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) 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; + } + /** * 驳回 重新提交建设方案 *