diff --git a/src/com/engine/organization/service/impl/ChartServiceImpl.java b/src/com/engine/organization/service/impl/ChartServiceImpl.java index 4d496539..a7109a69 100644 --- a/src/com/engine/organization/service/impl/ChartServiceImpl.java +++ b/src/com/engine/organization/service/impl/ChartServiceImpl.java @@ -765,7 +765,7 @@ public class ChartServiceImpl extends Service implements ChartService { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM"); String currentYearMonth = currentDateTime.format(formatter); - // 部门编制人数向下汇总 20250122 优化需求 + // 部门编制人数向下汇总 20250122 优化需求 ==》需求变更20250205 不使用年月字段 数据存在即汇总统计 List bzList = new ArrayList<>(); rs.executeQuery("select bzrs,ny from uf_bzgljmb where bm in ("+value+")"); while (rs.next()) { @@ -778,16 +778,16 @@ public class ChartServiceImpl extends Service implements ChartService { int sum = 0; if (bzList.size() > 0) { - Map> groupedByMonthYear = bzList.stream() - .collect(Collectors.groupingBy(ModeStaffPO::getMonthYear)); - - // 获取最新的 monthYear - String latestMonthYear = groupedByMonthYear.keySet().stream() - .max(String::compareTo) - .orElse(null); - - List modeStaffPOS = groupedByMonthYear.get(latestMonthYear); - sum = modeStaffPOS.stream().mapToInt(ModeStaffPO::getCount).sum(); +// Map> groupedByMonthYear = bzList.stream() +// .collect(Collectors.groupingBy(ModeStaffPO::getMonthYear)); +// +// // 获取最新的 monthYear +// String latestMonthYear = groupedByMonthYear.keySet().stream() +// .max(String::compareTo) +// .orElse(null); + +// List modeStaffPOS = groupedByMonthYear.get(latestMonthYear); + sum = bzList.stream().mapToInt(ModeStaffPO::getCount).sum(); }