编制数统计按照子级部门汇总
This commit is contained in:
parent
02e7b9c7b3
commit
c8ae7519d3
|
|
@ -752,7 +752,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
DepartmentComInfo dept = new DepartmentComInfo();
|
DepartmentComInfo dept = new DepartmentComInfo();
|
||||||
ArrayList<Integer> list = new ArrayList<>();
|
ArrayList<Integer> list = new ArrayList<>();
|
||||||
list.add(stp.getDataId());
|
list.add(stp.getDataId());
|
||||||
|
BaseBean bb = new BaseBean();
|
||||||
|
|
||||||
if (ModuleTypeEnum.departmentfielddefined.getValue().equals(stp.getType())) {
|
if (ModuleTypeEnum.departmentfielddefined.getValue().equals(stp.getType())) {
|
||||||
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
|
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
|
||||||
|
|
@ -764,10 +764,15 @@ public class ChartServiceImpl extends Service implements ChartService {
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||||
String currentYearMonth = currentDateTime.format(formatter);
|
String currentYearMonth = currentDateTime.format(formatter);
|
||||||
|
|
||||||
rs.executeQuery("select bzrs from uf_bzgljmb where bm = ? and ny = ?",stp.getDataId(),currentYearMonth);
|
// 部门编制人数向下汇总
|
||||||
if (rs.next()) {
|
List<Integer> bzList = new ArrayList<>();
|
||||||
stp.setStaffNum(Util.getIntValue(rs.getString("bzrs"),0));
|
rs.executeQuery("select bzrs from uf_bzgljmb where bm in ("+value+") and ny = ?",currentYearMonth);
|
||||||
|
while (rs.next()) {
|
||||||
|
bzList.add(Util.getIntValue(rs.getString("bzrs"), 0));
|
||||||
}
|
}
|
||||||
|
int sum = bzList.stream().mapToInt(Integer::intValue).sum();
|
||||||
|
stp.setStaffNum(sum);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return stp;
|
return stp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue