fix: 塘口设备列表,bug修复。
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -346,4 +346,9 @@ public class DeviceVo implements Serializable {
|
||||
*/
|
||||
private Boolean isLinkCtrl;
|
||||
|
||||
/**
|
||||
* 告警码信息(告警码 + 告警描述)
|
||||
*/
|
||||
private PondMode1WarnCodeInfo warnCodeInfo;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user