Explorar el Código

实施管理

master
PoffyZhang hace 1 año
padre
commit
f617873d8a
Se han modificado 35 ficheros con 515 adiciones y 36 borrados
  1. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java
  2. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java
  3. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java
  4. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java
  5. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java
  6. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java
  7. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java
  8. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java
  9. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java
  10. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java
  11. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java
  12. +7
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java
  13. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java
  14. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java
  15. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java
  16. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java
  17. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java
  18. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java
  19. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java
  20. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java
  21. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java
  22. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java
  23. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java
  24. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/event/ProjectStatusChangeEvent.java
  25. +42
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/OperationController.java
  26. +79
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/OperationManage.java
  27. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/OperationMapper.java
  28. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/OperationMapper.xml
  29. +49
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/OperationDTO.java
  30. +59
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/Operation.java
  31. +55
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/OperationVO.java
  32. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IOperationService.java
  33. +21
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/OperationServiceImpl.java
  34. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java
  35. +5
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java Ver fichero

@@ -209,9 +209,15 @@ public class ProjectDeclareAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJNAction.java Ver fichero

@@ -206,9 +206,15 @@ public class ProjectDeclareJNAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareJYAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareJYAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareKFBAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareKFBAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLDAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareLDAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareLQAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareLQAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQTAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareQTAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareQYAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareQYAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSBJAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareSBJAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSCAction.java Ver fichero

@@ -213,9 +213,15 @@ public class ProjectDeclareSCAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareSYAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareSYAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareYHAction.java Ver fichero

@@ -205,9 +205,15 @@ public class ProjectDeclareYHAction {
}


@OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION")
@OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION")
public void PURCHASE_PUT_ON_RECORD(Message<ProjectStatusChangeEvent> 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<ProjectStatusChangeEvent> message) {
Project project = (Project) message.getHeaders().get(PROJECT_DECLARE);
project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode());
}



+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java Ver fichero

@@ -212,11 +212,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java Ver fichero

@@ -212,11 +212,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java Ver fichero

@@ -221,11 +221,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java Ver fichero

@@ -211,11 +211,16 @@ 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.UNDER_CONSTRUCTION)
.target(ProjectStatusEnum.OPERATION)
.event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and()
// 待开工 实施,从实施到建设中
.withExternal()
.source(ProjectStatusEnum.OPERATION)
.target(ProjectStatusEnum.UNDER_CONSTRUCTION)
.event(ProjectStatusChangeEvent.START_TO_WORK).and()
// 建设中初验备案,从建设中到待终验
.withExternal()
.source(ProjectStatusEnum.UNDER_CONSTRUCTION)


+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/event/ProjectStatusChangeEvent.java Ver fichero

@@ -111,9 +111,14 @@ public enum ProjectStatusChangeEvent {
*/
REGISTER_APP(ProjectStatusEnum.TO_BE_APP_REGISTER.getCode(), null, null),
/**
* 采购备案(项目状态变为:建设中)
* 采购备案(项目状态变为:待开工)
*/
PURCHASE_PUT_ON_RECORD(ProjectStatusEnum.TO_BE_PURCHASED.getCode(), null, null),

/**
* 开工 到建设中
*/
START_TO_WORK(ProjectStatusEnum.OPERATION.getCode(), null,null),
/**
* 初验备案(项目状态变为:待终验)
*/


+ 42
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/OperationController.java Ver fichero

@@ -0,0 +1,42 @@
package com.ningdatech.pmapi.projectdeclared.controller;

import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.projectdeclared.manage.OperationManage;
import com.ningdatech.pmapi.projectdeclared.model.dto.OperationDTO;
import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
* @Classname OperationController
* @Description 申报项目-实施
* @Date 2023/7/31 09:29
* @Author PoffyZhang
*/
@Slf4j
@Validated
@RestController
@RequestMapping("/api/v1/declared/operation")
@Api(value = "OperationController", tags = "申报管理-实施")
@RequiredArgsConstructor
public class OperationController {
private final OperationManage operationManage;

@ApiOperation(value = "实施详情", notes = "实施详情")
@GetMapping("/detail/{projectId}")
public OperationVO detail(@PathVariable Long projectId) {
return operationManage.detail(projectId);
}

@GetMapping("/push-operation")
@ApiOperation("推送实施信息")
@WebLog("推送实施信息")
public String pushOperation(@RequestBody OperationDTO operation) {
return operationManage.pushOperation(operation);
}

}

+ 79
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/OperationManage.java Ver fichero

@@ -0,0 +1,79 @@
package com.ningdatech.pmapi.projectdeclared.manage;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.projectdeclared.model.dto.OperationDTO;
import com.ningdatech.pmapi.projectdeclared.model.entity.Operation;
import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO;
import com.ningdatech.pmapi.projectdeclared.service.IOperationService;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.Objects;

/**
* @Classname OperationManage
* @Description
* @Date 2023/7/31 14:48
* @Author PoffyZhang
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class OperationManage {

private final IOperationService operationService;

private final IProjectService projectService;

/**
* 获取实施详情
* @param projectId
* @return
*/
public OperationVO detail(Long projectId) {
Project project = projectService.getNewProject(projectId);
VUtils.isTrue(Objects.isNull(project))
.throwMessage("项目不存在!");

Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class)
.eq(Operation::getProjectId, project.getProjectCode())
.last(BizConst.LIMIT_1));

return BeanUtil.copyProperties(operation,OperationVO.class);
}

public String pushOperation(OperationDTO operation) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();

Project project = projectService.getNewProject(operation.getProjectId());
VUtils.isTrue(Objects.isNull(project))
.throwMessage("项目不存在!");

Operation old = operationService.getOne(Wrappers.lambdaQuery(Operation.class)
.eq(Operation::getProjectId, project.getProjectCode())
.last(BizConst.LIMIT_1));

Operation entity = BeanUtil.copyProperties(operation, Operation.class);
if(Objects.nonNull(old)){
entity.setId(old.getId());
}else{
entity.setCreateOn(LocalDateTime.now());
entity.setCreateBy(user.getUsername());
}
entity.setProjectCode(project.getProjectCode());
entity.setUpdateOn(LocalDateTime.now());
entity.setUpdateBy(user.getUsername());
operationService.saveOrUpdate(entity);

return entity.getProjectCode();
}
}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/OperationMapper.java Ver fichero

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.projectdeclared.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ningdatech.pmapi.projectdeclared.model.entity.Operation;

/**
* <p>
* Mapper 接口
* </p>
*
* @author zpf
* @since 2023-02-05
*/
public interface OperationMapper extends BaseMapper<Operation> {

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/OperationMapper.xml Ver fichero

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ningdatech.pmapi.projectdeclared.mapper.OperationMapper">

</mapper>

+ 49
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/OperationDTO.java Ver fichero

@@ -0,0 +1,49 @@
package com.ningdatech.pmapi.projectdeclared.model.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
* @Classname OperationDTO
* @Description
* @Date 2023/5/29 10:00
* @Author PoffyZhang
*/
@ApiModel(value = "实施对象DTO", description = "实施对象DTO")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OperationDTO {

@ApiModelProperty("项目ID")
@NotNull(message = "项目ID不能为空")
private Long projectId;

@ApiModelProperty("项目Code")
private String projectCode;

@ApiModelProperty("项目开工时间")
@NotNull(message = "项目开工时间不能为空")
private LocalDateTime projectStartDate;

@ApiModelProperty("初验时间")
@NotNull(message = "初验时间不能为空")
private LocalDateTime initialInspectionDate;

@ApiModelProperty("终验时间")
@NotNull(message = "终验时间不能为空")
private LocalDateTime finalInspectionDate;

@ApiModelProperty("开始实施时间")
@NotNull(message = "开始实施时间不能为空")
private LocalDateTime startTrialOperationDate;
}

+ 59
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/Operation.java Ver fichero

@@ -0,0 +1,59 @@
package com.ningdatech.pmapi.projectdeclared.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

/**
* @Classname Operation
* @Description
* @Date 2023/5/29 10:00
* @Author PoffyZhang
*/
@TableName("nd_project_operation")
@ApiModel(value = "实施对象", description = "实施对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Operation {

@TableId(type = IdType.AUTO)
@ApiModelProperty("id")
private Long id;

@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目Code")
private String projectCode;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("创建人 工号")
private String createBy;

@ApiModelProperty("修改人 工号")
private String updateBy;

@ApiModelProperty("项目开工时间")
private LocalDateTime projectStartDate;

@ApiModelProperty("初验时间")
private LocalDateTime initialInspectionDate;

@ApiModelProperty("终验时间")
private LocalDateTime finalInspectionDate;

@ApiModelProperty("开始实施时间")
private LocalDateTime startTrialOperationDate;
}

+ 55
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/OperationVO.java Ver fichero

@@ -0,0 +1,55 @@
package com.ningdatech.pmapi.projectdeclared.model.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
* @Classname Operation
* @Description
* @Date 2023/5/29 10:00
* @Author PoffyZhang
*/
@ApiModel(value = "实施对象", description = "实施对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OperationVO {

@ApiModelProperty("id")
private Long id;

@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目Code")
private String projectCode;

@ApiModelProperty("创建时间")
private LocalDateTime createOn;

@ApiModelProperty("修改时间")
private LocalDateTime updateOn;

@ApiModelProperty("创建人 工号")
private String createBy;

@ApiModelProperty("修改人 工号")
private String updateBy;

@ApiModelProperty("项目开工时间")
private LocalDateTime projectStartDate;

@ApiModelProperty("初验时间")
private LocalDateTime initialInspectionDate;

@ApiModelProperty("终验时间")
private LocalDateTime finalInspectionDate;

@ApiModelProperty("开始实施时间")
private LocalDateTime startTrialOperationDate;
}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IOperationService.java Ver fichero

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.projectdeclared.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ningdatech.pmapi.projectdeclared.model.entity.Operation;

/**
* <p>
* 服务类
* </p>
*
* @author zpf
* @since 2023-05-29
*/
public interface IOperationService extends IService<Operation> {

}

+ 21
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/OperationServiceImpl.java Ver fichero

@@ -0,0 +1,21 @@
package com.ningdatech.pmapi.projectdeclared.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.pmapi.projectdeclared.mapper.OperationMapper;
import com.ningdatech.pmapi.projectdeclared.model.entity.Operation;
import com.ningdatech.pmapi.projectdeclared.service.IOperationService;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author zpf
* @since 2023-02-05
*/
@Service
public class OperationServiceImpl extends ServiceImpl<OperationMapper, Operation>
implements IOperationService {

}

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java Ver fichero

@@ -53,6 +53,7 @@ public enum ProjectStatusEnum {
TO_BE_FINALLY_INSPECTED(20003, "待终验"),
FINAL_ACCEPTANCE_IS_UNDER_REVIEW(20004, "终验审核中"),
FINAL_ACCEPTANCE_REVIEW_FAILED(20005, "终验审核不通过"),
OPERATION(20006, "待开工"),
/**
* 项目阶段:已归档
*/


+ 5
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Ver fichero

@@ -184,7 +184,11 @@ public class TodoCenterManage {
List<ProjectInst> projectInstList = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, projectIdList)
.orderByDesc(ProjectInst::getProjectId));
Map<String, Project> projectInfoMap = projectInstList.stream().collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
Map<String, Project> projectInfoMap = projectInstList.stream()
.filter(p -> StringUtils.isNotBlank(p.getInstCode()) &&
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode()))
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));

List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList());
if (CollUtil.isEmpty(instCodes)) {
return PageVo.empty();


Cargando…
Cancelar
Guardar