|
@@ -195,6 +195,7 @@ public class SecSupplyService {
|
|
|
waterPieDto.setWaterQuality(waterPieStateDto4);
|
|
|
|
|
|
|
|
|
+
|
|
|
List<ParmTypeCountDto> list = deviceParmService.findAlarmCount(deviceParmEntity);
|
|
|
//余氯11 浊度9 PH8 cod 15 15,8,9,11,18,19
|
|
|
for(ParmTypeCountDto item : list)
|
|
@@ -209,7 +210,7 @@ public class SecSupplyService {
|
|
|
waterPieStateDto1.setPercentage((double) (Math.round((Double.valueOf(listTotal.get(0).getTotalCount()- item.getNbnormalCount())/Double.valueOf(listTotal.get(0).getTotalCount()))*100)));
|
|
|
waterPieDto.setPh(waterPieStateDto1);
|
|
|
break;
|
|
|
- case 9:
|
|
|
+ case 10:
|
|
|
WaterPieStateDto waterPieStateDto2 = new WaterPieStateDto();
|
|
|
waterPieStateDto2.setNormalCount(listTotal.get(0).getTotalCount()- item.getNbnormalCount());
|
|
|
waterPieStateDto2.setNbnormalCount(item.getNbnormalCount());
|
|
@@ -227,6 +228,32 @@ public class SecSupplyService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(waterPieDto.getPh()==null)
|
|
|
+ {
|
|
|
+ WaterPieStateDto waterPieStateDto1 = new WaterPieStateDto();
|
|
|
+ waterPieStateDto1.setNormalCount(listTotal.get(0).getTotalCount());
|
|
|
+ waterPieStateDto1.setNbnormalCount(0);
|
|
|
+ DecimalFormat df1 = new DecimalFormat("#.00");
|
|
|
+ waterPieStateDto1.setPercentage((double) (Math.round((Double.valueOf(listTotal.get(0).getTotalCount())/Double.valueOf(listTotal.get(0).getTotalCount()))*100)));
|
|
|
+ waterPieDto.setPh(waterPieStateDto1);
|
|
|
+ }
|
|
|
+ if(waterPieDto.getTurbidity()==null)
|
|
|
+ {
|
|
|
+ WaterPieStateDto waterPieStateDto2 = new WaterPieStateDto();
|
|
|
+ waterPieStateDto2.setNormalCount(listTotal.get(0).getTotalCount());
|
|
|
+ waterPieStateDto2.setNbnormalCount(0);
|
|
|
+ DecimalFormat df2 = new DecimalFormat("#.00");
|
|
|
+ waterPieStateDto2.setPercentage((double) (Math.round((Double.valueOf(listTotal.get(0).getTotalCount())/Double.valueOf(listTotal.get(0).getTotalCount()))*100)));
|
|
|
+ waterPieDto.setTurbidity(waterPieStateDto2);
|
|
|
+ }
|
|
|
+ if(waterPieDto.getResidualChlorine()==null)
|
|
|
+ {
|
|
|
+ WaterPieStateDto waterPieStateDto3 = new WaterPieStateDto();
|
|
|
+ waterPieStateDto3.setNormalCount(listTotal.get(0).getTotalCount());
|
|
|
+ waterPieStateDto3.setNbnormalCount(0);
|
|
|
+ waterPieStateDto3.setPercentage((double) (Math.round((Double.valueOf(listTotal.get(0).getTotalCount())/Double.valueOf(listTotal.get(0).getTotalCount()))*100)));
|
|
|
+ waterPieDto.setResidualChlorine(waterPieStateDto3);
|
|
|
+ }
|
|
|
return waterPieDto;
|
|
|
}
|
|
|
}
|