Browse Source

1、测试机房能耗接口;

2、优化设备台账,维保查询接口;
dev
mh 2 months ago
parent
commit
d52b7eaa9a
  1. 6
      mh-admin/src/main/java/com/mh/web/controller/device/MaintainInfoController.java
  2. 2
      mh-common/src/main/java/com/mh/common/constant/Constants.java
  3. 14
      mh-common/src/main/java/com/mh/common/core/domain/entity/CollectionParamsManage.java
  4. 14
      mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceLedger.java
  5. 2
      mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceReport.java
  6. 8
      mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceTypeEnergy.java
  7. 16
      mh-common/src/main/java/com/mh/common/core/domain/entity/MaintainSum.java
  8. 3
      mh-common/src/main/java/com/mh/common/utils/PageUtils.java
  9. 4
      mh-quartz/src/main/java/com/mh/quartz/task/DealDataTask.java
  10. 4
      mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java
  11. 96
      mh-system/src/main/java/com/mh/system/mapper/energy/EnergyAnalyzeMapper.java
  12. 26
      mh-system/src/main/java/com/mh/system/service/device/impl/MaintainInfoServiceImpl.java
  13. 1
      mh-system/src/main/java/com/mh/system/service/energy/EnergyAnalyzeService.java
  14. 12
      mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java
  15. 23
      sql/表结构设计.sql

6
mh-admin/src/main/java/com/mh/web/controller/device/MaintainInfoController.java

@ -99,12 +99,14 @@ public class MaintainInfoController extends BaseController {
@RequestParam(value= "curDate", required=false)String curDate) { @RequestParam(value= "curDate", required=false)String curDate) {
try { try {
MaintainSum record; MaintainSum record;
if (buildingId == null || buildingId.equals("")) { if (buildingId == null || buildingId.isEmpty()) {
record = maintainInfoService.queryMaintainSum("所有", curDate); record = maintainInfoService.queryMaintainSum("所有", curDate);
} else { } else {
record = maintainInfoService.queryMaintainSum(buildingId, curDate); record = maintainInfoService.queryMaintainSum(buildingId, curDate);
} }
if (record == null) {
record = new MaintainSum();
}
return AjaxResult.success(record); return AjaxResult.success(record);
} catch (Exception e) { } catch (Exception e) {
return AjaxResult.error(); return AjaxResult.error();

2
mh-common/src/main/java/com/mh/common/constant/Constants.java

@ -195,7 +195,7 @@ public class Constants {
public static final String TYPE_REGISTER = "registers"; // 查询ddc指令 public static final String TYPE_REGISTER = "registers"; // 查询ddc指令
public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; // 格式化时间 public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; // 格式化时间
public static final String METER_TYPE = "meter"; public static final String METER_TYPE = "5";
public static final String CLOUD_TYPE = "cloud"; public static final String CLOUD_TYPE = "cloud";

14
mh-common/src/main/java/com/mh/common/core/domain/entity/CollectionParamsManage.java

@ -183,6 +183,19 @@ public class CollectionParamsManage extends BaseEntity {
*/ */
private String collectionType; private String collectionType;
/**
* 终端设备类型实际上就是设备类型
*/
private String terminalDeviceType;
public String getTerminalDeviceType() {
return terminalDeviceType;
}
public void setTerminalDeviceType(String terminalDeviceType) {
this.terminalDeviceType = terminalDeviceType;
}
public String getCollectionType() { public String getCollectionType() {
return collectionType; return collectionType;
} }
@ -478,6 +491,7 @@ public class CollectionParamsManage extends BaseEntity {
.append("paramType", paramType) .append("paramType", paramType)
.append("systemType", systemType) .append("systemType", systemType)
.append("collectionType", collectionType) .append("collectionType", collectionType)
.append("terminalDeviceType", terminalDeviceType)
.toString(); .toString();
} }
} }

14
mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceLedger.java

@ -100,6 +100,19 @@ public class DeviceLedger extends BaseEntity {
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, Object> params; private Map<String, Object> params;
/**
* 系统类型
*/
private String systemType;
public String getSystemType() {
return systemType;
}
public void setSystemType(String systemType) {
this.systemType = systemType;
}
public String getId() { public String getId() {
return id; return id;
} }
@ -253,6 +266,7 @@ public class DeviceLedger extends BaseEntity {
.append("searchValue", searchValue) .append("searchValue", searchValue)
.append("remark", remark) .append("remark", remark)
.append("params", params) .append("params", params)
.append("systemType", systemType)
.toString(); .toString();
} }
} }

2
mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceReport.java

@ -25,6 +25,8 @@ public class DeviceReport implements Serializable {
private Date updateTime; private Date updateTime;
private String deviceNum; private String deviceNum;
private String deviceCode; private String deviceCode;
// 寄存器地址
private String registerAddr;
private String deviceType; private String deviceType;
private String lastValue; private String lastValue;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")

8
mh-common/src/main/java/com/mh/common/core/domain/entity/DeviceTypeEnergy.java

@ -74,13 +74,13 @@ public class DeviceTypeEnergy implements Serializable {
} }
public String getDeviceTypeRange() { public String getDeviceTypeRange() {
if (Integer.parseInt(this.grade) < 10) { if (Integer.parseInt(this.deviceType) == 0) {
return "冷水机组(kwh)"; return "冷水机组(kwh)";
} else if (Integer.parseInt(this.grade) >= 10 && Integer.parseInt(this.grade) < 20) { } else if (Integer.parseInt(this.deviceType) == 2) {
return "冷冻泵(kwh)"; return "冷冻泵(kwh)";
} else if (Integer.parseInt(this.grade) >= 20 && Integer.parseInt(this.grade) < 30) { } else if (Integer.parseInt(this.deviceType) == 1) {
return "冷却泵(kwh)"; return "冷却泵(kwh)";
} else if (Integer.parseInt(this.grade) >= 30 && Integer.parseInt(this.grade) < 40) { } else if (Integer.parseInt(this.deviceType) == 3) {
return "冷却塔(kwh)"; return "冷却塔(kwh)";
} else { } else {
return "其他"; return "其他";

16
mh-common/src/main/java/com/mh/common/core/domain/entity/MaintainSum.java

@ -19,21 +19,21 @@ public class MaintainSum {
private String curDate; private String curDate;
private int dayNum; private int dayNum=0;
private String dayP; private String dayP = "0";
private int weekNum; private int weekNum = 0;
private String weekP; private String weekP = "0";
private int monthNum; private int monthNum = 0;
private String monthP; private String monthP = "0";
private int yearNum; private int yearNum = 0;
private String yearP; private String yearP = "0";
public String getId() { public String getId() {
return id; return id;

3
mh-common/src/main/java/com/mh/common/utils/PageUtils.java

@ -19,6 +19,9 @@ public class PageUtils extends PageHelper
{ {
PageDomain pageDomain = TableSupport.buildPageRequest(); PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum(); Integer pageNum = pageDomain.getPageNum();
if (pageNum == 0) {
return;
}
Integer pageSize = pageDomain.getPageSize(); Integer pageSize = pageDomain.getPageSize();
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
Boolean reasonable = pageDomain.getReasonable(); Boolean reasonable = pageDomain.getReasonable();

4
mh-quartz/src/main/java/com/mh/quartz/task/DealDataTask.java

@ -112,6 +112,8 @@ public class DealDataTask {
firstEntity.setCurValue(entity.getCurValue().toString()); firstEntity.setCurValue(entity.getCurValue().toString());
firstEntity.setDeviceNum(entity.getMtNum()); firstEntity.setDeviceNum(entity.getMtNum());
firstEntity.setDeviceCode(entity.getMtCode()); firstEntity.setDeviceCode(entity.getMtCode());
// 寄存器地址
firstEntity.setRegisterAddr(entity.getRegisterAddr());
firstEntity.setDeviceType(deviceType); firstEntity.setDeviceType(deviceType);
firstEntity.setRatio(ratio); firstEntity.setRatio(ratio);
double usedValue = entity.getCurValue().doubleValue() - Double.parseDouble(initValue); double usedValue = entity.getCurValue().doubleValue() - Double.parseDouble(initValue);
@ -135,6 +137,8 @@ public class DealDataTask {
firstEntity.setCurValue(entity.getCurValue().toString()); firstEntity.setCurValue(entity.getCurValue().toString());
firstEntity.setDeviceNum(entity.getMtNum()); firstEntity.setDeviceNum(entity.getMtNum());
firstEntity.setDeviceCode(entity.getMtCode()); firstEntity.setDeviceCode(entity.getMtCode());
// 寄存器地址
firstEntity.setRegisterAddr(entity.getRegisterAddr());
firstEntity.setDeviceType(deviceType); firstEntity.setDeviceType(deviceType);
firstEntity.setRatio(ratio); firstEntity.setRatio(ratio);
double usedValue = entity.getCurValue().doubleValue() - Double.parseDouble(lastValue); double usedValue = entity.getCurValue().doubleValue() - Double.parseDouble(lastValue);

4
mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java

@ -35,8 +35,8 @@ public interface CollectionParamsManageMapper extends BaseMapper<CollectionParam
@Result(column = "last_date", property = "lastDates"), @Result(column = "last_date", property = "lastDates"),
@Result(column = "communication_type", property = "communicationType"), @Result(column = "communication_type", property = "communicationType"),
@Result(column = "device_type", property = "deviceType"), @Result(column = "device_type", property = "deviceType"),
@Result(column = "create_time", property = "createTimes"), @Result(column = "create_time", property = "createTime"),
@Result(column = "update_time", property = "updateTimes"), @Result(column = "update_time", property = "updateTime"),
@Result(column = "remark", property = "remark"), @Result(column = "remark", property = "remark"),
@Result(column = "grade", property = "grade") @Result(column = "grade", property = "grade")
}) })

96
mh-system/src/main/java/com/mh/system/mapper/energy/EnergyAnalyzeMapper.java

@ -27,43 +27,51 @@ public interface EnergyAnalyzeMapper {
*/ */
@Select("<script>" + @Select("<script>" +
"select " + "select " +
" dh.calc_value, " + " dm.calc_value, " +
" dh.device_num, " + " dm.device_num, " +
" dm.remark, " + " cpm.other_name as remark, " +
" dm.grade " + " cpm.terminal_device_type as device_type " +
"from " + "from " +
" ${lastTableName} dh " + " ${lastTableName} dm " +
"join device_manage dm " + "join collection_params_manage cpm " +
"on " + " on " +
" dh.device_num = dm.device_num " + " cpm.mt_num = dm.device_num " +
" and cpm.mt_code = dm.device_code " +
" and cpm.register_addr = dm.register_addr " +
"join device_ledger dl " +
" on " +
" cpm.device_ledger_id = dl.id " +
"where " + "where " +
" dh.cur_time >= #{startTime} " + " dm.cur_time >= #{startTime} " +
" and dh.cur_time &lt;= #{endTime} " + " and dm.cur_time &lt;= #{endTime} " +
" and dm.grade &lt; 40 " + " and cpm.grade = 40 " +
" and dm.device_type like '%meter%' " + " and cpm.is_use = 0 " +
" and dm.status = 0" +
"<if test='paramType != null and paramType != \"\"'>" + "<if test='paramType != null and paramType != \"\"'>" +
" and dh.device_type = #{paramType}" + " and dl.device_type = #{paramType}" +
"</if>" + "</if>" +
"union all " + "union all " +
"select " + "select " +
" dh.calc_value, " + " dm.calc_value, " +
" dh.device_num, " + " dm.device_num, " +
" dm.remark, " + " cpm.other_name as remark, " +
" dm.grade " + " cpm.terminal_device_type as device_type " +
"from " + "from " +
" ${curTableName} dh " + " ${curTableName} dm " +
"join device_manage dm " + "join collection_params_manage cpm " +
"on " + " on " +
" dh.device_num = dm.device_num " + " cpm.mt_num = dm.device_num " +
" and cpm.mt_code = dm.device_code " +
" and cpm.register_addr = dm.register_addr " +
"join device_ledger dl " +
" on " +
" cpm.device_ledger_id = dl.id " +
"where " + "where " +
" dh.cur_time >= #{startTime} " + " dm.cur_time >= #{startTime} " +
" and dh.cur_time &lt;= #{endTime} " + " and dm.cur_time &lt;= #{endTime} " +
" and dm.grade &lt; 40 " + " and cpm.grade = 40 " +
" and dm.device_type like '%meter%' " + " and cpm.is_use = 0 " +
" and dm.status = 0" +
"<if test='paramType != null and paramType != \"\"'>" + "<if test='paramType != null and paramType != \"\"'>" +
" and dh.device_type = #{paramType}" + " and dl.device_type = #{paramType}" +
"</if>" + "</if>" +
"</script>") "</script>")
List<DeviceTypeEnergy> queryManyTable(@Param("startTime") String startTime, List<DeviceTypeEnergy> queryManyTable(@Param("startTime") String startTime,
@ -83,23 +91,27 @@ public interface EnergyAnalyzeMapper {
*/ */
@Select("<script>" + @Select("<script>" +
"select " + "select " +
" dh.calc_value, " + " dm.calc_value, " +
" dh.device_num, " + " dm.device_num, " +
" dm.remark, " + " cpm.other_name as remark, " +
" dm.grade " + " cpm.terminal_device_type as device_type " +
"from " + "from " +
" ${lastTableName} dh " + " ${lastTableName} dm " +
"join device_manage dm " + "join collection_params_manage cpm " +
"on " + " on " +
" dh.device_num = dm.device_num " + " cpm.mt_num = dm.device_num " +
" and cpm.mt_code = dm.device_code " +
" and cpm.register_addr = dm.register_addr " +
"join device_ledger dl " +
" on " +
" cpm.device_ledger_id = dl.id " +
"where " + "where " +
" dh.cur_time >= #{startTime} " + " dm.cur_time >= #{startTime}::timestamp " +
" and dh.cur_time &lt;= #{endTime} " + " and dm.cur_time &lt;= #{endTime}::timestamp " +
" and dm.grade &lt; 40 " + " and cpm.grade = 40 " +
" and dm.device_type like '%meter%' " + " and cpm.is_use = 0 " +
" and dm.status = 0" +
"<if test='paramType != null and paramType != \"\"'>" + "<if test='paramType != null and paramType != \"\"'>" +
" and dh.device_type = #{paramType}" + " and dl.device_type = #{paramType}" +
"</if>" + "</if>" +
"</script>") "</script>")
List<DeviceTypeEnergy> queryOneTable(@Param("startTime") String startTime, List<DeviceTypeEnergy> queryOneTable(@Param("startTime") String startTime,

26
mh-system/src/main/java/com/mh/system/service/device/impl/MaintainInfoServiceImpl.java

@ -3,12 +3,15 @@ package com.mh.system.service.device.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mh.common.core.domain.entity.MaintainInfo; import com.mh.common.core.domain.entity.MaintainInfo;
import com.mh.common.core.domain.entity.MaintainSum; import com.mh.common.core.domain.entity.MaintainSum;
import com.mh.common.utils.DateUtils;
import com.mh.common.utils.StringUtils; import com.mh.common.utils.StringUtils;
import com.mh.system.mapper.device.MaintainInfoMapper; import com.mh.system.mapper.device.MaintainInfoMapper;
import com.mh.system.service.device.IMaintainInfoService; import com.mh.system.service.device.IMaintainInfoService;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List; import java.util.List;
/** /**
@ -34,13 +37,30 @@ public class MaintainInfoServiceImpl implements IMaintainInfoService {
if (maintainInfo.getMaintainType() != null) { if (maintainInfo.getMaintainType() != null) {
queryWrapper.eq("maintain_type", maintainInfo.getMaintainType()); queryWrapper.eq("maintain_type", maintainInfo.getMaintainType());
} }
if (!StringUtils.isEmpty(maintainInfo.getBuildingId())) {
queryWrapper.eq("building_id", maintainInfo.getBuildingId());
}
// 维保人员 // 维保人员
if (!StringUtils.isEmpty(maintainInfo.getMaintainPeople())) { if (!StringUtils.isEmpty(maintainInfo.getMaintainPeople())) {
queryWrapper.like("maintain_people", maintainInfo.getMaintainPeople()); queryWrapper.like("maintain_people", maintainInfo.getMaintainPeople());
} }
// 设备id // 设备类型
if (!StringUtils.isEmpty(maintainInfo.getDeviceId())) { if (!StringUtils.isEmpty(maintainInfo.getDeviceType())) {
queryWrapper.eq("device_id", maintainInfo.getDeviceId()); queryWrapper.eq("device_type", maintainInfo.getDeviceType());
}
// 创建时间(格式为 yyyy-MM-dd)
// 添加时间范围
if (maintainInfo.getParams() != null && !maintainInfo.getParams().isEmpty()) {
String beginTimeStr = (String) maintainInfo.getParams().get("beginTime");
String endTimeStr = (String) maintainInfo.getParams().get("endTime");
if (StringUtils.isNotEmpty(beginTimeStr) && StringUtils.isNotEmpty(endTimeStr)) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate beginTime = LocalDate.parse(beginTimeStr, formatter);
LocalDate endTime = LocalDate.parse(endTimeStr, formatter);
queryWrapper.between("create_time", java.sql.Date.valueOf(beginTime), java.sql.Date.valueOf(endTime));
}
} }
queryWrapper.orderByDesc("create_time"); queryWrapper.orderByDesc("create_time");
return maintainInfoMapper.selectList(queryWrapper); return maintainInfoMapper.selectList(queryWrapper);

1
mh-system/src/main/java/com/mh/system/service/energy/EnergyAnalyzeService.java

@ -1,7 +1,6 @@
package com.mh.system.service.energy; package com.mh.system.service.energy;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.mh.common.core.domain.AjaxResult;
import com.mh.common.core.domain.vo.EnergyQueryVO; import com.mh.common.core.domain.vo.EnergyQueryVO;
import java.util.List; import java.util.List;

12
mh-system/src/main/java/com/mh/system/service/energy/impl/EnergyAnalyzeServiceImpl.java

@ -93,16 +93,16 @@ public class EnergyAnalyzeServiceImpl implements EnergyAnalyzeService {
} }
// 查询各个冷水机组的 0-9 // 查询各个冷水机组的 0-9
List<DeviceTypeEnergy> chiller = createDeviceTypeData(deviceTypeEnergyEntities, 10, 0); List<DeviceTypeEnergy> chiller = createDeviceTypeData(deviceTypeEnergyEntities, 0, 0);
// 查询各个冷冻泵的 10-19 // 查询各个冷冻泵的 10-19
List<DeviceTypeEnergy> chillerPump = createDeviceTypeData(deviceTypeEnergyEntities, 20, 10); List<DeviceTypeEnergy> chillerPump = createDeviceTypeData(deviceTypeEnergyEntities, 2, 2);
// 查询各个冷却泵的 20-29 // 查询各个冷却泵的 20-29
List<DeviceTypeEnergy> coolPump = createDeviceTypeData(deviceTypeEnergyEntities, 30, 20); List<DeviceTypeEnergy> coolPump = createDeviceTypeData(deviceTypeEnergyEntities, 1, 1);
// 查询各个冷却塔的 30-39 // 查询各个冷却塔的 30-39
List<DeviceTypeEnergy> coolTower = createDeviceTypeData(deviceTypeEnergyEntities, 40, 30); List<DeviceTypeEnergy> coolTower = createDeviceTypeData(deviceTypeEnergyEntities, 3, 3);
// 从device_manage查询不是总表的 // 从device_manage查询不是总表的
List<CollectionParamsManage> deviceByOther = collectionParamsManageMapper.getDeviceByOther(null); List<CollectionParamsManage> deviceByOther = collectionParamsManageMapper.getDeviceByOther(null);
@ -259,7 +259,7 @@ public class EnergyAnalyzeServiceImpl implements EnergyAnalyzeService {
.filter(val -> val.getDeviceNum().equals(deviceManageEntity.getMtNum())) .filter(val -> val.getDeviceNum().equals(deviceManageEntity.getMtNum()))
.peek(val -> { .peek(val -> {
val.setDeviceType(deviceManageEntity.getMtType()); val.setDeviceType(deviceManageEntity.getMtType());
val.setRemark(deviceManageEntity.getRemark()); val.setRemark(deviceManageEntity.getOtherName());
val.setGrade(String.valueOf(deviceManageEntity.getGrade())); val.setGrade(String.valueOf(deviceManageEntity.getGrade()));
}) })
.sorted(Comparator.comparing(DeviceTypeEnergy::getGrade)) .sorted(Comparator.comparing(DeviceTypeEnergy::getGrade))
@ -268,7 +268,7 @@ public class EnergyAnalyzeServiceImpl implements EnergyAnalyzeService {
private static List<DeviceTypeEnergy> createDeviceTypeData(List<DeviceTypeEnergy> deviceTypeEnergyEntities, int x, int x1) { private static List<DeviceTypeEnergy> createDeviceTypeData(List<DeviceTypeEnergy> deviceTypeEnergyEntities, int x, int x1) {
return deviceTypeEnergyEntities.stream() return deviceTypeEnergyEntities.stream()
.filter(val -> Integer.parseInt(val.getGrade()) < x && Integer.parseInt(val.getGrade()) >= x1) .filter(val -> Integer.parseInt(val.getDeviceType()) == x)
.collect(Collectors.groupingBy(DeviceTypeEnergy::getDeviceNum, Collectors.summarizingDouble(DeviceTypeEnergy::getDoubleCalcValue))) .collect(Collectors.groupingBy(DeviceTypeEnergy::getDeviceNum, Collectors.summarizingDouble(DeviceTypeEnergy::getDoubleCalcValue)))
.entrySet().stream() .entrySet().stream()
.map(entry -> { .map(entry -> {

23
sql/表结构设计.sql

@ -565,3 +565,26 @@ CREATE INDEX idx_alarm_records_create_time ON alarm_records(create_time);
ALTER TABLE public.alarm_rules ADD status int4 NULL; ALTER TABLE public.alarm_rules ADD status int4 NULL;
COMMENT ON COLUMN public.alarm_rules.status IS '状态:0:已启用,1:未启用'; COMMENT ON COLUMN public.alarm_rules.status IS '状态:0:已启用,1:未启用';
ALTER TABLE public.data_min2025 ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_min2025.register_addr IS '寄存器地址';
ALTER TABLE public.data_hour2024 ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_hour2024.register_addr IS '寄存器地址';
ALTER TABLE public.data_hour2025 ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_hour2025.register_addr IS '寄存器地址';
ALTER TABLE public.data_day2024 ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_day2024.register_addr IS '寄存器地址';
ALTER TABLE public.data_month ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_month.register_addr IS '寄存器地址';
ALTER TABLE public.data_year ADD register_addr varchar(20) NULL;
COMMENT ON COLUMN public.data_year.register_addr IS '寄存器地址';
ALTER TABLE public.device_ledger ADD system_type varchar NULL;
COMMENT ON COLUMN public.device_ledger.system_type IS '系统类型';
ALTER TABLE public.collection_params_manage ADD terminal_device_type varchar(10) NULL;
COMMENT ON COLUMN public.collection_params_manage.terminal_device_type IS '终端设备类型';

Loading…
Cancel
Save