diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/HarmonicServiceImpl.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/HarmonicServiceImpl.java index e1136600b..872eec463 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/HarmonicServiceImpl.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/HarmonicServiceImpl.java @@ -149,25 +149,24 @@ public class HarmonicServiceImpl implements IHarmonicService { List finalAllData = allData; deptList.forEach(item->{ List lineList = item.getLineIndexes(); - if (!CollectionUtils.isEmpty(lineList)){ + if (!CollectionUtils.isEmpty(lineList)){ - HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO(); - List collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList()); + HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO(); + List collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList()); - List sumList = finalAllData.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList()); + List sumList = finalAllData.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList()); - AreaDTO areaDTO = handleDataNew(collect, sumList, param.getStatisticalType().getCode()); + AreaDTO areaDTO = handleDataNew(collect, sumList, param.getStatisticalType().getCode()); - BeanUtil.copyProperties(areaDTO,harmonicDeptVO); - harmonicDeptVO.setId(item.getIndex()); - harmonicDeptVO.setName(item.getName()); - list.add(harmonicDeptVO); - } - - }); + BeanUtil.copyProperties(areaDTO,harmonicDeptVO); + harmonicDeptVO.setId(item.getIndex()); + harmonicDeptVO.setName(item.getName()); + list.add(harmonicDeptVO); + } + }); if (!CollectionUtils.isEmpty(list)){ - return list.stream().sorted(Comparator.comparing(HarmonicDeptVO::getRatio).reversed().thenComparing(HarmonicDeptVO::getOnlineCount).thenComparing(HarmonicDeptVO::getOverLineCount)).collect(Collectors.toList()); - } + return list.stream().sorted(Comparator.comparing(HarmonicDeptVO::getRatio).reversed().thenComparing(HarmonicDeptVO::getOnlineCount).thenComparing(HarmonicDeptVO::getOverLineCount)).collect(Collectors.toList()); + } return list; } @@ -440,7 +439,7 @@ public class HarmonicServiceImpl implements IHarmonicService { } else { avgOverDay = overLineCount == 0?0.0:BigDecimal.valueOf(overCountByDay*1.0/overLineCount).setScale(2, RoundingMode.HALF_UP).doubleValue(); } - //月监测点超标占比 + //月监测点符合性超标占比 ratio = map.size() == 0?0:BigDecimal.valueOf(ratio*100/map.size()).setScale(2, RoundingMode.HALF_UP).doubleValue(); areaDTO.setOnlineCount(onlineCount); areaDTO.setOverLineCount(overLineCount);