fix: 溶解氧探头离线告警修复。
This commit is contained in:
@@ -98,7 +98,8 @@ public class DefineDeviceWarnCode {
|
||||
|
||||
/**
|
||||
* 转换告警码为告警描述(与 C# ToWarnDescription 保持一致)
|
||||
* 优先级:设备过期 > 设备离线 > 设备断电 > 溶解氧离线 > 溶解氧告警 > 温度告警 > 饱和度过高
|
||||
* 优先级:设备过期 > 设备离线 > 设备休眠 > 设备断电 > 溶解氧离线 > 溶解氧告警 > 温度告警 > 饱和度过高
|
||||
* 注:PH/盐度/浊度/水位/氨氮探头离线不需要前端展示,故不在此处理
|
||||
*/
|
||||
public static String toWarnDescription(int warnCode) {
|
||||
if (warnCode == None) {
|
||||
|
||||
@@ -306,7 +306,8 @@ public class PondController extends BaseController {
|
||||
PondMode1WarnCodeInfo detectorWarnCodeInfo = new PondMode1WarnCodeInfo();
|
||||
if (device.getWarnCode() != null && device.getWarnCode() < DefineDeviceWarnCode.UserMaxCode) {
|
||||
detectorWarnCodeInfo.setWarnCode(device.getWarnCode());
|
||||
detectorWarnCodeInfo.setWarnDescription(DefineDeviceWarnCode.toWarnDescription(device.getWarnCode()));
|
||||
String desc = DefineDeviceWarnCode.toWarnDescription(device.getWarnCode());
|
||||
detectorWarnCodeInfo.setWarnDescription(desc != null ? desc : "");
|
||||
} else {
|
||||
detectorWarnCodeInfo.setWarnCode(DefineDeviceWarnCode.None);
|
||||
detectorWarnCodeInfo.setWarnDescription("");
|
||||
@@ -357,7 +358,8 @@ public class PondController extends BaseController {
|
||||
PondMode1WarnCodeInfo warnCodeInfo = new PondMode1WarnCodeInfo();
|
||||
if (device.getWarnCode() != null && device.getWarnCode() < DefineDeviceWarnCode.UserMaxCode) {
|
||||
warnCodeInfo.setWarnCode(device.getWarnCode());
|
||||
warnCodeInfo.setWarnDescription(DefineDeviceWarnCode.toWarnDescription(device.getWarnCode()));
|
||||
String desc = DefineDeviceWarnCode.toWarnDescription(device.getWarnCode());
|
||||
warnCodeInfo.setWarnDescription(desc != null ? desc : "");
|
||||
} else {
|
||||
warnCodeInfo.setWarnCode(DefineDeviceWarnCode.None);
|
||||
warnCodeInfo.setWarnDescription("");
|
||||
@@ -923,7 +925,8 @@ public class PondController extends BaseController {
|
||||
data.setDeviceCount(hashSetDeviceId.size());
|
||||
data.setSwitchCount(pondSwitches.size());
|
||||
data.getWarnCodeInfo().setWarnCode(warnCode);
|
||||
data.getWarnCodeInfo().setWarnDescription(DefineDeviceWarnCode.toWarnDescription(warnCode));
|
||||
String warnDesc = DefineDeviceWarnCode.toWarnDescription(warnCode);
|
||||
data.getWarnCodeInfo().setWarnDescription(warnDesc != null ? warnDesc : "");
|
||||
|
||||
listData.add(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user