From f0a09ee996ab2605869844d6a3d812709e2bf0fa Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 16 十月 2026 16:07:25 +0800
Subject: [PATCH] 任务模块、电话模块

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 58 insertions(+), 2 deletions(-)

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 4b117e0..8490244 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
@@ -4,20 +4,30 @@
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+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.RSAPublicKeyExample;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.ServiceOutPath;
-import com.smartor.service.IServiceOutPathService;
+import com.smartor.domain.BaseOrganization;
+import com.smartor.service.IBaseOrganizationService;
+import com.smartor.service.IPatArchiveService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
+import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.task.domain.ServiceOutPath;
+import com.ruoyi.task.service.IServiceOutPathService;
+import com.ruoyi.task.service.IServiceTaskService;
 
 /**
  * 涓婚敭Controller
@@ -30,6 +40,21 @@
 public class ServiceOutPathController extends BaseController {
     @Autowired
     private IServiceOutPathService serviceOutPathService;
+
+    @Autowired
+    private IServiceTaskService serviceTaskService;
+
+    @Autowired
+    IPatArchiveService patArchiveService;
+
+    @Autowired
+    private IBaseOrganizationService baseOrganizationService;
+
+    @Autowired
+    private RSAPublicKeyExample rsaPublicKeyExample;
+
+    @Value("${pri_key}")
+    private String pri_key;
 
     /**
      * 鏌ヨ涓婚敭鍒楄〃
@@ -58,6 +83,26 @@
             ServiceOutPath serviceOutPath1 = list.get(0);
             serviceOutPath1.setId(null);
             serviceOutPath1.setRadix(null);
+            if(StringUtils.isNotEmpty(serviceOutPath1.getOrgid())){
+                String orgId = serviceOutPath1.getOrgid();
+                BaseOrganization baseOrganization = new BaseOrganization();
+                baseOrganization.setOrgid(orgId);
+                List<BaseOrganization> orgs = baseOrganizationService.selectBaseOrganizationList(baseOrganization);
+                if(CollectionUtils.isNotEmpty(orgs)){
+                    String orgname = orgs.get(0).getOrganizationName();
+                    serviceOutPath1.setOrgid(orgId);
+                    serviceOutPath1.setOrgname(orgname);
+                }
+            }
+            if(StringUtils.isNotEmpty(serviceOutPath1.getParam2())){
+                RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+                Long patId = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceOutPath1.getParam2(), pri_key));
+                if(patId != null){
+                    PatArchive patArchive = patArchiveService.selectPatArchiveByPatid(patId);
+                    serviceOutPath1.setPatArchive(patArchive);
+                }
+            }
+
             return success(serviceOutPath1);
         }
         return success(null);
@@ -96,6 +141,17 @@
         return toAjax(serviceOutPathService.insertServiceOutPath(serviceOutPath));
     }
 
+
+    /**
+     * 鏂板涓婚敭
+     */
+    @ApiOperation("鏂板涓婚敭")
+    @Log(title = "涓婚敭", businessType = BusinessType.INSERT)
+    @PostMapping("/addOutPath")
+    public AjaxResult addOutPath(@RequestBody ServiceOutPath serviceOutPath) {
+        return success(serviceOutPathService.addOutPath(serviceOutPath));
+    }
+
     /**
      * 淇敼涓婚敭
      */

--
Gitblit v1.9.3