From 2c331be5c10be56d887bb601e5596fe2cb8eedc8 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 5 May 2023 16:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=A4=84=E7=90=86=20=E5=8A=A0taskId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/todocenter/handle/WithDrawHandle.java | 12 +++++++----- .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java index d0ad64c..d07c051 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/handle/WithDrawHandle.java @@ -72,15 +72,17 @@ public class WithDrawHandle { // 判断当前操作人 是上一个节点的审批人 public Boolean checkUserIsBefore(List currentProgressInfo, ReqProcessHandlerDTO param) { UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); - //1.判断出 当前审批人和上一个审批人 - ProgressNode progressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); - ProgressNode beforeProgressNode = null; - ProgressNode currentProgressNode = null; // 先排除掉抄送任务节点 currentProgressInfo = currentProgressInfo.stream() .filter(c -> !NodeTypeEnum.CC.name().equals(c.getNodeType().name())) .collect(Collectors.toList()); + + //1.判断出 当前审批人和上一个审批人 + ProgressNode progressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); + ProgressNode beforeProgressNode = null; + ProgressNode currentProgressNode = null; + if (CollUtil.isEmpty(currentProgressInfo)){ return Boolean.FALSE; } @@ -108,7 +110,7 @@ public class WithDrawHandle { // 判断当前工作流任务前一个审核人的部门和当前登录用户的部门是否是同一个,如果是同一个才可以撤回,否则抛出异常 // 获取当前当前工作流任务当前审核人信息 UserFullInfoDTO currentUserInfo = userInfoHelper.getUserFullInfoByEmployeeCode(currentProgressNode.getUserId()); - if(!currentUserInfo.getEmpPosUnitCode().equals(user.getEmpPosUnitCode())){ + if(Objects.isNull(currentUserInfo) || !currentUserInfo.getEmpPosUnitCode().equals(user.getEmpPosUnitCode())){ return Boolean.FALSE; } 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 696b06c..a56f15d 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 @@ -550,6 +550,7 @@ public class TodoCenterManage { res.setProcessStatusName(d.getStatus()); res.setProcessLaunchTime(d.getCreateTime()); res.setProcessHandleTime(d.getTaskEndTime()); + res.setTaskId(d.getTaskId()); return res; }).collect(Collectors.toList()); return PageVo.of(resVos, iDoList.size());