wangmiaomiao 9 ماه پیش
والد
کامیت
3404fa2a42

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

@@ -432,17 +432,17 @@ public class GRPCController extends BaseController {
             for (WorkOrderRes workOrderRe : workOrderRes) {
                 sb.append(workOrderRe.getTime()).append(":");
                 if(workOrderReq.getJsCod())
-                    sb.append(workOrderRe.getJsCod()).append("mg/L、");
+                    sb.append("COD:").append(workOrderRe.getJsCod()).append("mg/L、");
                 if(workOrderReq.getJsTn())
-                    sb.append(workOrderRe.getJsTn()).append("mg/L、");
+                    sb.append("TN:").append(workOrderRe.getJsTn()).append("mg/L、");
                 if(workOrderReq.getJsTp())
-                    sb.append(workOrderRe.getJsTp()).append("mg/L、");
+                    sb.append("TP:").append(workOrderRe.getJsTp()).append("mg/L、");
                 if(workOrderReq.getJsNh3())
-                    sb.append(workOrderRe.getJsNh3()).append("mg/L、");
+                    sb.append("NH3-N:").append(workOrderRe.getJsNh3()).append("mg/L、");
                 if(workOrderReq.getJsSs())
-                    sb.append(workOrderRe.getJsSs()).append("mg/L、");
+                    sb.append("SS:").append(workOrderRe.getJsSs()).append("mg/L、");
                 if(workOrderReq.getJsSlq())
-                    sb.append(workOrderRe.getJsSlq()).append("m³/d、");
+                    sb.append("进水水量:").append(workOrderRe.getJsSlq()).append("m³/d、");
             }
         }
         if(workOrderReq.getCsSlqc() || workOrderReq.getCsSs() || workOrderReq.getCsTp() || workOrderReq.getCsTn() || workOrderReq.getCsCod() || workOrderReq.getCsNh3()){
@@ -450,17 +450,17 @@ public class GRPCController extends BaseController {
             for (WorkOrderRes workOrderRe : workOrderRes) {
                 sb.append(workOrderRe.getTime()).append(":");
                 if(workOrderReq.getCsCod())
-                    sb.append(workOrderRe.getCsCod()).append("mg/L、");
+                    sb.append("COD:").append(workOrderRe.getCsCod()).append("mg/L、");
                 if(workOrderReq.getCsTn())
-                    sb.append(workOrderRe.getCsTn()).append("mg/L、");
+                    sb.append("TN:").append(workOrderRe.getCsTn()).append("mg/L、");
                 if(workOrderReq.getCsTp())
-                    sb.append(workOrderRe.getCsTp()).append("mg/L、");
+                    sb.append("TP:").append(workOrderRe.getCsTp()).append("mg/L、");
                 if(workOrderReq.getCsNh3())
-                    sb.append(workOrderRe.getCsNh3()).append("mg/L、");
+                    sb.append("NH3-N:").append(workOrderRe.getCsNh3()).append("mg/L、");
                 if(workOrderReq.getCsSs())
-                    sb.append(workOrderRe.getCsSs()).append("mg/L、");
+                    sb.append("SS:").append(workOrderRe.getCsSs()).append("mg/L、");
                 if(workOrderReq.getCsSlqc())
-                    sb.append(workOrderRe.getCsSlqc()).append("m³/d、");
+                    sb.append("进水水量:").append(workOrderRe.getCsSlqc()).append("m³/d、");
             }
         }
         if(workOrderReq.getNo3Hlj1Jqr() || workOrderReq.getNo3Hlj2Jqr() || workOrderReq.getNh31Jqr() || workOrderReq.getNh32Jqr()
@@ -469,19 +469,19 @@ public class GRPCController extends BaseController {
             for (WorkOrderRes workOrderRe : workOrderRes) {
                 sb.append(workOrderRe.getTime()).append(":");
                 if(workOrderReq.getNo3Hlj1Jqr())
-                    sb.append(workOrderRe.getNo3Hlj1Jqr()).append("mg/L、");
+                    sb.append("#1好氧池硝酸盐:").append(workOrderRe.getNo3Hlj1Jqr()).append("mg/L、");
                 if(workOrderReq.getNo3Hlj2Jqr())
-                    sb.append(workOrderRe.getNo3Hlj2Jqr()).append("mg/L、");
-                if(workOrderReq.getNh31Jqr())
-                    sb.append(workOrderRe.getNh31Jqr()).append("mg/L、");
-                if(workOrderReq.getNh32Jqr())
-                    sb.append(workOrderRe.getNh32Jqr()).append("mg/L、");
+                    sb.append("#2好氧池硝酸盐:").append(workOrderRe.getNo3Hlj2Jqr()).append("mg/L、");
                 if(workOrderReq.getNo3Qyc1Jqr())
-                    sb.append(workOrderRe.getNo3Qyc1Jqr()).append("mg/L、");
+                    sb.append("#1缺氧池硝酸盐:").append(workOrderRe.getNo3Qyc1Jqr()).append("mg/L、");
                 if(workOrderReq.getNo3Qyc2Jqr())
-                    sb.append(workOrderRe.getNo3Qyc2Jqr()).append("mg/L、");
+                    sb.append("#2缺氧池硝酸盐:").append(workOrderRe.getNo3Qyc2Jqr()).append("mg/L、");
                 if(workOrderReq.getTpRccJqr())
-                    sb.append(workOrderRe.getTpRccJqr()).append("mg/L、");
+                    sb.append("二沉池正磷酸盐:").append(workOrderRe.getTpRccJqr()).append("mg/L、");
+                if(workOrderReq.getNh31Jqr())
+                    sb.append("#1缺氧氨氮:").append(workOrderRe.getNh31Jqr()).append("mg/L、");
+                if(workOrderReq.getNh32Jqr())
+                    sb.append("#2缺氧氨氮:").append(workOrderRe.getNh32Jqr()).append("mg/L、");
             }
         }
         sb.append(GONGDAN_PROMPT_CUSTOM_END_1);

+ 23 - 4
slibra-quartz/src/main/java/com/slibra/quartz/task/RyTask.java

@@ -97,8 +97,14 @@ public class RyTask
     public static final String[] queryTags = {"信义污水厂JS_COD_Value","信义污水厂JS_PH_Value","信义污水厂JS_SS_Value","信义污水厂JS_ZL_Value","信义污水厂JS_ZA_Value","信义污水厂JS_AD_Value","信义污水厂JS_T_Value","信义污水厂进水泵房液位","信义污水厂出水瞬时流量","信义污水厂升级出水COD","信义污水厂升级出水PH","信义污水厂升级出水SS","信义污水厂升级出水TN","信义污水厂升级出水TP","信义污水厂升级出水氨氮","信义污水厂AIT202_Value","信义污水厂AIT203_Value","信义污水厂AIT207_Value","信义污水厂AIT206_Value","信义污水厂AIT209_Value","信义污水厂AIT210_Value","信义污水厂进水TDS","信义污水厂FT101_Value","信义污水厂SWCHHYHLB1_R_Value","信义污水厂SWCHHYHLB2_R_Value","信义污水厂SWCHHYHLB3_R_Value","信义污水厂SWCHHYHLB4_R_Value","信义污水厂SWCHHYHLB5_R_Value","信义污水厂SWCHHYHLB6_R_Value","信义污水厂SWCWNHLB1_R_Value","信义污水厂SWCWNHLB2_R_Value","信义污水厂SWCWNHLB3_R_Value","信义污水厂SWCWNHLB4_R_Value","信义污水厂SWCWNHLB5_R_Value","信义污水厂GFJ1_R_Value","信义污水厂GFJ2_R_Value","信义污水厂GFJ3_R_Value","信义污水厂GFJ4_R_Value","信义污水厂GFJ5_R_Value","信义污水厂GFJ6_R_Value","信义污水厂GFJ1_KQLL_Value","信义污水厂GFJ2_KQLL_Value","信义污水厂GFJ3_KQLL_Value","信义污水厂GFJ4_KQLL_Value","信义污水厂GFJ5_KQLL_Value","信义污水厂GFJ6_KQLL_Value","信义污水厂实际碳源加药量","信义污水厂除磷加药瞬时流量", "信义污水厂_除磷P04预测值_"};
 
 
-    public static final String[] predictorArr = {"出水COD", "出水SS", "出水总氮", "出水总磷", "出水氨氮", "xsy1", "xsy2"};
-//    public static final String[] predictorArrStr = {"出水COD", "出水SS", "出水总氮", "出水总磷", "出水氨氮", "硝酸盐#1", "硝酸盐#2"};
+    /**
+     *
+     * 2024年6月21日14:52:05 调整逻辑:
+     * 出水总氮 的预测:使用 (xsy1 + xsy2) /2 /0.8 做为出水总氮的结果
+     *
+     */
+    public static final String[] predictorArr = {"出水COD", "出水SS", "出水总磷", "出水氨氮", "xsy1", "xsy2"};
+
     /**
      * 定时从工业库获取数据
      *
@@ -1409,7 +1415,7 @@ public class RyTask
                 chartsDataList.add(chartBasic);
             }
             handleXinYiWarningsYC(csSSBzz, split, csssGkz, BusinessEnum.WarningCategoryEnum.CS_SS_YC.getCode(), hour, normConfig,tXinyiIndustry.getCsCod(), tXinyiIndustry, chartsDataList, date);
-        }else if("tn".equals(task)){
+        }/*else if("tn".equals(task)){
             //同时调用跃渊的预测接口 保存记录值
             try {
                 String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=3&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH));
@@ -1441,7 +1447,7 @@ public class RyTask
                 chartsDataList.add(chartBasic);
             }
             handleXinYiWarningsYC(cszzBzz, split, cszzGkz, BusinessEnum.WarningCategoryEnum.CS_TN_YC.getCode(), hour, normConfig,tXinyiIndustry.getCsCod(), tXinyiIndustry, chartsDataList, date);
-        }else if("tp".equals(task)){
+        }*/else if("tp".equals(task)){
             //同时调用跃渊的预测接口 保存记录值
             try {
                 String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=1&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH));
@@ -1506,6 +1512,19 @@ public class RyTask
             }
             handleXinYiWarningsYC(csadBzz, split, csadGkz, BusinessEnum.WarningCategoryEnum.CS_AD_YC.getCode(), hour, normConfig,tXinyiIndustry.getCsCod(), tXinyiIndustry, chartsDataList, date);
         }else if("xsy1".equals(task)){
+            //2024年6月21日14:57:02 红杉的出水总氮预测改成 不用工业库的,用化验科的两个xsy 相关指标
+            //同时调用跃渊的预测接口 保存记录值
+            try {
+                String result = HttpUtil.get("http://10.0.3.52:10003/system/forecast?type=3&time=" + DateUtil.format(DateUtils.getNowDate(), DateUtils.YYYY_MM_DD_HH));
+                if(!StringUtils.isBlank(result)){
+                    JSONArray array = JSON.parseArray(result);
+                    tXinyiForecastComparison.setYyForecastOne(array.getBigDecimal(6));
+                    tXinyiForecastComparison.setYyForecastTwo(array.getBigDecimal(7));
+                    tXinyiForecastComparison.setYyForecastThree(array.getBigDecimal(8));
+                }
+            } catch (Exception e) {
+                log.error("调用跃渊的预测接口出现异常,异常信息为{}", e.getMessage());
+            }
             // this.xinyiForecastComparisonService.insertTXinyiForecastComparison(tXinyiForecastComparison);
             BigDecimal cscodBzz = new BigDecimal(XIAOSUANYAN_BZK);
             BigDecimal cscodGkz = new BigDecimal(XIAOSUANYAN_GKZ);

+ 6 - 6
slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

@@ -230,17 +230,17 @@ public class FrontServiceImpl implements IFrontService {
                         || workOrderReq.getCsTp() || workOrderReq.getCsNh3() || workOrderReq.getCsSs()){
                     JSONObject jsonObjectCS = new JSONObject();
                     jsonObjectCS.put("time", workOrderRe.getTime());
-                    if(workOrderReq.getJsSlq())
+                    if(workOrderReq.getCsSlqc())
                         jsonObjectCS.put("csSlqc", workOrderRe.getCsSlqc());
-                    if(workOrderReq.getJsCod())
+                    if(workOrderReq.getCsCod())
                         jsonObjectCS.put("csCod", workOrderRe.getCsCod());
-                    if(workOrderReq.getJsTn())
+                    if(workOrderReq.getCsTn())
                         jsonObjectCS.put("csTn", workOrderRe.getCsTn());
-                    if(workOrderReq.getJsTp())
+                    if(workOrderReq.getCsTp())
                         jsonObjectCS.put("csTp", workOrderRe.getCsTp());
-                    if(workOrderReq.getJsNh3())
+                    if(workOrderReq.getCsNh3())
                         jsonObjectCS.put("csNh3", workOrderRe.getCsNh3());
-                    if(workOrderReq.getJsSs())
+                    if(workOrderReq.getCsSs())
                         jsonObjectCS.put("csSs", workOrderRe.getCsSs());
                     csGroup.add(jsonObjectCS);
                 }