From 79687bbaf1b5de53e77d75d401a42330d6d9b2c4 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 31 Mar 2023 11:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=A4=E6=96=AD=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 7236ab0..70e9470 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -13,6 +13,7 @@ import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; +import com.wflow.workflow.enums.ProcessStatusEnum; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.assertj.core.util.Lists; @@ -828,10 +829,18 @@ public class TodoCenterManage { res.setProcessProgressVo(progressInstanceDetail); res.setStatus(progressInstanceDetail.getStatus()); res.setProjectId(projectId); - res.setCanWithdraw(checkUserIsRoot(instanceId,null) || checkUserIsBefore(progressInfo)); + res.setCanWithdraw(checkCanWithdraw(instanceId,progressInstanceDetail)); return res; } + private Boolean checkCanWithdraw(String instanceId, ProcessProgressVo progressInstanceDetail) { + if(!ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(progressInstanceDetail.getStatus())){ + return Boolean.FALSE; + } + + return checkUserIsRoot(instanceId,null) || checkUserIsBefore(progressInstanceDetail.getProgressInfo()); + } + /** * 待办中心我已处理项目列表查询