From 884f26b6c148310ed7cc487977eca95de4b883c5 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 23 六月 2026 18:38:28 +0800
Subject: [PATCH] 【市一】外链开放机构号生成
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 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 037bb28..5a58dbb 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,17 +7,22 @@
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.ServiceOutPath;
+import com.smartor.domain.ServiceTask;
import com.smartor.service.IBaseOrganizationService;
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;
@@ -36,7 +41,16 @@
private IServiceOutPathService serviceOutPathService;
@Autowired
+ private IServiceTaskService serviceTaskService;
+
+ @Autowired
private IBaseOrganizationService baseOrganizationService;
+
+ @Autowired
+ private RSAPublicKeyExample rsaPublicKeyExample;
+
+ @Value("${pri_key}")
+ private String pri_key;
/**
* 鏌ヨ涓婚敭鍒楄〃
@@ -65,13 +79,22 @@
ServiceOutPath serviceOutPath1 = list.get(0);
serviceOutPath1.setId(null);
serviceOutPath1.setRadix(null);
- 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);
+ //鏍规嵁taskid鑾峰彇鏈烘瀯淇℃伅
+ if(StringUtils.isNotEmpty(serviceOutPath1.getParam1())){
+ Long taskId = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceOutPath1.getParam1(), pri_key));
+ if(ObjectUtils.isNotEmpty(taskId)){
+ ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(taskId);
+ String orgId = serviceTask.getOrgid();
+ if(StringUtils.isNotEmpty(orgId)){
+ 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);
+ }
+ }
}
}
return success(serviceOutPath1);
--
Gitblit v1.9.3