diff --git a/mh-admin/src/main/java/com/mh/web/controller/device/ChillersParamsController.java b/mh-admin/src/main/java/com/mh/web/controller/device/ChillersParamsController.java index 394f844..626002e 100644 --- a/mh-admin/src/main/java/com/mh/web/controller/device/ChillersParamsController.java +++ b/mh-admin/src/main/java/com/mh/web/controller/device/ChillersParamsController.java @@ -87,7 +87,7 @@ public class ChillersParamsController extends BaseController { break; case "5": // 故障 if (!StringUtils.isEmpty(vo.getCurValue())) { - vo.setCurValue(new BigDecimal(vo.getCurValue()).intValue() == 1 ? "故障" : "正常"); + vo.setCurValue(new BigDecimal(vo.getCurValue()).intValue() == 1 ? "故障" : "无故障"); } break; case "6": // 手自动切换 diff --git a/mh-common/src/main/java/com/mh/common/core/domain/dto/MaglevReportSysParamDTO.java b/mh-common/src/main/java/com/mh/common/core/domain/dto/MaglevReportSysParamDTO.java index 24d05c5..23fcf8a 100644 --- a/mh-common/src/main/java/com/mh/common/core/domain/dto/MaglevReportSysParamDTO.java +++ b/mh-common/src/main/java/com/mh/common/core/domain/dto/MaglevReportSysParamDTO.java @@ -160,103 +160,124 @@ public class MaglevReportSysParamDTO { /** * 压缩比 */ - @ExcelProperty(value = {"${deviceType}", "系统", "压缩比"}, index = 16) +// @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 ratioComp; + private BigDecimal ratioCompThree; /** * 膨胀阀开度% */ - @ExcelProperty(value = {"${deviceType}", "系统", "膨胀阀开度%"}, index = 17) + @ExcelProperty(value = {"${deviceType}", "系统", "膨胀阀开度%"}, index = 19) @ColumnWidth(10) private BigDecimal openExv; /** * 运行中的压缩机数量 */ - @ExcelProperty(value = {"${deviceType}", "系统", "运行中的压缩机数量"}, index = 18) + @ExcelProperty(value = {"${deviceType}", "系统", "运行中的压缩机数量"}, index = 20) @ColumnWidth(10) private Integer runCompNum; /** * 冷冻水泵频率hz */ - @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水泵频率hz"}, index = 19) + @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水泵频率hz"}, index = 21) @ColumnWidth(10) private BigDecimal frequencyChiller; /** * 冷冻水进水压力kpa */ - @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水进水压力kpa"}, index = 20) + @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水进水压力kpa"}, index = 22) @ColumnWidth(10) private BigDecimal pressInChillerWater; /** * 冷冻水出水压力kpa */ - @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水出水压力kpa"}, index = 21) + @ExcelProperty(value = {"${deviceType}", "冷冻泵", "冷冻水出水压力kpa"}, index = 23) @ColumnWidth(10) private BigDecimal pressOutChillerWater; /** * 冷却水泵频率hz */ - @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水泵频率hz"}, index = 22) + @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水泵频率hz"}, index = 24) @ColumnWidth(10) private BigDecimal frequencyCooling; /** * 冷却水进水压力kpa */ - @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水进水压力kpa"}, index = 23) + @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水进水压力kpa"}, index = 25) @ColumnWidth(10) private BigDecimal pressInCoolingWater; /** * 冷却水出水压力kpa */ - @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水出水压力kpa"}, index = 24) + @ExcelProperty(value = {"${deviceType}", "冷却泵", "冷却水出水压力kpa"}, index = 26) @ColumnWidth(10) private BigDecimal pressOutCoolingWater; /** * 冷却塔频率hz */ - @ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔频率hz"}, index = 25) + @ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔频率hz"}, index = 27) private BigDecimal frequencyCoolingTower; /** * 冷却塔运行数量(原注释可能有误,根据列名调整) */ - @ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔运行数量"}, index = 26) + @ExcelProperty(value = {"${deviceType}", "冷却塔", "冷却塔运行数量"}, index = 28) private Integer runCoolingTower; /** * 室外温度℃ */ - @ExcelProperty(value = {"${deviceType}", "室外温度℃", "室外温度℃"}, index = 27) + @ExcelProperty(value = {"${deviceType}", "室外温度℃", "室外温度℃"}, index = 29) @ColumnWidth(10) private BigDecimal tempOutdoor; /** * 室外湿度% */ - @ExcelProperty(value = {"${deviceType}", "室外湿度%", "室外湿度%"}, index = 28) + @ExcelProperty(value = {"${deviceType}", "室外湿度%", "室外湿度%"}, index = 30) @ColumnWidth(10) private BigDecimal humidityOutdoor; /** * 恒压补水罐压力 */ - @ExcelProperty(value = {"${deviceType}", "恒压补水罐压力MPa", "恒压补水罐压力MPa"}, index = 29) + @ExcelProperty(value = {"${deviceType}", "恒压补水罐压力MPa", "恒压补水罐压力MPa"}, index = 31) @ColumnWidth(10) private BigDecimal pressConstantWaterTank; /** * 巡查记录人 */ - @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 30) + @ExcelProperty(value = {"${deviceType}", "巡查记录人", "巡查记录人"}, index = 32) @ColumnWidth(20) private String recorder; diff --git a/mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java b/mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java index 2be67aa..d417cea 100644 --- a/mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java +++ b/mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java @@ -268,6 +268,7 @@ public class AnalysisReceiveOrder485 { || deviceCodeParam.getParamType().equals("2") || deviceCodeParam.getParamType().equals("12") || deviceCodeParam.getParamType().equals("14") + || deviceCodeParam.getParamType().equals("48") )) { data = ExchangeStringUtil.hexToDec(data); } diff --git a/mh-framework/src/main/java/com/mh/framework/netty/EchoServerHandler.java b/mh-framework/src/main/java/com/mh/framework/netty/EchoServerHandler.java index 5436c21..e41fd05 100644 --- a/mh-framework/src/main/java/com/mh/framework/netty/EchoServerHandler.java +++ b/mh-framework/src/main/java/com/mh/framework/netty/EchoServerHandler.java @@ -362,6 +362,9 @@ public class EchoServerHandler extends ChannelInboundHandlerAdapter { case "14" -> // 热泵读取温度设置 analysisData = analysisReceiveOrder485.analysisHeatPumpOrder485(receiveStr, deviceCodeParamEntity); + case "48" -> + // 热泵读取电流 + analysisData = analysisReceiveOrder485.analysisHeatPumpOrder485(receiveStr, deviceCodeParamEntity); default -> { log.info("设备类型错误"); return; diff --git a/mh-quartz/src/main/java/com/mh/quartz/task/ChillersTask.java b/mh-quartz/src/main/java/com/mh/quartz/task/ChillersTask.java index 0b8e9c9..10e0c6b 100644 --- a/mh-quartz/src/main/java/com/mh/quartz/task/ChillersTask.java +++ b/mh-quartz/src/main/java/com/mh/quartz/task/ChillersTask.java @@ -1,8 +1,28 @@ 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 @@ -10,18 +30,177 @@ import org.springframework.stereotype.Component; * @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; - public ChillersTask(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 queryMap = new HashMap<>(); + queryMap.put("systemType", "0"); + // 得出 systemType =0 的数据 + List collectionParamsManages = collectionParamsManageService.selectListByParams(queryMap); + List policyManages = (List) policyManageService.selectPolicyList("0", "4"); + // 过滤otherName包含paramType=29, curValue=1,deviceLedgerId不为空的数据,代表已经启用定时开关机的功能 + List needStartOrStopDataList = collectionParamsManages + .stream() + .filter(item -> item.getParamType().equals("29") + && StringUtils.isNotEmpty(item.getDeviceLedgerId()) + && item.getCurValue().intValue() == 1) + .toList(); + List list = policyManageService.selectListByCpmIds(needStartOrStopDataList); + // policyManages匹配policyManageList存在的policyName + List policyManageList = policyManages.stream() + .filter(item -> list.stream().anyMatch(policy -> policy.getPolicyName().equals(item.getName()))).toList(); + + // policyManageList根据policy_name进行分组,获取对应的策略数据 +// Map> groupedByPolicyName = policyManageList.stream().collect(Collectors.groupingBy( +// PolicyManage::getPolicyName, +// Collectors.toList() +// )); + + for (DeviceMonitorDTO value : policyManageList) { + List manageList = (List) value.getValues(); + // 获取当前设置的偏移值 + Optional 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 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 offsetValuePolicy = manageList.stream().filter(item -> item.getPointName().contains("目标偏移值")).findFirst(); + if (offsetValuePolicy.isPresent()) { + PolicyManage offsetValuePm = offsetValuePolicy.get(); + // 获取collectionParamsManages中id为tempSetPolicy.getCpmId()的数据 + Optional 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 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 changeValues = new ArrayList<>(); + changeValues.add(new OrderEntity(cpmId, "0", Integer.parseInt(paramType), otherName)); + sendOrderToMqtt(changeValues); + } + } + + } + } + + public void sendOrderToMqtt(List 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); + } + } + } diff --git a/mh-system/src/main/java/com/mh/system/service/policy/impl/PolicyManageServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/policy/impl/PolicyManageServiceImpl.java index 3a8831a..9f2bcdd 100644 --- a/mh-system/src/main/java/com/mh/system/service/policy/impl/PolicyManageServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/policy/impl/PolicyManageServiceImpl.java @@ -216,6 +216,18 @@ public class PolicyManageServiceImpl implements IPolicyManageService { deviceMonitorDTO.setValues(listMap.get(k)); list.add(deviceMonitorDTO); }); + // 这里再根据name排序,如果包含数字,则数字排序,否则按字符串排序 + list.sort((o1, o2) -> { + if (o1.getName().contains("\\d+") && o2.getName().contains("\\d+")) { + return o1.getName().compareTo(o2.getName()); + } else if (o1.getName().contains("\\d+")) { + return -1; + } else if (o2.getName().contains("\\d+")) { + return 1; + } else { + return o1.getName().compareTo(o2.getName()); + } + }); return list; } } diff --git a/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java b/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java index 4f34843..18d8400 100644 --- a/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java +++ b/mh-system/src/main/java/com/mh/system/service/space/impl/HouseInfoServiceImpl.java @@ -126,19 +126,19 @@ public class HouseInfoServiceImpl implements IHouseInfoService { List ledgerIds = houseInfo.getLedgerId(); if (ledgerIds != null && !ledgerIds.isEmpty()) { for (String ledgerId : ledgerIds) { - // 插入关联的区域关联表 - CpmSpaceRelation cpmSpaceRelation = new CpmSpaceRelation(); - cpmSpaceRelation.setAreaId(houseInfo.getAreaId()); - cpmSpaceRelation.setBuildingId(houseInfo.getBuildingId()); - cpmSpaceRelation.setHouseId(houseInfo.getId()); - cpmSpaceRelation.setFloorId(houseInfo.getFloorId()); - cpmSpaceRelation.setLedgerId(ledgerId); List cpmIds = houseInfo.getCpmId(); List collectionParamsManages = collectionParamsManageMapper.selectList(new QueryWrapper().eq("device_ledger_id", ledgerId)); // 根据ledgerId查询对应的cpmId,判断当前houseIfo中的List cpmId包含了哪几个cpmId,就插入哪几个 if (collectionParamsManages != null && !collectionParamsManages.isEmpty()) { for (CollectionParamsManage cpm : collectionParamsManages) { if (cpmIds != null && cpmIds.contains(cpm.getId())) { + // 插入关联的区域关联表 + CpmSpaceRelation cpmSpaceRelation = new CpmSpaceRelation(); + cpmSpaceRelation.setAreaId(houseInfo.getAreaId()); + cpmSpaceRelation.setBuildingId(houseInfo.getBuildingId()); + cpmSpaceRelation.setHouseId(houseInfo.getId()); + cpmSpaceRelation.setFloorId(houseInfo.getFloorId()); + cpmSpaceRelation.setLedgerId(ledgerId); cpmSpaceRelation.setCpmId(cpm.getId()); cpmSpaceRelation.setCreateBy(houseInfo.getCreateBy()); cpmSpaceRelation.setCreateTime(houseInfo.getCreateTime()); diff --git a/sql/2025新增.sql b/sql/2025新增.sql index f6c7bd9..68ae326 100644 --- a/sql/2025新增.sql +++ b/sql/2025新增.sql @@ -138,4 +138,31 @@ COMMENT ON COLUMN collection_params_manage.quality IS '质量:网关上传的 -- 2025-10-09 ALTER TABLE public.cpm_space_relation ADD del_flag bpchar(1) DEFAULT '0' NOT NULL; -COMMENT ON COLUMN public.cpm_space_relation.del_flag IS '删除标志(0代表存在 2代表删除)'; \ No newline at end of file +COMMENT ON COLUMN public.cpm_space_relation.del_flag IS '删除标志(0代表存在 2代表删除)'; + +-- 2025-10-10 +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02401', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_1510385', 'ddc13_1510385', 'ddc13_1510385', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_1号风阀远程手自动', 140, '2', '2', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02402', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_1510485', 'ddc13_1510485', 'ddc13_1510485', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_2号风阀远程手自动', 140, '2', '2', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02403', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_1510585', 'ddc13_1510585', 'ddc13_1510585', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_3号风阀远程手自动', 140, '2', '2', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02404', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_0211885', 'ddc13_0211885', 'ddc13_0211885', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_1号风阀手动调节', 140, '3', '2', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02405', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_0211985', 'ddc13_0211985', 'ddc13_0211985', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_2号风阀手动调节', 140, '3', '2', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('283034kk26a9b3a79a8635fenggui02406', 'ddcahu13b3a898d85f3a1205a2d82071e100', '7', 'ddc13_0212085', 'ddc13_0212085', 'ddc13_0212085', '03', NULL, NULL, NULL, 1, 0.000, 0, 0, 0.000, NULL, 0, NULL, 1, '99', '2', '1', '1', NULL, 2, 0, '2025-10-10 08:05:51.000', NULL, NULL, NULL, 'AHU1_3号风阀手动调节', 140, '3', '2', '1', '10', '0'); + +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402101', '283034kk26a9b3a79a8635fenggui02401', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402102', '283034kk26a9b3a79a8635fenggui02402', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402103', '283034kk26a9b3a79a8635fenggui02403', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402104', '283034kk26a9b3a79a8635fenggui02404', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402105', '283034kk26a9b3a79a8635fenggui02405', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); +INSERT INTO public.cpm_space_relation (id, cpm_id, area_id, building_id, floor_id, house_id, create_by, update_by, create_time, update_time, ledger_id, del_flag) VALUES('ddc1443b3a898d85f3a1205a2ddc1402106', '283034kk26a9b3a79a8635fenggui02406', 'd39d42e89387bc01e0c5b4df4180f209', '4029cfbb357e4dd82cc3eeef59cff8ff', 'd301d47283e31f8f2666e4cf1c980b2e', '966e13d9d27aa37b8b104b7a0cec9199', '开发', '', '2025-09-16 16:23:00.000', '2025-09-16 16:30:18.730', 'ddcahu13b3a898d85f3a1205a2d82071e100', '0'); + +INSERT INTO public.sys_dict_data (dict_code,dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) +VALUES((select max(dict_code)+1 from sys_dict_data),48, '电流', '48', 'sys_param_type', NULL, 'default', NULL, '0', 'mhtech', '2025-10-10 15:53:38.178', NULL, '2025-10-10 15:53:38.178', NULL); + +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587125', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '3', '03', '0BD9', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '3号热泵电流1', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587126', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '3', '03', '0BDD', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '3号热泵电流2', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587127', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '4', '04', '0BD9', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '4号热泵电流1', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587128', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '4', '04', '0BDD', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '4号热泵电流2', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587129', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '5', '05', '0BD9', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '5号热泵电流1', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587130', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '5', '05', '0BDD', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '5号热泵电流2', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587131', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '6', '06', '0BD9', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '6号热泵电流1', 140, '48', '1', '1', '10', '0'); +INSERT INTO public.collection_params_manage (id, device_ledger_id, mt_type, mt_num, mt_code, register_addr, func_code, identify_code, mt_caliber_pulse, mt_range, mt_ratio, mt_init_value, digits, data_type, cur_value, cur_time, mt_is_sum, unit, order_num, gateway_id, communication_param_id, protocol_type, communication_type, remark, register_size, is_use, create_time, update_time, create_by, update_by, other_name, grade, param_type, system_type, collection_type, terminal_device_type, quality) VALUES('hotd1333498ec37f7fc697e404587132', 'hot6b3a898d85f3a1605a2r420711e3e3', '7', '6', '06', '0BDD', '03', '', '', NULL, 1, 0.000, 0, 2, 1, '2025-08-01 11:30:50.000', 0, '', 0, '2', '2', '1', '0', '', 1, 0, '2025-03-09 19:32:22.061', '2025-03-09 19:34:00.072', 'mhtech', 'mhtech', '6号热泵电流2', 140, '48', '1', '1', '10', '0');