Sfoglia il codice sorgente

决策新增一些字段处理

wangmiaomiao 10 mesi fa
parent
commit
7eb2fb3f72

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

@@ -251,11 +251,11 @@ public class FrontController extends BaseController {
 
 
     //--------------------下面是测试的方法--------------------
-    @GetMapping("/test/data")
+    /*@GetMapping("/test/data")
     public void testData(){
         List<DecisionReq> decisionReqs = this.xinyiIndustryMapper.selectLast10RecordsForDecisionOnlyIndustry();
         System.out.println(JSON.toJSONString(decisionReqs,  JSONWriter.Feature.WriteNulls));
-    }
+    }*/
 
 
 

+ 26 - 0
slibra-system/src/main/java/com/slibra/business/req/DecisionReq.java

@@ -187,4 +187,30 @@ public class DecisionReq {
     @JSONField(name = "TP_LV_continuity")
     private BigDecimal tpLvContinuity = null;
 
+
+    //2024年5月24日16:56:46  新增几个字段
+    @JSONField(name = "tyjyl")
+    private String tyjyl;
+
+    @JSONField(name = "cltjl")
+    private String cltjl;
+
+    @JSONField(name = "hycxsy_all")
+    private String hycxsyAll;
+
+    @JSONField(name = "qyan_all")
+    private String qyanAll;
+
+    @JSONField(name = "qyckxsy_all")
+    private String qyckxsyAll;
+
+    @JSONField(name = "gwnl")
+    private String gwnl;
+
+    @JSONField(name = "ecc_zl")
+    private String eccZl;
+
+    @JSONField(name = "hyzlsy_all")
+    private String hyzlsyAll;
+
 }

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

@@ -427,6 +427,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
 
+    <!-- todo 数据加字段  gwnl-->
     <select id="selectLast10RecordsForDecisionOnlyIndustry" resultType="com.slibra.business.req.DecisionReq">
         SELECT
             a.ID ID,
@@ -450,13 +451,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             a.JS_NH3 addanIn,
             b.JSAD_SJZ addanInName,
             a.CS_NH3 andanOff,
-            b.CSAD_BZZ  andanOffName,
+            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,
+            b.CSSS_GKZ ssOffCon,
             a.JS_TDS tdsIn,
             b.JDTDS_GKZ tdsInName,
             a.JS_PH pH,
@@ -478,13 +479,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             '' btpWending,
             '' jsTnWentai,
             a.CL_P04_YCZ clP04YCZ,
-            (a.JS_TP - a.CL_P04_YCZ)/a.JS_TP tpLv,
-            '' tpLvContinuity
+            ( a.JS_TP - a.CL_P04_YCZ )/ a.JS_TP tpLv,
+            '' tpLvContinuity,
+            a.SJTYJLY tyjyl,
+            a.CLJYSSLL cltjl,
+            CONCAT( "[", c.NO3_HLJ1_JQR, ",", c.NO3_HLJ2_JQR, "]" ) hycxsyAll,
+            CONCAT( "[", c.NH3_1_JQR, ",", c.NH3_2_JQR, "]" ) qyanAll,
+            CONCAT( "[", c.NO3_QYC_1_JQR, ",", c.NO3_QYC_2_JQR, "]" ) qyckxsyAll,
+            '' gwnl,
+            c.TP_RCC_JQR eccZl,
+            CONCAT( "[", c.TP_HL1_JQR, ",", c.TP_HL2_JQR, "]" ) hyzlsyAll
         FROM
             t_xinyi_industry a
-                LEFT JOIN t_xinyi_norm_config b on 1 = 1
-        WHERE 1 = 1
-        ORDER BY a.ID DESC
-            LIMIT 10
+                LEFT JOIN t_xinyi_norm_config b ON 1 = 1
+                LEFT JOIN (
+                SELECT
+                    TEST_HOUR,
+                    any_value ( NO3_HLJ1_JQR ) NO3_HLJ1_JQR,
+                    any_value ( NO3_HLJ2_JQR ) NO3_HLJ2_JQR,
+                    any_value ( NH3_1_JQR ) NH3_1_JQR,
+                    any_value ( NH3_2_JQR ) NH3_2_JQR,
+                    any_value ( NO3_QYC_1_JQR ) NO3_QYC_1_JQR,
+                    any_value ( NO3_QYC_2_JQR ) NO3_QYC_2_JQR,
+                    any_value ( TP_RCC_JQR ) TP_RCC_JQR,
+                    any_value ( TP_HL1_JQR ) TP_HL1_JQR,
+                    any_value ( TP_HL2_JQR ) TP_HL2_JQR
+                FROM
+                    t_xinyi_robot
+                GROUP BY
+                    TEST_HOUR
+            ) c ON a.TEST_HOUR = c.TEST_HOUR
+        WHERE
+            1 = 1
+        ORDER BY
+            a.ID DESC
+            LIMIT 1,10
     </select>
 </mapper>