|
|
@@ -1,6 +1,9 @@ |
|
|
|
package com.ningdatech.pmapi.projectlib.handle; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import com.ningdatech.basic.util.CollUtils; |
|
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
@@ -68,14 +71,16 @@ public class ProjectApprovalHandle extends AbstractProcessBusinessHandle { |
|
|
|
void businessHandle(Long projectId, List<ProcessDetailVO> processSchedule) { |
|
|
|
ProcessDetailVO processDetailVO = new ProcessDetailVO(); |
|
|
|
|
|
|
|
Project project = projectService.getById(projectId); |
|
|
|
Project project = projectService.getNewProject(projectId); |
|
|
|
//查出历史版本的 所有项目ID |
|
|
|
List<Long> allVersionProjectIds = projectService.getAllVersionProjectId(project); |
|
|
|
Integer status = project.getStatus(); |
|
|
|
List<Integer> fieldList = CollUtils.fieldList(PROJECT_APPROVAL_LIST_STATUS, ProjectStatusEnum::getCode); |
|
|
|
if(Objects.isNull(status)){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 项目状态为待立项批复之前的状态 |
|
|
|
if (fieldList.contains(status)){ |
|
|
|
if (status < ProjectStatusEnum.TO_BE_APPROVED.getCode()){ |
|
|
|
processDetailVO.setStepStatus(StepStatusEnum.NOT_START); |
|
|
|
processDetailVO.setProcessName(CommonConst.PROJECT_APPROVAL); |
|
|
|
processSchedule.add(processDetailVO); |
|
|
|