Compare commits
10 Commits
dev_fgd_sc
...
dev
| Author | SHA1 | Date |
|---|---|---|
|
|
beb4bc866e | 1 day ago |
|
|
837e662c8d | 1 week ago |
|
|
2ceb622eb6 | 2 weeks ago |
|
|
4fd5c674b5 | 1 month ago |
|
|
1871e06353 | 3 months ago |
|
|
fc98e3bd6d | 8 months ago |
|
|
c83403c4cd | 9 months ago |
|
|
5210bcdd58 | 9 months ago |
|
|
ebabe3d17a | 9 months ago |
|
|
c4eaa3b97b | 9 months ago |
142 changed files with 744 additions and 8871 deletions
Binary file not shown.
@ -1,55 +0,0 @@ |
|||||||
package com.mh.web.controller.comprehensive; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.vo.EnergyQueryVO; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.report.IComprehensiveReportService; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Classname CompreReportController |
|
||||||
* Todo: 综合报表 |
|
||||||
* @Date 2025-10-05 13:59 |
|
||||||
* @Created by LJF |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/compre") |
|
||||||
public class CompreReportController extends BaseController { |
|
||||||
|
|
||||||
private final IComprehensiveReportService proOverviewService; |
|
||||||
|
|
||||||
public CompreReportController(IComprehensiveReportService proOverviewService) { |
|
||||||
this.proOverviewService = proOverviewService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/report") |
|
||||||
public TableDataInfo report(@RequestBody EnergyQueryVO vo) { |
|
||||||
TableDataInfo dataTable = getDataTable(proOverviewService.report(vo)); |
|
||||||
// 优化分页逻辑,防止出现数组越界异常
|
|
||||||
List<?> rows = dataTable.getRows(); |
|
||||||
int total = rows.size(); |
|
||||||
// 如果 pageNum 小于等于0,则返回全部
|
|
||||||
if (vo.getPageNum() <= 0) { |
|
||||||
return dataTable; |
|
||||||
} |
|
||||||
int pageNum = vo.getPageNum() <= 0 ? 1 : vo.getPageNum(); |
|
||||||
int pageSize = vo.getPageSize() <= 0 ? 10 : vo.getPageSize(); |
|
||||||
|
|
||||||
// 计算起始索引和结束索引
|
|
||||||
int startIndex = (pageNum - 1) * pageSize; |
|
||||||
int endIndex = Math.min(startIndex + pageSize, total); |
|
||||||
|
|
||||||
// 边界检查
|
|
||||||
if (startIndex >= total || startIndex < 0) { |
|
||||||
dataTable.setRows(List.of()); // 返回空列表而不是抛出异常
|
|
||||||
} else { |
|
||||||
dataTable.setRows(rows.subList(startIndex, endIndex)); |
|
||||||
} |
|
||||||
|
|
||||||
return dataTable; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -1,70 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
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 2025-09-12 09:36:33 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/device") |
|
||||||
public class HeatingPumpMonitorController extends BaseController { |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
public HeatingPumpMonitorController(ICollectionParamsManageService collectionParamsManageService) { |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 alarmList 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询报警 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/alarmList") |
|
||||||
public TableDataInfo list(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<?> list = collectionParamsManageService.selectHeatPumpAlarmListByParams(systemType, type, "14", "5"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 运行热泵统计 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询报警 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/online") |
|
||||||
public TableDataInfo online(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<?> list = collectionParamsManageService.selectHeatPumpOnlineByParams(systemType, type); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 采暖泵 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/heatPump/list") |
|
||||||
public TableDataInfo heatPumpList(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<DeviceMonitorDTO> list = collectionParamsManageService.selectHotWaterBoilerListByParams(systemType, type, "14"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,57 +0,0 @@ |
|||||||
package com.mh.web.controller.monitor; |
|
||||||
|
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
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 2025-09-12 09:36:33 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/device") |
|
||||||
public class SteamBoilerMonitorController extends BaseController { |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
public SteamBoilerMonitorController(ICollectionParamsManageService collectionParamsManageService) { |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 steamBoiler 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据,1:代表查询模拟量监测数据,2:代表查询继电器数据,3:查询端口输入数据,4:代表查询报警数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/steamBoiler/list") |
|
||||||
public TableDataInfo list(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type") String type) { |
|
||||||
List<CollectionParamsManage> list = collectionParamsManageService.selectSteamBoilerListByParams(systemType, type); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 获取 热水锅炉 列表 |
|
||||||
* @param systemType 3 |
|
||||||
* @param type 0:代表查询动画界面数据 |
|
||||||
* @return |
|
||||||
*/ |
|
||||||
@RequestMapping("/hotWaterBoiler/list") |
|
||||||
public TableDataInfo hotWaterBoilerList(@RequestParam(name = "systemType") String systemType, |
|
||||||
@RequestParam(name = "type", required = false, defaultValue = "0") String type) { |
|
||||||
List<DeviceMonitorDTO> list = collectionParamsManageService.selectHotWaterBoilerListByParams(systemType, type, "13"); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,96 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.ReportHeatingRunParamDTO; |
|
||||||
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportHeatingRunParamHis; |
|
||||||
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; |
|
||||||
import com.mh.common.core.page.PageDomain; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.core.page.TableSupport; |
|
||||||
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.common.utils.sql.SqlUtil; |
|
||||||
import com.mh.system.service.report.IReportHeatingService; |
|
||||||
import com.mh.system.service.report.IReportSteamService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.nio.charset.StandardCharsets; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project eemcs |
|
||||||
* @description 采暖系统运行参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportHeating") |
|
||||||
@Slf4j |
|
||||||
public class ReportHeatingController extends BaseController { |
|
||||||
|
|
||||||
private final IReportHeatingService reportHeatingService; |
|
||||||
|
|
||||||
private ReportHeatingController(IReportHeatingService reportHeatingService) { |
|
||||||
this.reportHeatingService = reportHeatingService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) { |
|
||||||
if (reportHeatingRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportHeatingRunParamHis.getPageNum(), reportHeatingRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportHeatingRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportHeatingRunParamHis reportHeatingRunParamHis) { |
|
||||||
return toAjax(reportHeatingService.updateRunParams(reportHeatingRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportHeatingRunParamHis reportSteamRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "采暖系统运行记录表.xlsx"; |
|
||||||
String headTitle = "采暖系统运行记录表"; |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportHeatingRunParamHis> list = reportHeatingService.selectHeatingList(reportSteamRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, StandardCharsets.UTF_8) + "\""); |
|
||||||
response.setCharacterEncoding(String.valueOf(StandardCharsets.UTF_8)); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
List<ReportHeatingRunParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
ReportHeatingRunParamDTO deviceInfoDTO = new ReportHeatingRunParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), ReportHeatingRunParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,144 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
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.ReportHotWaterParamHis; |
|
||||||
import com.mh.common.core.domain.entity.ReportSysRunParamHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.StringUtils; |
|
||||||
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 jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 热泵系统运行参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportHotWater") |
|
||||||
@Slf4j |
|
||||||
public class ReportHotWaterController extends BaseController { |
|
||||||
|
|
||||||
private final IReportHotWaterService reportHotWaterService; |
|
||||||
|
|
||||||
private ReportHotWaterController(IReportHotWaterService reportHotWaterService) { |
|
||||||
this.reportHotWaterService = reportHotWaterService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis) |
|
||||||
{ |
|
||||||
if (reportHotWaterParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportHotWaterParamHis.getPageNum(), reportHotWaterParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportHotWaterParamHis> list = reportHotWaterService.selectList(reportHotWaterParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis) |
|
||||||
{ |
|
||||||
return toAjax(reportHotWaterService.updateRunParams(reportHotWaterParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportHotWaterParamHis reportHotWaterParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "热水热泵运行记录表.xlsx"; |
|
||||||
String floorId = reportHotWaterParamHis.getFloorId(); |
|
||||||
String headTitle = "热水热泵运行记录表"; |
|
||||||
if (!StringUtils.isBlank(floorId)) { |
|
||||||
if (floorId.contains("-1楼")) { |
|
||||||
fileName = "-1楼热水热泵运行记录表.xlsx"; |
|
||||||
headTitle = "-1楼热水热泵运行记录表"; |
|
||||||
} else { |
|
||||||
fileName = "3楼热水热泵运行记录表.xlsx"; |
|
||||||
headTitle = "3楼热水热泵运行记录表"; |
|
||||||
} |
|
||||||
} |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportHotWaterParamHis> list = reportHotWaterService.selectList(reportHotWaterParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
int headSize = 3; |
|
||||||
if (floorId.contains("-1楼")) { |
|
||||||
List<BFloorReportHotWaterDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
BFloorReportHotWaterDTO deviceInfoDTO = new BFloorReportHotWaterDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
// 单独处理启停和运行状态
|
|
||||||
deviceInfoDTO.setStatusRunHotPumpOneStr(info.getStatusRunHotPumpOne() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpOneStr(info.getStatusSwitchHotPumpOne() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunHotPumpTwoStr(info.getStatusRunHotPumpTwo() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpTwoStr(info.getStatusSwitchHotPumpTwo() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpOneStr(info.getStatusRunSupplyPumpOne() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpTwoStr(info.getStatusRunSupplyPumpTwo() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpThreeStr(info.getStatusRunSupplyPumpThree() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpFourStr(info.getStatusRunSupplyPumpFour() == 1 ? "运行" : "不运行"); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), BFloorReportHotWaterDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} else { |
|
||||||
List<ThreeFloorReportHotWaterDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
ThreeFloorReportHotWaterDTO deviceInfoDTO = new ThreeFloorReportHotWaterDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
// 单独处理启停和运行状态
|
|
||||||
deviceInfoDTO.setStatusRunHotPumpOneStr(info.getStatusRunHotPumpOne() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpOneStr(info.getStatusSwitchHotPumpOne() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunHotPumpTwoStr(info.getStatusRunHotPumpTwo() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpTwoStr(info.getStatusSwitchHotPumpTwo() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunHotPumpThreeStr(info.getStatusRunHotPumpThree() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpThreeStr(info.getStatusSwitchHotPumpThree() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunHotPumpFourStr(info.getStatusRunHotPumpFour() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusSwitchHotPumpFourStr(info.getStatusSwitchHotPumpFour() == 1 ? "开机" : "关机"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpOneStr(info.getStatusRunSupplyPumpOne() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpTwoStr(info.getStatusRunSupplyPumpTwo() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpThreeStr(info.getStatusRunSupplyPumpThree() == 1 ? "运行" : "不运行"); |
|
||||||
deviceInfoDTO.setStatusRunSupplyPumpFourStr(info.getStatusRunSupplyPumpFour() == 1 ? "运行" : "不运行"); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), ThreeFloorReportHotWaterDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,131 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.alibaba.excel.ExcelWriter; |
|
||||||
import com.alibaba.excel.write.metadata.WriteSheet; |
|
||||||
import com.alibaba.excel.write.metadata.fill.FillWrapper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.dto.WeatherDataDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportMeterReadingsHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.DateUtils; |
|
||||||
import com.mh.system.service.device.ICoolingSystemMonitorService; |
|
||||||
import com.mh.system.service.report.IMeterReadingsHisService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import org.apache.poi.ss.usermodel.*; |
|
||||||
import org.springframework.core.io.ClassPathResource; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream; |
|
||||||
import java.io.File; |
|
||||||
import java.io.IOException; |
|
||||||
import java.io.InputStream; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.HashMap; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 每日抄表记录查询 |
|
||||||
* @date 2025-10-21 16:04:09 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportMeterReadings") |
|
||||||
public class ReportMeterReadingsController extends BaseController { |
|
||||||
|
|
||||||
private final IMeterReadingsHisService meterReadingsHisService; |
|
||||||
|
|
||||||
private final ICoolingSystemMonitorService coolingSystemMonitorService; |
|
||||||
|
|
||||||
public ReportMeterReadingsController(IMeterReadingsHisService meterReadingsHisService, ICoolingSystemMonitorService coolingSystemMonitorService) { |
|
||||||
this.meterReadingsHisService = meterReadingsHisService; |
|
||||||
this.coolingSystemMonitorService = coolingSystemMonitorService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportMeterReadingsHis todayTimestamp) |
|
||||||
{ |
|
||||||
List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(todayTimestamp); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportMeterReadingsHis reportMeterReadingsHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "节能岛改造每日能耗统计表"+ DateUtils.dateToString(reportMeterReadingsHis.getTodayTimestamp(), "yyyyMMdd")+".xlsx"; |
|
||||||
// 读取资源文件
|
|
||||||
ClassPathResource classPathResource = new ClassPathResource(File.separator + "节能岛改造每日能耗统计表.xlsx"); |
|
||||||
// 获取数据
|
|
||||||
List<ReportMeterReadingsHis> list = meterReadingsHisService.selectList(reportMeterReadingsHis); |
|
||||||
// 组织并填充模板数据
|
|
||||||
ByteArrayOutputStream byteArrayOutputStream = compositeFill(classPathResource.getInputStream(), reportMeterReadingsHis.getTodayTimestamp(), list); |
|
||||||
|
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
|
|
||||||
// 将文件内容写入响应输出流,浏览器可以直接触发下载
|
|
||||||
response.getOutputStream().write(byteArrayOutputStream.toByteArray()); |
|
||||||
response.getOutputStream().flush(); |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
private ByteArrayOutputStream compositeFill(InputStream templateInputStream, Date todayTimestamp, List<ReportMeterReadingsHis> list) throws IOException { |
|
||||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); |
|
||||||
// 使用EasyExcel的模板填充功能,在这里指定合并单元格,这里应该是easyExcel的bug,第一列无法合并,其他列都可以,所以第一列单独用原生poi进行合并
|
|
||||||
try (ExcelWriter excelWriter = EasyExcel.write(byteArrayOutputStream).withTemplate(templateInputStream) |
|
||||||
.build()) { |
|
||||||
WriteSheet writeSheet = EasyExcel.writerSheet().build(); |
|
||||||
// 防止上面两个表格覆盖下面两个表格,每一行都采用新增一行的方式
|
|
||||||
// FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
|
|
||||||
// 使用模板填充,必须使用FillWrapper,这是官方要求,并且每行两个表格只能有一个表格设置增行,否则会存在一个表格有空行,这里是造的测试数据
|
|
||||||
for (int i = 0; i < list.size(); i++) { |
|
||||||
excelWriter.fill(new FillWrapper("data"+(i+1), List.of(list.get(i))), writeSheet); |
|
||||||
} |
|
||||||
|
|
||||||
// 设置表格外的填充数据,例如总计、日期等数据
|
|
||||||
HashMap<String, Object> map = new HashMap<>(); |
|
||||||
|
|
||||||
List<WeatherDataDTO> weatherTemp = (List<WeatherDataDTO>) coolingSystemMonitorService.getWeatherTemp(DateUtils.dateToString(todayTimestamp, "yyyy-MM-dd"), DateUtils.dateToString(todayTimestamp, "yyyy-MM-dd")); |
|
||||||
if (!weatherTemp.isEmpty()) { |
|
||||||
String maxTemp = weatherTemp.getFirst().getMaxTemp(); |
|
||||||
map.put("maxTemp", maxTemp); |
|
||||||
String minTemp = weatherTemp.getFirst().getMinTemp(); |
|
||||||
map.put("minTemp", minTemp); |
|
||||||
} |
|
||||||
|
|
||||||
map.put("date", DateUtils.dateToString(todayTimestamp, "yyyy年MM月dd日")); |
|
||||||
excelWriter.fill(map, writeSheet); |
|
||||||
|
|
||||||
// 2. 获取 Workbook 并计算公式
|
|
||||||
Workbook workbook = excelWriter.writeContext() |
|
||||||
.writeWorkbookHolder() |
|
||||||
.getWorkbook(); |
|
||||||
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); |
|
||||||
for (Row row : workbook.getSheetAt(0)) { |
|
||||||
for (Cell cell : row) { |
|
||||||
if (cell.getCellType() == CellType.FORMULA) { |
|
||||||
evaluator.evaluateFormulaCell(cell); // 单元格级计算
|
|
||||||
// evaluator.evaluateAll(); // 全工作簿计算(推荐)
|
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
// 3. 强制刷新计算结果
|
|
||||||
workbook.setForceFormulaRecalculation(true); |
|
||||||
excelWriter.finish(); |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
// 合并单元格,由于easyExcel自带的OnceAbsoluteMergeStrategy合并策略bug,这里需要用poi合并一下
|
|
||||||
return byteArrayOutputStream; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,156 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.ReportSteamRunParamDTO; |
|
||||||
import com.mh.common.core.domain.dto.ThreeFloorReportHotWaterDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
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.IReportSteamService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project eemcs |
|
||||||
* @description 蒸汽系统运行参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportSteam") |
|
||||||
@Slf4j |
|
||||||
public class ReportSteamController extends BaseController { |
|
||||||
|
|
||||||
private final IReportSteamService reportSteamService; |
|
||||||
|
|
||||||
private ReportSteamController(IReportSteamService reportSteamService) { |
|
||||||
this.reportSteamService = reportSteamService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) { |
|
||||||
if (reportSteamRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportSteamRunParamHis.getPageNum(), reportSteamRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis) { |
|
||||||
return toAjax(reportSteamService.updateRunParams(reportSteamRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportSteamRunParamHis reportSteamRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "蒸汽机运行记录表.xlsx"; |
|
||||||
String headTitle = "蒸汽机运行记录表"; |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportSteamRunParamHis> list = reportSteamService.selectList(reportSteamRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
List<ReportSteamRunParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
ReportSteamRunParamDTO deviceInfoDTO = new ReportSteamRunParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
// 单独处理运行状态
|
|
||||||
// 0:上电延时
|
|
||||||
// 1:关机
|
|
||||||
// 2:待机
|
|
||||||
// 3:前清扫
|
|
||||||
// 4:预点火
|
|
||||||
// 5:点火
|
|
||||||
// 6:传火
|
|
||||||
// 7:工作
|
|
||||||
// 8:后清扫
|
|
||||||
// 9:故障
|
|
||||||
// 10:小火保持
|
|
||||||
// 11:自检
|
|
||||||
// 12:检漏
|
|
||||||
// 13:开点火器
|
|
||||||
// 14:启动等待中
|
|
||||||
switch (info.getCurStatus()) { |
|
||||||
case 0: |
|
||||||
deviceInfoDTO.setCurStatus("上电延时"); |
|
||||||
break; |
|
||||||
case 1: |
|
||||||
deviceInfoDTO.setCurStatus("关机"); |
|
||||||
break; |
|
||||||
case 2: |
|
||||||
deviceInfoDTO.setCurStatus("待机"); |
|
||||||
break; |
|
||||||
case 3: |
|
||||||
deviceInfoDTO.setCurStatus("前清扫"); |
|
||||||
break; |
|
||||||
case 4: |
|
||||||
deviceInfoDTO.setCurStatus("预点火"); |
|
||||||
break; |
|
||||||
case 5: |
|
||||||
deviceInfoDTO.setCurStatus("点火"); |
|
||||||
break; |
|
||||||
case 6: |
|
||||||
deviceInfoDTO.setCurStatus("传火"); |
|
||||||
break; |
|
||||||
case 7: |
|
||||||
deviceInfoDTO.setCurStatus("工作"); |
|
||||||
break; |
|
||||||
case 8: |
|
||||||
deviceInfoDTO.setCurStatus("后清扫"); |
|
||||||
break; |
|
||||||
case 9: |
|
||||||
deviceInfoDTO.setCurStatus("故障"); |
|
||||||
break; |
|
||||||
case 10: |
|
||||||
deviceInfoDTO.setCurStatus("小火保持"); |
|
||||||
break; |
|
||||||
case 11: |
|
||||||
deviceInfoDTO.setCurStatus("自检"); |
|
||||||
break; |
|
||||||
case 12: |
|
||||||
deviceInfoDTO.setCurStatus("检漏"); |
|
||||||
break; |
|
||||||
case 13: |
|
||||||
deviceInfoDTO.setCurStatus("开点火器"); |
|
||||||
break; |
|
||||||
case 14: |
|
||||||
deviceInfoDTO.setCurStatus("启动等待中"); |
|
||||||
break; |
|
||||||
default: |
|
||||||
deviceInfoDTO.setCurStatus("未知"); |
|
||||||
break; |
|
||||||
} |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), ReportSteamRunParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler(headTitle)) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,100 +0,0 @@ |
|||||||
package com.mh.web.controller.report; |
|
||||||
|
|
||||||
import com.alibaba.excel.EasyExcel; |
|
||||||
import com.github.pagehelper.PageHelper; |
|
||||||
import com.mh.common.core.controller.BaseController; |
|
||||||
import com.mh.common.core.domain.AjaxResult; |
|
||||||
import com.mh.common.core.domain.dto.MaglevReportSysParamDTO; |
|
||||||
import com.mh.common.core.domain.entity.ReportSysRunParamHis; |
|
||||||
import com.mh.common.core.page.TableDataInfo; |
|
||||||
import com.mh.common.utils.StringUtils; |
|
||||||
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.IReportSysService; |
|
||||||
import jakarta.servlet.http.HttpServletResponse; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.BeanUtils; |
|
||||||
import org.springframework.web.bind.annotation.*; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.net.URLEncoder; |
|
||||||
import java.util.List; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 系统参数报表 |
|
||||||
* @date 2024-05-30 08:45:57 |
|
||||||
*/ |
|
||||||
@RestController |
|
||||||
@RequestMapping("/reportSys") |
|
||||||
@Slf4j |
|
||||||
public class ReportSysController extends BaseController { |
|
||||||
|
|
||||||
private final IReportSysService reportSysService; |
|
||||||
|
|
||||||
private ReportSysController(IReportSysService reportSysService) { |
|
||||||
this.reportSysService = reportSysService; |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/list") |
|
||||||
public TableDataInfo list(@RequestBody ReportSysRunParamHis reportSysRunParamHis) |
|
||||||
{ |
|
||||||
if (reportSysRunParamHis.getPageNum() != 0) { |
|
||||||
PageHelper.startPage(reportSysRunParamHis.getPageNum(), reportSysRunParamHis.getPageSize()); |
|
||||||
} |
|
||||||
List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis); |
|
||||||
return getDataTable(list); |
|
||||||
} |
|
||||||
|
|
||||||
@PutMapping("/edit") |
|
||||||
public AjaxResult edit(@RequestBody ReportSysRunParamHis reportSysRunParamHis) |
|
||||||
{ |
|
||||||
return toAjax(reportSysService.updateSysRunParams(reportSysRunParamHis)); |
|
||||||
} |
|
||||||
|
|
||||||
@PostMapping("/export") |
|
||||||
public void exportExcel(@RequestBody ReportSysRunParamHis reportSysRunParamHis, HttpServletResponse response) { |
|
||||||
// 文件名
|
|
||||||
try { |
|
||||||
String fileName = "系统参数运行日志报表.xlsx"; |
|
||||||
String deviceNum = (String) reportSysRunParamHis.getParams().get("deviceNum"); |
|
||||||
if (!StringUtils.isBlank(deviceNum)) { |
|
||||||
if ("2".equals(deviceNum)) { |
|
||||||
fileName = "变频螺杆主机系统参数报表.xlsx"; |
|
||||||
} else { |
|
||||||
fileName = "磁悬浮主机系统参数报表.xlsx"; |
|
||||||
} |
|
||||||
} |
|
||||||
// 从数据库获取数据
|
|
||||||
List<ReportSysRunParamHis> list = reportSysService.selectList(reportSysRunParamHis); |
|
||||||
if (list != null) { |
|
||||||
// 设置响应格式
|
|
||||||
response.setContentType("application/vdn.ms-excel;charset=utf-8"); |
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fileName, "UTF-8") + "\""); |
|
||||||
response.setCharacterEncoding("UTF-8"); |
|
||||||
ExcelFillCellMergeHandler mergePrevCol = new ExcelFillCellMergeHandler(); |
|
||||||
int headSize = 3; |
|
||||||
List<MaglevReportSysParamDTO> infoDTOS = list.stream().map(info -> { |
|
||||||
MaglevReportSysParamDTO deviceInfoDTO = new MaglevReportSysParamDTO(); |
|
||||||
BeanUtils.copyProperties(info, deviceInfoDTO); |
|
||||||
return deviceInfoDTO; |
|
||||||
}).collect(Collectors.toList()); |
|
||||||
|
|
||||||
// 内容格式
|
|
||||||
EasyExcel.write(response.getOutputStream(), MaglevReportSysParamDTO.class) |
|
||||||
.registerWriteHandler(new ReportSysParamHandler("磁悬浮水冷冷水机组数据运行记录表")) |
|
||||||
.registerWriteHandler(mergePrevCol) |
|
||||||
.registerWriteHandler(new RowHeightStyleHandler()) |
|
||||||
.sheet(fileName.replace(".xlsx", "")) |
|
||||||
.doWrite(infoDTOS); |
|
||||||
} |
|
||||||
} catch (IOException e) { |
|
||||||
throw new RuntimeException("下载报表异常"); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
Binary file not shown.
@ -1,170 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
//import java.math.String;
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 三楼热水系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(25) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class BFloorReportHotWaterDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 班次
|
|
||||||
// */
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// @ExcelProperty(value = {"${deviceType}", "班次", "班次"}, index = 1)
|
|
||||||
// private String classes;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设定温度℃"}, index = 1) |
|
||||||
private BigDecimal tempSetHotPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 实际温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "实际温度℃"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备开关机 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设备开关机"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpOneStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备运行状态 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设备运行状态"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpOneStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设定温度℃"}, index = 5) |
|
||||||
private BigDecimal tempSetHotPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 实际温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "实际温度℃"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备开关机 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设备开关机"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpTwoStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备运行状态 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设备运行状态"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpTwoStr; |
|
||||||
|
|
||||||
// 高区/裙楼设定压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "裙楼变频泵", "设定压力bar"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presSetSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/裙楼实际压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "裙楼变频泵", "实际压力bar"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presRealSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/裙楼1号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "裙楼变频泵", "1号泵运行状态"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpOneStr; |
|
||||||
|
|
||||||
// 高区/裙楼2号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "裙楼变频泵", "2号泵运行状态"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpTwoStr; |
|
||||||
|
|
||||||
// 中区/中厨设定压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中厨变频泵", "设定压力bar"}, index = 13) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presSetSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中厨实际压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中厨变频泵", "实际压力bar"}, index = 14) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presRealSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中厨1号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中厨变频泵", "1号泵运行状态"}, index = 15) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpThreeStr; |
|
||||||
|
|
||||||
// 中区/中厨2号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中厨变频泵", "2号泵运行状态"}, index = 16) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpFourStr; |
|
||||||
|
|
||||||
// 高区/裙楼液位(米)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "水箱液位", "裙楼液位%"}, index = 17) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal levelWaterTankOne; |
|
||||||
|
|
||||||
// 中区/中厨液位(米)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "水箱液位", "中厨液位%"}, index = 18) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal levelWaterTankTwo; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 19) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 20) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,74 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 综合系统能耗查询DTO |
|
||||||
* @date 2025-10-09 10:17:26 |
|
||||||
*/ |
|
||||||
public class CompreReportDTO { |
|
||||||
|
|
||||||
private String time; |
|
||||||
|
|
||||||
private String electValue; |
|
||||||
|
|
||||||
private String coldValue; |
|
||||||
|
|
||||||
private String hotValue; |
|
||||||
|
|
||||||
private String steamValue; |
|
||||||
|
|
||||||
public String getTime() { |
|
||||||
return time; |
|
||||||
} |
|
||||||
|
|
||||||
public void setTime(String time) { |
|
||||||
this.time = time; |
|
||||||
} |
|
||||||
|
|
||||||
public String getElectValue() { |
|
||||||
return electValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setElectValue(String electValue) { |
|
||||||
this.electValue = electValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getColdValue() { |
|
||||||
return coldValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setColdValue(String coldValue) { |
|
||||||
this.coldValue = coldValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getHotValue() { |
|
||||||
return hotValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setHotValue(String hotValue) { |
|
||||||
this.hotValue = hotValue; |
|
||||||
} |
|
||||||
|
|
||||||
public String getSteamValue() { |
|
||||||
return steamValue; |
|
||||||
} |
|
||||||
|
|
||||||
public void setSteamValue(String steamValue) { |
|
||||||
this.steamValue = steamValue; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", CompreReportDTO.class.getSimpleName() + "[", "]") |
|
||||||
.add("time='" + time + "'") |
|
||||||
.add("electValue='" + electValue + "'") |
|
||||||
.add("coldValue='" + coldValue + "'") |
|
||||||
.add("hotValue='" + hotValue + "'") |
|
||||||
.add("steamValue='" + steamValue + "'") |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,284 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore; |
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
//import java.math.String;
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 磁悬浮主机系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(25) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class MaglevReportSysParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 班次
|
|
||||||
// */
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// @ExcelProperty(value = {"${deviceType}", "班次", "班次"}, index = 1)
|
|
||||||
// private String classes;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "冷冻水进水温度℃"}, index = 1) |
|
||||||
private BigDecimal tempInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "冷冻水出水温度℃"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设计流量% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "设计流量%"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal designFlow; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "蒸发器压力kpa"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器饱和温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "蒸发器饱和温度℃"}, index = 5) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 趋近温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸发器", "趋近温度℃"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempEvapApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷却水进水温度℃"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷却水出水温度℃"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷凝器压力kpa"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器饱和温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "冷凝器饱和温度℃"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器趋近温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷凝器", "趋近温度℃"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCondenserApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水设定值 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "冷冻水设定值℃"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal setChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷水机需求% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "冷水机需求%"}, index = 13) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal setLoad; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总电流A |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "总电流A"}, index = 14) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal currentTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总输入功率kw |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "总输入功率kw"}, index = 15) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal inputPowerTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比 |
|
||||||
*/ |
|
||||||
// @ExcelProperty(value = {"${deviceType}", "系统", "压缩比"}, index = 16)
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// private BigDecimal ratioComp;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比1 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "1#压缩机压缩比"}, index = 16) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比2 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "2#压缩机压缩比"}, index = 17) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比3 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "3#压缩机压缩比"}, index = 18) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal ratioCompThree; |
|
||||||
|
|
||||||
/** |
|
||||||
* 膨胀阀开度% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "膨胀阀开度%"}, index = 19) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal openExv; |
|
||||||
|
|
||||||
/** |
|
||||||
* 运行中的压缩机数量 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "系统", "运行中的压缩机数量"}, index = 20) |
|
||||||
@ColumnWidth(10) |
|
||||||
private Integer runCompNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水泵频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水泵频率hz"}, index = 21) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal frequencyChiller; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水进水压力kpa"}, index = 22) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水出水压力kpa"}, index = 23) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水泵频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水泵频率hz"}, index = 24) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal frequencyCooling; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水进水压力kpa"}, index = 25) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水压力kpa |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水出水压力kpa"}, index = 26) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔频率hz |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔频率hz"}, index = 27) |
|
||||||
private BigDecimal frequencyCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔运行数量(原注释可能有误,根据列名调整) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔运行数量"}, index = 28) |
|
||||||
private Integer runCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "室外温度℃", "室外温度℃"}, index = 29) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外湿度% |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "室外湿度%", "室外湿度%"}, index = 30) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal humidityOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 恒压补水罐压力 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "恒压补水罐压力MPa", "恒压补水罐压力MPa"}, index = 31) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressConstantWaterTank; |
|
||||||
|
|
||||||
/** |
|
||||||
* 巡查记录人 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 32) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,179 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 采暖系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(20) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class ReportHeatingRunParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "运行状态"}, index = 1) |
|
||||||
private String runStatusBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "设定温度(℃)"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempSetBoilerOne; |
|
||||||
/** |
|
||||||
* 出水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "出水温度(℃)"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 回水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "回水温度(℃)"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 炉水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "炉水温度(℃)"}, index = 5) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempWaterBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟道温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖设备", "烟道温度(℃)"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGasBoilerOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "运行状态"}, index = 7) |
|
||||||
private String runStatusBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "设定温度(℃)"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempSetBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 出水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "出水温度(℃)"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempOutBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 回水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "回水温度(℃)"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempInBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 炉水温度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "炉水温度(℃)"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempWaterBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟道温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖设备", "烟道温度(℃)"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGasBoilerTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖泵", "运行状态"}, index = 13) |
|
||||||
private String runStatusPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号采暖泵", "频率(Hz)"}, index = 14) |
|
||||||
private BigDecimal frequencyPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖泵", "运行状态"}, index = 15) |
|
||||||
private String runStatusPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号采暖泵", "频率(Hz)"}, index = 16) |
|
||||||
private BigDecimal frequencyPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号采暖泵", "运行状态"}, index = 17) |
|
||||||
private String runStatusPumpThree; |
|
||||||
|
|
||||||
/** |
|
||||||
* 频率 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号采暖泵", "频率(Hz)"}, index = 18) |
|
||||||
private BigDecimal frequencyPumpThree; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 19) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 20) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,135 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 蒸汽机系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(20) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class ReportSteamRunParamDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前状态 |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "当前状态", "当前状态"}, index = 1) |
|
||||||
private String curStatus; |
|
||||||
|
|
||||||
/** |
|
||||||
* 火焰强度 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "火焰强度", "火焰强度"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flameIntensity; |
|
||||||
|
|
||||||
/** |
|
||||||
* 烟气温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "烟气温度(℃)", "烟气温度(℃)"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempFlueGas; |
|
||||||
|
|
||||||
/** |
|
||||||
* 火焰百分比(%) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "火焰百分比(%)", "火焰百分比(%)"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal percentFlameIntensity; |
|
||||||
|
|
||||||
/** |
|
||||||
* 液位(%) |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "液位(%)", "液位(%)"}, index = 5) |
|
||||||
private BigDecimal waterLevel; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸汽温度(℃) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "蒸汽温度(℃)", "蒸汽温度(℃)"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempCur; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前压力(Mpa) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "当前压力(Mpa)", "当前压力(Mpa)"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressCur; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压力设定值(Mpa) |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "压力设定值(Mpa)", "压力设定值(Mpa)"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressSet; |
|
||||||
|
|
||||||
// 启动压差(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "启动压差(Mpa)", "启动压差(Mpa)"}, index = 9) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressStartDiff; |
|
||||||
|
|
||||||
// 停止压差(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "停止压差(Mpa)", "停止压差(Mpa)"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressShutdownDiff; |
|
||||||
|
|
||||||
// 瞬时压力(Mpa)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "瞬时压力(Mpa)", "瞬时压力(Mpa)"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal pressInstance; |
|
||||||
|
|
||||||
// 瞬时流量(t/h)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "瞬时流量(t/h)", "瞬时流量(t/h)"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flowInstance; |
|
||||||
|
|
||||||
// 累积流量(t)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "累积流量(t)", "累积流量(t)"}, index = 13) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal flowTotal; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 14) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 15) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,210 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.*; |
|
||||||
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
|
||||||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.NoArgsConstructor; |
|
||||||
import lombok.experimental.Accessors; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
|
|
||||||
//import java.math.String;
|
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 三楼热水系统参数报表 |
|
||||||
* @date 2024-05-30 11:00:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@NoArgsConstructor |
|
||||||
@Accessors(chain = true) |
|
||||||
@HeadRowHeight(25) |
|
||||||
@HeadFontStyle(fontHeightInPoints = 14) |
|
||||||
@ContentFontStyle(fontHeightInPoints = 13) |
|
||||||
@ContentRowHeight(25) |
|
||||||
@ContentStyle( |
|
||||||
horizontalAlignment = HorizontalAlignmentEnum.CENTER, |
|
||||||
borderBottom = BorderStyleEnum.THIN, |
|
||||||
borderLeft = BorderStyleEnum.THIN, |
|
||||||
borderRight = BorderStyleEnum.THIN, |
|
||||||
borderTop = BorderStyleEnum.THIN |
|
||||||
) |
|
||||||
@ColumnWidth(10) |
|
||||||
public class ThreeFloorReportHotWaterDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 当前时间 |
|
||||||
*/ |
|
||||||
@ColumnWidth(17) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "时间", "时间"}, index = 0) |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 班次
|
|
||||||
// */
|
|
||||||
// @ColumnWidth(10)
|
|
||||||
// @ExcelProperty(value = {"${deviceType}", "班次", "班次"}, index = 1)
|
|
||||||
// private String classes;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设定温度℃"}, index = 1) |
|
||||||
private BigDecimal tempSetHotPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 实际温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "实际温度℃"}, index = 2) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备开关机 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设备开关机"}, index = 3) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpOneStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备运行状态 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "1号热泵", "设备运行状态"}, index = 4) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpOneStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设定温度℃ |
|
||||||
*/ |
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设定温度℃"}, index = 5) |
|
||||||
private BigDecimal tempSetHotPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 实际温度℃ |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "实际温度℃"}, index = 6) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备开关机 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设备开关机"}, index = 7) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpTwoStr; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备运行状态 |
|
||||||
*/ |
|
||||||
@ExcelProperty(value = {"${deviceType}", "2号热泵", "设备运行状态"}, index = 8) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpTwoStr; |
|
||||||
|
|
||||||
// 3号热泵设定温度(℃)
|
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号热泵", "设定温度℃"}, index = 9) |
|
||||||
private BigDecimal tempSetHotPumpThree; |
|
||||||
|
|
||||||
// 3号热泵实际温度(℃)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号热泵", "实际温度℃"}, index = 10) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpThree; |
|
||||||
|
|
||||||
// 3号热泵启停状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号热泵", "设备开关机"}, index = 11) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpThreeStr; |
|
||||||
|
|
||||||
// 3号热泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "3号热泵", "设备运行状态"}, index = 12) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpThreeStr; |
|
||||||
|
|
||||||
// 4号热泵设定温度(℃)
|
|
||||||
@ColumnWidth(10) |
|
||||||
@ExcelProperty(value = {"${deviceType}", "4号热泵", "设定温度℃"}, index = 13) |
|
||||||
private BigDecimal tempSetHotPumpFour; |
|
||||||
|
|
||||||
// 4号热泵实际温度(℃)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "4号热泵", "实际温度℃"}, index = 14) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal tempRealHotPumpFour; |
|
||||||
|
|
||||||
// 4号热泵启停状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "4号热泵", "设备开关机"}, index = 15) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusSwitchHotPumpFourStr; |
|
||||||
|
|
||||||
// 4号热泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "4号热泵", "设备运行状态"}, index = 16) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunHotPumpFourStr; |
|
||||||
|
|
||||||
// 高区/高区设定压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "高区变频泵", "设定压力bar"}, index = 17) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presSetSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/高区实际压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "高区变频泵", "实际压力bar"}, index = 18) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presRealSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/高区1号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "高区变频泵", "1号泵运行状态"}, index = 19) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpOneStr; |
|
||||||
|
|
||||||
// 高区/高区2号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "高区变频泵", "2号泵运行状态"}, index = 20) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpTwoStr; |
|
||||||
|
|
||||||
// 中区/中区设定压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中区变频泵", "设定压力bar"}, index = 21) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presSetSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中区实际压力(bar)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中区变频泵", "实际压力bar"}, index = 22) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal presRealSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中区1号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中区变频泵", "1号泵运行状态"}, index = 23) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpThreeStr; |
|
||||||
|
|
||||||
// 中区/中区2号泵运行状态
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "中区变频泵", "2号泵运行状态"}, index = 24) |
|
||||||
@ColumnWidth(10) |
|
||||||
private String statusRunSupplyPumpFourStr; |
|
||||||
|
|
||||||
// 高区/高区液位(米)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "水箱液位", "高区液位%"}, index = 25) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal levelWaterTankOne; |
|
||||||
|
|
||||||
// 中区/中区液位(米)
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "水箱液位", "中区液位%"}, index = 26) |
|
||||||
@ColumnWidth(10) |
|
||||||
private BigDecimal levelWaterTankTwo; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 27) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
@ExcelProperty(value = {"${deviceType}", "备注", "备注"}, index = 28) |
|
||||||
@ColumnWidth(20) |
|
||||||
private String remark; |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,63 +0,0 @@ |
|||||||
package com.mh.common.core.domain.dto; |
|
||||||
|
|
||||||
import lombok.Data; |
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 天气温度历史记录查询 |
|
||||||
* @date 2025-06-16 11:21:48 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
public class WeatherDataDTO { |
|
||||||
|
|
||||||
/** |
|
||||||
* 时间 |
|
||||||
*/ |
|
||||||
private String weatherDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 日期和星期 |
|
||||||
*/ |
|
||||||
private String dateAndWeek; |
|
||||||
|
|
||||||
/** |
|
||||||
* 最高温度 |
|
||||||
*/ |
|
||||||
private String maxTemp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 最低温度 |
|
||||||
*/ |
|
||||||
private String minTemp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 天气 |
|
||||||
*/ |
|
||||||
private String weatherConditions; |
|
||||||
|
|
||||||
/** |
|
||||||
* 风向 |
|
||||||
*/ |
|
||||||
private String windDirection; |
|
||||||
|
|
||||||
/** |
|
||||||
* 风速 |
|
||||||
*/ |
|
||||||
private String windPower; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new ToStringBuilder(this) |
|
||||||
.append("weatherDate", weatherDate) |
|
||||||
.append("dateAndWeek", dateAndWeek) |
|
||||||
.append("maxTemp", maxTemp) |
|
||||||
.append("minTemp", minTemp) |
|
||||||
.append("weatherConditions", weatherConditions) |
|
||||||
.append("windDirection", windDirection) |
|
||||||
.append("windPower", windPower) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,217 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.Data; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 采暖系统运行记录表 |
|
||||||
* @date 2025-10-21 10:26:12 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("report_heating_run_param_his") // 指定数据库表名
|
|
||||||
public class ReportHeatingRunParamHis extends BaseEntity { |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
// 日期
|
|
||||||
@TableField("cur_date") // 字段映射(可选,若字段名与属性名不一致时需指定)
|
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
// 时间
|
|
||||||
@TableField("cur_time") |
|
||||||
private String curTime; // 字符串类型直接映射
|
|
||||||
|
|
||||||
// 班次
|
|
||||||
@TableField("classes") |
|
||||||
private String classes; |
|
||||||
|
|
||||||
// 锅炉1状态
|
|
||||||
@TableField("cur_status_boiler_one") |
|
||||||
private Integer curStatusBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1出水温度(℃)
|
|
||||||
@TableField("temp_out_boiler_one") |
|
||||||
private BigDecimal tempOutBoilerOne; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉1设定温度(℃)
|
|
||||||
@TableField("temp_set_boiler_one") |
|
||||||
private BigDecimal tempSetBoilerOne; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉1回水温度(℃)
|
|
||||||
@TableField("temp_in_boiler_one") |
|
||||||
private BigDecimal tempInBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1炉水温度(℃)
|
|
||||||
@TableField("temp_water_boiler_one") |
|
||||||
private BigDecimal tempWaterBoilerOne; |
|
||||||
|
|
||||||
// 锅炉1烟道温度(℃)
|
|
||||||
@TableField("temp_flue_gas_boiler_one") |
|
||||||
private BigDecimal tempFlueGasBoilerOne; |
|
||||||
|
|
||||||
// 锅炉2状态
|
|
||||||
@TableField("cur_status_boiler_two") |
|
||||||
private Integer curStatusBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2设定温度(℃)
|
|
||||||
@TableField("temp_set_boiler_two") |
|
||||||
private BigDecimal tempSetBoilerTwo; // 精度要求高时使用BigDecimal
|
|
||||||
|
|
||||||
// 锅炉2出水温度(℃)
|
|
||||||
@TableField("temp_out_boiler_two") |
|
||||||
private BigDecimal tempOutBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2回水温度(℃)
|
|
||||||
@TableField("temp_in_boiler_two") |
|
||||||
private BigDecimal tempInBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2炉水温度(℃)
|
|
||||||
@TableField("temp_water_boiler_two") |
|
||||||
private BigDecimal tempWaterBoilerTwo; |
|
||||||
|
|
||||||
// 锅炉2烟道温度(℃)
|
|
||||||
@TableField("temp_flue_gas_boiler_two") |
|
||||||
private BigDecimal tempFlueGasBoilerTwo; |
|
||||||
|
|
||||||
// 采暖泵1状态
|
|
||||||
@TableField("cur_status_pump_one") |
|
||||||
private Integer curStatusPumpOne; |
|
||||||
|
|
||||||
// 采暖泵1状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpOne; |
|
||||||
|
|
||||||
// 采暖泵1频率(Hz)
|
|
||||||
@TableField("frequency_pump_one") |
|
||||||
private BigDecimal frequencyPumpOne; |
|
||||||
|
|
||||||
// 采暖泵2状态
|
|
||||||
@TableField("cur_status_pump_two") |
|
||||||
private Integer curStatusPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵2状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵2频率(Hz)
|
|
||||||
@TableField("frequency_pump_two") |
|
||||||
private BigDecimal frequencyPumpTwo; |
|
||||||
|
|
||||||
// 采暖泵3状态
|
|
||||||
@TableField("cur_status_pump_three") |
|
||||||
private Integer curStatusPumpThree; |
|
||||||
|
|
||||||
// 采暖泵3状态
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatusPumpThree; |
|
||||||
|
|
||||||
// 采暖泵3频率(Hz)
|
|
||||||
@TableField("frequency_pump_three") |
|
||||||
private BigDecimal frequencyPumpThree; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
@TableField("recorder") |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注
|
|
||||||
@TableField("remark") |
|
||||||
private String remark; |
|
||||||
|
|
||||||
// 创建时间(自动填充)
|
|
||||||
@TableField(value = "create_date", fill = FieldFill.INSERT) // 插入时自动填充
|
|
||||||
private LocalDateTime createDate; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportHeatingRunParamHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("curDate=" + curDate) |
|
||||||
.add("curTime='" + curTime + "'") |
|
||||||
.add("classes='" + classes + "'") |
|
||||||
.add("curStatusBoilerOne=" + curStatusBoilerOne) |
|
||||||
.add("tempOutBoilerOne=" + tempOutBoilerOne) |
|
||||||
.add("tempInBoilerOne=" + tempInBoilerOne) |
|
||||||
.add("tempWaterBoilerOne=" + tempWaterBoilerOne) |
|
||||||
.add("tempFlueGasBoilerOne=" + tempFlueGasBoilerOne) |
|
||||||
.add("curStatusBoilerTwo=" + curStatusBoilerTwo) |
|
||||||
.add("tempOutBoilerTwo=" + tempOutBoilerTwo) |
|
||||||
.add("tempInBoilerTwo=" + tempInBoilerTwo) |
|
||||||
.add("tempWaterBoilerTwo=" + tempWaterBoilerTwo) |
|
||||||
.add("tempFlueGasBoilerTwo=" + tempFlueGasBoilerTwo) |
|
||||||
.add("curStatusPumpOne=" + curStatusPumpOne) |
|
||||||
.add("frequencyPumpOne=" + frequencyPumpOne) |
|
||||||
.add("curStatusPumpTwo=" + curStatusPumpTwo) |
|
||||||
.add("frequencyPumpTwo=" + frequencyPumpTwo) |
|
||||||
.add("curStatusPumpThree=" + curStatusPumpThree) |
|
||||||
.add("frequencyPumpThree=" + frequencyPumpThree) |
|
||||||
.add("recorder='" + recorder + "'") |
|
||||||
.add("remark='" + remark + "'") |
|
||||||
.add("createDate=" + createDate) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,232 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.io.Serial; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.time.LocalDateTime; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 生活热水供水热泵运行情况 |
|
||||||
* @date 2025-10-22 17:40:03 |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@TableName("report_hot_water_param_his") |
|
||||||
public class ReportHotWaterParamHis extends BaseEntity implements Serializable { |
|
||||||
|
|
||||||
// 主键
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
// 楼层ID
|
|
||||||
private String floorId; |
|
||||||
|
|
||||||
// 记录日期
|
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
// 记录时间(varchar格式)
|
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// 班次
|
|
||||||
private String classes; |
|
||||||
|
|
||||||
// 1号热泵设定温度(℃)
|
|
||||||
private BigDecimal tempSetHotPumpOne; |
|
||||||
|
|
||||||
// 1号热泵实际温度(℃)
|
|
||||||
private BigDecimal tempRealHotPumpOne; |
|
||||||
|
|
||||||
// 1号热泵启停状态(0-关闭,1-开启)
|
|
||||||
private Integer statusSwitchHotPumpOne; |
|
||||||
|
|
||||||
// 1号热泵运行状态(0-故障,1-正常)
|
|
||||||
private Integer statusRunHotPumpOne; |
|
||||||
|
|
||||||
// 2号热泵设定温度(℃)
|
|
||||||
private BigDecimal tempSetHotPumpTwo; |
|
||||||
|
|
||||||
// 2号热泵实际温度(℃)
|
|
||||||
private BigDecimal tempRealHotPumpTwo; |
|
||||||
|
|
||||||
// 2号热泵启停状态
|
|
||||||
private Integer statusSwitchHotPumpTwo; |
|
||||||
|
|
||||||
// 2号热泵运行状态
|
|
||||||
private Integer statusRunHotPumpTwo; |
|
||||||
|
|
||||||
// 3号热泵设定温度(℃)
|
|
||||||
private BigDecimal tempSetHotPumpThree; |
|
||||||
|
|
||||||
// 3号热泵实际温度(℃)
|
|
||||||
private BigDecimal tempRealHotPumpThree; |
|
||||||
|
|
||||||
// 3号热泵启停状态
|
|
||||||
private Integer statusSwitchHotPumpThree; |
|
||||||
|
|
||||||
// 3号热泵运行状态
|
|
||||||
private Integer statusRunHotPumpThree; |
|
||||||
|
|
||||||
// 4号热泵设定温度(℃)
|
|
||||||
private BigDecimal tempSetHotPumpFour; |
|
||||||
|
|
||||||
// 4号热泵实际温度(℃)
|
|
||||||
private BigDecimal tempRealHotPumpFour; |
|
||||||
|
|
||||||
// 4号热泵启停状态
|
|
||||||
private Integer statusSwitchHotPumpFour; |
|
||||||
|
|
||||||
// 4号热泵运行状态
|
|
||||||
private Integer statusRunHotPumpFour; |
|
||||||
|
|
||||||
// 高区/裙楼设定压力(MPa)
|
|
||||||
private BigDecimal presSetSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/裙楼实际压力(MPa)
|
|
||||||
private BigDecimal presRealSupplyPumpAreaOne; |
|
||||||
|
|
||||||
// 高区/裙楼1号泵运行状态
|
|
||||||
private Integer statusRunSupplyPumpOne; |
|
||||||
|
|
||||||
// 高区/裙楼2号泵运行状态
|
|
||||||
private Integer statusRunSupplyPumpTwo; |
|
||||||
|
|
||||||
// 中区/中厨设定压力(MPa)
|
|
||||||
private BigDecimal presSetSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中厨实际压力(MPa)
|
|
||||||
private BigDecimal presRealSupplyPumpAreaTwo; |
|
||||||
|
|
||||||
// 中区/中厨1号泵运行状态
|
|
||||||
private Integer statusRunSupplyPumpThree; |
|
||||||
|
|
||||||
// 中区/中厨2号泵运行状态
|
|
||||||
private Integer statusRunSupplyPumpFour; |
|
||||||
|
|
||||||
// 高区/裙楼液位(米)
|
|
||||||
private BigDecimal levelWaterTankOne; |
|
||||||
|
|
||||||
// 中区/中厨液位(米)
|
|
||||||
private BigDecimal levelWaterTankTwo; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
private String remark; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
// 无参构造
|
|
||||||
public ReportHotWaterParamHis() { |
|
||||||
} |
|
||||||
|
|
||||||
// Getter/Setter 方法(此处省略,实际开发中建议使用 Lombok @Data)
|
|
||||||
|
|
||||||
// 业务方法示例:判断热泵1是否正常运行
|
|
||||||
public boolean isHotPump1Normal() { |
|
||||||
return statusRunHotPumpOne != null && statusRunHotPumpOne == 1; |
|
||||||
} |
|
||||||
|
|
||||||
// 业务方法示例:获取当前压力差值(高区)
|
|
||||||
public BigDecimal getHighAreaPressureDiff() { |
|
||||||
return presRealSupplyPumpAreaOne.subtract(presSetSupplyPumpAreaOne); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportHotWaterParamHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("floorId='" + floorId + "'") |
|
||||||
.add("curDate=" + curDate) |
|
||||||
.add("curTime='" + curTime + "'") |
|
||||||
.add("classes='" + classes + "'") |
|
||||||
.add("tempSetHotPumpOne=" + tempSetHotPumpOne) |
|
||||||
.add("tempRealHotPumpOne=" + tempRealHotPumpOne) |
|
||||||
.add("statusSwitchHotPumpOne=" + statusSwitchHotPumpOne) |
|
||||||
.add("statusRunHotPumpOne=" + statusRunHotPumpOne) |
|
||||||
.add("tempSetHotPumpTwo=" + tempSetHotPumpTwo) |
|
||||||
.add("tempRealHotPumpTwo=" + tempRealHotPumpTwo) |
|
||||||
.add("statusSwitchHotPumpTwo=" + statusSwitchHotPumpTwo) |
|
||||||
.add("statusRunHotPumpTwo=" + statusRunHotPumpTwo) |
|
||||||
.add("tempSetHotPumpThree=" + tempSetHotPumpThree) |
|
||||||
.add("tempRealHotPumpThree=" + tempRealHotPumpThree) |
|
||||||
.add("statusSwitchHotPumpThree=" + statusSwitchHotPumpThree) |
|
||||||
.add("statusRunHotPumpThree=" + statusRunHotPumpThree) |
|
||||||
.add("tempSetHotPumpFour=" + tempSetHotPumpFour) |
|
||||||
.add("tempRealHotPumpFour=" + tempRealHotPumpFour) |
|
||||||
.add("statusSwitchHotPumpFour=" + statusSwitchHotPumpFour) |
|
||||||
.add("statusRunHotPumpFour=" + statusRunHotPumpFour) |
|
||||||
.add("presSetSupplyPumpAreaOne=" + presSetSupplyPumpAreaOne) |
|
||||||
.add("presRealSupplyPumpAreaOne=" + presRealSupplyPumpAreaOne) |
|
||||||
.add("statusRunSupplyPumpOne=" + statusRunSupplyPumpOne) |
|
||||||
.add("statusRunSupplyPumpTwo=" + statusRunSupplyPumpTwo) |
|
||||||
.add("presSetSupplyPumpAreaTwo=" + presSetSupplyPumpAreaTwo) |
|
||||||
.add("presRealSupplyPumpAreaTwo=" + presRealSupplyPumpAreaTwo) |
|
||||||
.add("statusRunSupplyPumpThree=" + statusRunSupplyPumpThree) |
|
||||||
.add("statusRunSupplyPumpFour=" + statusRunSupplyPumpFour) |
|
||||||
.add("levelWaterTankOne=" + levelWaterTankOne) |
|
||||||
.add("levelWaterTankTwo=" + levelWaterTankTwo) |
|
||||||
.add("recorder='" + recorder + "'") |
|
||||||
.add("remark='" + remark + "'") |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,114 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 设备抄表记录表 |
|
||||||
* @date 2025-10-21 10:26:12 |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
public class ReportMeterReadingsHis { |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID) |
|
||||||
private String id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备类型 |
|
||||||
*/ |
|
||||||
private String mtType; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备位置 |
|
||||||
*/ |
|
||||||
private String location; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备编号 |
|
||||||
*/ |
|
||||||
private String mtNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 昨日抄表读数 |
|
||||||
*/ |
|
||||||
private BigDecimal yesterdayReading; |
|
||||||
|
|
||||||
/** |
|
||||||
* 昨日抄表时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date yesterdayTimestamp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日抄表读数 |
|
||||||
*/ |
|
||||||
private BigDecimal todayReading; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日抄表时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date todayTimestamp; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设备倍率 |
|
||||||
*/ |
|
||||||
private int mtRatio; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日总读数*设备倍率 |
|
||||||
*/ |
|
||||||
private BigDecimal total; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日单价 |
|
||||||
*/ |
|
||||||
private BigDecimal unitPrice; |
|
||||||
|
|
||||||
/** |
|
||||||
* 当日金额 |
|
||||||
*/ |
|
||||||
private BigDecimal cost; |
|
||||||
|
|
||||||
/** |
|
||||||
* 记录创建时间 |
|
||||||
*/ |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** |
|
||||||
* 排序序号 |
|
||||||
*/ |
|
||||||
private int sortOrder; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportMeterReadingsHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("mtType='" + mtType + "'") |
|
||||||
.add("location='" + location + "'") |
|
||||||
.add("mtNum='" + mtNum + "'") |
|
||||||
.add("yesterdayReading=" + yesterdayReading) |
|
||||||
.add("yesterdayTimestamp=" + yesterdayTimestamp) |
|
||||||
.add("todayReading=" + todayReading) |
|
||||||
.add("todayTimestamp=" + todayTimestamp) |
|
||||||
.add("mtRatio=" + mtRatio) |
|
||||||
.add("total=" + total) |
|
||||||
.add("unitPrice=" + unitPrice) |
|
||||||
.add("cost=" + cost) |
|
||||||
.add("createTime=" + createTime) |
|
||||||
.add("sortOrder=" + sortOrder) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,170 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.Getter; |
|
||||||
import lombok.Setter; |
|
||||||
|
|
||||||
import java.io.Serial; |
|
||||||
import java.io.Serializable; |
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
import java.util.StringJoiner; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 生活热水供水热泵运行情况 |
|
||||||
* @date 2025-10-22 17:40:03 |
|
||||||
*/ |
|
||||||
@Setter |
|
||||||
@Getter |
|
||||||
@TableName("report_steam_run_param_his") |
|
||||||
public class ReportSteamRunParamHis extends BaseEntity implements Serializable { |
|
||||||
|
|
||||||
// 主键
|
|
||||||
@Serial |
|
||||||
private static final long serialVersionUID = 1L; |
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
|
||||||
private Long id; |
|
||||||
|
|
||||||
// 记录日期
|
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
// 记录时间(varchar格式)
|
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// 班次
|
|
||||||
private String classes; |
|
||||||
|
|
||||||
// 蒸汽机状态字
|
|
||||||
private Integer curStatus; |
|
||||||
|
|
||||||
// 运行状态
|
|
||||||
// @JsonIgnore
|
|
||||||
@TableField(exist = false) |
|
||||||
private String runStatus; |
|
||||||
|
|
||||||
// 火焰强度
|
|
||||||
private BigDecimal flameIntensity; |
|
||||||
|
|
||||||
// 烟气温度(℃)
|
|
||||||
private BigDecimal tempFlueGas; |
|
||||||
|
|
||||||
// 火焰百分比(%)
|
|
||||||
private BigDecimal percentFlameIntensity; |
|
||||||
|
|
||||||
// 液位(%)
|
|
||||||
private BigDecimal waterLevel; |
|
||||||
|
|
||||||
// 蒸汽温度(℃)
|
|
||||||
private BigDecimal tempCur; |
|
||||||
|
|
||||||
// 当前压力(Mpa)
|
|
||||||
private BigDecimal pressCur; |
|
||||||
|
|
||||||
// 压力设定值(Mpa)
|
|
||||||
private BigDecimal pressSet; |
|
||||||
|
|
||||||
// 启动压差(Mpa)
|
|
||||||
private BigDecimal pressStartDiff; |
|
||||||
|
|
||||||
// 停止压差(Mpa)
|
|
||||||
private BigDecimal pressShutdownDiff; |
|
||||||
|
|
||||||
// 瞬时压力(Mpa)
|
|
||||||
private BigDecimal pressInstance; |
|
||||||
|
|
||||||
// 瞬时流量(t/h)
|
|
||||||
private BigDecimal flowInstance; |
|
||||||
|
|
||||||
// 累积流量(t)
|
|
||||||
private BigDecimal flowTotal; |
|
||||||
|
|
||||||
// 巡查记录人
|
|
||||||
private String recorder; |
|
||||||
|
|
||||||
// 备注信息
|
|
||||||
private String remark; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new StringJoiner(", ", ReportSteamRunParamHis.class.getSimpleName() + "[", "]") |
|
||||||
.add("id='" + id + "'") |
|
||||||
.add("curDate=" + curDate) |
|
||||||
.add("curTime='" + curTime + "'") |
|
||||||
.add("classes='" + classes + "'") |
|
||||||
.add("curStatus=" + curStatus) |
|
||||||
.add("flameIntensity=" + flameIntensity) |
|
||||||
.add("tempFlueGas=" + tempFlueGas) |
|
||||||
.add("percentFlameIntensity=" + percentFlameIntensity) |
|
||||||
.add("waterLevel=" + waterLevel) |
|
||||||
.add("tempCur=" + tempCur) |
|
||||||
.add("pressCur=" + pressCur) |
|
||||||
.add("pressSet=" + pressSet) |
|
||||||
.add("pressStartDiff=" + pressStartDiff) |
|
||||||
.add("pressShutdownDiff=" + pressShutdownDiff) |
|
||||||
.add("pressInstance=" + pressInstance) |
|
||||||
.add("flowInstance=" + flowInstance) |
|
||||||
.add("flowTotal=" + flowTotal) |
|
||||||
.add("recorder='" + recorder + "'") |
|
||||||
.add("remark='" + remark + "'") |
|
||||||
.add("searchValue='" + searchValue + "'") |
|
||||||
.add("params=" + params) |
|
||||||
.add("createBy='" + createBy + "'") |
|
||||||
.add("createTime=" + createTime) |
|
||||||
.add("updateBy='" + updateBy + "'") |
|
||||||
.add("updateTime=" + updateTime) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,310 +0,0 @@ |
|||||||
package com.mh.common.core.domain.entity; |
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty; |
|
||||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|
||||||
import com.baomidou.mybatisplus.annotation.IdType; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableField; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableId; |
|
||||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude; |
|
||||||
import com.mh.common.core.domain.BaseEntity; |
|
||||||
import lombok.*; |
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
||||||
import org.springframework.data.annotation.Id; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalDate; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 系统参数设备运行历史记录 |
|
||||||
* @date 2025-08-12 10:44:36 |
|
||||||
*/ |
|
||||||
@Data |
|
||||||
@TableName("report_sys_run_param_his") |
|
||||||
public class ReportSysRunParamHis extends BaseEntity { |
|
||||||
|
|
||||||
/** |
|
||||||
* 自增主键 |
|
||||||
*/ |
|
||||||
@Id |
|
||||||
@TableId(value = "id", type = IdType.AUTO) |
|
||||||
private Long id; |
|
||||||
|
|
||||||
/** |
|
||||||
* 主机id |
|
||||||
*/ |
|
||||||
private String deviceNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 日期 |
|
||||||
*/ |
|
||||||
private LocalDate curDate; |
|
||||||
|
|
||||||
/** |
|
||||||
* 时间(格式建议与数据库存储一致,如 "HH:mm:ss" 或 "yyyy-MM-dd HH:mm:ss") |
|
||||||
*/ |
|
||||||
private String curTime; |
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 班次
|
|
||||||
// */
|
|
||||||
// private String classes;
|
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 设计流量%(修正列名,原 "design flow" 含空格) |
|
||||||
*/ |
|
||||||
private BigDecimal designFlow; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器压力kpa--磁悬浮 |
|
||||||
*/ |
|
||||||
private BigDecimal pressEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器饱和温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempEvapSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 蒸发器趋近温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempEvapApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器压力kpa--磁悬浮 |
|
||||||
*/ |
|
||||||
private BigDecimal pressCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器饱和温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempCondenserSaturation; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷凝器趋近温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempCondenserApproaching; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水设定值℃ |
|
||||||
*/ |
|
||||||
private BigDecimal setChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷水机需求% |
|
||||||
*/ |
|
||||||
private BigDecimal setLoad; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总电流% |
|
||||||
*/ |
|
||||||
private BigDecimal currentTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 总输入功率kw |
|
||||||
*/ |
|
||||||
private BigDecimal inputPowerTotal; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比1 |
|
||||||
*/ |
|
||||||
private BigDecimal ratioCompOne; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比1 |
|
||||||
*/ |
|
||||||
private BigDecimal ratioCompTwo; |
|
||||||
|
|
||||||
/** |
|
||||||
* 压缩比1 |
|
||||||
*/ |
|
||||||
private BigDecimal ratioCompThree; |
|
||||||
|
|
||||||
/** |
|
||||||
* 膨胀阀开度% |
|
||||||
*/ |
|
||||||
private BigDecimal openExv; |
|
||||||
|
|
||||||
/** |
|
||||||
* 运行中的压缩机数量 |
|
||||||
*/ |
|
||||||
private Integer runCompNum; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水泵频率hz |
|
||||||
*/ |
|
||||||
private BigDecimal frequencyChiller; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水出水压力kpa |
|
||||||
*/ |
|
||||||
private BigDecimal pressOutChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷冻水进水压力kpa |
|
||||||
*/ |
|
||||||
private BigDecimal pressInChillerWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水泵频率hz |
|
||||||
*/ |
|
||||||
private BigDecimal frequencyCooling; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水出水压力kpa |
|
||||||
*/ |
|
||||||
private BigDecimal pressOutCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却水进水压力kpa |
|
||||||
*/ |
|
||||||
private BigDecimal pressInCoolingWater; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔水泵频率hz |
|
||||||
*/ |
|
||||||
private BigDecimal frequencyCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 冷却塔运行数量(原注释可能有误,根据列名调整) |
|
||||||
*/ |
|
||||||
private Integer runCoolingTower; |
|
||||||
|
|
||||||
/** |
|
||||||
* 恒压补水罐压力 |
|
||||||
*/ |
|
||||||
private BigDecimal pressConstantWaterTank; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外温度℃ |
|
||||||
*/ |
|
||||||
private BigDecimal tempOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 室外湿度% |
|
||||||
*/ |
|
||||||
private BigDecimal humidityOutdoor; |
|
||||||
|
|
||||||
/** |
|
||||||
* 巡查记录人 |
|
||||||
*/ |
|
||||||
private String recorder; |
|
||||||
|
|
||||||
/** |
|
||||||
* 备注 |
|
||||||
*/ |
|
||||||
private String remark; |
|
||||||
|
|
||||||
@JsonIgnore |
|
||||||
@TableField(exist = false) |
|
||||||
private String searchValue; |
|
||||||
|
|
||||||
/** |
|
||||||
* 请求参数 |
|
||||||
*/ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|
||||||
private Map<String, Object> params; |
|
||||||
|
|
||||||
/** 创建者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private String createBy; |
|
||||||
|
|
||||||
/** 创建时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date createTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private String updateBy; |
|
||||||
|
|
||||||
/** 更新时间 */ |
|
||||||
@TableField(exist = false) |
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|
||||||
private Date updateTime; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageNum; |
|
||||||
|
|
||||||
/** 更新者 */ |
|
||||||
@TableField(exist = false) |
|
||||||
private int pageSize; |
|
||||||
|
|
||||||
@Override |
|
||||||
public String toString() { |
|
||||||
return new ToStringBuilder(this) |
|
||||||
.append("id", id) |
|
||||||
.append("deviceNum", deviceNum) |
|
||||||
.append("curDate", curDate) |
|
||||||
.append("curTime", curTime) |
|
||||||
.append("tempInChillerWater", tempInChillerWater) |
|
||||||
.append("tempOutChillerWater", tempOutChillerWater) |
|
||||||
.append("designFlow", designFlow) |
|
||||||
.append("pressEvapSaturation", pressEvapSaturation) |
|
||||||
.append("tempEvapSaturation", tempEvapSaturation) |
|
||||||
.append("tempEvapApproaching", tempEvapApproaching) |
|
||||||
.append("tempInCoolingWater", tempInCoolingWater) |
|
||||||
.append("tempOutCoolingWater", tempOutCoolingWater) |
|
||||||
.append("pressCondenserSaturation", pressCondenserSaturation) |
|
||||||
.append("tempCondenserSaturation", tempCondenserSaturation) |
|
||||||
.append("tempCondenserApproaching", tempCondenserApproaching) |
|
||||||
.append("setChillerWater", setChillerWater) |
|
||||||
.append("setLoad", setLoad) |
|
||||||
.append("currentTotal", currentTotal) |
|
||||||
.append("inputPowerTotal", inputPowerTotal) |
|
||||||
.append("ratioCompOne", ratioCompOne) |
|
||||||
.append("ratioCompTwo", ratioCompTwo) |
|
||||||
.append("ratioCompThree", ratioCompThree) |
|
||||||
.append("openExv", openExv) |
|
||||||
.append("runCompNum", runCompNum) |
|
||||||
.append("frequencyChiller", frequencyChiller) |
|
||||||
.append("pressOutChillerWater", pressOutChillerWater) |
|
||||||
.append("pressInChillerWater", pressInChillerWater) |
|
||||||
.append("frequencyCooling", frequencyCooling) |
|
||||||
.append("pressOutCoolingWater", pressOutCoolingWater) |
|
||||||
.append("pressInCoolingWater", pressInCoolingWater) |
|
||||||
.append("frequencyCoolingTower", frequencyCoolingTower) |
|
||||||
.append("runCoolingTower", runCoolingTower) |
|
||||||
.append("pressConstantWaterTank", pressConstantWaterTank) |
|
||||||
.append("tempOutdoor", tempOutdoor) |
|
||||||
.append("humidityOutdoor", humidityOutdoor) |
|
||||||
.append("recorder", recorder) |
|
||||||
.append("remark", remark) |
|
||||||
.append("searchValue", searchValue) |
|
||||||
.append("params", params) |
|
||||||
.append("createBy", createBy) |
|
||||||
.append("createTime", createTime) |
|
||||||
.append("updateBy", updateBy) |
|
||||||
.append("updateTime", updateTime) |
|
||||||
.toString(); |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,81 +0,0 @@ |
|||||||
package com.mh.common.utils.file.handle; |
|
||||||
|
|
||||||
import com.alibaba.excel.metadata.Head; |
|
||||||
import com.alibaba.excel.metadata.data.WriteCellData; |
|
||||||
import com.alibaba.excel.write.handler.CellWriteHandler; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteTableHolder; |
|
||||||
import org.apache.poi.ss.usermodel.Cell; |
|
||||||
import org.apache.poi.ss.usermodel.Row; |
|
||||||
import org.apache.poi.ss.usermodel.Sheet; |
|
||||||
import org.apache.poi.ss.util.CellRangeAddress; |
|
||||||
|
|
||||||
import java.util.HashMap; |
|
||||||
import java.util.List; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 列合并 |
|
||||||
* @date 2024-06-03 10:01:07 |
|
||||||
*/ |
|
||||||
public class ExcelFillCellMergeHandler implements CellWriteHandler { |
|
||||||
private static final String KEY ="%s-%s"; |
|
||||||
//所有的合并信息都存在了这个map里面
|
|
||||||
Map<String, Integer> mergeInfo = new HashMap<>(); |
|
||||||
|
|
||||||
public ExcelFillCellMergeHandler() { |
|
||||||
} |
|
||||||
public ExcelFillCellMergeHandler(Map<String, Integer> mergeInfo) { |
|
||||||
this.mergeInfo = mergeInfo; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Head head, Integer integer, Integer integer1, Boolean aBoolean) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell, Head head, Integer integer, Boolean aBoolean) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void afterCellDataConverted(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, WriteCellData<?> cellData, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) { |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void afterCellDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) { |
|
||||||
|
|
||||||
//当前行
|
|
||||||
int curRowIndex = cell.getRowIndex(); |
|
||||||
//当前列
|
|
||||||
int curColIndex = cell.getColumnIndex(); |
|
||||||
|
|
||||||
Integer num = mergeInfo.get(String.format(KEY, curRowIndex, curColIndex)); |
|
||||||
if(null != num){ |
|
||||||
// 合并最后一行 ,列
|
|
||||||
mergeWithPrevCol(writeSheetHolder, cell, curRowIndex, curColIndex,num); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public void mergeWithPrevCol(WriteSheetHolder writeSheetHolder, Cell cell, int curRowIndex, int curColIndex, int num) { |
|
||||||
Sheet sheet = writeSheetHolder.getSheet(); |
|
||||||
CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex, curRowIndex, curColIndex, curColIndex + num); |
|
||||||
sheet.addMergedRegion(cellRangeAddress); |
|
||||||
} |
|
||||||
|
|
||||||
//num从第几列开始增加多少列
|
|
||||||
// curRowIndex 在第几行进行行合并
|
|
||||||
// curColIndex 在第几列进行合并
|
|
||||||
// num 合并多少格
|
|
||||||
// 比如我上图中中心需要在第三行 从0列开始合并三列 所以我可以传入 (3,0,2)
|
|
||||||
public void add (int curRowIndex, int curColIndex , int num){ |
|
||||||
mergeInfo.put(String.format(KEY, curRowIndex, curColIndex),num); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -1,49 +0,0 @@ |
|||||||
package com.mh.common.utils.file.handle; |
|
||||||
|
|
||||||
import com.alibaba.excel.metadata.Head; |
|
||||||
import com.alibaba.excel.write.handler.CellWriteHandler; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteTableHolder; |
|
||||||
import org.apache.commons.collections4.CollectionUtils; |
|
||||||
import org.apache.poi.ss.usermodel.Row; |
|
||||||
import org.springframework.util.PropertyPlaceholderHelper; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import java.util.Properties; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 报表handle |
|
||||||
* @date 2024-05-31 17:36:38 |
|
||||||
*/ |
|
||||||
public class ReportDayAndMonthParamHandler implements CellWriteHandler { |
|
||||||
|
|
||||||
private final String title; |
|
||||||
|
|
||||||
private final String value; |
|
||||||
|
|
||||||
PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper("${", "}"); |
|
||||||
|
|
||||||
public ReportDayAndMonthParamHandler(String value, String title) { |
|
||||||
this.title = title; |
|
||||||
this.value = value; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, |
|
||||||
Row row, Head head, Integer integer, Integer integer1, Boolean aBoolean) { |
|
||||||
if (head != null) { |
|
||||||
List<String> headNameList = head.getHeadNameList(); |
|
||||||
if (CollectionUtils.isNotEmpty(headNameList)) { |
|
||||||
Properties properties = new Properties(); |
|
||||||
properties.setProperty(title, value); |
|
||||||
for (int i = 0; i < headNameList.size(); i++) { |
|
||||||
headNameList.set(i, placeholderHelper.replacePlaceholders(headNameList.get(i), properties)); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,46 +0,0 @@ |
|||||||
package com.mh.common.utils.file.handle; |
|
||||||
|
|
||||||
import com.alibaba.excel.metadata.Head; |
|
||||||
import com.alibaba.excel.write.handler.CellWriteHandler; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
|
||||||
import com.alibaba.excel.write.metadata.holder.WriteTableHolder; |
|
||||||
import org.apache.commons.collections4.CollectionUtils; |
|
||||||
import org.apache.poi.ss.usermodel.Row; |
|
||||||
import org.springframework.util.PropertyPlaceholderHelper; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
import java.util.Properties; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 报表handle |
|
||||||
* @date 2024-05-31 17:36:38 |
|
||||||
*/ |
|
||||||
public class ReportSysParamHandler implements CellWriteHandler { |
|
||||||
|
|
||||||
private final String title; |
|
||||||
|
|
||||||
PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper("${", "}"); |
|
||||||
|
|
||||||
public ReportSysParamHandler(String title) { |
|
||||||
this.title = title; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, |
|
||||||
Row row, Head head, Integer integer, Integer integer1, Boolean aBoolean) { |
|
||||||
if (head != null) { |
|
||||||
List<String> headNameList = head.getHeadNameList(); |
|
||||||
if (CollectionUtils.isNotEmpty(headNameList)) { |
|
||||||
Properties properties = new Properties(); |
|
||||||
properties.setProperty("deviceType", title); |
|
||||||
for (int i = 0; i < headNameList.size(); i++) { |
|
||||||
headNameList.set(i, placeholderHelper.replacePlaceholders(headNameList.get(i), properties)); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,25 +0,0 @@ |
|||||||
package com.mh.common.utils.file.handle; |
|
||||||
|
|
||||||
import com.alibaba.excel.write.style.row.AbstractRowHeightStyleStrategy; |
|
||||||
import org.apache.poi.ss.usermodel.Row; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 处理行高 |
|
||||||
* @date 2024-08-09 15:03:37 |
|
||||||
*/ |
|
||||||
public class RowHeightStyleHandler extends AbstractRowHeightStyleStrategy { |
|
||||||
@Override |
|
||||||
protected void setHeadColumnHeight(Row row, int i) { |
|
||||||
if (i == 2) { |
|
||||||
row.setHeightInPoints(70); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
protected void setContentColumnHeight(Row row, int i) { |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,11 +0,0 @@ |
|||||||
package com.mh.quartz.domain; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Classname FuzzyLevel |
|
||||||
* Todo: |
|
||||||
* @Date 2025-05-31 14:19 |
|
||||||
* @Created by LJF |
|
||||||
*/ |
|
||||||
public enum FuzzyLevel { |
|
||||||
NB, NM, NS, ZO, PS, PM, PB; // 极小,较小,小,零,稍大,较大,极大
|
|
||||||
} |
|
||||||
@ -1,52 +0,0 @@ |
|||||||
package com.mh.quartz.domain; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description PID参数 |
|
||||||
* @date 2025-05-30 13:51:22 |
|
||||||
*/ |
|
||||||
public class PIDParams { |
|
||||||
|
|
||||||
private volatile double kp; // 比例系数
|
|
||||||
private volatile double ki; // 积分系数
|
|
||||||
private volatile double kd; // 微分系数
|
|
||||||
|
|
||||||
public PIDParams(double kp, double ki, double kd) { |
|
||||||
this.kp = kp; |
|
||||||
this.ki = ki; |
|
||||||
this.kd = kd; |
|
||||||
} |
|
||||||
|
|
||||||
// 动态更新PID参数
|
|
||||||
public void updateParams(double kp, double ki, double kd) { |
|
||||||
this.kp = kp; |
|
||||||
this.ki = ki; |
|
||||||
this.kd = kd; |
|
||||||
} |
|
||||||
|
|
||||||
public double getKp() { |
|
||||||
return kp; |
|
||||||
} |
|
||||||
|
|
||||||
public void setKp(double kp) { |
|
||||||
this.kp = kp; |
|
||||||
} |
|
||||||
|
|
||||||
public double getKi() { |
|
||||||
return ki; |
|
||||||
} |
|
||||||
|
|
||||||
public void setKi(double ki) { |
|
||||||
this.ki = ki; |
|
||||||
} |
|
||||||
|
|
||||||
public double getKd() { |
|
||||||
return kd; |
|
||||||
} |
|
||||||
|
|
||||||
public void setKd(double kd) { |
|
||||||
this.kd = kd; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,387 +0,0 @@ |
|||||||
package com.mh.quartz.task; |
|
||||||
|
|
||||||
import com.mh.common.config.MHConfig; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.domain.entity.CpmSpaceRelation; |
|
||||||
import com.mh.common.core.domain.entity.OrderEntity; |
|
||||||
import com.mh.common.core.domain.entity.PolicyManage; |
|
||||||
import com.mh.common.utils.DateUtils; |
|
||||||
import com.mh.framework.mqtt.service.IMqttGatewayService; |
|
||||||
import com.mh.quartz.util.AHUPIDControlUtil; |
|
||||||
import com.mh.quartz.util.FuzzyPIDControlUtil; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
import com.mh.system.service.operation.IOperationDeviceService; |
|
||||||
import com.mh.system.service.policy.IPolicyManageService; |
|
||||||
import com.mh.system.service.space.ICpmSpaceRelationService; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.beans.factory.annotation.Value; |
|
||||||
import org.springframework.stereotype.Component; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalTime; |
|
||||||
import java.util.*; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 风柜系统任务 |
|
||||||
* @date 2025-05-30 08:36:43 |
|
||||||
*/ |
|
||||||
@Slf4j |
|
||||||
@Component("ahuTask") |
|
||||||
public class AHUTask { |
|
||||||
|
|
||||||
@Value("${control.topic}") |
|
||||||
String controlTopic; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private MHConfig mhConfig; |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
private final IPolicyManageService policyManageService; |
|
||||||
|
|
||||||
private final ICpmSpaceRelationService cpmSpaceRelationService; |
|
||||||
|
|
||||||
private final IOperationDeviceService iOperationService; |
|
||||||
|
|
||||||
private final IMqttGatewayService iMqttGatewayService; |
|
||||||
|
|
||||||
// 在 AHUTask 类中添加一个 PID 控制器成员变量
|
|
||||||
private final Map<String, FuzzyPIDControlUtil> pidControllers = new HashMap<>(); |
|
||||||
|
|
||||||
private final List<String> ahuList = List.of("ddc13_0211385", // 软件2号
|
|
||||||
"ddc13_0211485", // 软件3号
|
|
||||||
"ddc14_01185", // 硬件2号
|
|
||||||
"ddc14_01285", // 硬件3号
|
|
||||||
"ddc13_1510085", // 远程手自动启停
|
|
||||||
"ddc13_1510185" // 时间表启停
|
|
||||||
); |
|
||||||
|
|
||||||
@Autowired |
|
||||||
public AHUTask(ICollectionParamsManageService collectionParamsManageService, IPolicyManageService policyManageService, ICpmSpaceRelationService cpmSpaceRelationService, IOperationDeviceService iOperationService, IMqttGatewayService iMqttGatewayService) { |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
this.policyManageService = policyManageService; |
|
||||||
this.cpmSpaceRelationService = cpmSpaceRelationService; |
|
||||||
this.iOperationService = iOperationService; |
|
||||||
this.iMqttGatewayService = iMqttGatewayService; |
|
||||||
} |
|
||||||
|
|
||||||
public void ddc13SendDataToDDC14() throws InterruptedException { |
|
||||||
HashMap<String, Object> queryMap = new HashMap<>(); |
|
||||||
queryMap.put("systemType", "2"); |
|
||||||
queryMap.put("isUse", 0); |
|
||||||
queryMap.put("mtType", "7"); |
|
||||||
List<CollectionParamsManage> collectionParamsManages = collectionParamsManageService.selectListByParams(queryMap); |
|
||||||
List<CollectionParamsManage> list = collectionParamsManages.stream() |
|
||||||
.filter(collectionParamsManage -> ahuList.contains(collectionParamsManage.getMtNum())) |
|
||||||
.toList(); |
|
||||||
if (list.isEmpty()) { |
|
||||||
return; |
|
||||||
} |
|
||||||
// Optional<CollectionParamsManage> twoHardStartStopList = list.stream().filter(val -> val.getMtNum().equals("ddc13_1510085")).findFirst();
|
|
||||||
// boolean present = twoHardStartStopList.isPresent();
|
|
||||||
// CollectionParamsManage threeHardStartStop = new CollectionParamsManage();
|
|
||||||
// if (present) {
|
|
||||||
// threeHardStartStop = twoHardStartStopList.get();
|
|
||||||
// }
|
|
||||||
Optional<CollectionParamsManage> twoHardParamList = list.stream().filter(val -> val.getMtNum().equals("ddc14_01185")).findFirst(); |
|
||||||
Optional<CollectionParamsManage> threeHardParamList = list.stream().filter(val -> val.getMtNum().equals("ddc14_01285")).findFirst(); |
|
||||||
CollectionParamsManage twoHardParam = new CollectionParamsManage(); |
|
||||||
if (twoHardParamList.isPresent()) { |
|
||||||
twoHardParam = twoHardParamList.get(); |
|
||||||
} |
|
||||||
CollectionParamsManage threeHardParam = new CollectionParamsManage(); |
|
||||||
if (threeHardParamList.isPresent()) { |
|
||||||
threeHardParam = threeHardParamList.get(); |
|
||||||
} |
|
||||||
int twoSoftValue = 0; |
|
||||||
int threeSoftValue = 0; |
|
||||||
// 判断远程启停或者时间表启停是否开启来,判断是否存在getCurValue,且当前时间等于今天的时间
|
|
||||||
if (list.stream().anyMatch(val -> |
|
||||||
(val.getMtNum().equals("ddc13_1510085") || val.getMtNum().equals("ddc13_1510185")) |
|
||||||
&& val.getCurValue() != null)) { |
|
||||||
// 判断curTime是否为今天
|
|
||||||
Date now = new Date(); |
|
||||||
boolean isToday = list.stream().anyMatch(val -> |
|
||||||
(val.getMtNum().equals("ddc13_1510085") || val.getMtNum().equals("ddc13_1510185")) |
|
||||||
&& val.getCurTime() != null && DateUtils.isSameDay(val.getCurTime(), now)); |
|
||||||
if (isToday) { |
|
||||||
// 如果curTime是今天,则执行相关逻辑
|
|
||||||
// 可以在这里添加需要执行的代码
|
|
||||||
for (CollectionParamsManage value : list) { |
|
||||||
if (value.getMtNum().contains("ddc13_0211385")) { |
|
||||||
// 2号软件风阀调节
|
|
||||||
twoSoftValue = value.getCurValue().intValue(); |
|
||||||
sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), String.valueOf(twoSoftValue), 0, twoHardParam.getOtherName()))); |
|
||||||
} else if (value.getMtNum().contains("ddc13_0211485")) { |
|
||||||
// 3号软件风阀调节
|
|
||||||
threeSoftValue = value.getCurValue().intValue(); |
|
||||||
sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), String.valueOf(threeSoftValue), 0, threeHardParam.getOtherName()))); |
|
||||||
} |
|
||||||
Thread.sleep(2000); |
|
||||||
} |
|
||||||
} else { |
|
||||||
for (CollectionParamsManage value : list) { |
|
||||||
if (value.getMtNum().contains("ddc13_0211385")) { |
|
||||||
if (twoHardParam.getCurValue() != null && twoHardParam.getCurValue().intValue() != 0) { |
|
||||||
// 发送值给2号硬件风阀控制点位
|
|
||||||
sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), "0", 0, twoHardParam.getOtherName()))); |
|
||||||
} |
|
||||||
} else if (value.getMtNum().contains("ddc13_0211485")) { |
|
||||||
if (threeHardParam.getCurValue() != null && threeHardParam.getCurValue().intValue() != 0) { |
|
||||||
// 发送值给3号硬件风阀控制点位
|
|
||||||
sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), "0", 0, threeHardParam.getOtherName()))); |
|
||||||
} |
|
||||||
} |
|
||||||
Thread.sleep(2000); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
// else {
|
|
||||||
// for (CollectionParamsManage value : list) {
|
|
||||||
// if (value.getMtNum().contains("ddc13_0211385")) {
|
|
||||||
// if (twoHardParam.getCurValue() != null && twoHardParam.getCurValue().intValue() != 0) {
|
|
||||||
// // 发送值给2号硬件风阀控制点位
|
|
||||||
// sendOrderToMqtt(List.of(new OrderEntity(twoHardParam.getId(), "0", 0, twoHardParam.getOtherName())));
|
|
||||||
// }
|
|
||||||
// } else if (value.getMtNum().contains("ddc13_0211485")) {
|
|
||||||
// if (threeHardParam.getCurValue() != null && threeHardParam.getCurValue().intValue() != 0) {
|
|
||||||
// // 发送值给3号硬件风阀控制点位
|
|
||||||
// sendOrderToMqtt(List.of(new OrderEntity(threeHardParam.getId(), "0", 0, threeHardParam.getOtherName())));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// Thread.sleep(2000);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public void sendOrderToMqtt(List<OrderEntity> changeValues) { |
|
||||||
try { |
|
||||||
String sendOrder = iOperationService.operationDevice(changeValues); |
|
||||||
String name = mhConfig.getName(); |
|
||||||
// 获取mqtt操作队列(后期通过mqtt队列配置发送主题)
|
|
||||||
log.info("发送主题:{},消息:{}", name + "/" + controlTopic, sendOrder); |
|
||||||
iMqttGatewayService.publish(name + "/" + controlTopic, sendOrder, 1); |
|
||||||
} catch (Exception e) { |
|
||||||
log.error("设备操作失败", e); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public void adjustWaterValve(String kp, String ki, String kd) { |
|
||||||
// 西餐走廊2、宴会走廊需要调整PID参数,其他的ddc自己已经处理好
|
|
||||||
String[] deviceLedgerIds = new String[]{"ddc0083b3a898d85f3a1205a2d82071e100", "ddc0133b3a898d85f3a1205a2d82071e100"}; |
|
||||||
for (String deviceLedgerId : deviceLedgerIds) { |
|
||||||
// 获取西餐走廊2的启停控制
|
|
||||||
HashMap<String, Object> queryMap = new HashMap<>(); |
|
||||||
queryMap.put("systemType", "2"); |
|
||||||
queryMap.put("deviceLedgerId", deviceLedgerId); |
|
||||||
queryMap.put("isUse", 0); |
|
||||||
// 得出 systemType =2 的数据
|
|
||||||
List<CollectionParamsManage> collectionParamsManages = collectionParamsManageService.selectListByParams(queryMap); |
|
||||||
|
|
||||||
CollectionParamsManage collectionParamsManage = new CollectionParamsManage(); |
|
||||||
// 过滤得出启停状态
|
|
||||||
Optional<CollectionParamsManage> first = collectionParamsManages.stream().filter(item -> item.getCurValue().intValue() == 1 && item.getParamType().equals("2")).findFirst(); |
|
||||||
if (first.isEmpty()) { |
|
||||||
// 如果设备停止了,则同步关掉水阀
|
|
||||||
// 过滤获取水阀调节参数
|
|
||||||
Optional<CollectionParamsManage> fourth = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getOtherName().contains("水阀调节") |
|
||||||
&& item.getParamType().equals("3")).findFirst(); |
|
||||||
if (fourth.isEmpty()) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
// 得出水阀调节参数
|
|
||||||
collectionParamsManage = fourth.get(); |
|
||||||
// 先判断水阀是否已经关闭
|
|
||||||
if (collectionParamsManage.getCurValue().intValue() == 0) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
// 关闭
|
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(collectionParamsManage.getId(), String.valueOf(0), Integer.parseInt(collectionParamsManage.getParamType()), collectionParamsManage.getOtherName())); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
continue; |
|
||||||
} |
|
||||||
|
|
||||||
// 过滤获取回风温度设置值
|
|
||||||
Optional<CollectionParamsManage> second = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getOtherName().contains("回风温度") |
|
||||||
&& item.getParamType().equals("14")).findFirst(); |
|
||||||
if (second.isEmpty()) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
// 得出回风温度设置值
|
|
||||||
double backTempSet = second.get().getCurValue().doubleValue(); |
|
||||||
|
|
||||||
// 设定目标温度(夏季制冷24℃)
|
|
||||||
// ✅ 如果没有该设备的控制器,则创建一个新的并保存起来
|
|
||||||
FuzzyPIDControlUtil controller = pidControllers.computeIfAbsent(deviceLedgerId, k -> new FuzzyPIDControlUtil(kp, ki, kd)); |
|
||||||
|
|
||||||
log.info("开始模糊PID控制循环,查看对象是否有变化:{}", controller); |
|
||||||
|
|
||||||
// 过滤获取当前回风温度
|
|
||||||
Optional<CollectionParamsManage> third = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getOtherName().contains("回风温度") |
|
||||||
&& item.getParamType().equals("12")).findFirst(); |
|
||||||
if (third.isEmpty()) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
// 得出当前回风温度
|
|
||||||
double temp = third.get().getCurValue().doubleValue(); |
|
||||||
|
|
||||||
// 2. 计算水阀开度(时间间隔1秒)
|
|
||||||
double valveOpening1 = controller.calculate(backTempSet, temp, 1); |
|
||||||
int valveOpening = new BigDecimal(valveOpening1).intValue(); |
|
||||||
// 过滤获取水阀调节参数
|
|
||||||
Optional<CollectionParamsManage> fourth = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getOtherName().contains("水阀调节") |
|
||||||
&& item.getParamType().equals("3")).findFirst(); |
|
||||||
if (fourth.isEmpty()) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
// 得出水阀调节参数
|
|
||||||
collectionParamsManage = fourth.get(); |
|
||||||
// 发送控制指令
|
|
||||||
if (valveOpening > 0 && valveOpening <= 100) { |
|
||||||
// 开启
|
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(collectionParamsManage.getId(), String.valueOf(valveOpening), Integer.parseInt(collectionParamsManage.getParamType()), collectionParamsManage.getOtherName())); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
// 3. 应用水阀开度(实际应用发送给执行机构)
|
|
||||||
log.info("回风温度: {} ℃ | 水阀开度: {} % ", |
|
||||||
temp, valveOpening); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public void startOrStopAHU() { |
|
||||||
// 扫描启动了定时开关机的风机,根据当前时间判断是否需要启动或停止
|
|
||||||
// systemType 2: 风柜系统
|
|
||||||
HashMap<String, Object> queryMap = new HashMap<>(); |
|
||||||
queryMap.put("systemType", "2"); |
|
||||||
// 得出 systemType =2 的数据
|
|
||||||
List<CollectionParamsManage> collectionParamsManages = collectionParamsManageService.selectListByParams(queryMap); |
|
||||||
// 判断当前时间是星期几
|
|
||||||
String dayOfWeekValue = DateUtils.dayOfWeekValue(); |
|
||||||
// 过滤otherName包含dayOfWeekValue,paramType=29, curValue=1的数据,代表已经启用定时开关机的功能
|
|
||||||
List<CollectionParamsManage> needStartOrStopDataList = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getOtherName().contains(dayOfWeekValue) |
|
||||||
&& item.getParamType().equals("29") |
|
||||||
&& item.getCurValue().intValue() == 1) |
|
||||||
.toList(); |
|
||||||
// 查询得出对应的houseId
|
|
||||||
List<PolicyManage> policyManageList = policyManageService.selectListByCpmIds(needStartOrStopDataList); |
|
||||||
|
|
||||||
// 开始:根据houseId查询出对应的风机启停id
|
|
||||||
List<CpmSpaceRelation> cpmSpaceRelationList = cpmSpaceRelationService.selectListByHouseId(policyManageList); |
|
||||||
// collectionParamsManages过滤出能够开启风机的点位,paramType=2,isUse=0
|
|
||||||
List<CollectionParamsManage> startDeviceList = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getParamType().equals("2") |
|
||||||
&& item.getIsUse() == 0) |
|
||||||
.toList(); |
|
||||||
// 结束:根据houseId查询出对应的风机启停id
|
|
||||||
|
|
||||||
// 在拼接出启用定时开关机的启动时间、关闭时间
|
|
||||||
Map<String, List<PolicyManage>> groupedByHouseId = policyManageList.stream() |
|
||||||
.collect(Collectors.groupingBy( |
|
||||||
PolicyManage::getHouseId, |
|
||||||
Collectors.toList() |
|
||||||
)); |
|
||||||
// groupedByHouseId for 循环遍历
|
|
||||||
for (Map.Entry<String, List<PolicyManage>> entry : groupedByHouseId.entrySet()) { |
|
||||||
// 得出houseId
|
|
||||||
String houseId = entry.getKey(); |
|
||||||
List<PolicyManage> timeList1 = entry.getValue(); |
|
||||||
if (timeList1.isEmpty()) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
PolicyManage policyManage1 = timeList1.getFirst(); |
|
||||||
// 得出policyManageList
|
|
||||||
List<PolicyManage> timeList = policyManageService.selectPolicyListByHouseId(houseId, policyManage1.getPolicyName()); |
|
||||||
int isHaveTime = 0; |
|
||||||
int startHour = 0; |
|
||||||
int startMinute = 0; |
|
||||||
int endHour = 0; |
|
||||||
int endMinute = 0; |
|
||||||
for (PolicyManage policyManage : timeList) { |
|
||||||
if (policyManage.getPointName().contains("开_时")) { |
|
||||||
startHour = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("开_分")) { |
|
||||||
startMinute = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("关_时")) { |
|
||||||
endHour = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("关_分")) { |
|
||||||
endMinute = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
} |
|
||||||
if (isHaveTime == 0) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
LocalTime nowTime = LocalTime.now(); |
|
||||||
LocalTime startTime = LocalTime.of(startHour, startMinute); |
|
||||||
LocalTime endTime = LocalTime.of(endHour, endMinute); |
|
||||||
// collectionParamsManages过滤出能够开启风机的点位,paramType=2,isUse=0
|
|
||||||
Set<String> validCpmIds = cpmSpaceRelationList.stream() |
|
||||||
.filter(item -> item.getHouseId().equals(houseId)) |
|
||||||
.map(CpmSpaceRelation::getCpmId) |
|
||||||
.collect(Collectors.toSet()); |
|
||||||
List<CollectionParamsManage> startDataList = startDeviceList |
|
||||||
.stream() |
|
||||||
.filter(item -> validCpmIds.contains(item.getId())) |
|
||||||
.toList(); |
|
||||||
// 判断当前风机是否在开启状态了
|
|
||||||
if (null == startDataList || startDataList.size() == 0) { |
|
||||||
return; |
|
||||||
} |
|
||||||
CollectionParamsManage first = startDataList.getFirst(); |
|
||||||
// 判断当前时间是否在开启时间范围内
|
|
||||||
if (DateUtils.isBetween(nowTime, startTime, endTime)) { |
|
||||||
// 判断当前风机是否在开启状态了
|
|
||||||
if (first.getCurValue().intValue() == 1) { |
|
||||||
// 当前风机在开启状态,不需要启动
|
|
||||||
log.info("当前风机在开启状态,不需要启动"); |
|
||||||
} else { |
|
||||||
// 当前风机不在开启状态,需要启动
|
|
||||||
log.info("当前风机不在开启状态,需要启动"); |
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(first.getId(), "1", Integer.parseInt(first.getParamType()), first.getOtherName())); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
} |
|
||||||
; |
|
||||||
} else { |
|
||||||
// 判断当前风机是否在关闭状态了
|
|
||||||
if (first.getCurValue().intValue() == 0) { |
|
||||||
// 当前风机在关闭状态,不需要停止
|
|
||||||
log.info("当前风机在关闭状态,不需要停止"); |
|
||||||
} else { |
|
||||||
// 当前风机不在关闭状态,需要停止
|
|
||||||
log.info("当前风机不在关闭状态,需要停止"); |
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(first.getId(), "0", Integer.parseInt(first.getParamType()), first.getOtherName())); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,206 +0,0 @@ |
|||||||
package com.mh.quartz.task; |
|
||||||
|
|
||||||
import com.mh.common.config.MHConfig; |
|
||||||
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.domain.entity.CpmSpaceRelation; |
|
||||||
import com.mh.common.core.domain.entity.OrderEntity; |
|
||||||
import com.mh.common.core.domain.entity.PolicyManage; |
|
||||||
import com.mh.common.utils.DateUtils; |
|
||||||
import com.mh.common.utils.StringUtils; |
|
||||||
import com.mh.framework.mqtt.service.IMqttGatewayService; |
|
||||||
import com.mh.system.service.device.ICollectionParamsManageService; |
|
||||||
import com.mh.system.service.operation.IOperationDeviceService; |
|
||||||
import com.mh.system.service.policy.IPolicyManageService; |
|
||||||
import com.mh.system.service.report.IReportSysService; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.beans.factory.annotation.Value; |
|
||||||
import org.springframework.stereotype.Component; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.time.LocalTime; |
|
||||||
import java.util.*; |
|
||||||
import java.util.stream.Collectors; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 冷水机组定时任务 |
|
||||||
* @date 2025-08-13 17:22:09 |
|
||||||
*/ |
|
||||||
@Slf4j |
|
||||||
@Component("chillersTask") |
|
||||||
public class ChillersTask { |
|
||||||
|
|
||||||
@Value("${control.topic}") |
|
||||||
String controlTopic; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private MHConfig mhConfig; |
|
||||||
|
|
||||||
private final IReportSysService reportSysService; |
|
||||||
|
|
||||||
private final ICollectionParamsManageService collectionParamsManageService; |
|
||||||
|
|
||||||
private final IPolicyManageService policyManageService; |
|
||||||
|
|
||||||
private final IOperationDeviceService iOperationService; |
|
||||||
|
|
||||||
private final IMqttGatewayService iMqttGatewayService; |
|
||||||
|
|
||||||
public ChillersTask(IReportSysService reportSysService, |
|
||||||
ICollectionParamsManageService collectionParamsManageService, |
|
||||||
IPolicyManageService policyManageService, IOperationDeviceService iOperationService, IMqttGatewayService iMqttGatewayService) { |
|
||||||
this.reportSysService = reportSysService; |
|
||||||
this.collectionParamsManageService = collectionParamsManageService; |
|
||||||
this.policyManageService = policyManageService; |
|
||||||
this.iOperationService = iOperationService; |
|
||||||
this.iMqttGatewayService = iMqttGatewayService; |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建系统运行参数 |
|
||||||
*/ |
|
||||||
public void createSysRunParam() { |
|
||||||
// 定时执行运行脚本
|
|
||||||
reportSysService.execProSysRunParamHis(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 偏移值定时设置 |
|
||||||
*/ |
|
||||||
public void driftValueSet() { |
|
||||||
// 偏移值定时设置
|
|
||||||
// systemType 0: 主机空调系统
|
|
||||||
HashMap<String, Object> queryMap = new HashMap<>(); |
|
||||||
queryMap.put("systemType", "0"); |
|
||||||
// 得出 systemType =0 的数据
|
|
||||||
List<CollectionParamsManage> collectionParamsManages = collectionParamsManageService.selectListByParams(queryMap); |
|
||||||
List<DeviceMonitorDTO> policyManages = (List<DeviceMonitorDTO>) policyManageService.selectPolicyList("0", "4"); |
|
||||||
// 过滤otherName包含paramType=29, curValue=1,deviceLedgerId不为空的数据,代表已经启用定时开关机的功能
|
|
||||||
List<CollectionParamsManage> needStartOrStopDataList = collectionParamsManages |
|
||||||
.stream() |
|
||||||
.filter(item -> item.getParamType().equals("29") |
|
||||||
&& StringUtils.isNotEmpty(item.getDeviceLedgerId()) |
|
||||||
&& item.getCurValue().intValue() == 1) |
|
||||||
.toList(); |
|
||||||
List<PolicyManage> list = policyManageService.selectListByCpmIds(needStartOrStopDataList); |
|
||||||
// policyManages匹配policyManageList存在的policyName
|
|
||||||
List<DeviceMonitorDTO> policyManageList = policyManages.stream() |
|
||||||
.filter(item -> list.stream().anyMatch(policy -> policy.getPolicyName().equals(item.getName()))).toList(); |
|
||||||
|
|
||||||
// policyManageList根据policy_name进行分组,获取对应的策略数据
|
|
||||||
// Map<String, List<PolicyManage>> groupedByPolicyName = policyManageList.stream().collect(Collectors.groupingBy(
|
|
||||||
// PolicyManage::getPolicyName,
|
|
||||||
// Collectors.toList()
|
|
||||||
// ));
|
|
||||||
|
|
||||||
for (DeviceMonitorDTO value : policyManageList) { |
|
||||||
List<PolicyManage> manageList = (List<PolicyManage>) value.getValues(); |
|
||||||
// 获取当前设置的偏移值
|
|
||||||
Optional<PolicyManage> tempSet = manageList.stream().filter(item -> item.getPointName().contains("当前偏移值设置")).findFirst(); |
|
||||||
BigDecimal curTempSetValue = new BigDecimal(0); |
|
||||||
BigDecimal offsetValue = new BigDecimal(0); |
|
||||||
String otherName = ""; |
|
||||||
String quality = ""; |
|
||||||
String cpmId = ""; |
|
||||||
String paramType = ""; |
|
||||||
if (tempSet.isPresent()) { |
|
||||||
PolicyManage tempSetPolicy = tempSet.get(); |
|
||||||
// 获取collectionParamsManages中id为tempSetPolicy.getCpmId()的数据
|
|
||||||
Optional<CollectionParamsManage> tempSetCpm = collectionParamsManages.stream().filter(item -> item.getId().equals(tempSetPolicy.getCpmId())).findFirst(); |
|
||||||
if (tempSetCpm.isPresent()) { |
|
||||||
CollectionParamsManage collectionParamsManage = tempSetCpm.get(); |
|
||||||
curTempSetValue = collectionParamsManage.getCurValue(); |
|
||||||
otherName = collectionParamsManage.getOtherName(); |
|
||||||
quality = collectionParamsManage.getQuality(); |
|
||||||
cpmId = collectionParamsManage.getId(); |
|
||||||
paramType = collectionParamsManage.getParamType(); |
|
||||||
} |
|
||||||
} |
|
||||||
// 获取设置值
|
|
||||||
Optional<PolicyManage> offsetValuePolicy = manageList.stream().filter(item -> item.getPointName().contains("目标偏移值")).findFirst(); |
|
||||||
if (offsetValuePolicy.isPresent()) { |
|
||||||
PolicyManage offsetValuePm = offsetValuePolicy.get(); |
|
||||||
// 获取collectionParamsManages中id为tempSetPolicy.getCpmId()的数据
|
|
||||||
Optional<CollectionParamsManage> tempSetCpm = collectionParamsManages.stream().filter(item -> item.getId().equals(offsetValuePm.getCpmId())).findFirst(); |
|
||||||
if (tempSetCpm.isPresent()) { |
|
||||||
CollectionParamsManage collectionParamsManage = tempSetCpm.get(); |
|
||||||
offsetValue = collectionParamsManage.getCurValue(); |
|
||||||
} |
|
||||||
} |
|
||||||
int isHaveTime = 0; |
|
||||||
int startHour = 0; |
|
||||||
int startMinute = 0; |
|
||||||
int endHour = 0; |
|
||||||
int endMinute = 0; |
|
||||||
for (PolicyManage policyManage : manageList) { |
|
||||||
if (policyManage.getPointName().contains("开时")) { |
|
||||||
startHour = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("开分")) { |
|
||||||
startMinute = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("关时")) { |
|
||||||
endHour = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
if (policyManage.getPointName().contains("关分")) { |
|
||||||
endMinute = collectionParamsManageService.selectCollectionParamsManageById(policyManage.getCpmId()).getCurValue().intValue(); |
|
||||||
isHaveTime++; |
|
||||||
} |
|
||||||
} |
|
||||||
if (isHaveTime == 0) { |
|
||||||
continue; |
|
||||||
} |
|
||||||
LocalTime nowTime = LocalTime.now(); |
|
||||||
LocalTime startTime = LocalTime.of(startHour, startMinute); |
|
||||||
LocalTime endTime = LocalTime.of(endHour, endMinute); |
|
||||||
|
|
||||||
// 判断当前时间是否在开启时间范围内
|
|
||||||
if (DateUtils.isBetween(nowTime, startTime, endTime)) { |
|
||||||
// 判断当前通信是否正常,并且设置值跟偏移值是否一样
|
|
||||||
if (quality.equals("0") && curTempSetValue.compareTo(offsetValue) == 0) { |
|
||||||
// 当前风机不在开启状态,需要启动
|
|
||||||
log.info("当前偏移值相等,不需要在设置"); |
|
||||||
} else if (quality.equals("0") && curTempSetValue.compareTo(offsetValue) != 0) { |
|
||||||
if (StringUtils.isNotEmpty(cpmId) && StringUtils.isNotEmpty(otherName)) { |
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(cpmId, String.valueOf(offsetValue.intValue()), Integer.parseInt(paramType), otherName)); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
} |
|
||||||
} |
|
||||||
} else { |
|
||||||
// 判断当前风机是否在关闭状态了
|
|
||||||
if (curTempSetValue.intValue() == 0) { |
|
||||||
// 当前偏移值等于0,不需要在设置
|
|
||||||
log.info("当前偏移值等于0,不需要在设置"); |
|
||||||
} else { |
|
||||||
// 当前偏移值不等于0,不需要在设置
|
|
||||||
log.info("当前偏移值不等于0,需要在设置"); |
|
||||||
List<OrderEntity> changeValues = new ArrayList<>(); |
|
||||||
changeValues.add(new OrderEntity(cpmId, "0", Integer.parseInt(paramType), otherName)); |
|
||||||
sendOrderToMqtt(changeValues); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public void sendOrderToMqtt(List<OrderEntity> changeValues) { |
|
||||||
try { |
|
||||||
String sendOrder = iOperationService.operationDevice(changeValues); |
|
||||||
String name = mhConfig.getName(); |
|
||||||
// 获取mqtt操作队列(后期通过mqtt队列配置发送主题)
|
|
||||||
log.info("发送主题:{},消息:{}", name + "/" + controlTopic, sendOrder); |
|
||||||
iMqttGatewayService.publish(name + "/" + controlTopic, sendOrder, 1); |
|
||||||
} catch (Exception e) { |
|
||||||
log.error("设备操作失败", e); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,38 +0,0 @@ |
|||||||
package com.mh.quartz.task; |
|
||||||
|
|
||||||
import com.mh.common.constant.CacheConstants; |
|
||||||
import com.mh.common.core.redis.RedisCache; |
|
||||||
import com.mh.system.service.overview.IProOverviewService; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.stereotype.Component; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 首页任务 |
|
||||||
* @date 2025-12-24 09:04:57 |
|
||||||
*/ |
|
||||||
@Slf4j |
|
||||||
@Component("homeTask") |
|
||||||
public class HomeTask { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IProOverviewService proOverviewService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private RedisCache redisCache; |
|
||||||
|
|
||||||
public void updateHomeData() { |
|
||||||
if (redisCache.hasKey(CacheConstants.PRO_PROFILE)) { |
|
||||||
redisCache.deleteObject(CacheConstants.PRO_PROFILE); |
|
||||||
} |
|
||||||
proOverviewService.getProProfile(); |
|
||||||
if (redisCache.hasKey(CacheConstants.ENERGY_ANALYSIS)) { |
|
||||||
redisCache.deleteObject(CacheConstants.ENERGY_ANALYSIS); |
|
||||||
} |
|
||||||
proOverviewService.energyAnalysis(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,76 +0,0 @@ |
|||||||
package com.mh.quartz.task; |
|
||||||
|
|
||||||
import com.mh.common.utils.DateUtils; |
|
||||||
import com.mh.common.utils.StringUtils; |
|
||||||
import com.mh.system.service.report.IMeterReadingsHisService; |
|
||||||
import com.mh.system.service.report.IReportHeatingService; |
|
||||||
import com.mh.system.service.report.IReportHotWaterService; |
|
||||||
import com.mh.system.service.report.IReportSteamService; |
|
||||||
import lombok.extern.slf4j.Slf4j; |
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||||
import org.springframework.stereotype.Component; |
|
||||||
|
|
||||||
import java.util.Calendar; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 报表定时记录生成 |
|
||||||
* @date 2025-10-22 10:39:00 |
|
||||||
*/ |
|
||||||
@Slf4j |
|
||||||
@Component("reportTask") |
|
||||||
public class ReportTask { |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IMeterReadingsHisService meterReadingsHisService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IReportHotWaterService reportHotWaterService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IReportSteamService reportSteamService; |
|
||||||
|
|
||||||
@Autowired |
|
||||||
private IReportHeatingService reportHeatingService; |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建抄表记录查询 |
|
||||||
*/ |
|
||||||
public void createMeterReadingHis(String curDate) { |
|
||||||
// 获取当前时间的前一天
|
|
||||||
if (StringUtils.isEmpty(curDate)) { |
|
||||||
Calendar calendar = Calendar.getInstance(); |
|
||||||
calendar.add(Calendar.DAY_OF_YEAR, -1); |
|
||||||
curDate = DateUtils.dateToString(calendar.getTime(), DateUtils.YYYY_MM_DD); |
|
||||||
} |
|
||||||
// 定时执行运行脚本
|
|
||||||
meterReadingsHisService.execProMeterReadingsHis(curDate); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建热水热泵运行参数 |
|
||||||
*/ |
|
||||||
public void createHotWaterRunParam() { |
|
||||||
// 定时执行运行脚本
|
|
||||||
reportHotWaterService.execProRunParamHis(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建蒸汽机运行参数 |
|
||||||
*/ |
|
||||||
public void createSteamRunParam() { |
|
||||||
// 定时执行运行脚本
|
|
||||||
reportSteamService.execProRunParamHis(); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 创建采暖系统运行参数 |
|
||||||
*/ |
|
||||||
public void createHeatingRunParam() { |
|
||||||
// 定时执行运行脚本
|
|
||||||
reportHeatingService.execProRunParamHis(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,84 +0,0 @@ |
|||||||
package com.mh.quartz.util; |
|
||||||
|
|
||||||
import com.mh.quartz.domain.FuzzyLevel; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 风柜系统PID调节工具类 |
|
||||||
* @date 2025-05-30 13:47:40 |
|
||||||
*/ |
|
||||||
public class AHUPIDControlUtil { |
|
||||||
|
|
||||||
private double kp = 2.0, ki = 0.1, kd = 0.0; |
|
||||||
private double integral = 0; |
|
||||||
private double previousError = 0; |
|
||||||
private static final double MAX_INTEGRAL = 100; |
|
||||||
private static final double MIN_INTEGRAL = -100; |
|
||||||
|
|
||||||
// 模糊增益修正比例
|
|
||||||
private double deltaKpScale = 0.5; |
|
||||||
private double deltaKiScale = 0.01; |
|
||||||
private double deltaKdScale = 0.01; |
|
||||||
|
|
||||||
public double compute(double setTemp, double currentTemp, double deltaTime) { |
|
||||||
double error = currentTemp - setTemp; |
|
||||||
double dError = (error - previousError) / deltaTime; |
|
||||||
|
|
||||||
// 模糊映射
|
|
||||||
FuzzyLevel eLevel = toFuzzyLevel(error); |
|
||||||
FuzzyLevel ecLevel = toFuzzyLevel(dError); |
|
||||||
|
|
||||||
// 获取PID参数调整
|
|
||||||
FuzzyLevel kpAdjust = FuzzyRuleBase.getKpAdjust(eLevel, ecLevel); |
|
||||||
FuzzyLevel kiAdjust = kpAdjust; // 简化处理
|
|
||||||
FuzzyLevel kdAdjust = kpAdjust; |
|
||||||
|
|
||||||
kp += fuzzyDeltaToValue(kpAdjust, deltaKpScale); |
|
||||||
ki += fuzzyDeltaToValue(kiAdjust, deltaKiScale); |
|
||||||
kd += fuzzyDeltaToValue(kdAdjust, deltaKdScale); |
|
||||||
|
|
||||||
// 限幅
|
|
||||||
kp = Math.max(0, Math.min(kp, 10)); |
|
||||||
ki = Math.max(0, Math.min(ki, 1)); |
|
||||||
kd = Math.max(0, Math.min(kd, 1)); |
|
||||||
|
|
||||||
// PID 计算
|
|
||||||
// 积分项限幅
|
|
||||||
integral += error * deltaTime; |
|
||||||
integral = Math.max(MIN_INTEGRAL, Math.min(MAX_INTEGRAL, integral)); |
|
||||||
double output = kp * error + ki * integral + kd * dError; |
|
||||||
System.out.println("计算输出值:" + output + ",误差:" + error + ",误差变化:" + dError); |
|
||||||
previousError = error; |
|
||||||
|
|
||||||
// 输出冷冻水阀开度,限制在0~100%
|
|
||||||
return Math.max(0, Math.min(100, Math.abs(output))); |
|
||||||
} |
|
||||||
|
|
||||||
// 将数值误差映射为模糊等级
|
|
||||||
public static FuzzyLevel toFuzzyLevel(double value) { |
|
||||||
if (value <= -3) return FuzzyLevel.NB; |
|
||||||
else if (value <= -2) return FuzzyLevel.NM; |
|
||||||
else if (value <= -1) return FuzzyLevel.NS; |
|
||||||
else if (value <= 1) return FuzzyLevel.ZO; |
|
||||||
else if (value <= 2) return FuzzyLevel.PS; |
|
||||||
else if (value <= 3) return FuzzyLevel.PM; |
|
||||||
else return FuzzyLevel.PB; |
|
||||||
} |
|
||||||
|
|
||||||
// 将模糊等级转为实际数值调整量
|
|
||||||
public static double fuzzyDeltaToValue(FuzzyLevel level, double scale) { |
|
||||||
switch (level) { |
|
||||||
case NB: return -3 * scale; |
|
||||||
case NM: return -2 * scale; |
|
||||||
case NS: return -1 * scale; |
|
||||||
case ZO: return 0; |
|
||||||
case PS: return 1 * scale; |
|
||||||
case PM: return 2 * scale; |
|
||||||
case PB: return 3 * scale; |
|
||||||
default: return 0; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
@ -1,152 +0,0 @@ |
|||||||
package com.mh.quartz.util; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 模糊PID控制算法 |
|
||||||
* @date 2025-06-04 09:47:16 |
|
||||||
*/ |
|
||||||
public class FuzzyPIDControlUtil { |
|
||||||
// PID参数
|
|
||||||
private final double kp; // 比例增益
|
|
||||||
private final double ki; // 积分增益
|
|
||||||
private final double kd; // 微分增益
|
|
||||||
|
|
||||||
// 控制器状态
|
|
||||||
private double prevError; |
|
||||||
private double integral; |
|
||||||
private double derivative; |
|
||||||
|
|
||||||
// 模糊规则参数
|
|
||||||
private final double[] errorLevels = {-6, -3, -1, 0, 1, 3, 6}; // 温度误差级别(℃)
|
|
||||||
private final double[] dErrorLevels = {-3, -1, 0, 1, 3}; // 误差变化率级别(℃/min)
|
|
||||||
private final double[] kpAdjust = {1.5, 2.0, 2.5, 3.0, 4.0}; // Kp调整因子 (增强)
|
|
||||||
private final double[] kiAdjust = {0.3, 0.7, 1.0, 1.3, 1.7}; // Ki调整因子
|
|
||||||
|
|
||||||
// 阀门限制
|
|
||||||
private static final double MIN_VALVE = 0.0; // 最小开度(0%)
|
|
||||||
private static final double MAX_VALVE = 100.0; // 最大开度(100%)
|
|
||||||
|
|
||||||
public FuzzyPIDControlUtil(String kp, String ki, String kd) { |
|
||||||
this.kp = Double.parseDouble(kp); |
|
||||||
this.ki = Double.parseDouble(ki); |
|
||||||
this.kd = Double.parseDouble(kd); |
|
||||||
this.prevError = 0; |
|
||||||
this.integral = 0; |
|
||||||
this.derivative = 0; |
|
||||||
} |
|
||||||
|
|
||||||
// 模糊推理计算PID参数调整因子
|
|
||||||
private double[] fuzzyInference(double error, double dError) { |
|
||||||
// 模糊化:计算误差和误差变化率的隶属度
|
|
||||||
double[] errorMembership = calculateMembership(error, errorLevels); |
|
||||||
double[] dErrorMembership = calculateMembership(dError, dErrorLevels); |
|
||||||
|
|
||||||
// 模糊规则库
|
|
||||||
double kpAdjustSum = 0.0; |
|
||||||
double kiAdjustSum = 0.0; |
|
||||||
double weightSum = 0.0; |
|
||||||
|
|
||||||
// 应用模糊规则 (增强大误差时的响应)
|
|
||||||
for (int i = 0; i < errorMembership.length; i++) { |
|
||||||
for (int j = 0; j < dErrorMembership.length; j++) { |
|
||||||
double weight = errorMembership[i] * dErrorMembership[j]; |
|
||||||
if (weight > 0) { |
|
||||||
// 增强大误差时的响应
|
|
||||||
int kpIndex; |
|
||||||
if (Math.abs(error) > 3) { // 大误差
|
|
||||||
kpIndex = Math.min(Math.max(i + j, 0), kpAdjust.length - 1); |
|
||||||
} else { |
|
||||||
kpIndex = Math.min(Math.max(i + j - 1, 0), kpAdjust.length - 1); |
|
||||||
} |
|
||||||
|
|
||||||
// Ki调整:小误差时增强积分作用
|
|
||||||
int kiIndex; |
|
||||||
if (Math.abs(error) < 1) { // 小误差
|
|
||||||
kiIndex = Math.min(Math.max(3 + j, 0), kiAdjust.length - 1); |
|
||||||
} else { |
|
||||||
kiIndex = Math.min(Math.max(2 + j, 0), kiAdjust.length - 1); |
|
||||||
} |
|
||||||
|
|
||||||
kpAdjustSum += weight * kpAdjust[kpIndex]; |
|
||||||
kiAdjustSum += weight * kiAdjust[kiIndex]; |
|
||||||
weightSum += weight; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
// 反模糊化 (加权平均)
|
|
||||||
double kpFactor = weightSum > 0 ? kpAdjustSum / weightSum : 1.0; |
|
||||||
double kiFactor = weightSum > 0 ? kiAdjustSum / weightSum : 1.0; |
|
||||||
|
|
||||||
return new double[]{kpFactor, kiFactor, 1.0}; // Kd不调整
|
|
||||||
} |
|
||||||
|
|
||||||
// 计算隶属度 (三角隶属函数)
|
|
||||||
private double[] calculateMembership(double value, double[] levels) { |
|
||||||
double[] membership = new double[levels.length]; |
|
||||||
|
|
||||||
for (int i = 0; i < levels.length; i++) { |
|
||||||
if (i == 0) { |
|
||||||
membership[i] = (value <= levels[i]) ? 1.0 : |
|
||||||
(value < levels[i+1]) ? (levels[i+1] - value) / (levels[i+1] - levels[i]) : 0.0; |
|
||||||
} else if (i == levels.length - 1) { |
|
||||||
membership[i] = (value >= levels[i]) ? 1.0 : |
|
||||||
(value > levels[i-1]) ? (value - levels[i-1]) / (levels[i] - levels[i-1]) : 0.0; |
|
||||||
} else { |
|
||||||
if (value >= levels[i-1] && value <= levels[i]) { |
|
||||||
membership[i] = (value - levels[i-1]) / (levels[i] - levels[i-1]); |
|
||||||
} else if (value >= levels[i] && value <= levels[i+1]) { |
|
||||||
membership[i] = (levels[i+1] - value) / (levels[i+1] - levels[i]); |
|
||||||
} else { |
|
||||||
membership[i] = 0.0; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
return membership; |
|
||||||
} |
|
||||||
|
|
||||||
// 计算控制输出 (阀门开度) - 修复了符号问题
|
|
||||||
public double calculate(double setpoint, double currentValue, double dt) { |
|
||||||
// 计算误差项 - 修复:当前值高于设定值需要冷却,误差应为正
|
|
||||||
double error = currentValue - setpoint; |
|
||||||
|
|
||||||
// 计算微分项 (基于误差变化率)
|
|
||||||
if (dt > 0) { |
|
||||||
derivative = (error - prevError) / dt; |
|
||||||
} |
|
||||||
|
|
||||||
// 模糊调整PID参数
|
|
||||||
double[] adjustments = fuzzyInference(error, derivative); |
|
||||||
double adjKp = kp * adjustments[0]; |
|
||||||
double adjKi = ki * adjustments[1]; |
|
||||||
double adjKd = kd * adjustments[2]; |
|
||||||
|
|
||||||
// 计算积分项 (带抗饱和)
|
|
||||||
integral += error * dt; |
|
||||||
|
|
||||||
// 抗饱和限制
|
|
||||||
double maxIntegral = MAX_VALVE / (adjKi + 1e-5); |
|
||||||
if (Math.abs(integral) > maxIntegral) { |
|
||||||
integral = Math.signum(integral) * maxIntegral; |
|
||||||
} |
|
||||||
|
|
||||||
// PID计算 - 修复:误差为正时需要正输出打开阀门
|
|
||||||
double output = adjKp * error + adjKi * integral + adjKd * derivative; |
|
||||||
|
|
||||||
// 保存误差用于下次计算
|
|
||||||
prevError = error; |
|
||||||
|
|
||||||
// 阀门开度限制
|
|
||||||
return Math.min(Math.max(output, MIN_VALVE), MAX_VALVE); |
|
||||||
} |
|
||||||
|
|
||||||
// 重置控制器状态
|
|
||||||
public void reset() { |
|
||||||
integral = 0; |
|
||||||
prevError = 0; |
|
||||||
derivative = 0; |
|
||||||
} |
|
||||||
} |
|
||||||
@ -1,29 +0,0 @@ |
|||||||
package com.mh.quartz.util; |
|
||||||
|
|
||||||
import com.mh.quartz.domain.FuzzyLevel; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Classname FuzzyRuleBase |
|
||||||
* Todo: |
|
||||||
* @Date 2025-05-31 14:20 |
|
||||||
* @Created by LJF |
|
||||||
*/ |
|
||||||
public class FuzzyRuleBase { |
|
||||||
|
|
||||||
// ΔKp 规则:根据误差 e 与误差变化 ec 得到修正量
|
|
||||||
private static final FuzzyLevel[][] kpRuleTable = { |
|
||||||
{FuzzyLevel.PB, FuzzyLevel.PM, FuzzyLevel.PS, FuzzyLevel.ZO, FuzzyLevel.NS, FuzzyLevel.NM, FuzzyLevel.NB}, |
|
||||||
{FuzzyLevel.PM, FuzzyLevel.PS, FuzzyLevel.ZO, FuzzyLevel.NS, FuzzyLevel.NM, FuzzyLevel.NB, FuzzyLevel.NB}, |
|
||||||
{FuzzyLevel.PS, FuzzyLevel.ZO, FuzzyLevel.NS, FuzzyLevel.NM, FuzzyLevel.NB, FuzzyLevel.NB, FuzzyLevel.NB}, |
|
||||||
{FuzzyLevel.ZO, FuzzyLevel.ZO, FuzzyLevel.ZO, FuzzyLevel.ZO, FuzzyLevel.ZO, FuzzyLevel.ZO, FuzzyLevel.ZO}, |
|
||||||
{FuzzyLevel.NS, FuzzyLevel.ZO, FuzzyLevel.PS, FuzzyLevel.PM, FuzzyLevel.PB, FuzzyLevel.PB, FuzzyLevel.PB}, |
|
||||||
{FuzzyLevel.NM, FuzzyLevel.NS, FuzzyLevel.ZO, FuzzyLevel.PS, FuzzyLevel.PM, FuzzyLevel.PB, FuzzyLevel.PB}, |
|
||||||
{FuzzyLevel.NB, FuzzyLevel.NB, FuzzyLevel.NS, FuzzyLevel.ZO, FuzzyLevel.PS, FuzzyLevel.PM, FuzzyLevel.PB} |
|
||||||
}; |
|
||||||
|
|
||||||
public static FuzzyLevel getKpAdjust(FuzzyLevel e, FuzzyLevel ec) { |
|
||||||
return kpRuleTable[e.ordinal()][ec.ordinal()]; |
|
||||||
} |
|
||||||
|
|
||||||
// 可扩展为不同规则表:getKiAdjust(), getKdAdjust()
|
|
||||||
} |
|
||||||
@ -1,134 +0,0 @@ |
|||||||
package com.mh.system.mapper.report; |
|
||||||
|
|
||||||
import com.mh.common.core.domain.ColumnFilter; |
|
||||||
import com.mh.common.core.domain.entity.CollectionParamsManage; |
|
||||||
import com.mh.common.core.domain.entity.WaterLevel; |
|
||||||
import org.apache.ibatis.annotations.*; |
|
||||||
|
|
||||||
import java.math.BigDecimal; |
|
||||||
import java.util.Date; |
|
||||||
import java.util.List; |
|
||||||
import java.util.Map; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project EEMCS |
|
||||||
* @description 热水温度记录 |
|
||||||
* @date 2025-06-19 16:24:31 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface ComprehensiveReportMapper { |
|
||||||
|
|
||||||
|
|
||||||
@Select("<script>" + |
|
||||||
"select sum(calc_value) as calc_value from data_year where " + |
|
||||||
" cur_time >= DATE_TRUNC('year', CURRENT_DATE)" + |
|
||||||
" AND cur_time < DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '1 year'" + |
|
||||||
" <if test='deviceNums != null and deviceNums.size() > 0'>" + |
|
||||||
" AND device_num IN " + |
|
||||||
" <foreach collection='deviceNums' item='item' open='(' separator=',' close=')'>" + |
|
||||||
" #{item.mtNum} " + |
|
||||||
" </foreach>" + |
|
||||||
" </if>" + |
|
||||||
"</script>") |
|
||||||
BigDecimal queryByDeviceNum(@Param("deviceNums") List<CollectionParamsManage> deviceNums); |
|
||||||
|
|
||||||
|
|
||||||
@Select("<script>" + |
|
||||||
"WITH combined_data AS ( " + |
|
||||||
" SELECT " + |
|
||||||
" CASE " + |
|
||||||
" WHEN #{timeType} = 'year' THEN to_char(date_trunc('year', cur_time), 'YYYY') " + |
|
||||||
" WHEN #{timeType} = 'month' THEN to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" WHEN #{timeType} = 'day' THEN to_char(date_trunc('day', cur_time), 'YYYY-MM-DD') " + |
|
||||||
" WHEN #{timeType} = 'hour' THEN to_char(date_trunc('hour', cur_time), 'YYYY-MM-DD HH24') " + |
|
||||||
" ELSE to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" END AS period, " + |
|
||||||
" calc_value " + |
|
||||||
" FROM ${lastTableName} " + |
|
||||||
" WHERE cur_time >= #{startTime}::timestamp AND cur_time <= #{endTime}::timestamp " + |
|
||||||
" <if test='deviceNums != null and deviceNums.size() > 0'>" + |
|
||||||
" AND device_num IN " + |
|
||||||
" <foreach collection='deviceNums' item='item' open='(' separator=',' close=')'>" + |
|
||||||
" #{item.mtNum} " + |
|
||||||
" </foreach>" + |
|
||||||
" </if>" + |
|
||||||
" UNION ALL " + |
|
||||||
" SELECT " + |
|
||||||
" CASE " + |
|
||||||
" WHEN #{timeType} = 'year' THEN to_char(date_trunc('year', cur_time), 'YYYY') " + |
|
||||||
" WHEN #{timeType} = 'month' THEN to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" WHEN #{timeType} = 'day' THEN to_char(date_trunc('day', cur_time), 'YYYY-MM-DD') " + |
|
||||||
" WHEN #{timeType} = 'hour' THEN to_char(date_trunc('hour', cur_time), 'YYYY-MM-DD HH24') " + |
|
||||||
" ELSE to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" END AS period, " + |
|
||||||
" calc_value " + |
|
||||||
" FROM ${curTableName} " + |
|
||||||
" WHERE cur_time >= #{startTime}::timestamp AND cur_time <= #{endTime}::timestamp " + |
|
||||||
" <if test='deviceNums != null and deviceNums.size() > 0'>" + |
|
||||||
" AND device_num IN " + |
|
||||||
" <foreach collection='deviceNums' item='item' open='(' separator=',' close=')'>" + |
|
||||||
" #{item.mtNum} " + |
|
||||||
" </foreach>" + |
|
||||||
" </if>" + |
|
||||||
") " + |
|
||||||
"SELECT " + |
|
||||||
" period AS name, " + |
|
||||||
" SUM(calc_value) AS value " + |
|
||||||
"FROM combined_data " + |
|
||||||
"GROUP BY period " + |
|
||||||
"ORDER BY period; " + |
|
||||||
"</script>") |
|
||||||
List<ColumnFilter> energyAnalysisManyTable(@Param("deviceNums") List<CollectionParamsManage> deviceNums, |
|
||||||
@Param("lastTableName") String lastTableName, |
|
||||||
@Param("curTableName") String curTableName, |
|
||||||
@Param("startTime") Date startTime, |
|
||||||
@Param("endTime") Date endTime, |
|
||||||
@Param("timeType") String timeType); |
|
||||||
|
|
||||||
|
|
||||||
@Select("<script>" + |
|
||||||
"select sum(cur_value) from collect_param_manage where id in " + |
|
||||||
" <foreach collection='deviceNums' item='item' open='(' separator=',' close=')'>" + |
|
||||||
" #{item.id} " + |
|
||||||
" </foreach>" + |
|
||||||
"</script>") |
|
||||||
BigDecimal selectEER(@Param("deviceNums") List<CollectionParamsManage> deviceNums); |
|
||||||
|
|
||||||
@Select("<script>" + |
|
||||||
"WITH time_bucketed_data AS ( " + |
|
||||||
" SELECT " + |
|
||||||
" CASE " + |
|
||||||
" WHEN #{timeType} = 'year' THEN to_char(date_trunc('year', cur_time), 'YYYY') " + |
|
||||||
" WHEN #{timeType} = 'month' THEN to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" WHEN #{timeType} = 'day' THEN to_char(date_trunc('day', cur_time), 'YYYY-MM-DD') " + |
|
||||||
" WHEN #{timeType} = 'hour' THEN to_char(date_trunc('hour', cur_time), 'YYYY-MM-DD HH24') " + |
|
||||||
" ELSE to_char(date_trunc('month', cur_time), 'YYYY-MM') " + |
|
||||||
" END AS period, " + |
|
||||||
" calc_value " + |
|
||||||
" FROM ${lastTableName} " + |
|
||||||
" WHERE cur_time >= #{startTime}::timestamp AND cur_time <= #{endTime}::timestamp " + |
|
||||||
" <if test='deviceNums != null and deviceNums.size() > 0'>" + |
|
||||||
" AND device_num IN " + |
|
||||||
" <foreach collection='deviceNums' item='item' open='(' separator=',' close=')'>" + |
|
||||||
" #{item.mtNum} " + |
|
||||||
" </foreach>" + |
|
||||||
" </if>" + |
|
||||||
") " + |
|
||||||
"SELECT " + |
|
||||||
" period AS name, " + |
|
||||||
" SUM(calc_value) AS value " + |
|
||||||
"FROM time_bucketed_data " + |
|
||||||
"GROUP BY period " + |
|
||||||
"ORDER BY period; " + |
|
||||||
"</script>") |
|
||||||
List<ColumnFilter> energyAnalysisOneTable(@Param("deviceNums") List<CollectionParamsManage> deviceNums, |
|
||||||
@Param("lastTableName") String lastTableName, |
|
||||||
@Param("curTableName") String curTableName, |
|
||||||
@Param("startTime") Date startTime, |
|
||||||
@Param("endTime") Date endTime, |
|
||||||
@Param("timeType") String timeType); |
|
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
@ -1,32 +0,0 @@ |
|||||||
package com.mh.system.mapper.report; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import com.mh.common.core.domain.entity.ReportHeatingRunParamHis; |
|
||||||
import com.mh.common.core.domain.entity.ReportHotWaterParamHis; |
|
||||||
import com.mh.common.core.domain.entity.ReportSteamRunParamHis; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Options; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
import org.apache.ibatis.annotations.Select; |
|
||||||
import org.apache.ibatis.mapping.StatementType; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 采暖系统运行参数服务类 |
|
||||||
* @date 2024-05-29 11:23:32 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface ReportHeatingRunParamHisMapper extends BaseMapper<ReportHeatingRunParamHis> { |
|
||||||
|
|
||||||
@Select("call pro_heating_run_param(#{curTime,jdbcType=VARCHAR,mode=IN})") |
|
||||||
@Options(statementType = StatementType.CALLABLE) |
|
||||||
void execProHeatingRunParam(@Param("curTime") String curTime); |
|
||||||
|
|
||||||
@Select("select * from report_heating_run_param_his where cur_time >= #{beginDate} and cur_time <= #{endDate} order by cur_time desc ") |
|
||||||
List<ReportHotWaterParamHis> findPage(@Param("beginDate") String beginDate, |
|
||||||
@Param("endDate") String endDate); |
|
||||||
} |
|
||||||
@ -1,35 +0,0 @@ |
|||||||
package com.mh.system.mapper.report; |
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||||
import com.mh.common.core.domain.entity.ReportHotWaterParamHis; |
|
||||||
import org.apache.ibatis.annotations.Mapper; |
|
||||||
import org.apache.ibatis.annotations.Options; |
|
||||||
import org.apache.ibatis.annotations.Param; |
|
||||||
import org.apache.ibatis.annotations.Select; |
|
||||||
import org.apache.ibatis.mapping.StatementType; |
|
||||||
|
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author LJF |
|
||||||
* @version 1.0 |
|
||||||
* @project NewZhujiang_Server |
|
||||||
* @description 热水运行参数服务类 |
|
||||||
* @date 2024-05-29 11:23:32 |
|
||||||
*/ |
|
||||||
@Mapper |
|
||||||
public interface ReportHotWaterParamHisMapper extends BaseMapper<ReportHotWaterParamHis> { |
|
||||||
|
|
||||||
@Select("call pro_hot_water_run_param(#{floorId,jdbcType=VARCHAR,mode=IN}, #{floorId1,jdbcType=VARCHAR,mode=IN}, #{floorId2,jdbcType=VARCHAR,mode=IN}, #{curTime,jdbcType=VARCHAR,mode=IN})") |
|
||||||
@Options(statementType = StatementType.CALLABLE) |
|
||||||
void execProHotWaterRunParam(@Param("floorId") String floorId, |
|
||||||
@Param("floorId1") String floorId1, |
|
||||||
@Param("floorId2") String floorId2, |
|
||||||
@Param("curTime") String curTime); |
|
||||||
|
|
||||||
@Select("select * from report_hot_water_param_his where floor_id = #{floorId} " + |
|
||||||
" and cur_time >= #{beginDate} and cur_time <= #{endDate} order by cur_time desc ") |
|
||||||
List<ReportHotWaterParamHis> findPage(@Param("floorId") String floorId, |
|
||||||
@Param("beginDate") String beginDate, |
|
||||||
@Param("endDate") String endDate); |
|
||||||
} |
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue