From 599beddc80e7e50b2099bacdbf7df2d89df00ef2 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期六, 07 十一月 2026 14:42:31 +0800
Subject: [PATCH] fix: 完成时状态与超时判断区分任务组
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java | 74 +++++++++++++++++++++++++-----------
1 files changed, 51 insertions(+), 23 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 2b6c7cf..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
@@ -8,27 +8,26 @@
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.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 com.ruoyi.patarchive.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
@@ -70,16 +69,35 @@
}
/**
- * 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);
+ 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);
@@ -95,15 +113,14 @@
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);
- }
- }
-
+// 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);
@@ -142,6 +159,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