fuliqi
2024-10-10 d268f82d25c25ebdc7a1ea30614f6cda6d3a9ae3
ycl-server/src/main/java/com/ycl/calculate/MonitorRegistrationCalculation.java
@@ -53,10 +53,15 @@
        List<TMonitorVO> monitorVOS = monitorMapper.selectMonitorVOList();
        areaStatsMap.forEach((key,areaStats)->{
            if(key.startsWith(ApiConstants.Province)){
                long count = monitorVOS.stream().filter(vo -> ApiConstants.TRUE.equals(vo.getProvinceTag()))
                long count = monitorVOS.stream().filter(TMonitorVO::getProvinceTag)
                        .filter(vo -> key.split("_")[1].equals(vo.getDeptId() + "")).count();
                areaStats.allFiles = Integer.parseInt(count+"");
            }else {
            }else if(key.startsWith(ApiConstants.Dept)){
                long count = monitorVOS.stream().filter(TMonitorVO::getDeptTag)
                        .filter(vo -> key.split("_")[1].equals(vo.getDeptId() + "")).count();
                areaStats.allFiles = Integer.parseInt(count+"");
            }
            else {
                long count = monitorVOS.stream().filter(vo -> key.equals(vo.getDeptId() + "")).count();
                areaStats.allFiles = Integer.parseInt(count+"");
            }