@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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()); | |||
} | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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) | |||
@@ -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), | |||
/** | |||
* 初验备案(项目状态变为:待终验) | |||
*/ | |||
@@ -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); | |||
} | |||
} |
@@ -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(); | |||
} | |||
} |
@@ -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> { | |||
} |
@@ -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> |
@@ -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; | |||
} |
@@ -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; | |||
} |
@@ -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; | |||
} |
@@ -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> { | |||
} |
@@ -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 { | |||
} |
@@ -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, "待开工"), | |||
/** | |||
* 项目阶段:已归档 | |||
*/ | |||
@@ -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(); | |||