From 574f63b57552e85406076bc0a2da511a040d263f Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期一, 14 九月 2026 18:03:53 +0800
Subject: [PATCH] 【景宁】记录Url

---
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java                  |   21 +++++++---
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java |   21 ++++++----
 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java        |   30 +++++++++-----
 3 files changed, 46 insertions(+), 26 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 5e750a1..06955a7 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
@@ -390,15 +390,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,6 +420,10 @@
                             sendMagParam.setPhone(serviceSubtask.getPhone());
                             sendMagParam.setContent(sc);
                         }
+                        serviceOutPath.setRadix(format);
+                        serviceOutPath.setUpdateTime(new Date());
+                        serviceOutPath.setUrl(url);
+                        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     }
 
                     //鐭俊杩橀渶瑕佹ā鏉�
@@ -598,8 +601,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 +619,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 +644,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 +663,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);
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 55c1971..34ada0f 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
@@ -1069,18 +1069,17 @@
                     serviceOutPath.setCreateTime(new Date());
                     serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                     iServiceOutPathService.insertServiceOutPath(serviceOutPath);
+                    String url = "";
                     String format = String.format("%03X", serviceOutPath.getId());
-                    serviceOutPath.setRadix(format);
-                    serviceOutPath.setUpdateTime(new Date());
-                    iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     //鍏堝垽鏂竴涓嬪彂鐨勬槸涓嶆槸瀹f暀
                     if (!"3".equals(serviceSubtask.getType())) {
                         sendMagParam.setPhone(serviceSubtask.getPhone());
-
-                        sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format);
+                        url = StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format;
+                        sendMagParam.setUrl(url);
                         //濡傛灉type鏄闊抽殢璁跨殑璇濓紙璇存槑琛ュ伩鍙戦�佹柟寮忎腑鏈夌數璇濋殢璁跨殑鏂瑰紡锛岃繖閲岀殑澶栭摼灏卞湴鍧�鍙兘鐢�/sf锛�
                         if (serviceSubtask.getType().equals("1"))
-                            sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/sf?p=" + format : localIP + "/sf?p=" + format);
+                            url = StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/sf?p=" + format : localIP + "/sf?p=" + format;
+                            sendMagParam.setUrl(url);
 
 //                        SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template");
                         SysConfig sysConfig = new SysConfig();
@@ -1100,7 +1099,9 @@
                         HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid());
                         if (heLibrary.getHetype().equals("1")) {
                             sendMagParam.setPhone(serviceSubtask.getPhone());
-                            sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/xj?p=" + format : localIP + "/xj?p=" + format);
+                            url = StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/xj?p=" + format : localIP + "/xj?p=" + format;
+
+                            sendMagParam.setUrl(url);
 
                             SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("xj.sms.template");
                             if (!Objects.isNull(sysConfig)) {
@@ -1118,6 +1119,11 @@
                         }
 
                     }
+
+                    serviceOutPath.setRadix(format);
+                    serviceOutPath.setUpdateTime(new Date());
+                    serviceOutPath.setUrl(url);
+                    iServiceOutPathService.updateServiceOutPath(serviceOutPath);
                     String isSuccess = null;
                     log.info("active鐨勫�间负锛歿}", active);
                     if (active.equals("xh")) {
@@ -1291,6 +1297,7 @@
                     String format = String.format("%03X", serviceOutPath.getId());
                     serviceOutPath.setRadix(format);
                     serviceOutPath.setUpdateTime(new Date());
+                    serviceOutPath.setUrl(url);
                     iServiceOutPathService.updateServiceOutPath(serviceOutPath);
 
                     //鑾峰彇寰俊鍏紬鍙疯姹備俊鎭牴鎹満鏋処D
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index fb0add6..90236af 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -4082,12 +4082,15 @@
         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
         //杞垚16杩涘埗
         String format = String.format("%03X", serviceOutPath.getId());
+        String url = "";
+        SendMagParam sendMagParam = new SendMagParam();
+        url = localIP + ":" + req_path + "/sf?p=" + format;
+        sendMagParam.setUrl(url);
+        sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌闅忚璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "濉啓銆傛劅璋㈡偍閰嶅悎锛�");
         serviceOutPath.setRadix(format);
         serviceOutPath.setUpdateTime(new Date());
+        serviceOutPath.setUrl(url);
         iServiceOutPathService.updateServiceOutPath(serviceOutPath);
-        SendMagParam sendMagParam = new SendMagParam();
-        sendMagParam.setUrl(localIP + ":" + req_path + "/sf?p=" + format);
-        sendMagParam.setContent("銆愭柊鍗庡尰闄€�戞偍濂斤紝閭�璇锋偍濉啓鍑洪櫌闅忚璋冩煡琛紝璇风偣鍑�" + sendMagParam.getUrl() + "濉啓銆傛劅璋㈡偍閰嶅悎锛�");
         Map<String, String> map = new HashMap<>();
         map.put("phone", serviceSubtask.getPhone());
         map.put("content", sendMagParam.getContent());
@@ -4973,15 +4976,17 @@
         serviceOutPath.setOrgid(serviceSubtask.getOrgid());
         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
         String format = String.format("%03X", serviceOutPath.getId());
-        serviceOutPath.setRadix(format);
-        serviceOutPath.setUpdateTime(new Date());
-        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
-
+        String url = "";
         SendMagParam sendMagParam = new SendMagParam();
         sendMagParam.setType("4");
         sendMagParam.setPhone(serviceSubtask.getPhone());
-        sendMagParam.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format);
+        url = StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + format : localIP + "/wt?p=" + format;
+        sendMagParam.setUrl(url);
 
+        serviceOutPath.setRadix(format);
+        serviceOutPath.setUpdateTime(new Date());
+        serviceOutPath.setUrl(url);
+        iServiceOutPathService.updateServiceOutPath(serviceOutPath);
         SysConfig sysConfig = new SysConfig();
 
         sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template");

--
Gitblit v1.9.3