From 9bc9760ef1d80c49a76b3abe16cb1408e5d185b7 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期五, 08 八月 2025 11:46:57 +0800
Subject: [PATCH] 替换流程基本实现
---
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java
index 3ccbd66..34ad7f2 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/controller/MyFlowController.java
@@ -10,12 +10,10 @@
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.support.Kv;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
import org.springblade.mdm.flow.service.FlowBusinessService;
+import org.springblade.mdm.flow.service.FlowCommonService;
+import org.springblade.mdm.flow.service.FlowTransferService;
import org.springblade.mdm.flow.vo.FlowVO;
-import org.springblade.system.feign.IUserClient;
import org.springblade.system.feign.IUserSearchClient;
import org.springblade.system.pojo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,7 +23,6 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
-import java.util.Map;
@Slf4j
@RestController
@@ -38,6 +35,9 @@
private FlowBusinessService businessService;
@Autowired
private IUserSearchClient userSearchClient;
+
+ @Autowired
+ private FlowTransferService flowTransferService;
/**
* 寰呭姙浠诲姟鍒楄〃椤�
*/
@@ -62,18 +62,23 @@
@Operation(summary = "杞淳浠诲姟", description = "")
@PostMapping("transferTask")
- public R<Void> transferTask(String taskId,String newAssigneeId, String processInstanceId, String comment, @RequestBody Map<String, Object> variables) {
+ public R<Void> transferTask(String taskId,String newAssigneeId, String processInstanceId, String comment) {
// 澧炲姞璇勮
+ /*
if (StringUtil.isNoneBlank(processInstanceId, comment)) {
taskService.addComment(taskId, processInstanceId, comment);
}
- // 闈炵┖鍒ゆ柇
- if (Func.isEmpty(variables)) {
- variables = Kv.create();
- }
+
// 瀹屾垚浠诲姟
taskService.setAssignee(taskId, newAssigneeId);
- return R.success("娴佺▼杞淳鎴愬姛");
+
+ */
+ try {
+ this.flowTransferService.transferTask(taskId, newAssigneeId, comment);
+ return R.success("娴佺▼杞淳鎴愬姛");
+ }catch(Exception e) {
+ return R.fail(e.getMessage());
+ }
}
/**
--
Gitblit v1.9.3