微调
This commit is contained in:
@@ -149,25 +149,24 @@ public class HarmonicServiceImpl implements IHarmonicService {
|
||||
List<RStatLimitTargetDPO> finalAllData = allData;
|
||||
deptList.forEach(item->{
|
||||
List<String> lineList = item.getLineIndexes();
|
||||
if (!CollectionUtils.isEmpty(lineList)){
|
||||
if (!CollectionUtils.isEmpty(lineList)){
|
||||
|
||||
HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO();
|
||||
List<RStatLimitTargetDPO> collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
||||
HarmonicDeptVO harmonicDeptVO = new HarmonicDeptVO();
|
||||
List<RStatLimitTargetDPO> collect = limitTargetNew.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
||||
|
||||
List<RStatLimitTargetDPO> sumList = finalAllData.stream().filter(x -> lineList.contains(x.getLineId())).collect(Collectors.toList());
|
||||
List<RStatLimitTargetDPO> 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);
|
||||
|
||||
Reference in New Issue
Block a user