From d67891153f82b9d7606f91bd2db0f8dd4d2a258d Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 02 七月 2026 17:44:45 +0800
Subject: [PATCH] 【市一】任务组调试

---
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java |   63 ++++++++++++++++++++++++++++---
 1 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index 79c36ea..f31c02d 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -24,6 +24,7 @@
 import com.ruoyi.system.service.ISysDeptService;
 import com.smartor.common.LSHospTokenUtil;
 import com.smartor.common.MtSubmitSmUtil;
+import com.smartor.common.QwenLLMUtil;
 import com.smartor.domain.*;
 import com.smartor.domain.entity.ServiceSubtaskEntity;
 import com.smartor.mapper.*;
@@ -34,6 +35,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.io.IOException;
 import java.net.URLEncoder;
@@ -176,6 +178,9 @@
     private String active;
     @Autowired
     private SysConfigMapper sysConfigMapper;
+
+    @Autowired
+    private IServiceTaskScheduleService serviceTaskScheduleService;
 
     public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) {
         System.out.println(StringUtils.format("鎵ц澶氬弬鏂规硶锛� 瀛楃涓茬被鍨媨}锛屽竷灏旂被鍨媨}锛岄暱鏁村瀷{}锛屾诞鐐瑰瀷{}锛屾暣褰}", s, b, l, d, i));
@@ -558,17 +563,17 @@
     }
 
     /**
-     * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃
+     * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃(浠诲姟缁�)
      */
-    public void dealOutHospInfoByDimension() {
+    public void dealOutHospInfoBySchedule() {
         String config = configService.selectConfigByKey("visit.early.day");
         if (port.equals("8095")) {
             //鍑洪櫌琛�
-            iPatMedInhospService.dealOutHospInfoByDimension(config);
+            iPatMedInhospService.dealOutHospInfoBySchedule(config);
             //闂ㄨ瘖琛�(鏂板崕鐨勬殏鏃朵笉鍋氶棬璇婇殢璁�)
-            if (!active.equals("xh")) {
-                //iPatMedOuthospService.dealOutpatientInfo();
-            }
+//            if (!active.equals("xh")) {
+//                //iPatMedOuthospService.dealOutpatientInfo();
+//            }
         }
     }
 
@@ -908,6 +913,7 @@
                     serviceOutPath.setParam3(ivrTask1.getTaskName());
                     serviceOutPath.setParam6(subId);
                     serviceOutPath.setCreateTime(new Date());
+                    serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                     iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                     String format = String.format("%03X", serviceOutPath.getId());
                     serviceOutPath.setRadix(format);
@@ -1343,7 +1349,7 @@
         Map<String, String> headerMap = new HashMap<>();
         headerMap.put("sign", encode);
         String result = HttpUtils.sendPostByHeader(wxqqxx.get(3), body, headerMap);
-
+        log.info("銆恎etWXCode銆戝井淇″叕浼楀彿杩斿洖鍙傛暟锛歿}", result);
         JSONObject jsonObject = JSONObject.parseObject(result);
         String code = (String) jsonObject.toString();
         return code;
@@ -1490,4 +1496,47 @@
         return serviceTaskMap;
     }
 
+    public int qwenLLMTest(String questionText, String voiceText,String value,String regexText) {
+        int result = QwenLLMUtil.matchRegex(questionText, voiceText, value, regexText);
+        return result;
+    }
+
+    /**
+     * 浠诲姟缁勶紙appltype=5锛夐杞撼鍏ワ細鎵弿鏂板嚭闄㈡偅鑰咃紝鎸� schedule 缁戝畾鐨勭淮搴﹀尮閰嶄换鍔$粍锛�
+     * 涓哄懡涓殑鎮h�呮寜璁″垝鏄庣粏涓�娆℃�х敓鎴愮 0 杞� N 鏉� subtask锛屽苟缃� schedulecheck_flag=1銆�
+     * 鍚庣画杞鐢� {@link #rollTaskGroupCycle()} 璐熻矗銆�
+     * <p>
+     * 涓庝富鎵弿 dealOutHospInfo 鍒嗙锛屼簰涓嶅共鎵般�傚缓璁瘡 30 鍒嗛挓鎵ц涓�娆°��
+     */
+    public void dealTaskGroupOutHosp() {
+        log.info("銆恉ealTaskGroupOutHosp銆戝紑濮嬫壂鎻忎换鍔$粍鏂板嚭闄㈡偅鑰�");
+        if (!port.equals("8095")) {
+            return;
+        }
+        try {
+            String config = configService.selectConfigByKey("visit.early.day");
+            iPatMedInhospService.dealOutHospInfoBySchedule(config);
+            log.info("銆恉ealTaskGroupOutHosp銆戜换鍔$粍棣栬疆绾冲叆鎵弿瀹屾垚");
+        } catch (Exception e) {
+            log.error("銆恉ealTaskGroupOutHosp銆戜换鍔$粍鎵弿寮傚父", e);
+        }
+    }
+
+    /**
+     * 浠诲姟缁勶紙appltype=5锛夊惊鐜换鍔℃粴鍔ㄨ皟搴︺��
+     * <p>
+     * 鎵弿鎵�鏈� schedule_style=1 鐨勮鍒掞紝鑻ユ湰杞� subtask 鍏ㄩ儴 finalize锛坰endstate 鈭� 1/2/3锛夛紝
+     * 鍒欏厠闅嗘湰杞偅鑰呭埌涓嬩竴杞紝鎺ㄨ繘 current_loop_count 涓� visit_time銆�
+     * <p>
+     * 寤鸿姣忓皬鏃舵垨姣忓崐灏忔椂鎵ц涓�娆★紝閬垮厤杞绉帇銆�
+     */
+    public void rollTaskGroupCycle() {
+        log.info("銆恟ollTaskGroupCycle銆戝紑濮嬫壂鎻忓惊鐜换鍔$粍");
+        try {
+            int rolled = serviceTaskScheduleService.rollCycleTasks();
+            log.info("銆恟ollTaskGroupCycle銆戞湰娆℃帹杩� {} 涓鍒�", rolled);
+        } catch (Exception e) {
+            log.error("銆恟ollTaskGroupCycle銆戞粴鍔ㄨ皟搴﹀紓甯�", e);
+        }
+    }
 }

--
Gitblit v1.9.3