diff --git a/mh-admin/src/main/java/com/mh/web/controller/energy/HowWaterRevenueEnergyController.java b/mh-admin/src/main/java/com/mh/web/controller/energy/HowWaterRevenueEnergyController.java new file mode 100644 index 0000000..cf21e2b --- /dev/null +++ b/mh-admin/src/main/java/com/mh/web/controller/energy/HowWaterRevenueEnergyController.java @@ -0,0 +1,58 @@ +package com.mh.web.controller.energy; + +import com.mh.common.core.controller.BaseController; +import com.mh.common.core.page.PageDomain; +import com.mh.common.core.page.TableDataInfo; +import com.mh.common.core.page.TableSupport; +import com.mh.system.service.energy.IEnergyQueryService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author LJF + * @version 1.0 + * @project EEMCS + * @description 中央热水收益分析 + * @date 2026-05-13 08:37:12 + */ +@RestController +@RequestMapping("/hot_water_revenue") +public class HowWaterRevenueEnergyController extends BaseController { + + private final IEnergyQueryService energyQueryService; + + public HowWaterRevenueEnergyController(IEnergyQueryService iEnergyQueryService) { + this.energyQueryService = iEnergyQueryService; + } + + @GetMapping(value = "/energySum") + public TableDataInfo queryEnergySum(@RequestParam(value = "buildingId", required = false) String buildingId, + @RequestParam(value = "startDate", required = false) String startDate, + @RequestParam(value = "endDate", required = false) String endDate, + @RequestParam(value = "type", required = true) Integer type) { + startPage(); + List result = energyQueryService.queryRevenueEnergyDataSumList(buildingId, startDate, endDate, type); + return getDataTable(result); + } + + @GetMapping("/query") + public TableDataInfo queryEnergy(@RequestParam(value = "buildingId", required = false) String buildingId, + @RequestParam(value = "startDate", required = false) String startDate, + @RequestParam(value = "endDate", required = false) String endDate, + @RequestParam(value = "type") int type) { + startPage(); + List result = energyQueryService.queryRevenueEnergyDataList(buildingId, startDate, endDate, type); + TableDataInfo dataTable = getDataTable(result); + // 或者总条数数据 + PageDomain pageDomain = TableSupport.buildPageRequest(); + pageDomain.setPageNum(0); + List result1 = energyQueryService.queryRevenueEnergyDataList(buildingId, startDate, endDate, type); + dataTable.setTotal(result1.size()); + return dataTable; + } + +} diff --git a/mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java b/mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java index d49229f..a449cd0 100644 --- a/mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java +++ b/mh-admin/src/main/java/com/mh/web/controller/report/ReportHotWaterController.java @@ -6,6 +6,7 @@ import com.mh.common.core.controller.BaseController; import com.mh.common.core.domain.AjaxResult; import com.mh.common.core.domain.dto.BFloorReportHotWaterDTO; import com.mh.common.core.domain.dto.ThreeFloorReportHotWaterDTO; +import com.mh.common.core.domain.entity.FloorInfo; import com.mh.common.core.domain.entity.ReportHotWaterParamHis; import com.mh.common.core.domain.entity.ReportSysRunParamHis; import com.mh.common.core.page.TableDataInfo; @@ -14,6 +15,7 @@ import com.mh.common.utils.file.handle.ExcelFillCellMergeHandler; import com.mh.common.utils.file.handle.ReportSysParamHandler; import com.mh.common.utils.file.handle.RowHeightStyleHandler; import com.mh.system.service.report.IReportHotWaterService; +import com.mh.system.service.space.IFloorInfoService; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; @@ -37,9 +39,12 @@ import java.util.stream.Collectors; public class ReportHotWaterController extends BaseController { private final IReportHotWaterService reportHotWaterService; + + private final IFloorInfoService floorInfoService; - private ReportHotWaterController(IReportHotWaterService reportHotWaterService) { + private ReportHotWaterController(IReportHotWaterService reportHotWaterService, IFloorInfoService floorInfoService) { this.reportHotWaterService = reportHotWaterService; + this.floorInfoService = floorInfoService; } @PostMapping("/list") @@ -48,6 +53,12 @@ public class ReportHotWaterController extends BaseController { if (reportHotWaterParamHis.getPageNum() != 0) { PageHelper.startPage(reportHotWaterParamHis.getPageNum(), reportHotWaterParamHis.getPageSize()); } + FloorInfo floorInfo = floorInfoService.selectFloorInfoById(reportHotWaterParamHis.getFloorId()); + if (floorInfo == null) { + throw new IllegalArgumentException("Floor not found"); + } else { + reportHotWaterParamHis.setFloorId(reportHotWaterParamHis.getFloorId() + "_" + floorInfo.getFloorName()); + } List list = reportHotWaterService.selectList(reportHotWaterParamHis); return getDataTable(list); } @@ -55,6 +66,12 @@ public class ReportHotWaterController extends BaseController { @PutMapping("/edit") public AjaxResult edit(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis) { +// FloorInfo floorInfo = floorInfoService.selectFloorInfoById(reportHotWaterParamHis.getFloorId()); +// if (floorInfo == null) { +// throw new IllegalArgumentException("Floor not found"); +// } else { +// reportHotWaterParamHis.setFloorId(reportHotWaterParamHis.getFloorId() + "_" + floorInfo.getFloorName()); +// } return toAjax(reportHotWaterService.updateRunParams(reportHotWaterParamHis)); } @@ -64,6 +81,13 @@ public class ReportHotWaterController extends BaseController { try { String fileName = "热水热泵运行记录表.xlsx"; String floorId = reportHotWaterParamHis.getFloorId(); + FloorInfo floorInfo = floorInfoService.selectFloorInfoById(floorId); + if (floorInfo == null) { + throw new IllegalArgumentException("Floor not found"); + } else { + floorId = floorId + "_" + floorInfo.getFloorName(); + reportHotWaterParamHis.setFloorId(floorId); + } String headTitle = "热水热泵运行记录表"; if (!StringUtils.isBlank(floorId)) { if (floorId.contains("主楼")) { @@ -123,6 +147,8 @@ public class ReportHotWaterController extends BaseController { deviceInfoDTO.setStatusSwitchHotPumpOneStr(info.getStatusSwitchHotPumpOne() == 1 ? "开机" : "关机"); deviceInfoDTO.setStatusRunHotPumpTwoStr(info.getStatusRunHotPumpTwo() == 1 ? "运行" : "不运行"); deviceInfoDTO.setStatusSwitchHotPumpTwoStr(info.getStatusSwitchHotPumpTwo() == 1 ? "开机" : "关机"); + deviceInfoDTO.setStatusRunCyclePumpOneStr(info.getStatusRunCyclePumpOne() == 1 ? "运行" : "不运行"); + deviceInfoDTO.setStatusRunCyclePumpTwoStr(info.getStatusRunCyclePumpTwo() == 1 ? "运行" : "不运行"); // deviceInfoDTO.setStatusRunHotPumpThreeStr(info.getStatusRunHotPumpThree() == 1 ? "运行" : "不运行"); // deviceInfoDTO.setStatusSwitchHotPumpThreeStr(info.getStatusSwitchHotPumpThree() == 1 ? "开机" : "关机"); // deviceInfoDTO.setStatusRunHotPumpFourStr(info.getStatusRunHotPumpFour() == 1 ? "运行" : "不运行"); diff --git a/mh-admin/src/test/java/com/mh/MHApplicationTest.java b/mh-admin/src/test/java/com/mh/MHApplicationTest.java index 54a721c..c4d1626 100644 --- a/mh-admin/src/test/java/com/mh/MHApplicationTest.java +++ b/mh-admin/src/test/java/com/mh/MHApplicationTest.java @@ -11,6 +11,7 @@ import com.mh.common.utils.StringUtils; import com.mh.quartz.task.DealDataTask; import com.mh.quartz.task.GGDataTask; import com.mh.quartz.task.GetWeatherDataTask; +import com.mh.quartz.task.HotWaterTask; import com.mh.system.mapper.device.DataProcessMapper; import com.mh.system.service.ISysParamsService; import com.mh.system.service.ISysUserService; @@ -42,6 +43,53 @@ public class MHApplicationTest { @Autowired private ISysUserService sysUserService; + @Autowired + private HotWaterTask hotWaterTask; + + @Test + public void hotWaterTask() { + hotWaterTask.calcEnergyData("2026-04-10 11:00:00"); + } + + @Test + public void hotWaterTaskWithTimeRange() { + // 定义起始时间和结束时间 + String startTimeStr = "2026-05-12 00:00:00"; + String endTimeStr = "2026-05-12 23:00:00"; + + try { + java.time.LocalDateTime startTime = java.time.LocalDateTime.parse(startTimeStr, + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + java.time.LocalDateTime endTime = java.time.LocalDateTime.parse(endTimeStr, + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + java.time.LocalDateTime currentTime = startTime; + int count = 0; + + while (!currentTime.isAfter(endTime)) { + String timeStr = currentTime.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + System.out.println("正在处理时间: " + timeStr); + + try { + hotWaterTask.calcFloorEnergyData(timeStr); + count++; + } catch (Exception e) { + System.err.println("处理时间 " + timeStr + " 时发生错误: " + e.getMessage()); + e.printStackTrace(); + } + + // 增加一小时 + currentTime = currentTime.plusHours(1); + } + + System.out.println("完成!共处理了 " + count + " 个时间点的数据"); + + } catch (Exception e) { + System.err.println("时间范围处理过程中发生错误: " + e.getMessage()); + e.printStackTrace(); + } + } + @Test public void test() throws Exception { SysUser sysUser = sysUserService.selectUserById(1L); diff --git a/mh-common/src/main/java/com/mh/common/core/domain/dto/BFloorReportHotWaterDTO.java b/mh-common/src/main/java/com/mh/common/core/domain/dto/BFloorReportHotWaterDTO.java index 5c82413..ee92a83 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/dto/BFloorReportHotWaterDTO.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/dto/BFloorReportHotWaterDTO.java @@ -315,23 +315,23 @@ public class BFloorReportHotWaterDTO { // @ColumnWidth(10) // private String statusRunSupplyPumpFourStr; - // 主楼液位1(米) - @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱1液位%"}, index = 33) + // 贵宾楼液位1(米) + @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱1液位(米)"}, index = 33) @ColumnWidth(10) private BigDecimal levelWaterTankOne; // 主楼液位2(米) - @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱2液位%"}, index = 34) - @ColumnWidth(10) - private BigDecimal levelWaterTankTwo; +// @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱2液位(米)"}, index = 34) +// @ColumnWidth(10) +// private BigDecimal levelWaterTankTwo; // 巡查记录人 - @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 35) + @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 34) @ColumnWidth(20) private String recorder; // 备注信息 - @ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 36) + @ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 35) @ColumnWidth(20) private String remark; diff --git a/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterNowDataDTO.java b/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterNowDataDTO.java index 4757bca..d6d0505 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterNowDataDTO.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterNowDataDTO.java @@ -50,6 +50,8 @@ public class HotWaterNowDataDTO { private String loopPumpState1; // 1循环泵状态:0:关机 1:运行 2:故障 private String loopPumpState2; // 2循环泵状态:0:关机 1:运行 2:故障 + + private String gatewayStatus; // 网关状态 0:离线,1:在线 private int orderNum; diff --git a/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterRevenueSumDTO.java b/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterRevenueSumDTO.java new file mode 100644 index 0000000..11884ff --- /dev/null +++ b/mh-common/src/main/java/com/mh/common/core/domain/dto/HotWaterRevenueSumDTO.java @@ -0,0 +1,77 @@ +package com.mh.common.core.domain.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.math.BigDecimal; +import java.util.StringJoiner; + +/** + * @author LJF + * @version 1.0 + * @project EEMCS + * @description 热水收益总的收益情况 + * @date 2026-05-13 09:33:27 + */ +@Setter +@Getter +public class HotWaterRevenueSumDTO { + + /** + * 时间 + */ + private String curDate; + + /** + * 建筑id + */ + private String buildingId; + + // 电表用量 + private BigDecimal totalUseEleAmount; + + // 电量单价 + private BigDecimal electPrice; + + // 用电金额 + private BigDecimal totalUseEle; + + // 水表用量 + private BigDecimal totalUseWaterAmount; + + // 水价 + private BigDecimal waterPrice; + + // 用水金额 + private BigDecimal totalUseWater; + + // 平均电表用量 + private BigDecimal avgUseEle; + + // 平均水表用量 + private BigDecimal avgUseWater; + + // 单耗 + private BigDecimal unitConsumption; + + // 收益总额 + private BigDecimal totalIncome; + + @Override + public String toString() { + return new StringJoiner(", ", HotWaterRevenueSumDTO.class.getSimpleName() + "[", "]") + .add("curDate='" + curDate + "'") + .add("buildingId='" + buildingId + "'") + .add("totalUseEleAmount=" + totalUseEleAmount) + .add("electPrice=" + electPrice) + .add("totalUseEle=" + totalUseEle) + .add("totalUseWaterAmount=" + totalUseWaterAmount) + .add("waterPrice=" + waterPrice) + .add("totalUseWater=" + totalUseWater) + .add("avgUseEle=" + avgUseEle) + .add("avgUseWater=" + avgUseWater) + .add("unitConsumption=" + unitConsumption) + .add("totalIncome=" + totalIncome) + .toString(); + } +} diff --git a/mh-common/src/main/java/com/mh/common/core/domain/dto/ThreeFloorReportHotWaterDTO.java b/mh-common/src/main/java/com/mh/common/core/domain/dto/ThreeFloorReportHotWaterDTO.java index 3ec1c1b..8ab58bc 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/dto/ThreeFloorReportHotWaterDTO.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/dto/ThreeFloorReportHotWaterDTO.java @@ -187,23 +187,33 @@ public class ThreeFloorReportHotWaterDTO { // @ColumnWidth(10) // private String statusRunSupplyPumpFourStr; + // 主楼与贵宾楼1号循环泵运行状态 + @ExcelProperty(value = {"${deviceType}", "主楼与贵宾楼循环泵", "1号循环泵运行状态"}, index = 9) + @ColumnWidth(10) + private String statusRunCyclePumpOneStr; + + // 主楼与贵宾楼2号循环泵运行状态 + @ExcelProperty(value = {"${deviceType}", "主楼与贵宾楼循环泵", "2号循环泵运行状态"}, index = 10) + @ColumnWidth(10) + private String statusRunCyclePumpTwoStr; + // 主楼水箱1 - @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱1液位%"}, index = 9) + @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱1液位(米)"}, index = 11) @ColumnWidth(10) private BigDecimal levelWaterTankOne; // 主楼水箱2 - @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱2液位%"}, index = 10) + @ExcelProperty(value = {"${deviceType}", "水箱液位", "水箱2液位(米)"}, index = 12) @ColumnWidth(10) private BigDecimal levelWaterTankTwo; // 巡查记录人 - @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 11) + @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 13) @ColumnWidth(20) private String recorder; // 备注信息 - @ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 12) + @ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 14) @ColumnWidth(20) private String remark; diff --git a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyBaseSum.java b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyBaseSum.java new file mode 100644 index 0000000..8dc68d4 --- /dev/null +++ b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyBaseSum.java @@ -0,0 +1,70 @@ +package com.mh.common.core.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author LJF + * @version 1.0 + * @project EEMCS + * @description 热水Sum基础类 + * @date 2026-05-13 09:50:45 + */ +@Data +public class EnergyBaseSum { + + private String id; + + /** + * 时间 + */ + private String curDate; + + /** + * 建筑id + */ + private String buildingId; + + /** + * 补水 + */ + private BigDecimal fillWater; + + /** + * 补水与昨日比 + */ + private String fillWaterP; + + /** + * 用水 + */ + private BigDecimal waterValue; + + /** + * 用水与昨日比 + */ + private String waterP; + + /** + * 用电量 + */ + private BigDecimal electValue; + + /** + * 用电与昨日比 + */ + private String electP; + + /** + * 单耗 + */ + private BigDecimal electWater; + + /** + * 单耗与昨日比 + */ + private String electWaterP; +} diff --git a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyDaySum.java b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyDaySum.java index 4004568..8c04d65 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyDaySum.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyDaySum.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import java.math.BigDecimal; @@ -14,61 +15,12 @@ import java.math.BigDecimal; * @description 热水时间能耗实体类 * @date 2025-06-18 14:28:30 */ +@EqualsAndHashCode(callSuper = true) @Data @TableName("energy_day_sum") -public class EnergyDaySum { +public class EnergyDaySum extends EnergyBaseSum { @TableId(value = "id", type = IdType.ASSIGN_UUID) private String id; - /** - * 时间 - */ - private String curDate; - - /** - * 建筑id - */ - private String buildingId; - - /** - * 补水 - */ - private BigDecimal fillWater; - - /** - * 补水与昨日比 - */ - private String fillWaterP; - - /** - * 用水 - */ - private BigDecimal waterValue; - - /** - * 用水与昨日比 - */ - private String waterP; - - /** - * 用电量 - */ - private BigDecimal electValue; - - /** - * 用电与昨日比 - */ - private String electP; - - /** - * 单耗 - */ - private BigDecimal electWater; - - /** - * 单耗与昨日比 - */ - private String electWaterP; - } diff --git a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyMonthSum.java b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyMonthSum.java index 5251ad0..11fb295 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyMonthSum.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyMonthSum.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import java.math.BigDecimal; @@ -14,61 +15,12 @@ import java.math.BigDecimal; * @description 热水时间能耗实体类 * @date 2025-06-18 14:28:30 */ +@EqualsAndHashCode(callSuper = true) @Data @TableName("energy_month_sum") -public class EnergyMonthSum { +public class EnergyMonthSum extends EnergyBaseSum { @TableId(value = "id", type = IdType.ASSIGN_UUID) private String id; - /** - * 时间 - */ - private String curDate; - - /** - * 建筑id - */ - private String buildingId; - - /** - * 补水 - */ - private BigDecimal fillWater; - - /** - * 补水与昨日比 - */ - private String fillWaterP; - - /** - * 用水 - */ - private BigDecimal waterValue; - - /** - * 用水与昨日比 - */ - private String waterP; - - /** - * 用电量 - */ - private BigDecimal electValue; - - /** - * 用电与昨日比 - */ - private String electP; - - /** - * 单耗 - */ - private BigDecimal electWater; - - /** - * 单耗与昨日比 - */ - private String electWaterP; - } diff --git a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyYearSum.java b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyYearSum.java index 93a15b3..13607b2 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyYearSum.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/entity/EnergyYearSum.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import java.math.BigDecimal; @@ -14,61 +15,12 @@ import java.math.BigDecimal; * @description 热水时间能耗实体类 * @date 2025-06-18 14:28:30 */ +@EqualsAndHashCode(callSuper = true) @Data @TableName("energy_month_sum") -public class EnergyYearSum { +public class EnergyYearSum extends EnergyBaseSum { @TableId(value = "id", type = IdType.ASSIGN_UUID) private String id; - /** - * 时间 - */ - private String curDate; - - /** - * 建筑id - */ - private String buildingId; - - /** - * 补水 - */ - private BigDecimal fillWater; - - /** - * 补水与昨日比 - */ - private String fillWaterP; - - /** - * 用水 - */ - private BigDecimal waterValue; - - /** - * 用水与昨日比 - */ - private String waterP; - - /** - * 用电量 - */ - private BigDecimal electValue; - - /** - * 用电与昨日比 - */ - private String electP; - - /** - * 单耗 - */ - private BigDecimal electWater; - - /** - * 单耗与昨日比 - */ - private String electWaterP; - } diff --git a/mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java b/mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java index 5a3f01c..4d9d3eb 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/entity/ReportHotWaterParamHis.java @@ -176,6 +176,12 @@ public class ReportHotWaterParamHis extends BaseEntity implements Serializable { // 中区/中厨液位(米) private BigDecimal levelWaterTankTwo; + + // 主楼与贵宾楼循环泵1 + private Integer statusRunCyclePumpOne; + + // 主楼与贵宾楼循环泵2 + private Integer statusRunCyclePumpTwo; // 巡查记录人 private String recorder; diff --git a/mh-common/src/main/java/com/mh/common/core/domain/vo/DeviceMonitorVO.java b/mh-common/src/main/java/com/mh/common/core/domain/vo/DeviceMonitorVO.java index cdb683b..eb07990 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/vo/DeviceMonitorVO.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/vo/DeviceMonitorVO.java @@ -62,6 +62,8 @@ public class DeviceMonitorVO { private int orderNum; + private String gatewayId; + @Override public String toString() { return new ToStringBuilder(this) @@ -74,6 +76,7 @@ public class DeviceMonitorVO { .append("collectValue", collectValue) .append("paramType", paramType) .append("orderNum", orderNum) + .append("gatewayId", gatewayId) .toString(); } } diff --git a/mh-common/src/main/java/com/mh/common/utils/DateUtils.java b/mh-common/src/main/java/com/mh/common/utils/DateUtils.java index f2593dc..d85c7c6 100644 --- a/mh-common/src/main/java/com/mh/common/utils/DateUtils.java +++ b/mh-common/src/main/java/com/mh/common/utils/DateUtils.java @@ -506,4 +506,43 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils } return null; } + + public static int dayDiff(String startDate, String endDate) { + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Date start = sdf.parse(startDate); + Date end = sdf.parse(endDate); + long diff = (end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000); + return Math.abs((int) diff) + 1; + } catch (ParseException e) { + return 0; + } + } + + public static int monthDiff(String startDate, String endDate) { + try { + if (startDate == null || endDate == null || startDate.isEmpty() || endDate.isEmpty()) { + return 0; + } + + LocalDate start = LocalDate.parse(startDate + "-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDate end = LocalDate.parse(endDate + "-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")); + + Period period = Period.between(start, end); + int months = period.getYears() * 12 + period.getMonths(); + + return Math.abs(months)+1; + } catch (Exception e) { + return 0; + } + } + + public static int yearDiff(String startDate, String endDate) { + try { + // startDate和endDate传入的值是“yyyy” + return Math.abs(Integer.parseInt(endDate) - Integer.parseInt(startDate))+1; + } catch (Exception e) { + return 0; + } + } } diff --git a/mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java b/mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java index 620f628..dcfa9df 100644 --- a/mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java +++ b/mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java @@ -254,6 +254,7 @@ public interface CollectionParamsManageMapper extends BaseMapper { @Select("select * from energy_day_sum where building_id = #{buildingId} and cur_date = #{startDate} ") List queryEnergyDaySum(String buildingId, String startDate); + + @Select("select * from energy_day_sum where building_id = #{buildingId} and cur_date between #{startDate} and #{endDate} ") + List queryRevenueEnergyDaySum(String buildingId, String startDate, String endDate); + } diff --git a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMonthSumMapper.java b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMonthSumMapper.java index 8822b0a..1e40c57 100644 --- a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMonthSumMapper.java +++ b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyMonthSumMapper.java @@ -20,4 +20,6 @@ public interface EnergyMonthSumMapper extends BaseMapper { @Select("select * from energy_month_sum where building_id = #{buildingId} and cur_date = #{startDate} ") List queryEnergyMonthSum(String buildingId, String startDate); + @Select("select * from energy_month_sum where building_id = #{buildingId} and cur_date between #{startDate} and #{endDate}") + List queryRevenueEnergyMonthSum(String buildingId, String startDate, String endDate); } diff --git a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyYearSumMapper.java b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyYearSumMapper.java index 542251e..5785c34 100644 --- a/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyYearSumMapper.java +++ b/mh-system/src/main/java/com/mh/system/mapper/energy/EnergyYearSumMapper.java @@ -20,5 +20,7 @@ public interface EnergyYearSumMapper extends BaseMapper { @Select("select * from energy_year_sum where building_id = #{buildingId} and cur_date = #{startDate} ") List queryEnergyYearSum(String buildingId, String startDate); - + + @Select("select * from energy_year_sum where building_id = #{buildingId} and cur_date between #{startDate} and #{endDate} ") + List queryRevenueEnergyYearSum(String buildingId, String startDate, String endDate); } diff --git a/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java index aa339b7..7e4ca01 100644 --- a/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/device/impl/CollectionParamsManageServiceImpl.java @@ -83,7 +83,7 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag "PLC1500_DB8304", // 压力瞬时值 "PLC1500_DB8308", // 流量瞬时值 "PLC1500_DB8320" //流量累积值 - ); + ); private static final List steamBoilerAO = List.of("DB611566", // 锅炉1-工作最小转速 "DB611550",// 锅炉1-工作最大转速 @@ -218,6 +218,7 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag /** * 处理otherName字段,按"-"分割并取最后一部分 + * * @param collectionParamsManages 待处理的集合 * @return 处理后的集合 */ @@ -765,9 +766,9 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag waterValves.stream() .filter(vo -> "11".equals(vo.getParamType()) && vo.getCollectValue() != null) .forEach(vo -> { - if (vo.getOrderNum()==1) { + if (vo.getOrderNum() == 1) { result.forEach(dto -> dto.setWaterLevel1(vo.getCollectValue())); - } else if (vo.getOrderNum()==2) { + } else if (vo.getOrderNum() == 2) { result.forEach(dto -> dto.setWaterLevel2(vo.getCollectValue())); } }); @@ -775,9 +776,9 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag waterValves.stream() .filter(vo -> "12".equals(vo.getParamType()) && vo.getCollectValue() != null) .forEach(vo -> { - if (vo.getOrderNum()==1) { + if (vo.getOrderNum() == 1) { result.forEach(dto -> dto.setTankWaterTemp(vo.getCollectValue())); - } else if (vo.getOrderNum()==2) { + } else if (vo.getOrderNum() == 2) { result.forEach(dto -> dto.setTankWaterTemp2(vo.getCollectValue())); } }); @@ -804,19 +805,19 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag waterLoopPumps.stream() .filter(vo -> "1".equals(vo.getParamType()) && vo.getCollectValue() != null) .forEach(vo -> { - if (vo.getOrderNum()==1) { + if (vo.getOrderNum() == 1) { result.forEach(dto -> dto.setLoopPumpState1(String.valueOf(new BigDecimal(vo.getCollectValue()).intValue()))); - } else if (vo.getOrderNum()==2) { + } else if (vo.getOrderNum() == 2) { result.forEach(dto -> dto.setLoopPumpState2(String.valueOf(new BigDecimal(vo.getCollectValue()).intValue()))); } }); // 在判断paramType=5值是否是1,如果是1,就赋值循环泵状态2 waterLoopPumps.stream() - .filter(vo -> "5".equals(vo.getParamType()) && vo.getCollectValue() != null && new BigDecimal(vo.getCollectValue()).intValue()==1) + .filter(vo -> "5".equals(vo.getParamType()) && vo.getCollectValue() != null && new BigDecimal(vo.getCollectValue()).intValue() == 1) .forEach(vo -> { - if (vo.getOrderNum()==1) { + if (vo.getOrderNum() == 1) { result.forEach(dto -> dto.setLoopPumpState1("2")); - } else if (vo.getOrderNum()==2) { + } else if (vo.getOrderNum() == 2) { result.forEach(dto -> dto.setLoopPumpState2("2")); } }); @@ -861,6 +862,19 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag // }); // } + // 处理网关在线状态 + String gatewayId = hotPumps.getFirst().getGatewayId(); + GatewayManage gatewayManage = gatewayManageMapper.selectById(gatewayId); + // 判断connectTime是否在30分钟内 + if (gatewayManage != null) { + Date connectTime = gatewayManage.getConnectTime(); + if (connectTime != null && new Date().getTime() - connectTime.getTime() <= 30 * 60 * 1000) { + result.forEach(dto -> dto.setGatewayStatus("1")); + } else { + result.forEach(dto -> dto.setGatewayStatus("0")); + } + } + // result再根据orderNum排序 return result.stream() .sorted(Comparator.comparingInt(HotWaterNowDataDTO::getOrderNum)) diff --git a/mh-system/src/main/java/com/mh/system/service/energy/IEnergyQueryService.java b/mh-system/src/main/java/com/mh/system/service/energy/IEnergyQueryService.java index ac55f09..8c7b623 100644 --- a/mh-system/src/main/java/com/mh/system/service/energy/IEnergyQueryService.java +++ b/mh-system/src/main/java/com/mh/system/service/energy/IEnergyQueryService.java @@ -53,4 +53,8 @@ public interface IEnergyQueryService { List queryAnalysisMonth(String curDate, String buildingId, int type); void calcAnalysisData(String lastHourTime); + + List queryRevenueEnergyDataSumList(String buildingId, String startDate, String endDate, Integer type); + + List queryRevenueEnergyDataList(String buildingId, String startDate, String endDate, int type); } diff --git a/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyQueryServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyQueryServiceImpl.java index 84805c0..0a97e25 100644 --- a/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyQueryServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyQueryServiceImpl.java @@ -1,6 +1,7 @@ package com.mh.system.service.energy.impl; import com.mh.common.core.domain.AjaxResult; +import com.mh.common.core.domain.dto.HotWaterRevenueSumDTO; import com.mh.common.core.domain.entity.*; import com.mh.common.core.domain.vo.EnergyQueryVO; import com.mh.common.utils.DateUtils; @@ -66,6 +67,190 @@ public class EnergyQueryServiceImpl implements IEnergyQueryService { @Resource AnalysisMapper analysisMapper; + + // 定义电价和水价 + private static final BigDecimal ELECTRIC_PRICE = new BigDecimal("0.7100"); + private static final BigDecimal WATER_PRICE = new BigDecimal("19.0000"); + + @Override + public List queryRevenueEnergyDataSumList(String buildingId, String startDate, String endDate, Integer type) { + if (StringUtils.isEmpty(buildingId)) { + return List.of(); + } + if (type==1){ + List energyDaySums = energyDaySumMapper.queryRevenueEnergyDaySum(buildingId, startDate, endDate); + // 查看startDate和endDate相差多少天 + int days = DateUtils.dayDiff(startDate, endDate); + return List.of(calculateRevenueSum(energyDaySums, days)); + }else if (type==2){ + List energyMonthSums = energyMonthSumMapper.queryRevenueEnergyMonthSum(buildingId,startDate,endDate); + // 查看startDate和endDate相差多少月 + int months = DateUtils.monthDiff(startDate, endDate); + return List.of(calculateRevenueSum(energyMonthSums, months)); + }else { + List energyYearSums = energyYearSumMapper.queryRevenueEnergyYearSum(buildingId,startDate,endDate); + // 查看startDate和endDate相差多少年 + int years = DateUtils.yearDiff(startDate, endDate); + return List.of(calculateRevenueSum(energyYearSums, years)); + } + } + + private HotWaterRevenueSumDTO calculateRevenueSum(List energySums, int diffTime) { + HotWaterRevenueSumDTO revenueSumDTO = new HotWaterRevenueSumDTO(); + + if (energySums == null || energySums.isEmpty()) { + revenueSumDTO.setTotalUseEle(BigDecimal.ZERO); + revenueSumDTO.setTotalUseWater(BigDecimal.ZERO); + revenueSumDTO.setAvgUseEle(BigDecimal.ZERO); + revenueSumDTO.setAvgUseWater(BigDecimal.ZERO); + revenueSumDTO.setUnitConsumption(BigDecimal.ZERO); + revenueSumDTO.setTotalIncome(BigDecimal.ZERO); + return revenueSumDTO; + } + + BigDecimal totalWaterValue = energySums.stream() + .map(EnergyBaseSum::getWaterValue) + .filter(Objects::nonNull) + .reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal totalElectValue = energySums.stream() + .map(EnergyBaseSum::getElectValue) + .filter(Objects::nonNull) + .reduce(BigDecimal.ZERO, BigDecimal::add); + +// int count = energySums.size(); +// // count如果type=1,就是日,需要看startDate和endDate的天数差 +// // count如果type=2,就是月,需要看startDate和endDate的月数差 +// // count如果type=3,就是年,需要看startDate和endDate的年数差 +// if (type == 1) { +// count = DateUtils.dayDiff(energySums.get(0).getCurDate(), energySums.get(energySums.size() - 1).getCurDate()); +// } else if (type == 2) { +// count = DateUtils.monthDiff(energySums.get(0).getCurDate(), energySums.get(energySums.size() - 1).getCurDate()); +// } else if (type == 3) { +// count = DateUtils.yearDiff(energySums.get(0).getCurDate(), energySums.get(energySums.size() - 1).getCurDate()); +// } + + + + BigDecimal unitConsumption = BigDecimal.ZERO; + if (totalWaterValue.compareTo(BigDecimal.ZERO) != 0) { + unitConsumption = totalElectValue.divide(totalWaterValue, 4, BigDecimal.ROUND_HALF_UP); + } + + BigDecimal waterRevenue = totalWaterValue.multiply(WATER_PRICE); + BigDecimal electCost = totalElectValue.multiply(ELECTRIC_PRICE); + BigDecimal totalIncome = waterRevenue.subtract(electCost).divide(new BigDecimal("1.06"), 4, BigDecimal.ROUND_HALF_UP); + + BigDecimal avgWaterValue = waterRevenue.divide(BigDecimal.valueOf(diffTime), 4, BigDecimal.ROUND_HALF_UP); + BigDecimal avgElectValue = electCost.divide(BigDecimal.valueOf(diffTime), 4, BigDecimal.ROUND_HALF_UP); + + revenueSumDTO.setTotalUseEle(electCost); + revenueSumDTO.setTotalUseWater(waterRevenue); + revenueSumDTO.setAvgUseEle(avgElectValue); + revenueSumDTO.setAvgUseWater(avgWaterValue); + revenueSumDTO.setUnitConsumption(unitConsumption); + revenueSumDTO.setTotalIncome(totalIncome); + + return revenueSumDTO; + } + + @Override + public List queryRevenueEnergyDataList(String buildingId, String startDate, String endDate, int type) { + if (StringUtils.isEmpty(buildingId)) { + return List.of(); + } + if (type == 0) { + List energyHours = energyHourMapper.queryEnergyHour(buildingId, startDate + " 00", endDate + " 23"); + // 遍历energyHours,然后计算用水金额,用电金额,总收入((水*19-电*0.71)/1.06),单耗,然后赋值给HotWaterRevenueSumDTO,并根据时间降序排序 + + return energyHours.stream() + .map(energyHour -> { + HotWaterRevenueSumDTO revenueSumDTO = new HotWaterRevenueSumDTO(); + revenueSumDTO.setCurDate(energyHour.getCurDate()); + + revenueSumDTO.setTotalUseEleAmount(energyHour.getElectValue().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setElectPrice(ELECTRIC_PRICE); + revenueSumDTO.setTotalUseEle(energyHour.getElectValue().multiply(ELECTRIC_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setTotalUseWaterAmount(energyHour.getUseHotWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setWaterPrice(WATER_PRICE); + revenueSumDTO.setTotalUseWater(energyHour.getUseHotWater().multiply(WATER_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setAvgUseEle(BigDecimal.ZERO); + revenueSumDTO.setAvgUseWater(BigDecimal.ZERO); + revenueSumDTO.setUnitConsumption(energyHour.getElectWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setTotalIncome(energyHour.getUseHotWater().multiply(WATER_PRICE).subtract(energyHour.getElectValue().multiply(ELECTRIC_PRICE)).divide(new BigDecimal("1.06"), 4, BigDecimal.ROUND_HALF_UP)); + return revenueSumDTO; + }) + .sorted(Comparator.comparing(HotWaterRevenueSumDTO::getCurDate).reversed()) + .collect(Collectors.toList()); + } else if(type==1) { + List energyDays = energyDayMapper.queryEnergyDay(buildingId, startDate, endDate); + return energyDays.stream() + .map(energyDay -> { + HotWaterRevenueSumDTO revenueSumDTO = new HotWaterRevenueSumDTO(); + revenueSumDTO.setCurDate(energyDay.getCurDate()); + revenueSumDTO.setTotalUseEleAmount(energyDay.getElectValue().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setElectPrice(ELECTRIC_PRICE); + revenueSumDTO.setTotalUseEle(energyDay.getElectValue().multiply(ELECTRIC_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setTotalUseWaterAmount(energyDay.getUseHotWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setWaterPrice(WATER_PRICE); + revenueSumDTO.setTotalUseWater(energyDay.getUseHotWater().multiply(WATER_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setAvgUseEle(BigDecimal.ZERO); + revenueSumDTO.setAvgUseWater(BigDecimal.ZERO); + revenueSumDTO.setUnitConsumption(energyDay.getElectWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setTotalIncome(energyDay.getUseHotWater().multiply(WATER_PRICE).subtract(energyDay.getElectValue().multiply(ELECTRIC_PRICE)).divide(new BigDecimal("1.06"), 4, BigDecimal.ROUND_HALF_UP)); + return revenueSumDTO; + }) + .sorted(Comparator.comparing(HotWaterRevenueSumDTO::getCurDate).reversed()) + .collect(Collectors.toList()); + } else if (type==2){ + List energyMonths = energyMonthMapper.queryEnergyMonth(buildingId, startDate, endDate); + return energyMonths.stream() + .map(energyMonth -> { + HotWaterRevenueSumDTO revenueSumDTO = new HotWaterRevenueSumDTO(); + revenueSumDTO.setCurDate(energyMonth.getCurDate()); + revenueSumDTO.setTotalUseEleAmount(energyMonth.getElectValue().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setElectPrice(ELECTRIC_PRICE); + revenueSumDTO.setTotalUseEle(energyMonth.getElectValue().multiply(ELECTRIC_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setTotalUseWaterAmount(energyMonth.getUseHotWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setWaterPrice(WATER_PRICE); + revenueSumDTO.setTotalUseWater(energyMonth.getUseHotWater().multiply(WATER_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setAvgUseEle(BigDecimal.ZERO); + revenueSumDTO.setAvgUseWater(BigDecimal.ZERO); + revenueSumDTO.setUnitConsumption(energyMonth.getElectWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setTotalIncome(energyMonth.getUseHotWater().multiply(WATER_PRICE).subtract(energyMonth.getElectValue().multiply(ELECTRIC_PRICE)).divide(new BigDecimal("1.06"), 4, BigDecimal.ROUND_HALF_UP)); + return revenueSumDTO; + }) + .sorted(Comparator.comparing(HotWaterRevenueSumDTO::getCurDate).reversed()) + .collect(Collectors.toList()); + } else if (type==3){ + List energyYears = energyYearMapper.queryEnergyYear(buildingId, startDate, endDate); + return energyYears.stream() + .map(energyYear -> { + HotWaterRevenueSumDTO revenueSumDTO = new HotWaterRevenueSumDTO(); + revenueSumDTO.setCurDate(energyYear.getCurDate()); + revenueSumDTO.setTotalUseEleAmount(energyYear.getElectValue().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setElectPrice(ELECTRIC_PRICE); + revenueSumDTO.setTotalUseEle(energyYear.getElectValue().multiply(ELECTRIC_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + + revenueSumDTO.setTotalUseWaterAmount(energyYear.getUseHotWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setWaterPrice(WATER_PRICE); + revenueSumDTO.setTotalUseWater(energyYear.getUseHotWater().multiply(WATER_PRICE).setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setAvgUseEle(BigDecimal.ZERO); + revenueSumDTO.setAvgUseWater(BigDecimal.ZERO); + revenueSumDTO.setUnitConsumption(energyYear.getElectWater().setScale(4, BigDecimal.ROUND_HALF_UP)); + revenueSumDTO.setTotalIncome(energyYear.getUseHotWater().multiply(WATER_PRICE).subtract(energyYear.getElectValue().multiply(ELECTRIC_PRICE)).divide(new BigDecimal("1.06"), 4, BigDecimal.ROUND_HALF_UP)); + return revenueSumDTO; + }) + .sorted(Comparator.comparing(HotWaterRevenueSumDTO::getCurDate).reversed()) + .collect(Collectors.toList()); + } + return null; + } @Override public void calcAnalysisData(String lastHourTime) { diff --git a/mh-system/src/main/java/com/mh/system/service/report/impl/ReportHotWaterServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/report/impl/ReportHotWaterServiceImpl.java index 32e6563..85d3ee7 100644 --- a/mh-system/src/main/java/com/mh/system/service/report/impl/ReportHotWaterServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/report/impl/ReportHotWaterServiceImpl.java @@ -55,7 +55,7 @@ public class ReportHotWaterServiceImpl implements IReportHotWaterService { // 提交任务 Future future1 = executorService.submit(() -> { reportHotWaterParamHisMapper.execProHotWaterRunParam( - "73138702b71e16d200b458185bb07e59_主楼", + "e3dc9e3d0aa7c07d3b6db9ce8c119f3d_主楼", "e3dc9e3d0aa7c07d3b6db9ce8c119f3d", "", timeParam @@ -65,7 +65,7 @@ public class ReportHotWaterServiceImpl implements IReportHotWaterService { Future future2 = executorService.submit(() -> { reportHotWaterParamHisMapper.execProHotWaterRunParam( - "73138702b71e16d200b458185bb07e59_贵宾楼", + "24c7538214b5f6e707e27095b37aee46_贵宾楼", "24c7538214b5f6e707e27095b37aee46", "", timeParam