diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java index 7dc0458..b06e90c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java @@ -141,17 +141,19 @@ public class DelayedApplyManage { // 判断当前项目是否已经开启了延期申请并且没有审批完成 ProjectDelayApply delayApply = projectDelayApplyService.getOne(Wrappers.lambdaQuery(ProjectDelayApply.class) .eq(ProjectDelayApply::getProjectId, w.getId()) + .orderByDesc(ProjectDelayApply::getCreateOn) .last("limit 1")); String instCode = delayApply.getInstanceId(); - // 获取流程通过后的流程实例 + // 获取流程实例 HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery() .processInstanceId(instCode) .singleResult(); ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) .eq(ProjectInst::getInstCode, instCode)); Integer instType = projectInst.getInstType(); + // 延期申请流程还未审核结束 if (InstTypeEnum.APPLY_DELAY.getCode().equals(instType) && - !HisProInsEndActId.END.equals(newInstance.getEndActivityId())){ + Objects.isNull(newInstance.getEndActivityId())){ item.setCanDelayApply(Boolean.FALSE); } // 如果是延期申请审核被驳回,设置项目可以申请延期申报