|
|
|
@ -134,13 +134,20 @@ public class DanikorResourceBackServiceImpl extends Service implements DanikorRe
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> getSummaryData(Map<String, Object> params) {
|
|
|
|
|
HashMap<String, Object> returnMap = new HashMap<>();
|
|
|
|
|
String companyTable = "hrmsubcompany";
|
|
|
|
|
String departmentTable = "hrmdepartment";
|
|
|
|
|
String resourceTable = "hrmresource";
|
|
|
|
|
String syncDate = Util.null2String(params.get("syncDate"));
|
|
|
|
|
if (DateUtil.getDate(new Date()).equals(syncDate)) {
|
|
|
|
|
if (StringUtils.isNotBlank(syncDate) && !DateUtil.getDate(new Date()).equals(syncDate)) {
|
|
|
|
|
companyTable += "_back";
|
|
|
|
|
departmentTable += "_back";
|
|
|
|
|
resourceTable += "_back";
|
|
|
|
|
} else {
|
|
|
|
|
syncDate = null;
|
|
|
|
|
}
|
|
|
|
|
returnMap.put("subcompany", getDanikorResourceMapper().summaryData("hrmsubcompany", syncDate));
|
|
|
|
|
returnMap.put("department", getDanikorResourceMapper().summaryData("hrmdepartment", syncDate));
|
|
|
|
|
returnMap.put("person", getDanikorResourceMapper().summaryData("hrmresource", syncDate));
|
|
|
|
|
returnMap.put("subcompany", getDanikorResourceMapper().summaryCompanyData(companyTable, syncDate));
|
|
|
|
|
returnMap.put("department", getDanikorResourceMapper().summaryDepartmentData(departmentTable, syncDate));
|
|
|
|
|
returnMap.put("person", getDanikorResourceMapper().summaryResourceData(resourceTable, syncDate));
|
|
|
|
|
return returnMap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|