This commit is contained in:
parent
e34a327c59
commit
424a133529
|
|
@ -126,7 +126,7 @@ public class CommonServiceImpl implements CommonService {
|
||||||
Map<String, Object> resultMap = dsSetService.getListDatas(SourceType.getSourceTypeByValue(sourceType),queryDto);
|
Map<String, Object> resultMap = dsSetService.getListDatas(SourceType.getSourceTypeByValue(sourceType),queryDto);
|
||||||
resultList = (List<Map<String, Object>>)resultMap.get("list");
|
resultList = (List<Map<String, Object>>)resultMap.get("list");
|
||||||
}
|
}
|
||||||
|
log.error("getListDatasBySourceName:[{}]",resultList);
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,15 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService
|
||||||
String currentDate = DateUtil.getCurrentMonth();
|
String currentDate = DateUtil.getCurrentMonth();
|
||||||
//人员编制统计数据 数据源
|
//人员编制统计数据 数据源
|
||||||
List<Map<String, Object>> datasBySourceList = commonService.getListDatasBySourceName("人员编制统计数据","LOGIC","weaver-hr-service");
|
List<Map<String, Object>> datasBySourceList = commonService.getListDatasBySourceName("人员编制统计数据","LOGIC","weaver-hr-service");
|
||||||
datasBySourceList = datasBySourceList.stream().filter(e->e.get("year").equals(params.get("adjustYear")) &&
|
datasBySourceList = datasBySourceList.stream().filter(e->CommonUtils.null2String(e.get("year")).equals(params.get("adjustYear")) &&
|
||||||
((List<Map<String,Object>>)e.get("orgId")).get(0).get("id").equals(params.get("adjustDepartment")) &&
|
CommonUtils.null2String(((List<Map<String,Object>>)e.get("orgId")).get(0).get("id")).equals(params.get("adjustDepartment")) &&
|
||||||
((List<Map<String,Object>>)e.get("planId")).get(0).get("id").equals(params.get("developPlan"))).collect(Collectors.toList());
|
CommonUtils.null2String(((List<Map<String,Object>>)e.get("planId")).get(0).get("id")).equals(params.get("developPlan"))).collect(Collectors.toList());
|
||||||
//人员编制控编维度统计数据(月度周期)
|
//人员编制控编维度统计数据(月度周期)
|
||||||
List<Map<String, Object>> personYdzqMonthList = commonService.getListDatasBySourceName("人员编制控编维度统计数据","LOGIC","weaver-hr-service");
|
List<Map<String, Object>> personYdzqMonthList = commonService.getListDatasBySourceName("人员编制控编维度统计数据","LOGIC","weaver-hr-service");
|
||||||
personYdzqMonthList = personYdzqMonthList.stream().filter(e->e.get("year").equals(params.get("adjustYear")) &&
|
personYdzqMonthList = personYdzqMonthList.stream().filter(e->e.get("year").equals(params.get("adjustYear")) &&
|
||||||
((List<Map<String,Object>>)e.get("orgId")).get(0).get("id").equals(params.get("adjustDepartment")) &&
|
CommonUtils.null2String(((List<Map<String,Object>>)e.get("orgId")).get(0).get("id")).equals(params.get("adjustDepartment")) &&
|
||||||
((List<Map<String,Object>>)e.get("position")).get(0).get("id").equals(params.get("position")) &&
|
CommonUtils.null2String(((List<Map<String,Object>>)e.get("position")).get(0).get("id")).equals(params.get("position")) &&
|
||||||
((List<Map<String,Object>>)e.get("grade")).get(0).get("id").equals(params.get("grade"))).collect(Collectors.toList());
|
CommonUtils.null2String(((List<Map<String,Object>>)e.get("grade")).get(0).get("id")).equals(params.get("grade"))).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
sql = "select * from e10_other_business.hr_est_history where org_id=? and cfg_id in ("+String.join(",",cfgIds)+")";
|
sql = "select * from e10_other_business.hr_est_history where org_id=? and cfg_id in ("+String.join(",",cfgIds)+")";
|
||||||
|
|
@ -54,42 +54,66 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService
|
||||||
String startDate = params.get("adjustYear")+"-01";
|
String startDate = params.get("adjustYear")+"-01";
|
||||||
List<Map<String, Object>> deparmentAdjust = Lists.newArrayList();
|
List<Map<String, Object>> deparmentAdjust = Lists.newArrayList();
|
||||||
List<Map<String, Object>> jobAdjust = Lists.newArrayList();
|
List<Map<String, Object>> jobAdjust = Lists.newArrayList();
|
||||||
|
log.error("datasBySourceList:[{}]",datasBySourceList);
|
||||||
|
log.error("personYdzqMonthList:[{}]",personYdzqMonthList);
|
||||||
for (int i=0;i<=11;i++){
|
for (int i=0;i<=11;i++){
|
||||||
Map<String,Object> dataMap = Maps.newHashMap();
|
Map<String,Object> dataMap = Maps.newHashMap();
|
||||||
Map<String,Object> dataMap2 = Maps.newHashMap();
|
Map<String,Object> dataMap2 = Maps.newHashMap();
|
||||||
|
|
||||||
String date = DateUtil.nextMonth(startDate,i, DateUtil.yyyyMM);
|
String date = DateUtil.nextMonth(startDate,i, DateUtil.yyyyMM);
|
||||||
int monthValue = DateUtil.getTime(date).getMonthValue();
|
int monthValue = DateUtil.getTime(date).getMonthValue();
|
||||||
List<Map<String, Object>> hrestCfg = dataList.stream().filter(e->e.get("cfg_month").equals(String.valueOf(monthValue))).collect(Collectors.toList());
|
List<Map<String, Object>> hrestCfg = dataList.stream().filter(e->CommonUtils.null2String(e.get("cfg_month")).equals(String.valueOf(monthValue))).collect(Collectors.toList());
|
||||||
if (hrestCfg.size() == 0){
|
if (hrestCfg.size() == 0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
log.error("hrestCfg: [{}]",hrestCfg);
|
||||||
|
dataMap.put("monthvalue",monthValue);
|
||||||
dataMap.put("bz",hrestCfg.get(0).get("est_count"));
|
dataMap.put("bz",hrestCfg.get(0).get("est_count"));
|
||||||
dataMap2.put("bz",hrestCfg.get(0).get("est_count"));
|
dataMap2.put("bz",hrestCfg.get(0).get("est_count"));
|
||||||
|
dataMap2.put("monthvalue",monthValue);
|
||||||
List<Map<String, Object>> hresthistory = historyList.stream().filter(e->e.get("cfg_id").equals(hrestCfg.get(0).get("id")) && e.get("history_month").equals(date)).collect(Collectors.toList());
|
List<Map<String, Object>> hresthistory = historyList.stream().filter(e->e.get("cfg_id").equals(hrestCfg.get(0).get("id")) && e.get("history_month").equals(date)).collect(Collectors.toList());
|
||||||
|
|
||||||
List<Map<String, Object>> personYdzqMonth = personYdzqMonthList.stream().filter(e->e.get("month").equals(String.valueOf(monthValue)) && e.get("cfgId").equals(hrestCfg.get(0).get("id"))).collect(Collectors.toList());
|
List<Map<String, Object>> personYdzqMonth = personYdzqMonthList.stream().filter(e->e.get("month").equals(String.valueOf(monthValue)) && e.get("cfgId").equals(hrestCfg.get(0).get("id"))).collect(Collectors.toList());
|
||||||
|
if (personYdzqMonth.size() > 0){
|
||||||
|
dataMap2.put("zz",personYdzqMonth.get(0).get("numberingCount"));
|
||||||
|
dataMap2.put("zy",personYdzqMonth.get(0).get("NumberComponent"));
|
||||||
|
dataMap2.put("ysf",personYdzqMonth.get(0).get("preSubEmpCount"));
|
||||||
|
dataMap2.put("kybz",personYdzqMonth.get(0).get("estLackCount"));
|
||||||
|
}else {
|
||||||
|
dataMap2.put("zz","");
|
||||||
|
dataMap2.put("zy","");
|
||||||
|
dataMap2.put("ysf","");
|
||||||
|
dataMap2.put("kybz","");
|
||||||
|
}
|
||||||
|
|
||||||
dataMap2.put("zz",personYdzqMonth.get(0).get("numberingCount"));
|
|
||||||
dataMap2.put("zy",personYdzqMonth.get(0).get("NumberComponent"));
|
|
||||||
dataMap2.put("ysf",personYdzqMonth.get(0).get("preSubEmpCount"));
|
|
||||||
dataMap2.put("kybz",personYdzqMonth.get(0).get("estLackCount"));
|
|
||||||
if (DateUtil.getTime(date).compareTo(DateUtil.getTime(currentDate))<0){
|
if (DateUtil.getTime(date).compareTo(DateUtil.getTime(currentDate))<0){
|
||||||
//取历史
|
//取历史
|
||||||
|
if (hresthistory.size() > 0){
|
||||||
dataMap.put("zz",hresthistory.get(0).get("est_count"));
|
dataMap.put("zz",hresthistory.get(0).get("est_count"));
|
||||||
dataMap.put("zy",hresthistory.get(0).get("pre_add_count"));
|
dataMap.put("zy",hresthistory.get(0).get("pre_add_count"));
|
||||||
dataMap.put("ysf",hresthistory.get(0).get("pre_sub_count"));
|
dataMap.put("ysf",hresthistory.get(0).get("pre_sub_count"));
|
||||||
int kybz = Integer.valueOf(dataMap.get("bz").toString())-Integer.valueOf(dataMap.get("zz").toString())-Integer.valueOf(dataMap.get("zy").toString());
|
int kybz = Integer.valueOf(dataMap.get("bz").toString())-Integer.valueOf(dataMap.get("zz").toString())-Integer.valueOf(dataMap.get("zy").toString());
|
||||||
dataMap.put("kybz",kybz);
|
dataMap.put("kybz",kybz);
|
||||||
|
}else {
|
||||||
|
dataMap.put("zz","");
|
||||||
|
dataMap.put("zy","");
|
||||||
|
dataMap.put("ysf","");
|
||||||
|
dataMap.put("kybz","");
|
||||||
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//取数据源
|
//取数据源
|
||||||
dataMap.put("zz",datasBySourceList.get(0).get("numberingCount"));
|
if (datasBySourceList.size() > 0){
|
||||||
dataMap.put("zy",datasBySourceList.get(0).get("preAddEmpCount"));
|
dataMap.put("zz",datasBySourceList.get(0).get("numberingCount"));
|
||||||
dataMap.put("ysf",datasBySourceList.get(0).get("preSubEmpCount"));
|
dataMap.put("zy",datasBySourceList.get(0).get("preAddEmpCount"));
|
||||||
dataMap.put("kybz",datasBySourceList.get(0).get("estLackCount"));
|
dataMap.put("ysf",datasBySourceList.get(0).get("preSubEmpCount"));
|
||||||
|
dataMap.put("kybz",datasBySourceList.get(0).get("estLackCount"));
|
||||||
|
}else {
|
||||||
|
dataMap.put("zz","");
|
||||||
|
dataMap.put("zy","");
|
||||||
|
dataMap.put("ysf","");
|
||||||
|
dataMap.put("kybz","");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
deparmentAdjust.add(dataMap);
|
deparmentAdjust.add(dataMap);
|
||||||
jobAdjust.add(dataMap2);
|
jobAdjust.add(dataMap2);
|
||||||
|
|
@ -98,6 +122,6 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService
|
||||||
resultMap.put("deparmentAdjust",deparmentAdjust);
|
resultMap.put("deparmentAdjust",deparmentAdjust);
|
||||||
resultMap.put("jobAdjust",jobAdjust);
|
resultMap.put("jobAdjust",jobAdjust);
|
||||||
|
|
||||||
return null;
|
return resultMap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue