|
|
@@ -8,6 +8,7 @@ import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum; |
|
|
|
import com.hz.pm.api.common.statemachine.util.StateMachineUtil; |
|
|
|
import com.hz.pm.api.projectlib.model.entity.Project; |
|
|
|
import com.hz.pm.api.projectlib.service.IProjectService; |
|
|
|
import com.hz.pm.api.sys.manage.ProcessModelManage; |
|
|
|
import com.wflow.bean.entity.WflowModels; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessDetailVO; |
|
|
|
import com.wflow.workflow.enums.StepStatusEnum; |
|
|
@@ -30,7 +31,7 @@ import java.util.Objects; |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class ProcessExecuteChainHandle { |
|
|
|
|
|
|
|
private final ProcessModelService processModelService; |
|
|
|
private final ProcessModelManage processModelManage; |
|
|
|
|
|
|
|
/** |
|
|
|
* 具体处理者的集合 |
|
|
@@ -45,7 +46,7 @@ public class ProcessExecuteChainHandle { |
|
|
|
* @author CMM |
|
|
|
* @since 2023/02/26 |
|
|
|
*/ |
|
|
|
public List<ProcessDetailVO> handle(Long projectId, List<ProcessDetailVO> processSchedule) { |
|
|
|
public List<ProcessDetailVO> handle(Project project, List<ProcessDetailVO> processSchedule) { |
|
|
|
List<AbstractProcessBusinessHandle> handles = Lists.newArrayList(); |
|
|
|
for (AbstractProcessBusinessHandle processBusinessHandle : processBusinessHandles) { |
|
|
|
if (processBusinessHandle instanceof AnnualPlanHandle) { |
|
|
@@ -56,15 +57,13 @@ public class ProcessExecuteChainHandle { |
|
|
|
|
|
|
|
//建设方案 |
|
|
|
if (processBusinessHandle instanceof ConstructionPlanReviewHandle) { |
|
|
|
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) |
|
|
|
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode()) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if (Objects.nonNull(model) && (Boolean.FALSE.equals(model.getIsStop()))) { |
|
|
|
ProjectProcessStageEnum processType = ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS; |
|
|
|
WflowModels wflowModels = processModelManage.getWflowModels(processType, project.getId()); |
|
|
|
if (Objects.nonNull(wflowModels) && (Boolean.FALSE.equals(wflowModels.getIsStop()))) { |
|
|
|
handles.add(processBusinessHandle); |
|
|
|
} |
|
|
|
} else if (processBusinessHandle instanceof ProvinceUnitedReviewHandle) { |
|
|
|
//省级联审 |
|
|
|
// TODO |
|
|
|
// TODO 省级联审 |
|
|
|
} else { |
|
|
|
handles.add(processBusinessHandle); |
|
|
|
} |
|
|
@@ -73,7 +72,7 @@ public class ProcessExecuteChainHandle { |
|
|
|
if (!handles.isEmpty()) { |
|
|
|
handles.sort(Comparator.comparing(AbstractProcessBusinessHandle::getOrder)); |
|
|
|
for (AbstractProcessBusinessHandle processBusinessHandle : handles) { |
|
|
|
processBusinessHandle.businessHandle(projectId, processSchedule); |
|
|
|
processBusinessHandle.businessHandle(project, processSchedule); |
|
|
|
} |
|
|
|
for (int i = processSchedule.size() - 1; i >= 1; i--) { |
|
|
|
ProcessDetailVO curr = processSchedule.get(i); |
|
|
|