From fc2715fe3f81dd57909e2f22c19c528ff83d3074 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 31 Jul 2023 16:10:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=BB=E5=B9=B2=E9=80=80=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/statemachine/action/ProjectDeclareAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareJNAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareJYAction.java | 8 +------- .../common/statemachine/action/ProjectDeclareKFBAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareLDAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareLQAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareQTAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareQYAction.java | 8 +------- .../common/statemachine/action/ProjectDeclareSBJAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareSCAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareSYAction.java | 8 +------- .../pmapi/common/statemachine/action/ProjectDeclareYHAction.java | 8 +------- .../builder/ProjectDeclareStateMachineJNBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineJYBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineKFQBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineLDBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineLQBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineQTBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineQYBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineSBJBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineSCBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineSYBuilder.java | 9 ++------- .../builder/ProjectDeclareStateMachineYHBuilder.java | 9 ++------- 23 files changed, 34 insertions(+), 161 deletions(-) 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 d82d21b..044d908 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 @@ -209,15 +209,9 @@ public class ProjectDeclareAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java index 6d16ba6..ffa8ae0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java @@ -206,15 +206,9 @@ public class ProjectDeclareJNAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java index 106bcd5..eb1ab5d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareJYAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java index a58b1e0..bff3743 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareKFBAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java index 3dea7b8..8fbcf3a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareLDAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } 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 acde109..f87fa91 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 @@ -205,15 +205,9 @@ public class ProjectDeclareLQAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java index d5269cc..9c4a19a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareQTAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java index afaee56..4117798 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareQYAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java index 56044ea..466fb16 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareSBJAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java index 436cf3a..d1351c6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java @@ -213,15 +213,9 @@ public class ProjectDeclareSCAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java index 7f8d38c..0f54f1f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareSYAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java index 1498589..4d78f52 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java @@ -205,15 +205,9 @@ public class ProjectDeclareYHAction { } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") + @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); - project.setStatus(ProjectStatusEnum.OPERATION.getCode()); - } - - @OnTransition(source = "OPERATION", target = "UNDER_CONSTRUCTION") - public void START_TO_WORK(Message message) { - Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java index d77704f..0ef1da6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineJNBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java index 8ddc583..342220b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineJYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java index 37becf2..f25cacb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineKFQBuilder implements ProjectDeclareState .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java index 4c5187e..1b5f4fa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineLDBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) 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 db9f3a5..e6dfb16 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 @@ -212,16 +212,11 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java index e1b3c00..2656ba4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineQTBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java index 690d7ff..e65d761 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineQYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java index 9178ee3..40d38b4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java @@ -212,16 +212,11 @@ public class ProjectDeclareStateMachineSBJBuilder implements ProjectDeclareState .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java index e2bd06f..f432e34 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java @@ -221,16 +221,11 @@ public class ProjectDeclareStateMachineSCBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APP_REGISTER) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.REGISTER_APP).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java index ca854dd..9a7b257 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineSYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java index ac57d56..cb7b103 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java @@ -211,16 +211,11 @@ public class ProjectDeclareStateMachineYHBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_APPROVED) .target(ProjectStatusEnum.TO_BE_PURCHASED) .event(ProjectStatusChangeEvent.PROJECT_APPROVAL).and() - // 待采购采购备案,从待采购到实施中 + // 待采购采购备案,从待采购到建设中 .withExternal() .source(ProjectStatusEnum.TO_BE_PURCHASED) - .target(ProjectStatusEnum.OPERATION) - .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() - // 待开工 实施,从实施到建设中 - .withExternal() - .source(ProjectStatusEnum.OPERATION) .target(ProjectStatusEnum.UNDER_CONSTRUCTION) - .event(ProjectStatusChangeEvent.START_TO_WORK).and() + .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() // 建设中初验备案,从建设中到待终验 .withExternal() .source(ProjectStatusEnum.UNDER_CONSTRUCTION) From 78312b528a78b53f26a6debfcbfe1a76bb6ffce3 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Mon, 31 Jul 2023 17:59:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E5=90=8E=20=E8=B0=83=E7=94=A8=E7=8A=B6=E6=80=81=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ConstructionPlanManage.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index 296cfb4..ce6f302 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -175,7 +175,13 @@ public class ConstructionPlanManage { log.info("建设方案项目申报成功 【{}】", instanceId); // 保存建设项目相关 - Project buildProject = projectLibManage.saveConstructProjectInDeclared(projectInfo,instanceId,employeeCode,oldProject); + Project buildProject = new Project(); + if(dto.getRestart()){ + //如果是重新提交 不用生成新版本 前面已经生成过了 + buildProject = contructionPlanModifyProject(oldProject, instanceId); + }else{ + buildProject = projectLibManage.saveConstructProjectInDeclared(projectInfo,instanceId,employeeCode,oldProject); + } //发送给第一个审批人消息 noticeManage.sendFirtUser(buildProject,model.getFormName(),instanceId, @@ -184,6 +190,24 @@ public class ConstructionPlanManage { return instanceId; } + private Project contructionPlanModifyProject(Project project, String instanceId) { + stateMachineUtils.pass(project); + project.setUpdateOn(LocalDateTime.now()); + project.setInstCode(instanceId); + projectService.updateById(project); + + //保存项目和实例的关系 + ProjectInst projectInst = new ProjectInst(); + projectInst.setProjectId(project.getId()); + projectInst.setInstCode(instanceId); + projectInst.setCreatOn(LocalDateTime.now()); + projectInst.setUpdateOn(LocalDateTime.now()); + projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode()); + projectInstService.save(projectInst); + + return project; + } + /** * 驳回 重新提交建设方案 *