Ver código fonte

Merge branch 'master' of ssh://gitlab.fuxicarbon.com:1111/hongshan/big-model-java

sunxiao 8 meses atrás
pai
commit
ff655134fc

+ 22 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/OutController.java

@@ -1,6 +1,9 @@
 package com.slibra.web.controller.business;
 
 
+import com.slibra.business.domain.TXinyiNormConfig;
+import com.slibra.business.mapper.TXinyiNormConfigMapper;
+import com.slibra.business.res.DailyWorkerRes;
 import com.slibra.common.core.domain.TXinyiDaily;
 import com.slibra.business.mapper.TXinyiDailyMapper;
 import com.slibra.common.core.domain.AjaxResult;
@@ -20,6 +23,9 @@ public class OutController {
     @Autowired
     private TXinyiDailyMapper xinyiDailyMapper;
 
+    @Autowired
+    private TXinyiNormConfigMapper xinyiNormConfigMapper;
+
     /**
      * 通过日期获取某天的日报情况
      * @return
@@ -33,4 +39,20 @@ public class OutController {
             return AjaxResult.success(xinyiDailies.get(0));
         return AjaxResult.error("没有查询到对应的日报数据");
     }
+
+
+    @GetMapping("generateReqData")
+    public DailyWorkerRes generateReqData(){
+        DailyWorkerRes dailyWorkerRes = new DailyWorkerRes();
+        //获取配置
+        //查询配置信息
+        List<TXinyiNormConfig> tXinyiNormConfigs = this.xinyiNormConfigMapper.selectTXinyiNormConfigList(null);
+        if(CollectionUtils.isEmpty(tXinyiNormConfigs))
+            return null;
+        TXinyiNormConfig normConfig = tXinyiNormConfigs.get(0);
+        dailyWorkerRes.setNormConfig(normConfig);
+        //查询最近15天的数据
+        dailyWorkerRes.setDailyRecords(this.xinyiDailyMapper.selectNRecords(15));
+        return dailyWorkerRes;
+    }
 }

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

@@ -452,6 +452,14 @@ public class RyTask
         showValueChartBasic.setF(DecimalUtils.getAbsAndScale(tXinyiWarningRecord.getControlVal(), INT_2));
         showValueChartBasic.setG(DecimalUtils.getAbsAndScale(tXinyiWarningRecord.getDesignVal(), INT_2));
 //        showValueChartBasic.setH(Math.min(count, MAX_COUNT));
+        //2024年7月20日17:28:17  增加数据来源展示
+        String category = tXinyiWarningRecord.getCategory();
+        if(BusinessEnum.WarningCategoryEnum.CS_COD_YC.getCode().equals(category)
+            || BusinessEnum.WarningCategoryEnum.CS_SS_YC.getCode().equals(category)
+                || BusinessEnum.WarningCategoryEnum.CS_AD_YC.getCode().equals(category))
+            showValueChartBasic.setH(ZAIXIANYIBIAO);
+        else
+            showValueChartBasic.setH(LIANXUJIANCE);
         if(tXinyiWarningRecord.getType() != 2)
             showValueChartBasic.setI(status == 0 ? "报警中" : status == 1 ? "用户关闭" : status == 2 ? "系统关闭" : "应急处理中");
         else

+ 39 - 0
slibra-system/src/main/java/com/slibra/business/res/DailyWorkerRes.java

@@ -0,0 +1,39 @@
+package com.slibra.business.res;
+
+
+import com.slibra.business.domain.TXinyiNormConfig;
+import com.slibra.business.domain.TXinyiRobot;
+import com.slibra.common.core.domain.TXinyiDaily;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ *
+ * 2024年7月20日10:53:45  传数据给大模型,他们处理prompt
+ * 日报工单返回的数据
+ *
+ */
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class DailyWorkerRes {
+
+
+    //查询日期及最近14天的日报数据
+    List<TXinyiDaily> dailyRecords;
+
+    //查询日期及最近14天的化验室数据
+//    List<TXinyiRobot> robotRecords;
+
+    //标准值 管控值
+    private TXinyiNormConfig normConfig;
+
+
+
+}

+ 3 - 2
slibra-system/src/main/java/com/slibra/business/res/ShowValueChartBasic.java

@@ -37,8 +37,9 @@ public class ShowValueChartBasic {
     @JSONField(ordinal = 7, name = "标准值")
     private BigDecimal g;
 
-    /*@JSONField(ordinal = 8, name = "数据来源")
-    private String h;*/
+    //2024年7月20日17:19:20  数据来源:在线仪表  或者  连续检测
+    @JSONField(ordinal = 8, name = "数据来源")
+    private String h;
 
     @JSONField(ordinal = 9, name = "状态")
     private String i;