From 479cf97d8daa08ee3a19a4bed4481377dd240d42 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 18 May 2022 15:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=B3=E5=9B=9E=20=E5=AF=B9=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=E4=B8=8A=E6=9E=B6=E8=A1=A8=E5=8D=95=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/controller/RejectController.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/RejectController.java b/renren-admin/src/main/java/io/renren/common/controller/RejectController.java index 17e57a46..729dcac5 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/RejectController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/RejectController.java @@ -1,6 +1,7 @@ package io.renren.common.controller; +import com.alibaba.fastjson.JSON; import io.renren.common.utils.Result; import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.sys.dto.SysUserDTO; @@ -15,7 +16,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; @@ -42,10 +43,16 @@ public class RejectController { AtomicReference result = new AtomicReference<>(new Result().error("重新发起流程失败")); Optional taskOptional = Optional.ofNullable(taskService.createTaskQuery().taskId(taskId).includeProcessVariables().singleResult()); taskOptional.ifPresent(task -> { - Map combineResultMap = new HashMap<>(); + Map combineResultMap = new LinkedHashMap<>(); combineResultMap.putAll(task.getProcessVariables()); combineResultMap.putAll(params); + if (combineResultMap.containsKey("parameterContent")) { // 上架申请特殊处理 + combineResultMap.remove("parameterContent"); + combineResultMap.remove("resourceDTO"); + combineResultMap.put("parameterContent", JSON.toJSONString(combineResultMap)); + } taskService.setVariables(task.getId(), combineResultMap); // 更新 + logger.error("-----------" + JSON.toJSONString(combineResultMap)); taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 标识驳回标签false taskService.setVariable(task.getId(), "completeEntry", Boolean.FALSE); // 标志为非首次录入 taskService.setVariable(task.getId(), "reject", Boolean.FALSE); // 标识流程中是否存在拒绝false