فهرست منبع

自定义工单 prompt调整、 工业库数据字段映射调整

wangmiaomiao 9 ماه پیش
والد
کامیت
3f0ac00147

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

@@ -336,7 +336,7 @@ public class GRPCController extends BaseController {
                 //品种prompt
                 chatReq.setQuestion(this.buildGDQuestionCustom(workOrderRes, workOrderReq));
                 //2024年6月20日16:48:08  如果是自定义工单,需要处理图表 放到remark中
-                chatReq.setRemark(JSON.toJSONString(frontService.customWorkOrderHandleByData(workOrderReq, workOrderRes)));
+                chatReq.setRemark(JSON.toJSONString(frontService.customWorkOrderHandleByData(workOrderReq, workOrderRes), JSONWriter.Feature.WriteNulls));
             }
             isStrong = 1;
         }
@@ -463,6 +463,27 @@ public class GRPCController extends BaseController {
                     sb.append(workOrderRe.getCsSlqc()).append("m³/d、");
             }
         }
+        if(workOrderReq.getNo3Hlj1Jqr() || workOrderReq.getNo3Hlj2Jqr() || workOrderReq.getNh31Jqr() || workOrderReq.getNh32Jqr()
+            || workOrderReq.getNo3Qyc1Jqr() || workOrderReq.getNo3Qyc2Jqr() || workOrderReq.getTpRccJqr()){
+            sb.append("过程指标:\n");
+            for (WorkOrderRes workOrderRe : workOrderRes) {
+                sb.append(workOrderRe.getTime()).append(":");
+                if(workOrderReq.getNo3Hlj1Jqr())
+                    sb.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、");
+                if(workOrderReq.getNo3Qyc1Jqr())
+                    sb.append(workOrderRe.getNo3Qyc1Jqr()).append("mg/L、");
+                if(workOrderReq.getNo3Qyc2Jqr())
+                    sb.append(workOrderRe.getNo3Qyc2Jqr()).append("mg/L、");
+                if(workOrderReq.getTpRccJqr())
+                    sb.append(workOrderRe.getTpRccJqr()).append("mg/L、");
+            }
+        }
         sb.append(GONGDAN_PROMPT_CUSTOM_END_1);
         if(workOrderReq.getJsCod() || workOrderReq.getCsCod())
             sb.append("化学需氧量(COD)、");

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

@@ -527,18 +527,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectIndustryAvgByDate" resultMap="TXinyiIndustryResult">
         SELECT
-            AVG(JS_SLQ) jsSlq,
-            AVG(JS_COD) jsCod,
-            AVG(JS_TN) jsTn,
-            AVG(JS_TP) jsTp,
-            AVG(JS_NH3) jsNh3,
-            AVG(JS_SS) jsSs,
-            AVG(CS_SLQC) csSlqc,
-            AVG(CS_COD) csCod,
-            AVG(CS_TN) csTn,
-            AVG(CS_TP) csTp,
-            AVG(CS_NH3) csNh3,
-            AVG(CS_SS) csSs
+            AVG(JS_SLQ) JS_SLQ,
+            AVG(JS_COD) JS_COD,
+            AVG(JS_TN) JS_TN,
+            AVG(JS_TP) JS_TP,
+            AVG(JS_NH3) JS_NH3,
+            AVG(JS_SS) JS_SS,
+            AVG(CS_SLQC) CS_SLQC,
+            AVG(CS_COD) CS_COD,
+            AVG(CS_TN) CS_TN,
+            AVG(CS_TP) CS_TP,
+            AVG(CS_NH3) CS_NH3,
+            AVG(CS_SS) CS_SS
         FROM
             t_xinyi_industry
         WHERE