Browse Source

为了兼容贼傻的传参+数据获取逻辑调整 额外处理

wangmiaomiao 10 months ago
parent
commit
ec75b9a36e

+ 13 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -1,8 +1,11 @@
 package com.slibra.web.controller.business;
 
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONWriter;
 import com.slibra.business.domain.TXinyiChatRecord;
 import com.slibra.business.domain.TXinyiWarningRecord;
 import com.slibra.business.mapper.*;
+import com.slibra.business.req.DecisionReq;
 import com.slibra.business.service.IFrontService;
 import com.slibra.common.core.controller.BaseController;
 import com.slibra.common.core.domain.AjaxResult;
@@ -17,6 +20,8 @@ import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * 前端用户相关接口
  */
@@ -39,6 +44,9 @@ public class FrontController extends BaseController {
     @Autowired
     private TXinyiAgentAssistantMapper xinyiAgentAssistantMapper;
 
+    @Autowired
+    private TXinyiIndustryMapper xinyiIndustryMapper;
+
 
 
     /**
@@ -161,6 +169,11 @@ public class FrontController extends BaseController {
 
 
 
+    @GetMapping("/test/data")
+    public void testData(){
+        List<DecisionReq> decisionReqs = this.xinyiIndustryMapper.selectLast10RecordsForDecisionOnlyIndustry();
+        System.out.println(JSON.toJSONString(decisionReqs,  JSONWriter.Feature.WriteNulls));
+    }
 
 
 

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

@@ -447,13 +447,13 @@ public class RyTask
                     decisionReq.setT(daily.getJsSw());
                     decisionReq.setSVI(daily.getWntjzsAll());
                     decisionReq.setSV(daily.getWncjbAll());
-                    decisionReq.setMLVSS(daily.getHfxwnndAll());
-                    decisionReq.setDO_ana(daily.getYycRjyAll());
-                    decisionReq.setDO_que(daily.getQycRjyAll());
+                    decisionReq.setMlvss(daily.getHfxwnndAll());
+                    decisionReq.setDoAna(daily.getYycRjyAll());
+                    decisionReq.setDoQue(daily.getQycRjyAll());
                     BigDecimal jsBod5 = daily.getJsBod5();
-                    decisionReq.setBOD_in(jsBod5);
-                    BigDecimal tpIn = decisionReq.getTP_in();
-                    BigDecimal tnIn = decisionReq.getTN_in();
+                    decisionReq.setBodIn(jsBod5);
+                    BigDecimal tpIn = decisionReq.getTpIn();
+                    BigDecimal tnIn = decisionReq.getTnIn();
                     if(!Objects.isNull(jsBod5)){
                         if(!Objects.isNull(tpIn) && tpIn.compareTo(new BigDecimal("0")) >0){
                             decisionReq.setC(jsBod5.divide(tpIn, 4, RoundingMode.HALF_UP));

+ 171 - 60
slibra-system/src/main/java/com/slibra/business/req/DecisionReq.java

@@ -1,6 +1,7 @@
 package com.slibra.business.req;
 
 
+import com.alibaba.fastjson2.annotation.JSONField;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
@@ -15,65 +16,175 @@ import java.math.BigDecimal;
 public class DecisionReq {
 
     private Long ID;
-    private String TEST_DATE;
-    private String TEST_HOUR;
-
-    private BigDecimal COD_in;
-    private BigDecimal COD_in_name;
-    private BigDecimal COD_off;
-    private BigDecimal COD_off_name;
-    private BigDecimal COD_off_con;
-    private BigDecimal TP_in;
-    private BigDecimal TP_in_name;
-    private BigDecimal TP_off;
-    private BigDecimal TP_off_name;
-    private BigDecimal TP_off_con;
-    private BigDecimal TN_in;
-    private BigDecimal TN_in_name;
-    private BigDecimal TN_off;
-    private BigDecimal TN_off_name;
-    private BigDecimal TN_off_con;
-    private BigDecimal andan_in;
-    private BigDecimal andan_in_name;
-    private BigDecimal andan_off;
-    private BigDecimal andan_off_name;
-    private BigDecimal andan_off_con;
-    private BigDecimal SS_in;
-    private BigDecimal SS_in_name;
-    private BigDecimal SS_off;
-    private BigDecimal SS_off_name;
-    private BigDecimal SS_off_con;
-    private BigDecimal TDS_in;
-    private BigDecimal TDS_in_name;
-    private BigDecimal T;
-    private BigDecimal pH;
-    private BigDecimal Q_in;
-    private BigDecimal Q_in_name;
-    private BigDecimal continuity;
-    private BigDecimal check_rise;
-    private BigDecimal time_tips;
-    private BigDecimal cs_continuity;
-    private String SVI;
-    private BigDecimal SVI_con;
-    private String SV;
-    private BigDecimal SV_con;
-    private String MLVSS;
-    private String MLSS;
-    private BigDecimal MLVSS_wentai;
-    private BigDecimal MLSS_wentai;
-    private String DO_ana;
-    private String DO_O;
-    private String DO_que;
-    private BigDecimal DO_que_wentai;
-    private BigDecimal DO_ana_wentai;
-    private BigDecimal DO_O_wentai;
-    private BigDecimal BOD_in;
-    private BigDecimal c;
-    private BigDecimal b;
-    private BigDecimal BTP_wending;
-    private BigDecimal JS_TN_wentai;
-    private BigDecimal CL_P04_YCZ;
-    private BigDecimal TP_LV;
-    private BigDecimal TP_LV_continuity;
+
+    @JSONField(name = "TEST_DATE")
+    private String testDate;
+
+    @JSONField(name = "TEST_HOUR")
+    private String testHour;
+
+    @JSONField(name = "COD_in")
+    private BigDecimal codIn;
+
+    @JSONField(name = "COD_in_name")
+    private BigDecimal codInName = null;
+
+    @JSONField(name = "COD_off")
+    private BigDecimal codOff = null;
+
+    @JSONField(name = "COD_off_name")
+    private BigDecimal codOffName = null;
+
+    @JSONField(name = "COD_off_con")
+    private BigDecimal codOffCon = null;
+
+    @JSONField(name = "TP_in")
+    private BigDecimal tpIn = null;
+
+    @JSONField(name = "TP_in_name")
+    private BigDecimal tpInName = null;
+
+    @JSONField(name = "TP_off")
+    private BigDecimal tpOff = null;
+
+    @JSONField(name = "TP_off_name")
+    private BigDecimal tpOffName = null;
+
+    @JSONField(name = "TP_off_con")
+    private BigDecimal tpOffCon = null;
+
+    @JSONField(name = "TN_in")
+    private BigDecimal tnIn = null;
+
+    @JSONField(name = "TN_in_name")
+    private BigDecimal tnInName = null;
+
+    @JSONField(name = "TN_off")
+    private BigDecimal tnOff = null;
+
+    @JSONField(name = "TN_off_name")
+    private BigDecimal tnOffName = null;
+
+    @JSONField(name = "TN_off_con")
+    private BigDecimal tnOffCon = null;
+
+    @JSONField(name = "andan_in")
+    private BigDecimal addanIn = null;
+
+    @JSONField(name = "andan_in_name")
+    private BigDecimal addanInName = null;
+
+    @JSONField(name = "andan_off")
+    private BigDecimal andanOff = null;
+
+    @JSONField(name = "andan_off_name")
+    private BigDecimal andanOffName = null;
+
+    @JSONField(name = "andan_off_con")
+    private BigDecimal andanOffCon = null;
+
+    @JSONField(name = "SS_in")
+    private BigDecimal ssIn = null;
+
+    @JSONField(name = "SS_in_name")
+    private BigDecimal ssInName = null;
+
+    @JSONField(name = "SS_off")
+    private BigDecimal ssOff = null;
+
+    @JSONField(name = "SS_off_name")
+    private BigDecimal ssOffName = null;
+
+    @JSONField(name = "SS_off_con")
+    private BigDecimal ssOffCon = null;
+
+    @JSONField(name = "TDS_in")
+    private BigDecimal tdsIn = null;
+
+    @JSONField(name = "TDS_in_name")
+    private BigDecimal tdsInName = null;
+
+    private BigDecimal T  = null;
+
+    private BigDecimal pH = null;
+
+    @JSONField(name = "Q_in")
+    private BigDecimal qIn = null;
+
+    @JSONField(name = "Q_in_name")
+    private BigDecimal qInName = null;
+
+    private BigDecimal continuity = null;
+
+    @JSONField(name = "check_rise")
+    private BigDecimal checkRise = null;
+
+    @JSONField(name = "time_tips")
+    private BigDecimal timeTips = null;
+
+    @JSONField(name = "cs_continuity")
+    private BigDecimal csContinuity = null;
+
+    private String SVI = null;
+
+    @JSONField(name = "SVI_con")
+    private BigDecimal sviCon = null;
+
+    private String SV = null;
+
+    @JSONField(name = "SV_con")
+    private BigDecimal svCon = null;
+
+    @JSONField(name = "MLVSS")
+    private String mlvss = null;
+
+    @JSONField(name = "MLSS")
+    private String mlss = null;
+
+    @JSONField(name = "MLVSS_wentai")
+    private String mlvssWentai = null;
+
+    @JSONField(name = "MLSS_wentai")
+    private String mlssWentai = null;
+
+    @JSONField(name = "DO_ana")
+    private String doAna = null;
+
+    @JSONField(name = "DO_O")
+    private String doO = null;
+
+    @JSONField(name = "DO_que")
+    private String doQue = null;
+
+    @JSONField(name = "DO_que_wentai")
+    private String doQueWentai = null;
+
+    @JSONField(name = "DO_ana_wentai")
+    private String doAnaWentai = null;
+
+    @JSONField(name = "DO_O_wentai")
+    private String doOWentai = null;
+
+    @JSONField(name = "BOD_in")
+    private BigDecimal bodIn = null;
+
+    private BigDecimal c = null;
+
+    private BigDecimal b = null;
+
+    @JSONField(name = "BTP_wending")
+    private String btpWending = null;
+
+    @JSONField(name = "JS_TN_wentai")
+    private String jsTnWentai = null;
+
+    @JSONField(name = "CL_P04_YCZ")
+    private BigDecimal clP04YCZ = null;
+
+    @JSONField(name = "TP_LV")
+    private BigDecimal tpLv = null;
+
+    @JSONField(name = "TP_LV_continuity")
+    private BigDecimal tpLvContinuity = null;
 
 }

+ 48 - 48
slibra-system/src/main/resources/mapper/business/TXinyiIndustryMapper.xml

@@ -430,56 +430,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectLast10RecordsForDecisionOnlyIndustry" resultType="com.slibra.business.req.DecisionReq">
         SELECT
             a.ID ID,
-            a.TEST_DATE TEST_DATE,
-            a.TEST_HOUR TEST_HOUR,
-            a.JS_COD COD_in,
-            b.JSCOD_SJZ COD_in_name,
-            a.CS_COD COD_off,
-            b.CSCOD_BZZ COD_off_name,
-            b.CSCOD_GKZ COD_off_con,
-            a.JS_TP TP_in,
-            b.JSZL_SJZ TP_in_name,
-            a.CS_TP TP_off,
-            b.CSZL_BZZ TP_off_name,
-            b.CSZL_GKZ TP_off_con,
-            a.JS_TN TN_in,
-            b.JSZD_SJZ TN_in_name,
-            a.CS_TN TN_off,
-            b.CSZZ_BZZ TN_off_name,
-            b.CSZZ_GKZ TN_off_con,
-            a.JS_NH3 andan_in,
-            b.JSAD_SJZ andan_in_name,
-            a.CS_NH3 andan_off,
-            b.CSAD_BZZ  andan_off_name,
-            b.CSAD_GKZ andan_off_con,
-            a.JS_SS SS_in,
-            b.JSSS_SJZ SS_in_name,
-            a.CS_SS SS_off,
-            b.CSSS_BZZ SS_off_name,
-            b.CSSS_GKZ  SS_off_con,
-            a.JS_TDS TDS_in,
-            b.JDTDS_GKZ TDS_in_name,
+            a.TEST_DATE testDate,
+            a.TEST_HOUR testHour,
+            a.JS_COD codIn,
+            b.JSCOD_SJZ codInName,
+            a.CS_COD codOff,
+            b.CSCOD_BZZ codOffName,
+            b.CSCOD_GKZ codOffCon,
+            a.JS_TP tpIn,
+            b.JSZL_SJZ tpInName,
+            a.CS_TP tpOff,
+            b.CSZL_BZZ tpOffName,
+            b.CSZL_GKZ tpOffCon,
+            a.JS_TN tnIn,
+            b.JSZD_SJZ tnInName,
+            a.CS_TN tnOff,
+            b.CSZZ_BZZ tnOffName,
+            b.CSZZ_GKZ tnOffCon,
+            a.JS_NH3 addanIn,
+            b.JSAD_SJZ addanInName,
+            a.CS_NH3 andanOff,
+            b.CSAD_BZZ  andanOffName,
+            b.CSAD_GKZ andanOffCon,
+            a.JS_SS ssIn,
+            b.JSSS_SJZ ssInName,
+            a.CS_SS ssOff,
+            b.CSSS_BZZ ssOffName,
+            b.CSSS_GKZ  ssOffCon,
+            a.JS_TDS tdsIn,
+            b.JDTDS_GKZ tdsInName,
             a.JS_PH pH,
-            a.JS_SLQ Q_in,
-            b.JSSL_SJZ Q_in_name,
+            a.JS_SLQ qIn,
+            b.JSSL_SJZ qInName,
             '' continuity,
-            '' check_rise,
-            '' time_tips,
-            '' cs_continuity,
-            b.WNTJZS_GKZ SVI_con,
-            b.WNCJB_GKZ SV_con,
-            a.HYC_WNND_ALL MLSS,
-            '' MLVSS_wentai,
-            '' MLSS_wentai,
-            a.HYC_RJY_ALL DO_O,
-            '' DO_que_wentai,
-            '' DO_ana_wentai,
-            '' DO_O_wentai,
-            '' BTP_wending,
-            '' JS_TN_wentai,
-            a.CL_P04_YCZ CL_P04_YCZ,
-            (a.JS_TP - a.CL_P04_YCZ)/a.JS_TP TP_LV,
-            '' TP_LV_continuity
+            '' checkRise,
+            '' timeTips,
+            '' csContinuity,
+            b.WNTJZS_GKZ sviCon,
+            b.WNCJB_GKZ svCon,
+            a.HYC_WNND_ALL mlss,
+            '' mlvssWentai,
+            '' mlssWentai,
+            a.HYC_RJY_ALL doO,
+            '' doQueWentai,
+            '' doAnaWentai,
+            '' doOWentai,
+            '' btpWending,
+            '' jsTnWentai,
+            a.CL_P04_YCZ clP04YCZ,
+            (a.JS_TP - a.CL_P04_YCZ)/a.JS_TP tpLv,
+            '' tpLvContinuity
         FROM
             t_xinyi_industry a
                 LEFT JOIN t_xinyi_norm_config b on 1 = 1