@@ -109,10 +109,10 @@ public class ProjectDeclareLQAction { | |||||
} | } | ||||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "IN_THE_ANNUAL_PLAN") | |||||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "PLAN_TO_BE_DECLARED") | |||||
public void DEPARTMENT_UNITED_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | public void DEPARTMENT_UNITED_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | ||||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | ||||
project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode()); | |||||
project.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); | |||||
} | } | ||||
@OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "DEPARTMENT_JOINT_REVIEW_FAILED") | @OnTransition(source = "DEPARTMENT_JOINT_REVIEW", target = "DEPARTMENT_JOINT_REVIEW_FAILED") | ||||
@@ -128,10 +128,10 @@ public class ProjectDeclareLQAction { | |||||
} | } | ||||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "PLAN_TO_BE_DECLARED") | |||||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "TO_BE_APPROVED") | |||||
public void ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE(Message<ProjectStatusChangeEvent> message) { | public void ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE(Message<ProjectStatusChangeEvent> message) { | ||||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | ||||
project.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); | |||||
project.setStatus(ProjectStatusEnum.TO_BE_APPROVED.getCode()); | |||||
} | } | ||||
@OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "BE_SUSPENDED") | @OnTransition(source = "IN_THE_ANNUAL_PLAN", target = "BE_SUSPENDED") | ||||
@@ -165,10 +165,10 @@ public class ProjectDeclareLQAction { | |||||
project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); | ||||
} | } | ||||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "TO_BE_APPROVED") | |||||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "IN_THE_ANNUAL_PLAN") | |||||
public void PLAN_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | public void PLAN_REVIEW_PASS(Message<ProjectStatusChangeEvent> message) { | ||||
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); | ||||
project.setStatus(ProjectStatusEnum.TO_BE_APPROVED.getCode()); | |||||
project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode()); | |||||
} | } | ||||
@OnTransition(source = "SCHEME_UNDER_REVIEW", target = "SCHEME_REVIEW_FAILED") | @OnTransition(source = "SCHEME_UNDER_REVIEW", target = "SCHEME_REVIEW_FAILED") | ||||
@@ -159,7 +159,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM | |||||
// 部门联审通过,从部门联审中到年度计划中 | // 部门联审通过,从部门联审中到年度计划中 | ||||
.withExternal() | .withExternal() | ||||
.source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) | .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) | ||||
.target(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) | |||||
.target(ProjectStatusEnum.PLAN_TO_BE_DECLARED) | |||||
.event(ProjectStatusChangeEvent.DEPARTMENT_UNITED_REVIEW_PASS).and() | .event(ProjectStatusChangeEvent.DEPARTMENT_UNITED_REVIEW_PASS).and() | ||||
// 部门联审驳回,从部门联审中到部门联审不通过 | // 部门联审驳回,从部门联审中到部门联审不通过 | ||||
.withExternal() | .withExternal() | ||||
@@ -171,10 +171,11 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM | |||||
.source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) | .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) | ||||
.target(ProjectStatusEnum.PRE_APPLYING) | .target(ProjectStatusEnum.PRE_APPLYING) | ||||
.event(ProjectStatusChangeEvent.DEPARTMENT_JOINT_REVIEW_WITHDRAW).and() | .event(ProjectStatusChangeEvent.DEPARTMENT_JOINT_REVIEW_WITHDRAW).and() | ||||
// 年度计划中开启方案申报,从年度计划中到方案待申报 | |||||
// 年度计划中开启方案申报,从年度计划中到立项批复 | |||||
.withExternal() | .withExternal() | ||||
.source(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) | .source(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) | ||||
.target(ProjectStatusEnum.PLAN_TO_BE_DECLARED) | |||||
.target(ProjectStatusEnum.TO_BE_APPROVED) | |||||
.event(ProjectStatusChangeEvent.ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE).and() | .event(ProjectStatusChangeEvent.ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE).and() | ||||
// 年度计划中暂缓,从年度计划中到被暂缓 | // 年度计划中暂缓,从年度计划中到被暂缓 | ||||
.withExternal() | .withExternal() | ||||
@@ -189,7 +190,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM | |||||
// 方案评审通过,从方案评审中到待立项批复 | // 方案评审通过,从方案评审中到待立项批复 | ||||
.withExternal() | .withExternal() | ||||
.source(ProjectStatusEnum.SCHEME_UNDER_REVIEW) | .source(ProjectStatusEnum.SCHEME_UNDER_REVIEW) | ||||
.target(ProjectStatusEnum.TO_BE_APPROVED) | |||||
.target(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) | |||||
.event(ProjectStatusChangeEvent.PLAN_REVIEW_PASS).and() | .event(ProjectStatusChangeEvent.PLAN_REVIEW_PASS).and() | ||||
// 方案评审驳回,从方案评审中到方案评审不通过 | // 方案评审驳回,从方案评审中到方案评审不通过 | ||||
.withExternal() | .withExternal() | ||||
@@ -6,6 +6,8 @@ import com.ningdatech.pmapi.common.statemachine.contants.RegionContant; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import javax.annotation.PostConstruct; | |||||
import java.util.Map; | import java.util.Map; | ||||
/** | /** | ||||
@@ -54,7 +56,8 @@ public class MachineBuilderFounder { | |||||
@Autowired | @Autowired | ||||
private ProjectDeclareStateMachineKFQBuilder projectDeclareStateMachineKFQBuilder; | private ProjectDeclareStateMachineKFQBuilder projectDeclareStateMachineKFQBuilder; | ||||
public MachineBuilderFounder(){ | |||||
@PostConstruct | |||||
public void MachineBuilderFounder(){ | |||||
machineBuilderMap.put(RegionContant.LS_SBJ_CODE, projectDeclareStateMachineSBJBuilder); | machineBuilderMap.put(RegionContant.LS_SBJ_CODE, projectDeclareStateMachineSBJBuilder); | ||||
machineBuilderMap.put(RegionContant.LS_LD_CODE, projectDeclareStateMachineLDBuilder); | machineBuilderMap.put(RegionContant.LS_LD_CODE, projectDeclareStateMachineLDBuilder); | ||||
machineBuilderMap.put(RegionContant.LS_QT_CODE, projectDeclareStateMachineQTBuilder); | machineBuilderMap.put(RegionContant.LS_QT_CODE, projectDeclareStateMachineQTBuilder); | ||||