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