From d5786f308379f037bfa959df805a34880d52d97c Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期一, 29 六月 2026 17:30:05 +0800
Subject: [PATCH] 【市一】getInfoByParam 增加用户信息

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java |   61 ++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 5 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 5e8c4fe..2b6c7cf 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
@@ -1,18 +1,30 @@
 package com.ruoyi.web.controller.smartor;
 
+import com.ruoyi.common.annotation.AddOrgId;
 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.BaseOrganization;
+import com.smartor.domain.PatArchive;
 import com.smartor.domain.ServiceOutPath;
+import com.smartor.domain.ServiceTask;
+import com.smartor.service.IBaseOrganizationService;
+import com.smartor.service.IPatArchiveService;
 import com.smartor.service.IServiceOutPathService;
+import com.smartor.service.IServiceTaskService;
 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;
@@ -29,6 +41,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;
 
     /**
      * 鏌ヨ涓婚敭鍒楄〃
@@ -50,13 +77,35 @@
      */
     @PostMapping("/getInfoByParam")
     public AjaxResult param(@Param("param") String param) {
-        ServiceOutPath serviceOutPath=new ServiceOutPath();
+        ServiceOutPath serviceOutPath = new ServiceOutPath();
         serviceOutPath.setRadix(param);
         List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
-        ServiceOutPath serviceOutPath1 = list.get(0);
-        serviceOutPath1.setId(null);
-        serviceOutPath1.setRadix(null);
-        if (CollectionUtils.isNotEmpty(list)) return success(serviceOutPath1);
+        if (CollectionUtils.isNotEmpty(list)) {
+            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);
     }
 
@@ -87,6 +136,7 @@
      */
     @ApiOperation("鏂板涓婚敭")
     @Log(title = "涓婚敭", businessType = BusinessType.INSERT)
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
     @PostMapping("/add")
     public AjaxResult add(@RequestBody ServiceOutPath serviceOutPath) {
         return toAjax(serviceOutPathService.insertServiceOutPath(serviceOutPath));
@@ -98,6 +148,7 @@
     @ApiOperation("淇敼涓婚敭")
     //@PreAuthorize("@ss.hasPermi('smartor:path:edit')")
     @Log(title = "涓婚敭", businessType = BusinessType.UPDATE)
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
     @PostMapping("/edit")
     public AjaxResult edit(@RequestBody ServiceOutPath serviceOutPath) {
         return toAjax(serviceOutPathService.updateServiceOutPath(serviceOutPath));

--
Gitblit v1.9.3