Pārlūkot izejas kodu

项目库详情修改

master
CMM pirms 1 gada
vecāks
revīzija
328e97101f
1 mainītis faili ar 11 papildinājumiem un 16 dzēšanām
  1. +11
    -16
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java

+ 11
- 16
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java Parādīt failu

@@ -63,28 +63,23 @@ public class ProjectVersionUtil {
}

// 获取之前版本的项目
int index = projectList.size() - 1;
ProcessProgressVo instanceDetail = null;
while (index > 0){
index = index - 1;
Project preProject = projectList.get(index);
for (Project preProject : projectList) {
// 从项目流程实例关联表中查出实例详情
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getProjectId, preProject.getId())
.eq(ProjectInst::getInstType,instTypeEnum.getCode()));
List<ProjectInst> projectInstList = projectInstService
.list(Wrappers.lambdaQuery(ProjectInst.class).eq(ProjectInst::getProjectId, preProject.getId())
.eq(ProjectInst::getInstType, instTypeEnum.getCode()));
if (CollUtil.isNotEmpty(projectInstList)) {
List<ProcessProgressVo> processProgressVoList = projectInstList.stream()
.map(p -> processInstanceService.getProgressInstanceDetail(null, p.getInstCode()))
.collect(Collectors.toList());
.map(p -> processInstanceService.getProgressInstanceDetail(null, p.getInstCode()))
.collect(Collectors.toList());
// 筛选出上个版本该类型审核流程通过的流程详情
List<ProcessProgressVo> instanceDetailList = processProgressVoList.stream()
.filter(p -> ProcessStatusEnum.APPROVED.getDesc().equals(p.getStatus()))
.collect(Collectors.toList());
if (CollUtil.isEmpty(instanceDetailList)){
continue;
.filter(p -> ProcessStatusEnum.APPROVED.getDesc().equals(p.getStatus()))
.collect(Collectors.toList());
if (CollUtil.isNotEmpty(instanceDetailList)) {
// 获取最后一个流程详情
return instanceDetailList.get(instanceDetailList.size() - 1);
}
// 获取最后一个流程详情
return instanceDetailList.get(instanceDetailList.size() - 1);
}
}
return null;


Notiek ielāde…
Atcelt
Saglabāt