Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
PoffyZhang 1 year ago
parent
commit
7b6025dba2
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java

+ 5
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java View File

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


Loading…
Cancel
Save