diff --git a/intc-modules/intc-fishery/src/main/java/com/intc/fishery/controller/PondController.java b/intc-modules/intc-fishery/src/main/java/com/intc/fishery/controller/PondController.java index ca29d78..a5e8041 100644 --- a/intc-modules/intc-fishery/src/main/java/com/intc/fishery/controller/PondController.java +++ b/intc-modules/intc-fishery/src/main/java/com/intc/fishery/controller/PondController.java @@ -288,11 +288,16 @@ public class PondController extends BaseController { DeviceVo deviceVo = MapstructUtils.convert(device, DeviceVo.class); // 设置告警码信息 + PondMode1WarnCodeInfo detectorWarnCodeInfo = new PondMode1WarnCodeInfo(); if (device.getWarnCode() != null && device.getWarnCode() < DefineDeviceWarnCode.UserMaxCode) { - // 告警码信息已在DeviceVo中,无需额外处理 + detectorWarnCodeInfo.setWarnCode(device.getWarnCode()); + detectorWarnCodeInfo.setWarnDescription(DefineDeviceWarnCode.toWarnDescription(device.getWarnCode())); } else { + detectorWarnCodeInfo.setWarnCode(DefineDeviceWarnCode.None); + detectorWarnCodeInfo.setWarnDescription(""); deviceVo.setWarnCode(DefineDeviceWarnCode.None); } + deviceVo.setWarnCodeInfo(detectorWarnCodeInfo); // 判断是否有联动控制 deviceVo.setIsLinkCtrl(false); diff --git a/intc-modules/intc-fishery/src/main/java/com/intc/fishery/domain/vo/DeviceVo.java b/intc-modules/intc-fishery/src/main/java/com/intc/fishery/domain/vo/DeviceVo.java index 79d0f45..14acfd2 100644 --- a/intc-modules/intc-fishery/src/main/java/com/intc/fishery/domain/vo/DeviceVo.java +++ b/intc-modules/intc-fishery/src/main/java/com/intc/fishery/domain/vo/DeviceVo.java @@ -346,4 +346,9 @@ public class DeviceVo implements Serializable { */ private Boolean isLinkCtrl; + /** + * 告警码信息(告警码 + 告警描述) + */ + private PondMode1WarnCodeInfo warnCodeInfo; + }