From 7a1eb44657591b61b054ebd5a380a317b01af801 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 31 Mar 2023 11:18:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 4 +++- 1 file changed, 3 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 47f3772..7236ab0 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 @@ -540,9 +540,10 @@ public class TodoCenterManage { } //进入上一个节点的标识 Boolean enterBefore = Boolean.FALSE; + String thisAndOrNodeId = curr.getNodeId(); for(int i = progressNodes.size() - 2;i >= 0;i--){ //说明有会签 或签 - if(progressNodes.get(i).getNodeId().equals(curr.getNodeId())){ + if(progressNodes.get(i).getNodeId().equals(thisAndOrNodeId)){ //还在当前节点 if(!enterBefore){ if(thisAndOr.isEmpty()){ @@ -558,6 +559,7 @@ public class TodoCenterManage { beforeAndOr.add(progressNodes.get(i)); } }else{ + thisAndOrNodeId = progressNodes.get(i).getNodeId(); if(!enterBefore){ beforeNode = progressNodes.get(i); enterBefore = Boolean.TRUE; 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 2/4] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=AD=97=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()); + } + /** * 待办中心我已处理项目列表查询 From 1740e9dff86aeee87528aa5cf5623f9cba769ba1 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 31 Mar 2023 12:01:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 4230a93..8d292e1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -29,6 +29,7 @@ import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.wflow.workflow.bean.vo.ProcessDetailVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -105,7 +106,9 @@ public class ProjectLibManage { item.setProcessStatus(w.getProcessStatus()); item.setInstCode(w.getInstCode()); if(userInfoDetails.getIsOrgAdmin() && - ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus())){ + ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus()) + && StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(userInfoDetails.getOrganizationCode()) + && w.getSuperOrgCode().equals(userInfoDetails.getOrganizationCode())){ item.setCanPreDeclared(Boolean.TRUE); } return item; From 2edd247533ddc2a8c777ec00a9dc8373776d68c3 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 31 Mar 2023 13:36:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=AF=E5=8D=95=E4=BD=8D=E7=AE=A1=E7=90=86=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/PrequalificationDeclaredProjectManage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index 1240c38..a4d65bf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -162,14 +162,18 @@ public class PrequalificationDeclaredProjectManage { * @return */ public PageVo projectLibList(PrequalificationDeclaredListReq preReq) { + UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail(); + VUtils.isTrue(Objects.isNull(userInfoDetail)).throwMessage("获取登录用户失败!"); + if(!userInfoDetail.getIsOrgAdmin()){ + return PageVo.empty(); + } //限定参数 复制bean ProjectListReq req = new ProjectListReq(); BeanUtils.copyProperties(preReq,req); //项目阶段 状态 已定 待预审 req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); - UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail(); - VUtils.isTrue(Objects.isNull(userInfoDetail)).throwMessage("获取登录用户失败!"); + //放入用户的主管单位 req.setSuperOrgCode(userInfoDetail.getOrganizationCode()); return projectLibManage.projectLibList(req);