Просмотр исходного кода

fix(data): 修复节点2的COD监测逻辑

- 修改条件判断从非节点1判断湿度改为非节点2判断COD
- 更新警告代码从WARN-HUMIDITY改为WARN-COD
- 调整默认最大值从90.0改为40.0
- 更新警告类型从湿度预警改为COD预警
- 修改备注信息从环境湿度报警改为环境COD报警
林仔 4 дней назад
Родитель
Сommit
1df4d0b489

+ 5 - 5
environment-service/src/main/java/com/zksy/environment/config/RSServerService.java

@@ -207,14 +207,14 @@ public class RSServerService {
                                 }
                             }
 
-                            // 只有非节点1才判断湿度报警(节点1无湿度数据)
+                            // 只有非节点2才判断cod
                             if (nodeId == 2 && !Float.isNaN(nd.getHum())) {
-                                String humWarningCode = "WARN-HUMIDITY";
+                                String humWarningCode = "WARN-COD";
                                 WarningThreshold humThreshold = checkThreshold(deviceId, humWarningCode);
                                 Double humMinValue = humThreshold != null ? humThreshold.getMinValue() : null;
-                                Double humMaxValue = humThreshold != null ? humThreshold.getMaxValue() : 90.0;
-                                String humWarningType = humThreshold != null ? humThreshold.getWarningType() : "湿度预警";
-                                String humRemark = humThreshold != null ? humThreshold.getRemark() : "环境湿度报警";
+                                Double humMaxValue = humThreshold != null ? humThreshold.getMaxValue() : 40.0;
+                                String humWarningType = humThreshold != null ? humThreshold.getWarningType() : "COD预警";
+                                String humRemark = humThreshold != null ? humThreshold.getRemark() : "环境COD报警";
 
                                 boolean humShouldAlarm = false;
                                 BigDecimal humValue = BigDecimal.valueOf(finalValue);