| | |
| | | //全年留存数 |
| | | int allFiles = 0; |
| | | } |
| | | //TODO:改为MonitorQualifyResult |
| | | @Override |
| | | public void calculate(List<MonitorQualifyResult> list) { |
| | | //获取分区域的指标数量 |
| | | Map<String, MonitorRegistrationCalculation.AreaStats> areaStatsMap = getAreaStatsMap(list); |
| | | Map<String, MonitorRegistrationCalculation.AreaStats> areaStatsMap = getAreaStatsMap(list,Boolean.TRUE); |
| | | if (areaStatsMap == null) return; |
| | | |
| | | //查数据库补充全年留存数 |
| | | 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+""); |
| | | } |