Bladeren bron

项目库详情修改

master
CMM 1 jaar geleden
bovenliggende
commit
fe31b770ce
2 gewijzigde bestanden met toevoegingen van 13 en 7 verwijderingen
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java
  2. +12
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java Bestand weergeven

@@ -79,7 +79,7 @@ public class UnitInnerAuditHandle extends AbstractProcessBusinessHandle {
instanceDetail = processInstanceService.getProgressInstanceDetail(null, instCode);
}
if (Objects.isNull(instanceDetail)){
throw new BizException("未获取到历史版本的流程详情!");
throw new BizException("未获取到单位内部审核流程详情!");
}
String status = instanceDetail.getStatus();
if (ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(status)){


+ 12
- 6
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/utils/ProjectVersionUtil.java Bestand weergeven

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


Laden…
Annuleren
Opslaan