Quellcode durchsuchen

新增化验室的 出水氨氮 - 连续检测报警 以及后续调用决策 和 展示的 处理

wangmiaomiao vor 8 Monaten
Ursprung
Commit
8f0c8c68c6

+ 3 - 3
slibra-admin/src/main/java/com/slibra/web/controller/business/GRPCController.java

@@ -377,10 +377,10 @@ public class GRPCController extends BaseController {
         PolicyReq policyReq = new PolicyReq();
         //2024年7月11日17:57:53 因为化验室的改了  但是 调用决策还得用原来的几个值
         String category = xinyiWarningRecord.getCategory();
-        if(ROBOT_XSY_1.getCode().equalsIgnoreCase(category)){
-            category = CS_ZD.getCode();
-        } else if (ROBOT_XSY_2.getCode().equalsIgnoreCase(category)) {
+        if(ROBOT_XSY_1.getCode().equalsIgnoreCase(category) || ROBOT_XSY_2.getCode().equalsIgnoreCase(category)){
             category = CS_ZD.getCode();
+        } else if (ROBOT_ANDAN_1.getCode().equalsIgnoreCase(category) || ROBOT_ANDAN_2.getCode().equalsIgnoreCase(category)) {
+            category = CS_AD.getCode();
         }else if (ROBOT_ECCZLSY.getCode().equalsIgnoreCase(category)) {
             category = CS_ZL.getCode();
         }

+ 2 - 0
slibra-common/src/main/java/com/slibra/common/enums/BusinessEnum.java

@@ -25,6 +25,8 @@ public class BusinessEnum {
         ROBOT_XSY_1("#1好氧硝酸盐", "#1好氧硝酸盐"),
         ROBOT_XSY_2("#2好氧硝酸盐", "#2好氧硝酸盐"),
         ROBOT_ECCZLSY("二沉池正磷酸盐", "二沉池正磷酸盐"),
+        ROBOT_ANDAN_1("#1氨氮", "#1氨氮"),
+        ROBOT_ANDAN_2("#2氨氮", "#2氨氮"),
 
         //生化报警
         NHLB("内回流比", "内回流比"),

+ 45 - 9
slibra-quartz/src/main/java/com/slibra/quartz/task/AsyncTask.java

@@ -1357,10 +1357,10 @@ public class AsyncTask {
             PolicyReq policyReq = new PolicyReq();
             //2024年7月11日17:57:53 因为化验室的改了  但是 调用决策还得用原来的几个值
             String category = tXinyiWarningRecord.getCategory();
-            if(ROBOT_XSY_1.getCode().equalsIgnoreCase(category)){
-                category = CS_ZD.getCode();
-            } else if (ROBOT_XSY_2.getCode().equalsIgnoreCase(category)) {
+            if(ROBOT_XSY_1.getCode().equalsIgnoreCase(category) || ROBOT_XSY_2.getCode().equalsIgnoreCase(category)){
                 category = CS_ZD.getCode();
+            } else if (ROBOT_ANDAN_1.getCode().equalsIgnoreCase(category) || ROBOT_ANDAN_2.getCode().equalsIgnoreCase(category)) {
+                category = CS_AD.getCode();
             }else if (ROBOT_ECCZLSY.getCode().equalsIgnoreCase(category)) {
                 category = CS_ZL.getCode();
             }
@@ -1519,8 +1519,10 @@ public class AsyncTask {
         //2024年7月15日10:57:31 因为新增了化验室的3个指标,也是出水数据
         if(category.contains(CHUSHUI)
             || ROBOT_ECCZLSY.getCode().equalsIgnoreCase(category)
-                || ROBOT_XSY_2.getCode().equalsIgnoreCase(category)
-                    || ROBOT_XSY_1.getCode().equalsIgnoreCase(category)){//出水的展示
+                || ROBOT_XSY_1.getCode().equalsIgnoreCase(category)
+                    || ROBOT_XSY_2.getCode().equalsIgnoreCase(category)
+                        || ROBOT_ANDAN_1.getCode().equalsIgnoreCase(category)
+                            || ROBOT_ANDAN_2.getCode().equalsIgnoreCase(category)){//出水的展示
             ShowValueCSBasic showValueCSBasic = new ShowValueCSBasic();
             if(ZERO_SZ_WARNING.getCode().equals(remark)){//水质报警
                 showValueCSBasic.setH(ZAIXIANYIBIAO);
@@ -1906,11 +1908,16 @@ public class AsyncTask {
                     handleXinYiWarningsRobot(cszzBzz, csTn, cszzGkz, BusinessEnum.WarningCategoryEnum.CS_ZD.getCode(), tXinyiIndustry, normConfig);
                 }
             }*/
+            //总氮的标准值和管控值
+            BigDecimal cszzBzz = normConfig.getCszzBzz();
+            BigDecimal cszzGkz = normConfig.getCszzGkz();
+            //氨氮的标准值和管控值
+            BigDecimal csadBzz = normConfig.getCsadBzz();
+            BigDecimal csadGkz = normConfig.getCsadGkz();
+
             //#1好氧硝酸盐
             BigDecimal no3Hlj1Jqr = tXinyiRobot.getNo3Hlj1Jqr();
             if(!Objects.isNull(no3Hlj1Jqr)){
-                BigDecimal cszzBzz = normConfig.getCszzBzz();
-                BigDecimal cszzGkz = normConfig.getCszzGkz();
                 if(!Objects.isNull(cszzBzz)){
                     handleXinYiWarningsRobot(cszzBzz, no3Hlj1Jqr, cszzGkz, ROBOT_XSY_1.getCode(), tXinyiIndustry, normConfig);
                 }
@@ -1919,8 +1926,6 @@ public class AsyncTask {
             //#2好氧硝酸盐
             BigDecimal no3Hlj2Jqr = tXinyiRobot.getNo3Hlj2Jqr();
             if(!Objects.isNull(no3Hlj2Jqr)){
-                BigDecimal cszzBzz = normConfig.getCszzBzz();
-                BigDecimal cszzGkz = normConfig.getCszzGkz();
                 if(!Objects.isNull(cszzBzz)){
                     handleXinYiWarningsRobot(cszzBzz, no3Hlj2Jqr, cszzGkz, ROBOT_XSY_2.getCode(), tXinyiIndustry, normConfig);
                 }
@@ -1937,6 +1942,37 @@ public class AsyncTask {
                 }
             }
 
+            //2024年7月18日10:48:15 新增报警:出水氨氮 - 连续检测报警
+            //1池
+            BigDecimal no3Qyc1Jqr = tXinyiRobot.getNo3Qyc1Jqr();
+            BigDecimal nh31Jqr = tXinyiRobot.getNh31Jqr();
+            //判断 增加容错
+            if(Objects.isNull(no3Qyc1Jqr))
+                no3Qyc1Jqr = BigDecimal.ZERO;
+            if(Objects.isNull(nh31Jqr))
+                nh31Jqr = BigDecimal.ZERO;
+            if(Objects.isNull(no3Hlj1Jqr))
+                no3Hlj1Jqr = BigDecimal.ZERO;
+            BigDecimal anDan1 = no3Qyc1Jqr.add(nh31Jqr).subtract(no3Hlj1Jqr);
+            if(!Objects.isNull(csadBzz)){
+                handleXinYiWarningsRobot(csadBzz, anDan1, csadGkz, ROBOT_ANDAN_1.getCode(), tXinyiIndustry, normConfig);
+            }
+
+            //2池
+            BigDecimal no3Qyc2Jqr = tXinyiRobot.getNo3Qyc2Jqr();
+            BigDecimal nh32Jqr = tXinyiRobot.getNh32Jqr();
+            //判断 增加容错
+            if(Objects.isNull(no3Qyc2Jqr))
+                no3Qyc2Jqr = BigDecimal.ZERO;
+            if(Objects.isNull(nh32Jqr))
+                nh32Jqr = BigDecimal.ZERO;
+            if(Objects.isNull(no3Hlj2Jqr))
+                no3Hlj2Jqr = BigDecimal.ZERO;
+            BigDecimal anDan2 = no3Qyc2Jqr.add(nh32Jqr).subtract(no3Hlj2Jqr);
+            if(!Objects.isNull(csadBzz)){
+                handleXinYiWarningsRobot(csadBzz, anDan2, csadGkz, ROBOT_ANDAN_2.getCode(), tXinyiIndustry, normConfig);
+            }
+
         }
     }