From c599b077ceee0c01ac0d9250973393dc622f68d0 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Thu, 20 Apr 2023 16:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BA=93=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java index 947e116..8f96faf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java @@ -12,6 +12,7 @@ import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessHandlerEnum; +import com.wflow.workflow.enums.ProcessStatusEnum; import com.wflow.workflow.service.ProcessInstanceService; import liquibase.pro.packaged.I; import lombok.RequiredArgsConstructor; @@ -60,7 +61,8 @@ public class ProjectVersionUtil { if (projectList.size() < CommonConst.VERSION_SIZE){ throw new BizException("未发现该项目的历史版本!"); } - // 获取上个版本的项目 + + // 获取之前版本的项目 int index = projectList.size() - 1; ProcessProgressVo instanceDetail = null; while (index > 0){ @@ -76,10 +78,10 @@ public class ProjectVersionUtil { .collect(Collectors.toList()); // 筛选出上个版本该类型审核流程通过的流程详情 List instanceDetailList = processProgressVoList.stream() - .filter(p -> ProcessHandlerEnum.PASS.name().equals(p.getResult())) + .filter(p -> ProcessStatusEnum.APPROVED.getDesc().equals(p.getStatus())) .collect(Collectors.toList()); if (CollUtil.isEmpty(instanceDetailList)){ - return null; + continue; } // 获取最后一个流程详情 return instanceDetailList.get(instanceDetailList.size() - 1);