From 0bbbd746e8c39d91ad7b47a4e36e29ab972dc98c Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 20 十月 2026 16:56:54 +0800
Subject: [PATCH] 处理长期任务发送问题

---
 ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
index 66b12d5..d118355 100644
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
+++ b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
@@ -4,6 +4,7 @@
 import com.ruoyi.common.core.service.PublicityApi;
 import com.ruoyi.common.core.service.PublicityDataPort;
 import com.ruoyi.common.core.service.dto.InHospPublicityRowDto;
+import com.ruoyi.common.core.service.dto.VisitInhospUpdateDto;
 import com.ruoyi.common.core.service.dto.VisitTaskRuleDto;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.core.service.dto.VisitArchiveRow;
@@ -179,8 +180,7 @@
             // 鍘� L1692-1700锛氳幏鍙栨偅鑰呭熀鏈俊鎭紝涓虹┖鍒欏啓 deptcheck=2 + reason
             VisitArchiveRow archive = archiveMapper.selectByPatid(row.getPatid());
             if (archive == null) {
-                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u =
-                        new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
+                VisitInhospUpdateDto u = new VisitInhospUpdateDto();
                 u.setInhospid(row.getInhospid());
                 u.setDeptcheckFlag("2");
                 u.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
@@ -197,8 +197,7 @@
                 // 鍘� L1839-1845锛堝湪缂栨帓鍣ㄩ噷涔熸湁锛屼絾澶栧眰閬嶅巻杩欎竴灞傚師瀹炵幇娌℃湁 try/catch锛�
                 // 杩欓噷鍔犱竴灞傛槸涓轰簡"鍗曟偅鑰呭け璐ヤ笉褰卞搷鍏跺畠鎮h��"锛屽睘鍋ュ.鎬ф敼杩涳紝宸茬櫥璁帮級
                 log.error("銆愬熀浜庤鍒欍�戞偅鑰厈}澶栧眰澶勭悊寮傚父锛歿}", row.getInhospid(), e.getMessage());
-                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u =
-                        new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
+                com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u = new com.ruoyi.common.core.service.dto.VisitInhospUpdateDto();
                 u.setInhospid(row.getInhospid());
                 u.setDeptcheckFlag("2");
                 u.setLongTaskReason("鍩轰簬瑙勫垯澶勭悊寮傚父");
@@ -245,8 +244,7 @@
      * @return 鍘熷疄鐜板浐瀹氳繑鍥� 1
      */
     public int dealOutHospInfoBySchedule(String config) {
-        log.warn("銆愬嚭鍏ラ櫌闅忚銆慸ealOutHospInfoBySchedule 鏈鏈惉杩侊紙鍚墜鏈垎鏀笌浠诲姟缁� builder锛�"
-                + "灞炵浜屾壒 ruoyi-othervisit 鑼冨洿锛夛紝浠嶇敱 smartor 鐨勫疄鐜版壙鎺ャ�俢onfig={}", config);
+        log.warn("銆愬嚭鍏ラ櫌闅忚銆慸ealOutHospInfoBySchedule 鏈鏈惉杩侊紙鍚墜鏈垎鏀笌浠诲姟缁� builder锛�" + "灞炵浜屾壒 ruoyi-othervisit 鑼冨洿锛夛紝浠嶇敱 smartor 鐨勫疄鐜版壙鎺ャ�俢onfig={}", config);
         return 1;
     }
 
@@ -254,12 +252,13 @@
     // 杈呭姪
     // ==========================================================================
 
-    /** 鍘� L1703-1707锛氭寜绂婚櫌绉戝/鐥呭尯鏌ヨ鍒欙紙鍙栦笉鍒扮鍙f椂杩斿洖 null = 鏈厤缃鍒� 鈫� 鍏ㄩ儴鐢熸垚锛� */
+    /**
+     * 鍘� L1703-1707锛氭寜绂婚櫌绉戝/鐥呭尯鏌ヨ鍒欙紙鍙栦笉鍒扮鍙f椂杩斿洖 null = 鏈厤缃鍒� 鈫� 鍏ㄩ儴鐢熸垚锛�
+     */
     private VisitTaskRuleDto findTaskRule(VisitInhospRow row) {
         PublicityDataPort port = dataPort();
         if (port == null) {
-            log.warn("銆愬嚭鍏ラ櫌闅忚銆慞ublicityDataPort 涓嶅彲鐢紝瑙勫垯鎸夈�屾湭閰嶇疆銆嶅鐞嗭紙鍏ㄩ儴鐢熸垚锛夈�俰nhospid={}",
-                    row.getInhospid());
+            log.warn("銆愬嚭鍏ラ櫌闅忚銆慞ublicityDataPort 涓嶅彲鐢紝瑙勫垯鎸夈�屾湭閰嶇疆銆嶅鐞嗭紙鍏ㄩ儴鐢熸垚锛夈�俰nhospid={}", row.getInhospid());
             return null;
         }
         try {
@@ -270,7 +269,9 @@
         }
     }
 
-    /** 鎶婄鍙g殑瑙勫垯 DTO 閫傞厤鎴愮紪鎺掑櫒鍐呭祵鐨勮鍒欒鍥撅紙瀛楁涓�涓�瀵瑰簲锛屽惈鎷奸敊鐨� {@code wradRule}锛� */
+    /**
+     * 鎶婄鍙g殑瑙勫垯 DTO 閫傞厤鎴愮紪鎺掑櫒鍐呭祵鐨勮鍒欒鍥撅紙瀛楁涓�涓�瀵瑰簲锛屽惈鎷奸敊鐨� {@code wradRule}锛�
+     */
     private InhospTaskOrchestrator.VisitTaskRule toOrchestratorRule(VisitTaskRuleDto dto) {
         if (dto == null) {
             return null;
@@ -282,7 +283,7 @@
         return r;
     }
 
-    private void updateInhosp(com.ruoyi.common.core.service.dto.VisitInhospUpdateDto u) {
+    private void updateInhosp(VisitInhospUpdateDto u) {
         PublicityDataPort port = dataPort();
         if (port == null) {
             log.warn("銆愬嚭鍏ラ櫌闅忚銆慞ublicityDataPort 涓嶅彲鐢紝鏃犳硶鍐欏洖鏍囧織浣嶃�俰nhospid={}", u.getInhospid());

--
Gitblit v1.9.3