From 5bbd99ba550aa2e8cd8da36644018981ca1a1921 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 23 九月 2026 16:58:51 +0800
Subject: [PATCH] 【丽水】更新同步

---
 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java |   41 ++++++++++++++++++++++++++++-------------
 1 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
index 3968974..e4e98d3 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -358,7 +358,6 @@
 //                                sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "&param2=" + patid + "&param3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "&param5=false");
                         sendMagParam.setPhone(serviceSubtask.getPhone());
                         sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format);
-                        log.info("sendMagParam鐨勫�间负锛歿}", sendMagParam);
                         //濡傛灉type鏄闊抽殢璁跨殑璇濓紙璇存槑琛ュ伩鍙戦�佹柟寮忎腑鏈夌數璇濋殢璁跨殑鏂瑰紡锛岃繖閲岀殑澶栭摼灏卞湴鍧�鍙兘鐢�/sf锛�
                         if (serviceSubtask.getType().equals("1"))
                             sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/sf?p=" + format : ip + "/sf?p=" + format);
@@ -390,15 +389,14 @@
                         serviceOutPath.setDeptName(serviceSubtask.getDeptname());
                         serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                        String url = "";
                         String format = String.format("%03X", serviceOutPath.getId());
-                        serviceOutPath.setRadix(format);
-                        serviceOutPath.setUpdateTime(new Date());
-                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                         //闇�瑕侀�氳繃妯℃澘ID鍘诲垽鏂鍙戠殑鍐呭鏄鏁欒繕鏄�氱煡
                         HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid());
                         if (heLibrary.getHetype().equals("1")) {
                             sendMagParam.setPhone(serviceSubtask.getPhone());
-                            sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/xj?p=" + format : ip + "/xj?p=" + format);
+                            url = StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/xj?p=" + format : ip + "/xj?p=" + format;
+                            sendMagParam.setUrl(url);
 
 
                             SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("xj.sms.template");
@@ -421,8 +419,12 @@
                             sendMagParam.setPhone(serviceSubtask.getPhone());
                             sendMagParam.setContent(sc);
                         }
+                        serviceOutPath.setRadix(format);
+                        serviceOutPath.setUpdateTime(new Date());
+                        serviceOutPath.setUrl(url);
+                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     }
-
+                    log.info("sendMagParam鐨勫�间负锛歿}", sendMagParam);
                     //鐭俊杩橀渶瑕佹ā鏉�
                     String s = null;
                     if (active.equals("xh")) {
@@ -598,8 +600,9 @@
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
                         serviceOutPath.setUpdateTime(new Date());
-                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                         url = ip + ":" + req_path + "/sf?p=" + format;
+                        serviceOutPath.setUrl(url);
+                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     } else if (type == 2) {
                         //闂埜
                         ServiceOutPath serviceOutPath = new ServiceOutPath();
@@ -615,13 +618,16 @@
                         serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
-                        serviceOutPath.setRadix(format);
-                        serviceOutPath.setUpdateTime(new Date());
-                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
+
                         url = StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format;
                         //濡傛灉type鏄闊抽殢璁跨殑璇濓紙璇存槑琛ュ伩鍙戦�佹柟寮忎腑鏈夌數璇濋殢璁跨殑鏂瑰紡锛岃繖閲岀殑澶栭摼灏卞湴鍧�鍙兘鐢�/sf锛�
                         if (serviceSubtask.getType().equals("1"))
                             sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format);
+
+                        serviceOutPath.setRadix(format);
+                        serviceOutPath.setUrl(url);
+                        serviceOutPath.setUpdateTime(new Date());
+                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     } else if (type == 3) {
                         //瀹f暀
                         ServiceOutPath serviceOutPath = new ServiceOutPath();
@@ -637,9 +643,6 @@
                         serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
-                        serviceOutPath.setRadix(format);
-                        serviceOutPath.setUpdateTime(new Date());
-                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
 
                         //闇�瑕侀�氳繃妯℃澘ID鍘诲垽鏂鍙戠殑鍐呭鏄鏁欒繕鏄�氱煡
 //                        HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid());
@@ -659,6 +662,10 @@
 //                        }
 
                         url = ip + ":" + req_path + "/xj?p=" + format;
+                        serviceOutPath.setRadix(format);
+                        serviceOutPath.setUpdateTime(new Date());
+                        serviceOutPath.setUrl(url);
+                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     }
                     if (StringUtils.isEmpty(patArchive.getPatidHis())) {
                         serviceSubtask.setCurrentPreachform(sendPreachform);
@@ -1061,6 +1068,7 @@
         String body = new Gson().toJson(map);
 
         String result = null;
+        log.info("銆恎etDXCode銆�-鐭俊鍙戦�佸叆鍙� body = {}", body);
         try {
             result = OkHttpExample.sendPostRequest(address, body, token);
         } catch (IOException e) {
@@ -1095,6 +1103,13 @@
      * @return
      */
     public boolean isSubtaskDeadline(ServiceSubtask serviceSubtask, List<ServiceSubtaskPreachform> serviceSubtaskPreachforms){
+        if (ObjectUtils.isNotEmpty(serviceSubtask)) {
+            //鍙湁鍑洪櫌闅忚鍜屼笓鐥呴殢璁挎湁瓒呮椂
+            if(StringUtils.isNotEmpty(serviceSubtask.getServiceType()) &&
+                    !serviceSubtask.getServiceType().equals("2") && !serviceSubtask.getServiceType().equals("13")){
+                return true;
+            }
+        }
         if (Objects.isNull(serviceSubtask) || CollectionUtils.isEmpty(serviceSubtaskPreachforms)) {
             return false;
         }

--
Gitblit v1.9.3