|
|
@@ -11,6 +11,7 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; |
|
|
|
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.service.ProcessInstanceService; |
|
|
|
import liquibase.pro.packaged.I; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
@@ -70,13 +71,18 @@ public class ProjectVersionUtil { |
|
|
|
.eq(ProjectInst::getProjectId, preProject.getId()) |
|
|
|
.eq(ProjectInst::getInstType,instTypeEnum.getCode())); |
|
|
|
if (CollUtil.isNotEmpty(projectInstList)) { |
|
|
|
// 获取最新一个对应审核类型的项目关联实例 |
|
|
|
ProjectInst projectInst = projectInstList.get(projectInstList.size() - 1); |
|
|
|
// 获取流程详情 |
|
|
|
instanceDetail = processInstanceService.getProgressInstanceDetail(null, projectInst.getInstCode()); |
|
|
|
if (Objects.nonNull(instanceDetail)){ |
|
|
|
return instanceDetail; |
|
|
|
List<ProcessProgressVo> processProgressVoList = projectInstList.stream() |
|
|
|
.map(p -> processInstanceService.getProgressInstanceDetail(null, p.getInstCode())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
// 筛选出上个版本该类型审核流程通过的流程详情 |
|
|
|
List<ProcessProgressVo> instanceDetailList = processProgressVoList.stream() |
|
|
|
.filter(p -> ProcessHandlerEnum.PASS.name().equals(p.getResult())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (CollUtil.isEmpty(instanceDetailList)){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
// 获取最后一个流程详情 |
|
|
|
return instanceDetailList.get(instanceDetailList.size() - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|