From 3d047130b059efd46f56be37465a751ab16ee8cb Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 11 十一月 2026 14:06:56 +0800
Subject: [PATCH] Merge branch 'smartor_ls_merge' into 20261111-妇幼档案随访
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java | 107 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 93 insertions(+), 14 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..5bbda21 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,22 +1,33 @@
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.ShortCode;
+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.ruoyi.patarchive.service.IPatArchiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
-import org.apache.ibatis.annotations.Param;
+import org.apache.commons.lang3.ObjectUtils;
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
@@ -29,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;
/**
* 鏌ヨ涓婚敭鍒楄〃
@@ -43,20 +69,60 @@
}
/**
- * param灏辨槸杩涘埗
+ * 澶栭摼钀藉湴椤靛彇浠诲姟淇℃伅锛堟偅鑰呯煭淇¢噷鐨� {@code /wt?p=XXXXXX}锛屽尶鍚嶈闂紝涓嶈兘鍔犵櫥褰曟�侀壌鏉冿級銆�
*
- * @param param
- * @return
+ * <p>鐭爜鏈変袱绉嶅舰鎬侊紝閮借璁わ細
+ * <ul>
+ * <li><b>6 浣� base62</b>锛堟湰娆℃敼閫犲悗锛夆�斺�� 鐢� {@link ShortCode} 瀵逛富閿仛甯﹀瘑閽ュ弻灏勫緱鍒帮紝
+ * 涓嶅彲鏋氫妇锛涘厛鍙嶈В鍑轰富閿啀鎸� id 鏌ワ紝杩欐牱鍗充究 {@code radix} 鍒楄鎴柇鎴栨病钀藉簱涔熻兘鏌ュ埌锛�</li>
+ * <li><b>3~5 浣嶅崄鍏繘鍒�</b>锛堝巻鍙查摼鎺ワ級鈥斺�� 鐩存帴鎸� {@code radix} 鍒楁煡锛屼繚璇佸凡鍙戝嚭鐨勭煭淇¤繕鑳芥墦寮�銆�</li>
+ * </ul>
+ *
+ * @param param 鐭爜锛堟棫绉�"杩涘埗"锛�
+ * @return 浠诲姟淇℃伅锛涚煭鐮佹棤鏁堟椂 data 涓� null
*/
@PostMapping("/getInfoByParam")
- public AjaxResult param(@Param("param") String param) {
- 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);
+ public AjaxResult param(@RequestParam(value = "param", required = false) String param) {
+ if (StringUtils.isEmpty(param)) {
+ return success(null);
+ }
+ List<ServiceOutPath> list = null;
+ Long id = ShortCode.decode(param);
+ if (id != null) {
+ ServiceOutPath byId = new ServiceOutPath();
+ byId.setId(id);
+ list = serviceOutPathService.selectServiceOutPathList(byId);
+ }
+ if (CollectionUtils.isEmpty(list)) {
+ ServiceOutPath byRadix = new ServiceOutPath();
+ byRadix.setRadix(param);
+ list = serviceOutPathService.selectServiceOutPathList(byRadix);
+ }
+ 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,9 +153,21 @@
*/
@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));
+ }
+
+
+ /**
+ * 鏂板涓婚敭
+ */
+ @ApiOperation("鏂板涓婚敭")
+ @Log(title = "涓婚敭", businessType = BusinessType.INSERT)
+ @PostMapping("/addOutPath")
+ public AjaxResult addOutPath(@RequestBody ServiceOutPath serviceOutPath) {
+ return success(serviceOutPathService.addOutPath(serviceOutPath));
}
/**
@@ -98,6 +176,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