diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java index 3f9cd72..30d61c1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java @@ -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 message) { 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") @@ -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 message) { 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") @@ -165,10 +165,10 @@ public class ProjectDeclareLQAction { 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 message) { 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") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java index d661baa..e39ce26 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java @@ -159,7 +159,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM // 部门联审通过,从部门联审中到年度计划中 .withExternal() .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) - .target(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) + .target(ProjectStatusEnum.PLAN_TO_BE_DECLARED) .event(ProjectStatusChangeEvent.DEPARTMENT_UNITED_REVIEW_PASS).and() // 部门联审驳回,从部门联审中到部门联审不通过 .withExternal() @@ -171,10 +171,11 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) .target(ProjectStatusEnum.PRE_APPLYING) .event(ProjectStatusChangeEvent.DEPARTMENT_JOINT_REVIEW_WITHDRAW).and() - // 年度计划中开启方案申报,从年度计划中到方案待申报 + + // 年度计划中开启方案申报,从年度计划中到立项批复 .withExternal() .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() // 年度计划中暂缓,从年度计划中到被暂缓 .withExternal() @@ -189,7 +190,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM // 方案评审通过,从方案评审中到待立项批复 .withExternal() .source(ProjectStatusEnum.SCHEME_UNDER_REVIEW) - .target(ProjectStatusEnum.TO_BE_APPROVED) + .target(ProjectStatusEnum.IN_THE_ANNUAL_PLAN) .event(ProjectStatusChangeEvent.PLAN_REVIEW_PASS).and() // 方案评审驳回,从方案评审中到方案评审不通过 .withExternal() diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/MachineBuilderFounder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/MachineBuilderFounder.java index 341e580..0416b1c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/MachineBuilderFounder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/MachineBuilderFounder.java @@ -6,6 +6,8 @@ import com.ningdatech.pmapi.common.statemachine.contants.RegionContant; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; import java.util.Map; /** @@ -54,7 +56,8 @@ public class MachineBuilderFounder { @Autowired private ProjectDeclareStateMachineKFQBuilder projectDeclareStateMachineKFQBuilder; - public MachineBuilderFounder(){ + @PostConstruct + public void MachineBuilderFounder(){ machineBuilderMap.put(RegionContant.LS_SBJ_CODE, projectDeclareStateMachineSBJBuilder); machineBuilderMap.put(RegionContant.LS_LD_CODE, projectDeclareStateMachineLDBuilder); machineBuilderMap.put(RegionContant.LS_QT_CODE, projectDeclareStateMachineQTBuilder);