|
@@ -3,6 +3,7 @@
|
|
|
*/
|
|
|
package com.jeeplus.flowable.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
@@ -368,7 +369,25 @@ public class FlowableTaskController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/back")
|
|
|
public ResponseEntity back(String backTaskDefKey, String taskId, TaskComment comment) {
|
|
|
+
|
|
|
String procInsId = flowTaskService.backTask(backTaskDefKey, taskId, comment);
|
|
|
+ Task task = taskService.createTaskQuery().processInstanceId(procInsId).active().singleResult();
|
|
|
+ if (ObjectUtil.isNotEmpty(task)) {
|
|
|
+ if (com.jeeplus.sys.utils.StringUtils.isNotBlank(task.getId())){
|
|
|
+ if (ObjectUtil.isNotEmpty(comment)) {
|
|
|
+ if (com.jeeplus.sys.utils.StringUtils.isNotBlank(comment.getCandidateUserList())) {
|
|
|
+ String[] split = comment.getCandidateUserList().split(",");
|
|
|
+ if (split.length == 1) {
|
|
|
+ taskService.setAssignee(task.getId(),split[0]);
|
|
|
+ }else{
|
|
|
+ for (String i : split) {
|
|
|
+ taskService.addCandidateUser(task.getId(),i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return ResponseEntity.ok (procInsId);
|
|
|
}
|
|
|
|