|
@@ -213,14 +213,19 @@ public class HomePageReportServiceImpl implements HomePageReportService {
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 水厂 3 水源 4 水位 12
|
|
|
|
|
|
+ * 水厂泵站 3 水源 4 水位 12
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public List<DeviceWaterSupply> monitorDataFifteenDays(Integer sceneId, String sceneType, Integer parmType) {
|
|
public List<DeviceWaterSupply> monitorDataFifteenDays(Integer sceneId, String sceneType, Integer parmType) {
|
|
|
|
+ BigDecimal multipleData;
|
|
|
|
+ if(sceneType.equals("泵站")){
|
|
|
|
+ multipleData = new BigDecimal("1");
|
|
|
|
+ }else{
|
|
|
|
+ multipleData = new BigDecimal("10000");
|
|
|
|
+ }
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
|
|
|
-
|
|
|
|
List<DeviceWaterSupply> deviceWaterSupplies = homePageReportMapper.getMonitorDataFifteenDays( sceneId, sceneType, parmType,
|
|
List<DeviceWaterSupply> deviceWaterSupplies = homePageReportMapper.getMonitorDataFifteenDays( sceneId, sceneType, parmType,
|
|
loginUser.getTenantId(),loginUser.getType(),loginUser.getPermissonType(),loginUser.getProgramItemList());
|
|
loginUser.getTenantId(),loginUser.getType(),loginUser.getPermissonType(),loginUser.getProgramItemList());
|
|
|
|
|
|
@@ -254,7 +259,7 @@ public class HomePageReportServiceImpl implements HomePageReportService {
|
|
} else {
|
|
} else {
|
|
deviceWaterSupplies.get(i).setOrderNo(i + 1);
|
|
deviceWaterSupplies.get(i).setOrderNo(i + 1);
|
|
if(parmType != 12 ){ //不是水位就除以1000 转化为万
|
|
if(parmType != 12 ){ //不是水位就除以1000 转化为万
|
|
- deviceWaterSupplies.get(i).amountConvert();
|
|
|
|
|
|
+ deviceWaterSupplies.get(i).amountConvert(multipleData);
|
|
}
|
|
}
|
|
deviceWaterSupplies.get(i).setDate(newLocalDate);
|
|
deviceWaterSupplies.get(i).setDate(newLocalDate);
|
|
}
|
|
}
|
|
@@ -342,9 +347,15 @@ public class HomePageReportServiceImpl implements HomePageReportService {
|
|
waterQualityRateForScene.setPressure(pressure!=null?pressure:new BigDecimal("100"));
|
|
waterQualityRateForScene.setPressure(pressure!=null?pressure:new BigDecimal("100"));
|
|
return waterQualityRateForScene;
|
|
return waterQualityRateForScene;
|
|
}
|
|
}
|
|
- //水厂制水、药耗、电耗对比曲线
|
|
|
|
|
|
+ //制水、药耗、电耗对比曲线
|
|
@Override
|
|
@Override
|
|
public List<WaterSupplyChart> waterEnergyConsumption( Integer sceneId,String sceneType) {
|
|
public List<WaterSupplyChart> waterEnergyConsumption( Integer sceneId,String sceneType) {
|
|
|
|
+ BigDecimal multipleData;
|
|
|
|
+ if(sceneType.equals("泵站")){
|
|
|
|
+ multipleData = new BigDecimal("1");
|
|
|
|
+ }else{
|
|
|
|
+ multipleData = new BigDecimal("10000");
|
|
|
|
+ }
|
|
|
|
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
LoginUser loginUser = UserUtil.getCurrentUser();
|
|
String tenantId = loginUser.getTenantId();
|
|
String tenantId = loginUser.getTenantId();
|
|
@@ -359,8 +370,8 @@ public class HomePageReportServiceImpl implements HomePageReportService {
|
|
WaterSupplyChart waterSupplyChartToday = new WaterSupplyChart();
|
|
WaterSupplyChart waterSupplyChartToday = new WaterSupplyChart();
|
|
waterSupplyChartToday.setSort(localDate.getDayOfMonth());
|
|
waterSupplyChartToday.setSort(localDate.getDayOfMonth());
|
|
waterSupplyChartToday.setDate(DateTimeFormatter.ofPattern("yyyy-MM-dd").format(localDate));
|
|
waterSupplyChartToday.setDate(DateTimeFormatter.ofPattern("yyyy-MM-dd").format(localDate));
|
|
- waterSupplyChartToday.setWaterData(waterDataCountDay.divide(new BigDecimal("10000"),3,BigDecimal.ROUND_HALF_UP));
|
|
|
|
- waterSupplyChartToday.setPowerData(powerDataCountDay);
|
|
|
|
|
|
+ waterSupplyChartToday.setWaterData(waterDataCountDay.divide(multipleData,3,BigDecimal.ROUND_HALF_UP));
|
|
|
|
+ waterSupplyChartToday.setPowerData(powerDataCountDay.divide(multipleData,3,BigDecimal.ROUND_HALF_UP));
|
|
waterSupplyChartToday.setDrugData(drugDataCountDay);
|
|
waterSupplyChartToday.setDrugData(drugDataCountDay);
|
|
|
|
|
|
|
|
|
|
@@ -375,9 +386,9 @@ public class HomePageReportServiceImpl implements HomePageReportService {
|
|
waterSupplyChart.setSort(waterSupplyData.getDay());
|
|
waterSupplyChart.setSort(waterSupplyData.getDay());
|
|
|
|
|
|
if (waterSupplyData.getParmType() == 3) { //供水
|
|
if (waterSupplyData.getParmType() == 3) { //供水
|
|
- waterSupplyChart.setWaterData(waterSupplyData.getAmount().divide(new BigDecimal("10000"),3,BigDecimal.ROUND_HALF_UP));
|
|
|
|
|
|
+ waterSupplyChart.setWaterData(waterSupplyData.getAmount().divide(multipleData,3,BigDecimal.ROUND_HALF_UP));
|
|
} else if (waterSupplyData.getParmType() == 5) {//电耗
|
|
} else if (waterSupplyData.getParmType() == 5) {//电耗
|
|
- waterSupplyChart.setPowerData(waterSupplyData.getAmount());
|
|
|
|
|
|
+ waterSupplyChart.setPowerData(waterSupplyData.getAmount().divide(multipleData,3,BigDecimal.ROUND_HALF_UP));
|
|
} else if (waterSupplyData.getParmType() == 6) {//药耗
|
|
} else if (waterSupplyData.getParmType() == 6) {//药耗
|
|
waterSupplyChart.setDrugData(waterSupplyData.getAmount());
|
|
waterSupplyChart.setDrugData(waterSupplyData.getAmount());
|
|
}
|
|
}
|