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);