瀏覽代碼

新版的工单不再拼接prompt 传递数据--待大模型确认

wangmiaomiao 8 月之前
父節點
當前提交
6540f15a41

+ 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;
+    }
 }

+ 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;
+
+
+
+}