|
|
@@ -34,7 +34,6 @@ import java.util.EnumSet; |
|
|
|
@RequiredArgsConstructor |
|
|
|
public class ProjectDeclareStateMachineBuilder { |
|
|
|
private static final ProjectDeclareGuardFactory projectDeclareGuardFactory = new ProjectDeclareGuardFactory(); |
|
|
|
private static final ProjectDeclareAction projectDeclareAction = new ProjectDeclareAction(); |
|
|
|
private final BeanFactory beanFactory; |
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
|
|
/** |
|
|
@@ -87,6 +86,7 @@ public class ProjectDeclareStateMachineBuilder { |
|
|
|
.source(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS) |
|
|
|
.target(ProjectStatusEnum.UNDER_INTERNAL_AUDIT) |
|
|
|
.event(ProjectStatusChangeEvent.PROJECT_APPLICATION_SUBMIT).and() |
|
|
|
|
|
|
|
// 待预审预审申报,从待预审到待预审选择 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION) |
|
|
@@ -95,8 +95,9 @@ public class ProjectDeclareStateMachineBuilder { |
|
|
|
// 待预审申报,从待预审选择->省级部门联审中,预审中,完成其中一种状态 |
|
|
|
.withChoice() |
|
|
|
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) |
|
|
|
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),projectDeclareAction.new ProjectDeclareChoiceAction()) |
|
|
|
.last(ProjectStatusEnum.PRE_APPLYING,projectDeclareAction.new ProjectDeclareChoiceAction()).and() |
|
|
|
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) |
|
|
|
.last(ProjectStatusEnum.PRE_APPLYING,new ProjectDeclareChoiceAction()).and() |
|
|
|
|
|
|
|
// 省级部门联审通过,从省级部门联审中到省级部门联审成功 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) |
|
|
@@ -112,7 +113,7 @@ public class ProjectDeclareStateMachineBuilder { |
|
|
|
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) |
|
|
|
.target(ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED) |
|
|
|
.event(ProjectStatusChangeEvent.PROVINCIAL_DEPARTMENT_REVIEW_REJECT).and() |
|
|
|
// 省级部门联审中撤回,从省级部门联审中到省级部门联审不通过 |
|
|
|
// 省级部门联审中撤回,从省级部门联审中到待预审 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) |
|
|
|
.target(ProjectStatusEnum.PENDING_PREQUALIFICATION) |
|
|
@@ -128,17 +129,17 @@ public class ProjectDeclareStateMachineBuilder { |
|
|
|
.source(ProjectStatusEnum.PRE_APPLYING) |
|
|
|
.target(ProjectStatusEnum.PREQUALIFICATION_FAILED) |
|
|
|
.event(ProjectStatusChangeEvent.PRELIMINARY_REVIEW_REJECT).and() |
|
|
|
// 预审中撤回,从预审中到待预审选择 |
|
|
|
// 预审中撤回,从预审中到预审中撤回选择态 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.PRE_APPLYING) |
|
|
|
.target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) |
|
|
|
.target(ProjectStatusEnum.PREQUALIFICATION_WITHDRAW_CHOICE) |
|
|
|
.event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and() |
|
|
|
// 预审中撤回,从待预审选择->省级部门联审成功,待预审,完成其中一种状态 |
|
|
|
// 预审中撤回,从预审中撤回选择态->省级部门联审成功,待预审,完成其中一种状态 |
|
|
|
.withChoice() |
|
|
|
.source(ProjectStatusEnum.PRE_APPLYING) |
|
|
|
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard() |
|
|
|
,new ProjectDeclareChoiceAction()) |
|
|
|
.last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() |
|
|
|
.last(ProjectStatusEnum.PENDING_PREQUALIFICATION,new ProjectDeclareChoiceAction()).and() |
|
|
|
// 预审不通过重新提交,从预审不通过到待预审选择 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.PREQUALIFICATION_FAILED) |
|
|
@@ -147,8 +148,8 @@ public class ProjectDeclareStateMachineBuilder { |
|
|
|
// 预审不通过重新提交,从待预审选择->省级部门联审中,预审中,完成其中一种状态 |
|
|
|
.withChoice() |
|
|
|
.source(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) |
|
|
|
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),projectDeclareAction.new ProjectDeclareChoiceAction()) |
|
|
|
.last(ProjectStatusEnum.PRE_APPLYING,projectDeclareAction.new ProjectDeclareChoiceAction()).and() |
|
|
|
.first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) |
|
|
|
.last(ProjectStatusEnum.PRE_APPLYING,new ProjectDeclareChoiceAction()).and() |
|
|
|
// 部门联审通过,从部门联审中到年度计划中 |
|
|
|
.withExternal() |
|
|
|
.source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) |
|
|
|