From 9e113cdae73c69831254d028816ad6d6c492b5a4 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 23 六月 2026 14:26:07 +0800
Subject: [PATCH] 【市一】生成外链-机构名称

---
 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java                   |    6 ++++++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java |   21 ++++++++++-----------
 smartor/src/main/java/com/smartor/domain/smsVO.java                                      |    3 +++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java             |    2 ++
 4 files changed, 21 insertions(+), 11 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 7895fd3..3f5813e 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
@@ -305,6 +305,7 @@
                         serviceOutPath.setParam2(patid);
                         serviceOutPath.setParam6(subId);
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
 //                                sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "&param2=" + patid + "&param5=false");
                         //杞垚16杩涘埗
@@ -337,6 +338,7 @@
 //                                serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()));
                         serviceOutPath.setParam3(ivrTask1.getTaskName());
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
@@ -371,6 +373,7 @@
                         serviceOutPath.setParam6(subId);
                         serviceOutPath.setParam3(ivrTask1.getTaskName());
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
@@ -554,6 +557,7 @@
                         serviceOutPath.setParam1(taskId);
                         serviceOutPath.setParam2(patid);
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
@@ -567,6 +571,7 @@
                         serviceOutPath.setParam2(patid);
                         serviceOutPath.setParam3(ivrTask1.getTaskName());
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
@@ -583,6 +588,7 @@
                         serviceOutPath.setParam2(patid);
                         serviceOutPath.setParam3(ivrTask1.getTaskName());
                         serviceOutPath.setCreateTime(new Date());
+                        serviceOutPath.setOrgid(serviceSubtask.getOrgid());
                         iServiceOutPathService.insertServiceOutPath(serviceOutPath);
                         String format = String.format("%03X", serviceOutPath.getId());
                         serviceOutPath.setRadix(format);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
index 91ed52e..bdefcbd 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
@@ -115,6 +115,7 @@
             serviceOutPath.setParam6(subId);
             serviceOutPath.setRadix(format);
             serviceOutPath.setCreateTime(new Date());
+            serviceOutPath.setOrgid(vo.getOrgid());
             iServiceOutPathService.insertServiceOutPath(serviceOutPath);
             String url = ip + ":" + req_path + "/wt?p=" + format;
             content = "鎮ㄥソ锛岄個璇锋偍濉啓鍑洪櫌璋冩煡琛紝璇风偣鍑�" + url + "濉啓銆傛劅璋㈡偍閰嶅悎锛�";
@@ -179,6 +180,7 @@
             serviceOutPath.setParam6(subId);
             serviceOutPath.setRadix(format);
             serviceOutPath.setCreateTime(new Date());
+            serviceOutPath.setOrgid(vo.getOrgid());
             iServiceOutPathService.insertServiceOutPath(serviceOutPath);
             String url = ip + ":" + req_path + "/wt?p=" + format;
             sendMsg = smsUtils.sendChat(url, vo.getPhone(), vo.getIdCard());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
index d2f4df2..037bb28 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
@@ -7,6 +7,7 @@
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.smartor.domain.BaseOrganization;
 import com.smartor.domain.ServiceOutPath;
@@ -57,15 +58,6 @@
      */
     @PostMapping("/getInfoByParam")
     public AjaxResult param(@Param("param") String param) {
-        SysUser user = getLoginUser().getUser();
-        String orgname = "";
-        String orgid = user.getOrgid();
-        if(orgid != null && !"".equals(orgid)){
-            BaseOrganization baseOrganization = new BaseOrganization();
-            List<BaseOrganization> orgids = baseOrganizationService.selectBaseOrganizationList(baseOrganization);
-            orgname = orgids.get(0).getOrganizationName();
-        }
-
         ServiceOutPath serviceOutPath = new ServiceOutPath();
         serviceOutPath.setRadix(param);
         List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
@@ -73,8 +65,15 @@
             ServiceOutPath serviceOutPath1 = list.get(0);
             serviceOutPath1.setId(null);
             serviceOutPath1.setRadix(null);
-            serviceOutPath1.setOrgid(orgid);
-            serviceOutPath1.setOrgname(orgname);
+            if(StringUtils.isNotEmpty(serviceOutPath1.getOrgid())){
+                BaseOrganization baseOrganization = new BaseOrganization();
+                baseOrganization.setOrgid(serviceOutPath1.getOrgid());
+                List<BaseOrganization> orgs = baseOrganizationService.selectBaseOrganizationList(baseOrganization);
+                if(CollectionUtils.isNotEmpty(orgs)){
+                    String orgname = orgs.get(0).getOrganizationName();
+                    serviceOutPath1.setOrgname(orgname);
+                }
+            }
             return success(serviceOutPath1);
         }
         return success(null);
diff --git a/smartor/src/main/java/com/smartor/domain/smsVO.java b/smartor/src/main/java/com/smartor/domain/smsVO.java
index 6dcc458..371ea24 100644
--- a/smartor/src/main/java/com/smartor/domain/smsVO.java
+++ b/smartor/src/main/java/com/smartor/domain/smsVO.java
@@ -28,4 +28,7 @@
     @ApiModelProperty(value = "韬唤璇佸彿")
     private String idCard;
 
+    @ApiModelProperty(value = "鏈烘瀯鍙�")
+    private String orgid;
+
 }

--
Gitblit v1.9.3