@@ -5,7 +5,6 @@ import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange; | |||||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | import com.wflow.workflow.bean.vo.ProcessDetailVO; | ||||
import com.wflow.workflow.bean.vo.ProcessInfoVO; | import com.wflow.workflow.bean.vo.ProcessInfoVO; | ||||
import com.wflow.workflow.bean.vo.ProcessInstanceVo; | |||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | import com.wflow.workflow.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
import com.wflow.workflow.enums.StepStatusEnum; | import com.wflow.workflow.enums.StepStatusEnum; | ||||
@@ -36,7 +35,8 @@ public abstract class AbstractProcessHandle implements Ordered, ProcessHandle { | |||||
@AllArgsConstructor | @AllArgsConstructor | ||||
public enum ProcessNode { | public enum ProcessNode { | ||||
PROJECT_DECLARED("项目申报", 1), | |||||
PROJECT_DECLARED("项目申报", 0), | |||||
COMPLIANCE_REVIEW("合规性审查", 1), | |||||
PROJECT_REVIEW("项目评审", 2), | PROJECT_REVIEW("项目评审", 2), | ||||
APPROVAL_AMOUNT("资金下达", 3), | APPROVAL_AMOUNT("资金下达", 3), | ||||
PROJECT_APPROVAL("项目立项", 4), | PROJECT_APPROVAL("项目立项", 4), | ||||
@@ -33,7 +33,7 @@ import static com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent.*; | |||||
*/ | */ | ||||
@Component | @Component | ||||
@RequiredArgsConstructor | @RequiredArgsConstructor | ||||
public class ProjectDeclareHandle extends AbstractProcessHandle { | |||||
public class ComplianceReviewHandle extends AbstractProcessHandle { | |||||
private final IProjectStatusChangeService projectStatusChangeService; | private final IProjectStatusChangeService projectStatusChangeService; | ||||
private final IProjectInstService projectInstService; | private final IProjectInstService projectInstService; | ||||
@@ -41,15 +41,22 @@ public class ProjectDeclareHandle extends AbstractProcessHandle { | |||||
@Override | @Override | ||||
public ProcessNode getProcessNode() { | public ProcessNode getProcessNode() { | ||||
return ProcessNode.PROJECT_DECLARED; | |||||
return ProcessNode.COMPLIANCE_REVIEW; | |||||
} | } | ||||
@Override | @Override | ||||
public void handle(HandleParamContext ctx) { | public void handle(HandleParamContext ctx) { | ||||
Project project = ctx.getProject(); | |||||
// 项目申报节点 | |||||
ProcessDetailVO startNode = new ProcessDetailVO(); | |||||
startNode.setProcessName(ProcessNode.PROJECT_DECLARED.getName()); | |||||
startNode.setFinishTime(project.getCreateOn()); | |||||
startNode.setStepStatus(StepStatusEnum.COMPLETED); | |||||
ctx.getProcessDetails().add(startNode); | |||||
// 合规性审查 | |||||
ProcessDetailVO detail = new ProcessDetailVO(); | ProcessDetailVO detail = new ProcessDetailVO(); | ||||
detail.setProcessName(getProcessNode().getName()); | detail.setProcessName(getProcessNode().getName()); | ||||
ctx.getProcessDetails().add(detail); | ctx.getProcessDetails().add(detail); | ||||
Project project = ctx.getProject(); | |||||
// 项目状态为待立项批复之前的状态 | // 项目状态为待立项批复之前的状态 | ||||
Map<ProjectStateChangeEvent, ProjectStatusChange> eventMap = projectStatusChangeService.listLastEventMap(project.getProjectCode()); | Map<ProjectStateChangeEvent, ProjectStatusChange> eventMap = projectStatusChangeService.listLastEventMap(project.getProjectCode()); | ||||
ctx.setProjectStatusChanges(eventMap); | ctx.setProjectStatusChanges(eventMap); |