From 9cd10f618844c8b79a532090bac01652f5ce6647 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 21 Mar 2023 17:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=B7=AF=E5=BE=84=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../statemachine/action/ProjectDeclareAction.java | 12 ++++++++- .../builder/ProjectDeclareStateMachineBuilder.java | 30 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java index 6a301f8..adc371c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java @@ -43,6 +43,12 @@ public class ProjectDeclareAction { project.setStatus(ProjectStatusEnum.TO_BE_DECLARED.getCode()); } + @OnTransition(source = "UNDER_INTERNAL_AUDIT_NOT_PASS", target = "UNDER_INTERNAL_AUDIT") + public void UNDER_INTERNAL_RESUBMIT(Message message) { + Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); + project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); + } + @OnTransition(source = "PENDING_PREQUALIFICATION", target = "PENDING_PREQUALIFICATION_CHOICE") public void PRELIMINARY_REVIEW_DECLARE(Message message) { @@ -75,7 +81,6 @@ public class ProjectDeclareAction { project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); } - @OnTransition(source = "PRE_APPLYING", target = "DEPARTMENT_JOINT_REVIEW") public void PRELIMINARY_REVIEW_PASS(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); @@ -145,6 +150,11 @@ public class ProjectDeclareAction { project.setStatus(ProjectStatusEnum.IN_THE_ANNUAL_PLAN.getCode()); } + @OnTransition(source = "SCHEME_REVIEW_FAILED", target = "SCHEME_UNDER_REVIEW") + public void DECLARE_PLAN_RESUBMIT(Message message) { + Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); + project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); + } @OnTransition(source = "SCHEME_UNDER_REVIEW", target = "TO_BE_APPROVED") public void PLAN_REVIEW_PASS(Message message) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java index e34eb3f..5b12b97 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java @@ -82,6 +82,11 @@ public class ProjectDeclareStateMachineBuilder { .source(ProjectStatusEnum.UNDER_INTERNAL_AUDIT) .target(ProjectStatusEnum.TO_BE_DECLARED) .event(ProjectStatusChangeEvent.UNDER_INTERNAL_WITHDRAW).and() + // 单位内部审核不通过重新提交,从单位内部审核不通过到单位内部审核中 + .withExternal() + .source(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS) + .target(ProjectStatusEnum.UNDER_INTERNAL_AUDIT) + .event(ProjectStatusChangeEvent.PROJECT_APPLICATION_SUBMIT).and() // 待预审预审申报,从待预审到待预审选择 .withExternal() .source(ProjectStatusEnum.PENDING_PREQUALIFICATION) @@ -107,6 +112,16 @@ public class ProjectDeclareStateMachineBuilder { .source(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS) .target(ProjectStatusEnum.PENDING_PREQUALIFICATION) .event(ProjectStatusChangeEvent.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_WITHDRAW).and() + // 省级部门联审不通过重新申报,从省级部门联审不通过到待预审选择 + .withExternal() + .source(ProjectStatusEnum.PRE_APPLYING) + .target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) + .event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and() + // 省级部门联审不通过重新申报,从待预审选择->省级部门联审中,待预审,完成其中一种状态 + .withChoice() + .source(ProjectStatusEnum.PRE_APPLYING) + .first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) + .last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() // 预审通过,从预审中到部门联审中 .withExternal() .source(ProjectStatusEnum.PRE_APPLYING) @@ -127,6 +142,16 @@ public class ProjectDeclareStateMachineBuilder { .source(ProjectStatusEnum.PRE_APPLYING) .first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) .last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() + // 预审不通过重新提交,从预审不通过到待预审选择 + .withExternal() + .source(ProjectStatusEnum.PREQUALIFICATION_FAILED) + .target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) + .event(ProjectStatusChangeEvent.PRELIMINARY_REVIEW_DECLARE).and() + // 预审不通过重新提交,从待预审选择->省级部门联审中,预审中,完成其中一种状态 + .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() // 部门联审通过,从部门联审中到年度计划中 .withExternal() .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) @@ -172,6 +197,11 @@ public class ProjectDeclareStateMachineBuilder { .source(ProjectStatusEnum.SCHEME_UNDER_REVIEW) .target(ProjectStatusEnum.PLAN_TO_BE_DECLARED) .event(ProjectStatusChangeEvent.SCHEME_UNDER_REVIEW_WITHDRAW).and() + // 方案评审不通过重新提交,从方案评审不通过到方案评审中 + .withExternal() + .source(ProjectStatusEnum.SCHEME_REVIEW_FAILED) + .target(ProjectStatusEnum.SCHEME_UNDER_REVIEW) + .event(ProjectStatusChangeEvent.DECLARE_PLAN).and() // 待立项批复批复,从待立项批复到待采购 .withExternal() .source(ProjectStatusEnum.TO_BE_APPROVED)