|
|
@@ -45,6 +45,7 @@ import com.ningdatech.pmapi.todocenter.constant.WorkNoticeContant; |
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import com.wflow.bean.entity.WflowModels; |
|
|
|
import com.wflow.contants.HisProInsEndActId; |
|
|
|
import com.wflow.exception.BusinessException; |
|
|
|
import com.wflow.workflow.bean.dto.OrgInfoDTO; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; |
|
|
@@ -53,6 +54,8 @@ import com.wflow.workflow.service.ProcessModelService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.flowable.engine.HistoryService; |
|
|
|
import org.flowable.engine.history.HistoricProcessInstance; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@@ -88,6 +91,7 @@ public class DelayedApplyManage { |
|
|
|
private final ProjectLibManage projectLibManage; |
|
|
|
private final NoticeManage noticeManage; |
|
|
|
private final IProjectInstService projectInstService; |
|
|
|
private final HistoryService historyService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 延期的-项目列表 |
|
|
@@ -132,6 +136,19 @@ public class DelayedApplyManage { |
|
|
|
item.setBuildCycle(StringUtils.isNotBlank(w.getBuildCycle()) ? |
|
|
|
Integer.valueOf(w.getBuildCycle()) : null); |
|
|
|
item.setPlanAcceptanceTime(w.getPlanAcceptanceTime()); |
|
|
|
// 判断当前项目是否已经开启了延期申请并且没有审批完成 |
|
|
|
String instCode = w.getInstCode(); |
|
|
|
// 获取流程通过后的流程实例 |
|
|
|
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())){ |
|
|
|
item.setCanDelayApply(Boolean.FALSE); |
|
|
|
} |
|
|
|
return item; |
|
|
|
}); |
|
|
|
return PageVo.of(records, total); |
|
|
|