|
@@ -49,29 +49,28 @@ public class PositionDataProviderEx extends ListDataProvider {
|
|
|
Long positionId = position.getLong("id");
|
|
Long positionId = position.getLong("id");
|
|
|
//在岗数:
|
|
//在岗数:
|
|
|
List<DynamicObject> personList = map.get(positionId);
|
|
List<DynamicObject> personList = map.get(positionId);
|
|
|
- if(personList == null)
|
|
|
|
|
- continue;
|
|
|
|
|
- //获取在岗数,排除兼职
|
|
|
|
|
- List filterList = personList.stream().filter(dyx -> dyx.getString("postype.number").equals("1010_S")).collect(Collectors.toList());
|
|
|
|
|
- personCount = filterList.size();
|
|
|
|
|
- position.set("nckd_personcount", personCount);
|
|
|
|
|
- //获取兼职数
|
|
|
|
|
- List filterList1 = personList.stream().filter(dyx -> dyx.getString("postype.number").equals("1020_S")).collect(Collectors.toList());
|
|
|
|
|
- personCountPart = filterList1.size();
|
|
|
|
|
- position.set("nckd_personcountpart", personCountPart);
|
|
|
|
|
|
|
+ if(personList != null) {
|
|
|
|
|
+ //获取在岗数,排除兼职
|
|
|
|
|
+ List filterList = personList.stream().filter(dyx -> dyx.getString("postype.number").equals("1010_S")).collect(Collectors.toList());
|
|
|
|
|
+ personCount = filterList.size();
|
|
|
|
|
+ position.set("nckd_personcount", personCount);
|
|
|
|
|
+ //获取兼职数
|
|
|
|
|
+ List filterList1 = personList.stream().filter(dyx -> dyx.getString("postype.number").equals("1020_S")).collect(Collectors.toList());
|
|
|
|
|
+ personCountPart = filterList1.size();
|
|
|
|
|
+ position.set("nckd_personcountpart", personCountPart);
|
|
|
|
|
+ //人员姓名拼接:
|
|
|
|
|
+ String personName = personList.stream().map(dyx -> dyx.getString("postype.number").equals("1010_S") ? dyx.getString("person.name") : dyx.getString("person.name") + "(兼)")
|
|
|
|
|
+ .collect(Collectors.joining(", "));
|
|
|
|
|
+ position.set("nckd_personname", personName);
|
|
|
|
|
+ }
|
|
|
//获取编制数
|
|
//获取编制数
|
|
|
if(staffMap.keySet().contains(positionId.toString())) {
|
|
if(staffMap.keySet().contains(positionId.toString())) {
|
|
|
staffCount = (int) ((Map) staffMap.get(positionId.toString())).get("staffNum");
|
|
staffCount = (int) ((Map) staffMap.get(positionId.toString())).get("staffNum");
|
|
|
position.set("nckd_staffcount", staffCount);
|
|
position.set("nckd_staffcount", staffCount);
|
|
|
}
|
|
}
|
|
|
- //人员姓名拼接:
|
|
|
|
|
- String personName = personList.stream().map(dyx -> dyx.getString("postype.number").equals("1010_S") ? dyx.getString("person.name") : dyx.getString("person.name") + "(兼)")
|
|
|
|
|
- .collect(Collectors.joining(", "));
|
|
|
|
|
- position.set("nckd_personname", personName);
|
|
|
|
|
//缺岗数 = 编制数 - 在岗数
|
|
//缺岗数 = 编制数 - 在岗数
|
|
|
position.set("nckd_lackcount", staffCount - personCount);
|
|
position.set("nckd_lackcount", staffCount - personCount);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return rows;
|
|
return rows;
|
|
|
}
|
|
}
|
|
|
|
|
|