编制数统计按照子级部门汇总

上海中远重工组织架构图
Chengliang 5 months ago
parent 02e7b9c7b3
commit c8ae7519d3

@ -752,7 +752,7 @@ public class ChartServiceImpl extends Service implements ChartService {
DepartmentComInfo dept = new DepartmentComInfo();
ArrayList<Integer> list = new ArrayList<>();
list.add(stp.getDataId());
BaseBean bb = new BaseBean();
if (ModuleTypeEnum.departmentfielddefined.getValue().equals(stp.getType())) {
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
@ -764,10 +764,15 @@ public class ChartServiceImpl extends Service implements ChartService {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
String currentYearMonth = currentDateTime.format(formatter);
rs.executeQuery("select bzrs from uf_bzgljmb where bm = ? and ny = ?",stp.getDataId(),currentYearMonth);
if (rs.next()) {
stp.setStaffNum(Util.getIntValue(rs.getString("bzrs"),0));
// 部门编制人数向下汇总
List<Integer> bzList = new ArrayList<>();
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;

Loading…
Cancel
Save