From 9cbba2477b9c6d49eaaf898e68067be51e2aeb07 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Tue, 17 May 2022 10:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E5=8F=91=E8=B5=B7=E7=9A=84=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=20=E6=B7=BB=E5=8A=A0=20=E6=98=AF=E5=90=A6=E9=A9=B3?= =?UTF-8?q?=E5=9B=9E=E5=88=B0=E7=AC=AC=E4=B8=80=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/renren/modules/activiti/dto/TaskDTO.java | 8 +++++--- .../modules/activiti/service/ActHistoryService.java | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java index cfa1ca47..38fce121 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/dto/TaskDTO.java @@ -4,7 +4,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.util.Date; import java.util.List; import java.util.Map; @@ -13,7 +12,7 @@ import java.util.Map; * @author Jone */ @Data -@Api(tags="任务") +@Api(tags = "任务") public class TaskDTO { private static final long serialVersionUID = 1L; @@ -27,7 +26,7 @@ public class TaskDTO { private String userId; @ApiModelProperty(value = "任务参数") - private Map params; + private Map params; @ApiModelProperty(value = "流程定义ID") private String processDefinitionId; @@ -77,4 +76,7 @@ public class TaskDTO { @ApiModelProperty(value = "流程发起时间") private Date startTime; + @ApiModelProperty(value = "流程被驳回到第一个用户任务?") + private Boolean backToFirst = Boolean.FALSE; + } diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java index 2fd4bcf4..a3789d42 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/service/ActHistoryService.java @@ -321,6 +321,10 @@ public class ActHistoryService { dto.setProcessInstanceId(task.getProcessInstanceId()); dto.setOwner(task.getOwner()); dto.setCreateTime(task.getCreateTime()); + dto.setParams(task.getProcessVariables()); + if (dto.getParams().containsKey("backToFirst")) { + dto.setBackToFirst(Boolean.valueOf(dto.getParams().get("backToFirst").toString())); + } } public ProcessInstanceDTO getHistoryProcessInstanceByBusinessKey(String procDefKey, String businessKey) {