From 475539be71cc66b303cd5eceb15ad67238804482 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 09:52:18 +0800 Subject: [PATCH 01/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E6=94=BE=E5=85=A5=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectLibManage.java | 23 +++++++++++----------- .../pmapi/projectlib/model/vo/ProjectDetailVO.java | 4 ++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 177679e..44d3c7a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -35,18 +35,9 @@ import com.ningdatech.pmapi.performance.model.dto.ProjectCoreBusinessDTO; import com.ningdatech.pmapi.performance.model.entity.ProjectCoreBusinessIndicators; import com.ningdatech.pmapi.performance.service.IProjectCoreBusinessIndicatorsService; import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO; -import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; -import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; -import com.ningdatech.pmapi.projectdeclared.model.entity.PreInsAcceptancePerson; -import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; -import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; -import com.ningdatech.pmapi.projectdeclared.service.IContractService; -import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; -import com.ningdatech.pmapi.projectdeclared.service.IPreInsAcceptancePersonService; -import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService; +import com.ningdatech.pmapi.projectdeclared.model.entity.*; +import com.ningdatech.pmapi.projectdeclared.model.vo.*; +import com.ningdatech.pmapi.projectdeclared.service.*; import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; import com.ningdatech.pmapi.projectlib.constant.ProjectConstant; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; @@ -114,6 +105,8 @@ public class ProjectLibManage { private final ITodoService todoService; private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; + private final IOperationService operationService; + public PageVo projectLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); query.eq(Project::getNewest, Boolean.TRUE); @@ -746,6 +739,12 @@ public class ProjectLibManage { contractVO.getTotalAmount())); } + //查询实施信息 + Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) + .in(Operation::getProjectId, allVersionProjectId) + .orderByAsc(Operation::getCreateOn) + .last(BizConst.LIMIT_1)); + vo.setOperation(BeanUtil.copyProperties(operation, OperationVO.class)); //查询初验信息 List acceptancePersons = acceptancePersonService.list(Wrappers.lambdaQuery(PreInsAcceptancePerson.class) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 21ded6a..522efdb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -7,6 +7,7 @@ import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; @@ -374,6 +375,9 @@ public class ProjectDetailVO { @ApiModelProperty("初审人员") private List acceptancePersons; + @ApiModelProperty("实施信息") + private OperationVO operation; + @ApiModelProperty("版本号str") private String versionStr; From cf6b01258c214887f776a4000324d9404ace7479 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 10:37:08 +0800 Subject: [PATCH 02/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA=E4=BF=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/statemachine/action/ProjectDeclareAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareJNAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareJYAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareKFBAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareLDAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareLQAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareQTAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareQYAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareSBJAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareSCAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareSYAction.java | 1 - .../pmapi/common/statemachine/action/ProjectDeclareYHAction.java | 1 - .../common/statemachine/builder/ProjectDeclareStateMachineJNBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineJYBuilder.java | 1 + .../statemachine/builder/ProjectDeclareStateMachineKFQBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineLDBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineLQBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineQTBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineQYBuilder.java | 1 + .../statemachine/builder/ProjectDeclareStateMachineSBJBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineSCBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineSYBuilder.java | 1 + .../common/statemachine/builder/ProjectDeclareStateMachineYHBuilder.java | 1 + 23 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java index d82d21b..1cf9af9 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 @@ -214,7 +214,6 @@ public class ProjectDeclareAction { 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); 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..868d2f8 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 @@ -211,7 +211,6 @@ public class ProjectDeclareJNAction { 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); 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..e5b4081 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 @@ -204,7 +204,6 @@ public class ProjectDeclareJYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..a72963f 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 @@ -204,7 +204,6 @@ public class ProjectDeclareKFBAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..7ac6a59 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 @@ -204,7 +204,6 @@ public class ProjectDeclareLDAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..4c6e792 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 @@ -204,7 +204,6 @@ public class ProjectDeclareLQAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..6d127ac 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 @@ -204,7 +204,6 @@ public class ProjectDeclareQTAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..9906c7d 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 @@ -204,7 +204,6 @@ public class ProjectDeclareQYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..b83c62a 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 @@ -204,7 +204,6 @@ public class ProjectDeclareSBJAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..c5e6db5 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 @@ -212,7 +212,6 @@ public class ProjectDeclareSCAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..e515925 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 @@ -204,7 +204,6 @@ public class ProjectDeclareSYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") public void PURCHASE_PUT_ON_RECORD(Message message) { Project project = (Project) message.getHeaders().get(PROJECT_DECLARE); 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..9fe7b1b 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 @@ -210,7 +210,6 @@ public class ProjectDeclareYHAction { 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); 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..6699f8a 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineJNBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..0e1e70b 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineJYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..a9c54d0 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineKFQBuilder implements ProjectDeclareState .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..575ff1a 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineLDBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..737d7f5 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 @@ -217,6 +217,7 @@ public class ProjectDeclareStateMachineLQBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..43dae81 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineQTBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..617c7d7 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineQYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..c321412 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 @@ -217,6 +217,7 @@ public class ProjectDeclareStateMachineSBJBuilder implements ProjectDeclareState .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..eddf681 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 @@ -226,6 +226,7 @@ public class ProjectDeclareStateMachineSCBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..048aac5 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineSYBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) 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..e7bbd74 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 @@ -216,6 +216,7 @@ public class ProjectDeclareStateMachineYHBuilder implements ProjectDeclareStateM .source(ProjectStatusEnum.TO_BE_PURCHASED) .target(ProjectStatusEnum.OPERATION) .event(ProjectStatusChangeEvent.PURCHASE_PUT_ON_RECORD).and() + // 待开工 实施,从实施到建设中 .withExternal() .source(ProjectStatusEnum.OPERATION) From a3070118334ad7845c1f05a5b4921cf1fb3f5acf Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:20:52 +0800 Subject: [PATCH 03/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/controller/EarlyWarningController.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java new file mode 100644 index 0000000..d446d01 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.sys.controller; + +import com.ningdatech.log.annotation.WebLog; +import com.wflow.bean.dto.WflowEarlyWarningDTO; +import com.wflow.bean.vo.WflowEarlyWarningVO; +import com.wflow.service.IEarlyWarningService; +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 EarlyWarningController + * @Description + * @Date 2023/8/01 14:28 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/sys/early-warning") +@Api(value = "EarlyWarning", tags = "系统管理-预警规则") +@RequiredArgsConstructor +public class EarlyWarningController { + + private final IEarlyWarningService earlyWarningService; + + @ApiOperation(value = "预警规则获取", notes = "预警规则获取") + @GetMapping("/detail/{regionCode}") + public WflowEarlyWarningVO detail(@PathVariable String regionCode) { + return earlyWarningService.detailByRegion(regionCode); + } + + @ApiOperation(value = "预警规则保存", notes = "预警规则保存") + @PostMapping("/save") + @WebLog("预警规则保存") + public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { + return earlyWarningService.saveByDto(dto); + } +} From 10e43a8c61601de59b078b146bcca409e891a38a Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:34:26 +0800 Subject: [PATCH 04/39] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/controller/ProjectApplicationController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java index 7ea6617..a5b7123 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java @@ -6,14 +6,10 @@ import com.ningdatech.pmapi.projectlib.manage.ApplicationManage; import com.ningdatech.pmapi.projectlib.model.dto.ApplicationAppCodeSaveDTO; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; -import com.ningdatech.pmapi.user.util.LoginUserUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; - import javax.validation.Valid; /** From 11269df2e062d3873713418efac71cdf82a08aaa Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 05/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index d446d01..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -28,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{regionCode}") - public WflowEarlyWarningVO detail(@PathVariable String regionCode) { - return earlyWarningService.detailByRegion(regionCode); + @GetMapping("/detail/{areaCode}") + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + return earlyWarningService.detailByRegion(areaCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 1cd390f3e2a47ea2dec892664e674818f24fca0a Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:39:20 +0800 Subject: [PATCH 06/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99=20?= =?UTF-8?q?=E5=8C=BA=E5=9F=9FCODE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index d446d01..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -28,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{regionCode}") - public WflowEarlyWarningVO detail(@PathVariable String regionCode) { - return earlyWarningService.detailByRegion(regionCode); + @GetMapping("/detail/{areaCode}") + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + return earlyWarningService.detailByRegion(areaCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 056bdff31cc972325fbad1b1334d9802762baccd Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:01:40 +0800 Subject: [PATCH 07/39] =?UTF-8?q?debug=20=E9=A2=84=E5=AE=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java | 2 +- .../java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index fe7bea6..a03920e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -154,7 +154,7 @@ public class DeclaredProjectManage { Project project = new Project(); BeanUtils.copyProperties(projectInfo,project); Map orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,project); - String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); + String instanceId = processService.startProcessLs(model, params,orgModelMap); log.info("申报项目成功 【{}】", instanceId); //如果是重新提交的话 判断下 项目是否存在 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 177679e..1fb877f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -903,7 +903,8 @@ public class ProjectLibManage { // 查询应用 List applications = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) .eq(ProjectApplication::getProjectCode, vo.getProjectCode()) - .eq(ProjectApplication::getIsConstruct, Boolean.FALSE)); + .eq(ProjectApplication::getIsConstruct, Boolean.FALSE) + .eq(ProjectApplication::getProjectVersion, projectInfo.getVersion())); Optional.ofNullable(applications).ifPresent(apps -> vo.setProjectApplications(CollUtils.convert(apps, From 5a2013c8069e795478d1c75ebb9a395a5e62e713 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 08/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 292b9c4eaddbf89125dd440dff152716cb1189ca Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 09:52:18 +0800 Subject: [PATCH 09/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E6=94=BE=E5=85=A5=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectLibManage.java | 23 +++++++++++----------- .../pmapi/projectlib/model/vo/ProjectDetailVO.java | 4 ++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 810d0ab..6c9e029 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -35,18 +35,9 @@ import com.ningdatech.pmapi.performance.model.dto.ProjectCoreBusinessDTO; import com.ningdatech.pmapi.performance.model.entity.ProjectCoreBusinessIndicators; import com.ningdatech.pmapi.performance.service.IProjectCoreBusinessIndicatorsService; import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO; -import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; -import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; -import com.ningdatech.pmapi.projectdeclared.model.entity.PreInsAcceptancePerson; -import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; -import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; -import com.ningdatech.pmapi.projectdeclared.service.IContractService; -import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; -import com.ningdatech.pmapi.projectdeclared.service.IPreInsAcceptancePersonService; -import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService; +import com.ningdatech.pmapi.projectdeclared.model.entity.*; +import com.ningdatech.pmapi.projectdeclared.model.vo.*; +import com.ningdatech.pmapi.projectdeclared.service.*; import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; import com.ningdatech.pmapi.projectlib.constant.ProjectConstant; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; @@ -114,6 +105,8 @@ public class ProjectLibManage { private final ITodoService todoService; private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; + private final IOperationService operationService; + public PageVo projectLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); query.eq(Project::getNewest, Boolean.TRUE); @@ -607,6 +600,12 @@ public class ProjectLibManage { contractVO.getTotalAmount())); } + //查询实施信息 + Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) + .in(Operation::getProjectId, allVersionProjectId) + .orderByAsc(Operation::getCreateOn) + .last(BizConst.LIMIT_1)); + vo.setOperation(BeanUtil.copyProperties(operation, OperationVO.class)); //查询初验信息 List acceptancePersons = acceptancePersonService.list(Wrappers.lambdaQuery(PreInsAcceptancePerson.class) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 21ded6a..522efdb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -7,6 +7,7 @@ import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; @@ -374,6 +375,9 @@ public class ProjectDetailVO { @ApiModelProperty("初审人员") private List acceptancePersons; + @ApiModelProperty("实施信息") + private OperationVO operation; + @ApiModelProperty("版本号str") private String versionStr; From 60d57d9aa117c6143bff003ba4bef402f0cd60a9 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 10:37:08 +0800 Subject: [PATCH 10/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA=E4=BF=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/statemachine/action/ProjectDeclareAction.java | 7 ++++++- .../common/statemachine/action/ProjectDeclareJNAction.java | 7 ++++++- .../common/statemachine/action/ProjectDeclareJYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareKFBAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareLDAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareLQAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareQTAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareQYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSBJAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSCAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareYHAction.java | 7 ++++++- .../builder/ProjectDeclareStateMachineJNBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineJYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineKFQBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineLDBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineLQBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineQTBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineQYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSBJBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSCBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineYHBuilder.java | 10 ++++++++-- 23 files changed, 169 insertions(+), 43 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java index 044d908..1cf9af9 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,9 +209,14 @@ 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 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 ffa8ae0..868d2f8 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,9 +206,14 @@ 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 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 eb1ab5d..e5b4081 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 @@ -204,10 +204,15 @@ public class ProjectDeclareJYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 bff3743..a72963f 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 @@ -204,10 +204,15 @@ public class ProjectDeclareKFBAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 8fbcf3a..7ac6a59 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 @@ -204,10 +204,15 @@ public class ProjectDeclareLDAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 f87fa91..4c6e792 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 @@ -204,10 +204,15 @@ public class ProjectDeclareLQAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 9c4a19a..6d127ac 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 @@ -204,10 +204,15 @@ public class ProjectDeclareQTAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 4117798..9906c7d 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 @@ -204,10 +204,15 @@ public class ProjectDeclareQYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 466fb16..b83c62a 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 @@ -204,10 +204,15 @@ public class ProjectDeclareSBJAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 d1351c6..c5e6db5 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 @@ -212,10 +212,15 @@ public class ProjectDeclareSCAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 0f54f1f..e515925 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 @@ -204,10 +204,15 @@ public class ProjectDeclareSYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 4d78f52..9fe7b1b 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,9 +205,14 @@ 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 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 0ef1da6..6699f8a 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,11 +211,17 @@ 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) 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 342220b..0e1e70b 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,11 +211,17 @@ 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) 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 f25cacb..a9c54d0 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,11 +211,17 @@ 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) 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 1b5f4fa..575ff1a 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,11 +211,17 @@ 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) 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 e6dfb16..737d7f5 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,11 +212,17 @@ 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) 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 2656ba4..43dae81 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,11 +211,17 @@ 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) 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 e65d761..617c7d7 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,11 +211,17 @@ 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) 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 40d38b4..c321412 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,11 +212,17 @@ 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) 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 f432e34..eddf681 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,11 +221,17 @@ 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) 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 9a7b257..048aac5 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,11 +211,17 @@ 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) 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 cb7b103..e7bbd74 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,11 +211,17 @@ 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) From f7544931bea77f23521fa67b1c283ae9a40d2dee Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:20:52 +0800 Subject: [PATCH 11/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/controller/EarlyWarningController.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java new file mode 100644 index 0000000..d446d01 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.sys.controller; + +import com.ningdatech.log.annotation.WebLog; +import com.wflow.bean.dto.WflowEarlyWarningDTO; +import com.wflow.bean.vo.WflowEarlyWarningVO; +import com.wflow.service.IEarlyWarningService; +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 EarlyWarningController + * @Description + * @Date 2023/8/01 14:28 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/sys/early-warning") +@Api(value = "EarlyWarning", tags = "系统管理-预警规则") +@RequiredArgsConstructor +public class EarlyWarningController { + + private final IEarlyWarningService earlyWarningService; + + @ApiOperation(value = "预警规则获取", notes = "预警规则获取") + @GetMapping("/detail/{regionCode}") + public WflowEarlyWarningVO detail(@PathVariable String regionCode) { + return earlyWarningService.detailByRegion(regionCode); + } + + @ApiOperation(value = "预警规则保存", notes = "预警规则保存") + @PostMapping("/save") + @WebLog("预警规则保存") + public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { + return earlyWarningService.saveByDto(dto); + } +} From 0bb967fa285fe234c94b9c2864e63eb161843fb6 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:34:26 +0800 Subject: [PATCH 12/39] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/controller/ProjectApplicationController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java index 7ea6617..a5b7123 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java @@ -6,14 +6,10 @@ import com.ningdatech.pmapi.projectlib.manage.ApplicationManage; import com.ningdatech.pmapi.projectlib.model.dto.ApplicationAppCodeSaveDTO; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; -import com.ningdatech.pmapi.user.util.LoginUserUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; - import javax.validation.Valid; /** From 04d4f23e23152f498fa8283361eb60aacb620a79 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Mon, 31 Jul 2023 16:32:09 +0800 Subject: [PATCH 13/39] =?UTF-8?q?=E7=BB=A9=E6=95=88=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/performance/manage/PerformanceAppraisalPlanManage.java | 2 ++ .../model/entity/PerformanceIndicatorProjectTemplate.java | 6 ++++++ .../pmapi/performance/model/vo/ProjectIndexTemplateVO.java | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java index 804603c..eff697b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java @@ -229,6 +229,8 @@ public class PerformanceAppraisalPlanManage { // 计划名称重复校验 deduplicationName(createDTO); PerformanceAppraisal pa = BeanUtil.copyProperties(createDTO,PerformanceAppraisal.class); + + pa.setCreateOn(LocalDateTime.now()); pa.setCreateBy(user.getUsername()); pa.setUpdateOn(LocalDateTime.now()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java index 1631390..55b92d9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java @@ -53,4 +53,10 @@ public class PerformanceIndicatorProjectTemplate implements Serializable { @ApiModelProperty("项目资金范围 1.500万元以下、2.500-2000万元,3.2000万元及以上") private Integer amountRange; + + @ApiModelProperty("项目标签ID") + private Long projectTagId; + + @ApiModelProperty("项目标签名称") + private String projectTagName; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java index 32ec504..a344072 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java @@ -55,4 +55,10 @@ public class ProjectIndexTemplateVO implements Serializable { @ApiModelProperty("附加绩效指标详情") private List additionalIndexDetails; + + @ApiModelProperty("项目标签ID") + private Long projectTagId; + + @ApiModelProperty("项目标签名称") + private String projectTagName; } From 37abecc6de86ada1d45afb4d81b8305893ab7fa9 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 1 Aug 2023 11:55:42 +0800 Subject: [PATCH 14/39] =?UTF-8?q?=E7=BB=A9=E6=95=88=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java | 1 + .../pmapi/performance/enumration/PerformanceTemplateTypeEnum.java | 1 - .../pmapi/projectdeclared/controller/ConstructionPlanController.java | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java index 53c5f02..a58f952 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java @@ -22,6 +22,7 @@ public class ApiApplySearchResult implements Serializable { private String type; private String status; private String sysStateTime; + private String systemAreas; private String deptName; private String deptCode; private String fiveAreas; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java index 879c2e5..82e03fb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java @@ -22,7 +22,6 @@ public enum PerformanceTemplateTypeEnum { /** * 模板类型 */ - //STAGE(0, "阶段"), FIRST_INDEX(1, "第一指标"), SECOND_INDEX(2, "第二指标"), THIRD_INDEX(3, "第三指标"); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java index 25cbdd1..5779ac6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java @@ -46,8 +46,6 @@ public class ConstructionPlanController { return "建设方案申报 【" + instanceId + "】 成功"; } - - @GetMapping("/export") @ApiOperation("可申报建设方案项目列表导出") @WebLog("可申报建设方案项目列表导出") From d5cd5f9a9bbe7e4ce9a583af3b5f72566a0ef9b2 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 15/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index d446d01..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -28,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{regionCode}") - public WflowEarlyWarningVO detail(@PathVariable String regionCode) { - return earlyWarningService.detailByRegion(regionCode); + @GetMapping("/detail/{areaCode}") + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + return earlyWarningService.detailByRegion(areaCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 691bd5a6182215ceffc9748a94a3368cbb11ec2e Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:01:40 +0800 Subject: [PATCH 16/39] =?UTF-8?q?debug=20=E9=A2=84=E5=AE=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index fe7bea6..a03920e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -154,7 +154,7 @@ public class DeclaredProjectManage { Project project = new Project(); BeanUtils.copyProperties(projectInfo,project); Map orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,project); - String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); + String instanceId = processService.startProcessLs(model, params,orgModelMap); log.info("申报项目成功 【{}】", instanceId); //如果是重新提交的话 判断下 项目是否存在 From 207713e520266d7de3fa635a9c7be1364925c964 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 17/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 053f9633e2924caa89d427e308fa4a38357924b2 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 18/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index a4dd3d8..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.List; - /** * @Classname EarlyWarningController * @Description @@ -31,7 +29,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public List detail(@PathVariable String areaCode) { + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 4f72c5ee07ed107395dc9acd8b4de99339415d30 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 19/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From f0a7b68c2f04911112bba0a861fdfa328f85c8ea Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 09:52:18 +0800 Subject: [PATCH 20/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E6=94=BE=E5=85=A5=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectLibManage.java | 23 +++++++++++----------- .../pmapi/projectlib/model/vo/ProjectDetailVO.java | 4 ++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 810d0ab..6c9e029 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -35,18 +35,9 @@ import com.ningdatech.pmapi.performance.model.dto.ProjectCoreBusinessDTO; import com.ningdatech.pmapi.performance.model.entity.ProjectCoreBusinessIndicators; import com.ningdatech.pmapi.performance.service.IProjectCoreBusinessIndicatorsService; import com.ningdatech.pmapi.projectdeclared.model.dto.DelayedApplyDTO; -import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; -import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; -import com.ningdatech.pmapi.projectdeclared.model.entity.PreInsAcceptancePerson; -import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; -import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; -import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; -import com.ningdatech.pmapi.projectdeclared.service.IContractService; -import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; -import com.ningdatech.pmapi.projectdeclared.service.IPreInsAcceptancePersonService; -import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService; +import com.ningdatech.pmapi.projectdeclared.model.entity.*; +import com.ningdatech.pmapi.projectdeclared.model.vo.*; +import com.ningdatech.pmapi.projectdeclared.service.*; import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; import com.ningdatech.pmapi.projectlib.constant.ProjectConstant; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; @@ -114,6 +105,8 @@ public class ProjectLibManage { private final ITodoService todoService; private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; + private final IOperationService operationService; + public PageVo projectLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); query.eq(Project::getNewest, Boolean.TRUE); @@ -607,6 +600,12 @@ public class ProjectLibManage { contractVO.getTotalAmount())); } + //查询实施信息 + Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class) + .in(Operation::getProjectId, allVersionProjectId) + .orderByAsc(Operation::getCreateOn) + .last(BizConst.LIMIT_1)); + vo.setOperation(BeanUtil.copyProperties(operation, OperationVO.class)); //查询初验信息 List acceptancePersons = acceptancePersonService.list(Wrappers.lambdaQuery(PreInsAcceptancePerson.class) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 21ded6a..522efdb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -7,6 +7,7 @@ import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; @@ -374,6 +375,9 @@ public class ProjectDetailVO { @ApiModelProperty("初审人员") private List acceptancePersons; + @ApiModelProperty("实施信息") + private OperationVO operation; + @ApiModelProperty("版本号str") private String versionStr; From 8dba59f51c60fe24c1a71eefc6bea6946fdfe3b3 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 10:37:08 +0800 Subject: [PATCH 21/39] =?UTF-8?q?=E5=AE=9E=E6=96=BD=E4=BF=A1=E6=81=AF=20?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA=E4=BF=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/statemachine/action/ProjectDeclareAction.java | 7 ++++++- .../common/statemachine/action/ProjectDeclareJNAction.java | 7 ++++++- .../common/statemachine/action/ProjectDeclareJYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareKFBAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareLDAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareLQAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareQTAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareQYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSBJAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSCAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareSYAction.java | 9 +++++++-- .../common/statemachine/action/ProjectDeclareYHAction.java | 7 ++++++- .../builder/ProjectDeclareStateMachineJNBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineJYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineKFQBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineLDBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineLQBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineQTBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineQYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSBJBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSCBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineSYBuilder.java | 10 ++++++++-- .../builder/ProjectDeclareStateMachineYHBuilder.java | 10 ++++++++-- 23 files changed, 169 insertions(+), 43 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareAction.java index 044d908..1cf9af9 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,9 +209,14 @@ 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 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 ffa8ae0..868d2f8 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,9 +206,14 @@ 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 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 eb1ab5d..e5b4081 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 @@ -204,10 +204,15 @@ public class ProjectDeclareJYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 bff3743..a72963f 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 @@ -204,10 +204,15 @@ public class ProjectDeclareKFBAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 8fbcf3a..7ac6a59 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 @@ -204,10 +204,15 @@ public class ProjectDeclareLDAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 f87fa91..4c6e792 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 @@ -204,10 +204,15 @@ public class ProjectDeclareLQAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 9c4a19a..6d127ac 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 @@ -204,10 +204,15 @@ public class ProjectDeclareQTAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 4117798..9906c7d 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 @@ -204,10 +204,15 @@ public class ProjectDeclareQYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 466fb16..b83c62a 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 @@ -204,10 +204,15 @@ public class ProjectDeclareSBJAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 d1351c6..c5e6db5 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 @@ -212,10 +212,15 @@ public class ProjectDeclareSCAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 0f54f1f..e515925 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 @@ -204,10 +204,15 @@ public class ProjectDeclareSYAction { project.setStatus(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode()); } - - @OnTransition(source = "TO_BE_PURCHASED", target = "UNDER_CONSTRUCTION") + @OnTransition(source = "TO_BE_PURCHASED", target = "OPERATION") 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 4d78f52..9fe7b1b 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,9 +205,14 @@ 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 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 0ef1da6..6699f8a 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,11 +211,17 @@ 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) 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 342220b..0e1e70b 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,11 +211,17 @@ 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) 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 f25cacb..a9c54d0 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,11 +211,17 @@ 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) 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 1b5f4fa..575ff1a 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,11 +211,17 @@ 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) 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 e6dfb16..737d7f5 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,11 +212,17 @@ 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) 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 2656ba4..43dae81 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,11 +211,17 @@ 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) 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 e65d761..617c7d7 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,11 +211,17 @@ 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) 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 40d38b4..c321412 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,11 +212,17 @@ 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) 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 f432e34..eddf681 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,11 +221,17 @@ 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) 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 9a7b257..048aac5 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,11 +211,17 @@ 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) 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 cb7b103..e7bbd74 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,11 +211,17 @@ 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) From ef9340308c65890b575e396927c185a7ac84e93b Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:20:52 +0800 Subject: [PATCH 22/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/controller/EarlyWarningController.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java new file mode 100644 index 0000000..d446d01 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.sys.controller; + +import com.ningdatech.log.annotation.WebLog; +import com.wflow.bean.dto.WflowEarlyWarningDTO; +import com.wflow.bean.vo.WflowEarlyWarningVO; +import com.wflow.service.IEarlyWarningService; +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 EarlyWarningController + * @Description + * @Date 2023/8/01 14:28 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/sys/early-warning") +@Api(value = "EarlyWarning", tags = "系统管理-预警规则") +@RequiredArgsConstructor +public class EarlyWarningController { + + private final IEarlyWarningService earlyWarningService; + + @ApiOperation(value = "预警规则获取", notes = "预警规则获取") + @GetMapping("/detail/{regionCode}") + public WflowEarlyWarningVO detail(@PathVariable String regionCode) { + return earlyWarningService.detailByRegion(regionCode); + } + + @ApiOperation(value = "预警规则保存", notes = "预警规则保存") + @PostMapping("/save") + @WebLog("预警规则保存") + public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { + return earlyWarningService.saveByDto(dto); + } +} From 923b601260756cd6750eca381ed571767afd4a3b Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:34:26 +0800 Subject: [PATCH 23/39] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/controller/ProjectApplicationController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java index 7ea6617..a5b7123 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectApplicationController.java @@ -6,14 +6,10 @@ import com.ningdatech.pmapi.projectlib.manage.ApplicationManage; import com.ningdatech.pmapi.projectlib.model.dto.ApplicationAppCodeSaveDTO; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; -import com.ningdatech.pmapi.user.util.LoginUserUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; - import javax.validation.Valid; /** From 87f3cc7bfb810a81e071143b1cdda28a6060bf6a Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Mon, 31 Jul 2023 16:32:09 +0800 Subject: [PATCH 24/39] =?UTF-8?q?=E7=BB=A9=E6=95=88=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/performance/manage/PerformanceAppraisalPlanManage.java | 2 ++ .../model/entity/PerformanceIndicatorProjectTemplate.java | 6 ++++++ .../pmapi/performance/model/vo/ProjectIndexTemplateVO.java | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java index 8362ce8..a97ebea 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/manage/PerformanceAppraisalPlanManage.java @@ -257,6 +257,8 @@ public class PerformanceAppraisalPlanManage { // 计划名称重复校验 deduplicationName(createDTO); PerformanceAppraisal pa = BeanUtil.copyProperties(createDTO,PerformanceAppraisal.class); + + pa.setCreateOn(LocalDateTime.now()); pa.setCreateBy(user.getUsername()); pa.setUpdateOn(LocalDateTime.now()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java index 1631390..55b92d9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/entity/PerformanceIndicatorProjectTemplate.java @@ -53,4 +53,10 @@ public class PerformanceIndicatorProjectTemplate implements Serializable { @ApiModelProperty("项目资金范围 1.500万元以下、2.500-2000万元,3.2000万元及以上") private Integer amountRange; + + @ApiModelProperty("项目标签ID") + private Long projectTagId; + + @ApiModelProperty("项目标签名称") + private String projectTagName; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java index 32ec504..a344072 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/model/vo/ProjectIndexTemplateVO.java @@ -55,4 +55,10 @@ public class ProjectIndexTemplateVO implements Serializable { @ApiModelProperty("附加绩效指标详情") private List additionalIndexDetails; + + @ApiModelProperty("项目标签ID") + private Long projectTagId; + + @ApiModelProperty("项目标签名称") + private String projectTagName; } From a49ece46b03e491fe2fdbd65211b75cd865d35ec Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 1 Aug 2023 11:55:42 +0800 Subject: [PATCH 25/39] =?UTF-8?q?=E7=BB=A9=E6=95=88=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java | 1 + .../pmapi/performance/enumration/PerformanceTemplateTypeEnum.java | 1 - .../pmapi/projectdeclared/controller/ConstructionPlanController.java | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java index 53c5f02..a58f952 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/irs/model/dto/ApiApplySearchResult.java @@ -22,6 +22,7 @@ public class ApiApplySearchResult implements Serializable { private String type; private String status; private String sysStateTime; + private String systemAreas; private String deptName; private String deptCode; private String fiveAreas; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java index 879c2e5..82e03fb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/performance/enumration/PerformanceTemplateTypeEnum.java @@ -22,7 +22,6 @@ public enum PerformanceTemplateTypeEnum { /** * 模板类型 */ - //STAGE(0, "阶段"), FIRST_INDEX(1, "第一指标"), SECOND_INDEX(2, "第二指标"), THIRD_INDEX(3, "第三指标"); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java index 25cbdd1..5779ac6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java @@ -46,8 +46,6 @@ public class ConstructionPlanController { return "建设方案申报 【" + instanceId + "】 成功"; } - - @GetMapping("/export") @ApiOperation("可申报建设方案项目列表导出") @WebLog("可申报建设方案项目列表导出") From dcbb49ed0ed56f9a1865b2081212f0dbd01d45aa Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 26/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index d446d01..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -28,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{regionCode}") - public WflowEarlyWarningVO detail(@PathVariable String regionCode) { - return earlyWarningService.detailByRegion(regionCode); + @GetMapping("/detail/{areaCode}") + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + return earlyWarningService.detailByRegion(areaCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 5301af5b5ce48a2ed14c83750f451ecf6bfb367f Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:01:40 +0800 Subject: [PATCH 27/39] =?UTF-8?q?debug=20=E9=A2=84=E5=AE=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index fe7bea6..a03920e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -154,7 +154,7 @@ public class DeclaredProjectManage { Project project = new Project(); BeanUtils.copyProperties(projectInfo,project); Map orgModelMap = defaultDeclaredProjectManage.buildOrgModelMap(employeeCode,project); - String instanceId = processService.newStartProcess(model.getProcessDefId(),model.getFormId(), params,orgModelMap); + String instanceId = processService.startProcessLs(model, params,orgModelMap); log.info("申报项目成功 【{}】", instanceId); //如果是重新提交的话 判断下 项目是否存在 From dc1fcfd637cb9dbb5668cd9816f96efca4203483 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 28/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 7e76cbf70ab130008c369d9306c1ade2f5374c78 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 29/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index a4dd3d8..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.List; - /** * @Classname EarlyWarningController * @Description @@ -31,7 +29,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public List detail(@PathVariable String areaCode) { + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 8656d50ebb1af635a717600cd5a2ed62a30dd232 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 30/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From a92b3f681d6691bb1dff9e89c73a0eff57e72ab9 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:20:52 +0800 Subject: [PATCH 31/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99=20?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ningdatech/pmapi/sys/controller/EarlyWarningController.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index a4dd3d8..d446d01 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import java.util.List; - /** * @Classname EarlyWarningController * @Description @@ -30,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{areaCode}") - public List detail(@PathVariable String areaCode) { - return earlyWarningService.detailByRegion(areaCode); + @GetMapping("/detail/{regionCode}") + public WflowEarlyWarningVO detail(@PathVariable String regionCode) { + return earlyWarningService.detailByRegion(regionCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 36bae085043f3e00115bcf4b86f13eb32a68a57f Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 14:38:28 +0800 Subject: [PATCH 32/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index d446d01..21c621e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -28,9 +28,9 @@ public class EarlyWarningController { private final IEarlyWarningService earlyWarningService; @ApiOperation(value = "预警规则获取", notes = "预警规则获取") - @GetMapping("/detail/{regionCode}") - public WflowEarlyWarningVO detail(@PathVariable String regionCode) { - return earlyWarningService.detailByRegion(regionCode); + @GetMapping("/detail/{areaCode}") + public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + return earlyWarningService.detailByRegion(areaCode); } @ApiOperation(value = "预警规则保存", notes = "预警规则保存") From 511d82ce5d2cda4253f19397d77213d7e79728ce Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 1 Aug 2023 16:21:16 +0800 Subject: [PATCH 33/39] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/sys/controller/EarlyWarningController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java index 21c621e..a4dd3d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/EarlyWarningController.java @@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * @Classname EarlyWarningController * @Description @@ -29,7 +31,7 @@ public class EarlyWarningController { @ApiOperation(value = "预警规则获取", notes = "预警规则获取") @GetMapping("/detail/{areaCode}") - public WflowEarlyWarningVO detail(@PathVariable String areaCode) { + public List detail(@PathVariable String areaCode) { return earlyWarningService.detailByRegion(areaCode); } From 23fcf7fc4532eea5e5f4eea0f0ff04c54bbdc1e1 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 09:46:16 +0800 Subject: [PATCH 34/39] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/handler/GlobalResponseHandler.java | 3 +- .../controller/AnnualPlanController.java | 1 - .../pmapi/projectlib/model/vo/ProjectDetailVO.java | 19 ++++++ .../safety/controller/SafetyRiskController.java | 54 ++++++++++++++++ .../pmapi/safety/manage/SafetyRiskManage.java | 34 ++++++++++ .../pmapi/safety/model/vo/ProjectMonitorVO.java | 75 ++++++++++++++++++++++ 6 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java index ad76321..7f7bb57 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java @@ -30,7 +30,8 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; "com.ningdatech.pmapi.ding.controller", "com.ningdatech.pmapi.filemanage.controller", "com.ningdatech.pmapi.performance.controller", - "com.ningdatech.pmapi.irs.controller" + "com.ningdatech.pmapi.irs.controller", + "com.ningdatech.pmapi.safety.controller" }) public class GlobalResponseHandler implements ResponseBodyAdvice { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java index 8850698..5202441 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java @@ -37,7 +37,6 @@ public class AnnualPlanController { @GetMapping("/list") @ApiOperation("年度计划库列表") - @WebLog("年度计划库列表") public PageVo annualPlanLibList(ProjectListReq req) { return annualPlanLibManage.annulPlanLibList(req); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 21ded6a..c010c8f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -9,6 +9,7 @@ import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; import com.ningdatech.pmapi.todocenter.model.vo.ProcessProgressDetailVo; import io.swagger.annotations.ApiModel; @@ -418,4 +419,22 @@ public class ProjectDetailVO { this.dynamicForm = JSON.parseObject(dynamicFormStr, Map.class); } } + + @ApiModelProperty("项目阶段中文") + private String stageName; + public String getStageName(){ + if(Objects.nonNull(this.stage)){ + return ProjectStatusEnum.getDesc(this.stage); + } + return StringUtils.EMPTY; + } + + @ApiModelProperty("项目状态中文") + private String statusName; + public String getStatusName(){ + if(Objects.nonNull(this.status)){ + return ProjectStatusEnum.getDesc(this.status); + } + return StringUtils.EMPTY; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java new file mode 100644 index 0000000..3badb64 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java @@ -0,0 +1,54 @@ +package com.ningdatech.pmapi.safety.controller; + +import com.alibaba.fastjson.JSONObject; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.safety.manage.SafetyRiskManage; +import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Classname SafetyRiskController + * @Description + * @Date 2023/8/2 9:15 + * @Author PoffyZhang + */ +@RestController +@RequiredArgsConstructor +@Api(tags = "安全风险监测") +@RequestMapping("/api/v1/safety-risk") +public class SafetyRiskController { + + private final SafetyRiskManage safetyRiskManage; + + @GetMapping("/person-monitor/list") + @ApiOperation("安全人员监控列表") + public PageVo personMonitorList(ProjectListReq req) { + return safetyRiskManage.personMonitorList(req); + } + + @GetMapping("/person-monitor/detail/{projectCode}") + @ApiOperation("安全人员监控详情") + public ProjectMonitorVO personMonitorDetail(@PathVariable String projectCode) { + return safetyRiskManage.personMonitorDetail(projectCode); + } + + + @GetMapping("/operation-monitor/list") + @ApiOperation("安全运行监控列表") + public PageVo operationnMonitorList(ProjectListReq req) { + return safetyRiskManage.operationnMonitorList(req); + } + + @GetMapping("/operation-monitor/search/{projectCode}") + @ApiOperation("安全运行监控-查询监测(对接外部平台)") + public JSONObject operationnMonitorList(@PathVariable String projectCode) { + return safetyRiskManage.operationnMonitorSearch(projectCode); + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java new file mode 100644 index 0000000..eb57d94 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.safety.manage; + +import com.alibaba.fastjson.JSONObject; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; +import org.springframework.stereotype.Component; + +/** + * @Classname SafetyRiskManage + * @Description + * @Date 2023/8/2 9:17 + * @Author PoffyZhang + */ +@Component +public class SafetyRiskManage { + + + public PageVo personMonitorList(ProjectListReq req) { + return null; + } + + public ProjectMonitorVO personMonitorDetail(String projectCode) { + return null; + } + + public PageVo operationnMonitorList(ProjectListReq req) { + return null; + } + + public JSONObject operationnMonitorSearch(String projectCode) { + return null; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java new file mode 100644 index 0000000..11d5972 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java @@ -0,0 +1,75 @@ +package com.ningdatech.pmapi.safety.model.vo; + +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; +import java.util.Optional; + +/** + * @Classname ProjectMonitorVO + * @Description + * @Date 2023/8/2 9:19 + * @Author PoffyZhang + */ +@Data +@ApiModel(value = "ProjectMonitorVO", description = "项目监控VO") +public class ProjectMonitorVO { + + @ApiModelProperty("项目ID") + private Long id; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("申报单位code") + private String buildOrgCode; + + @ApiModelProperty("申报单位名") + private String buildOrgName; + + @ApiModelProperty("项目年度") + private Integer projectYear; + + @ApiModelProperty("项目类型") + private Integer projectType; + + @ApiModelProperty("项目类型名") + private String projectTypeName; + + public String getProjectTypeName() { + if (Objects.nonNull(this.projectType)) { + Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType)) + .ifPresent(desc -> this.projectTypeName = desc); + } + return this.projectTypeName; + } + + @ApiModelProperty("项目阶段") + private Integer stage; + + @ApiModelProperty("项目状态") + private Integer status; + + @ApiModelProperty("项目阶段中文") + private String stageName; + public String getStageName(){ + if(Objects.nonNull(this.stage)){ + return ProjectStatusEnum.getDesc(this.stage); + } + return StringUtils.EMPTY; + } + + @ApiModelProperty("项目状态中文") + private String statusName; + public String getStatusName(){ + if(Objects.nonNull(this.status)){ + return ProjectStatusEnum.getDesc(this.status); + } + return StringUtils.EMPTY; + } +} From ac0286f83f63ff82dd834ad83f0349a6ae8cb825 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 09:53:56 +0800 Subject: [PATCH 35/39] =?UTF-8?q?debug=20=E5=BA=94=E7=94=A8=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/ProjectLibManage.java | 19 ++++++++++++------- .../pmapi/todocenter/manage/TodoCenterManage.java | 16 +--------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 810d0ab..fa36c23 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -262,7 +262,9 @@ public class ProjectLibManage { project.setSponsor(employeeCode); String projectCode = generateProjectCodeUtil.generateProjectCode(projectDto); project.setProjectCode(projectCode); - projectService.save(project); + if(projectService.save(project)){ + saveApplication(projectDto,project,null); + } } else { //否则是重新提交的 新生成一个新版本的项目 project = newProjectWithVersion(projectDto); @@ -316,13 +318,16 @@ public class ProjectLibManage { } else { project.setPrePlanProjectId(oldProject.getId()); } - projectService.save(project); + if(projectService.save(project)){ + saveApplication(projectDto,project,null); + + // 将旧的项目版本置为不是最新 + projectService.update(Wrappers.lambdaUpdate(Project.class) + .set(Project::getNewest, Boolean.FALSE) + .ne(Project::getId, project.getId()) + .eq(Project::getProjectCode, project.getProjectCode())); + } - // 将旧的项目版本置为不是最新 - projectService.update(Wrappers.lambdaUpdate(Project.class) - .set(Project::getNewest, Boolean.FALSE) - .ne(Project::getId, project.getId()) - .eq(Project::getProjectCode, project.getProjectCode())); } else { //否则是被驳回,重新提交的 新生成一个新版本的项目 project = newProjectWithVersion(projectDto); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index aaf4cf4..c8997dc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -1136,9 +1136,6 @@ public class TodoCenterManage { .eq(ProjectApplication::getIsConstruct, Boolean.TRUE)); if (CollUtil.isNotEmpty(applicationList)) { projectApplicationService.removeBatchByIds(applicationList); - List applicationIds = applicationList.stream().map(ProjectApplication::getId).collect(Collectors.toList()); -// projectCoreBusinessIndicatorsService.remove(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class) -// .in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds)); } List applications = projectDto.getApplicationList(); @@ -1157,18 +1154,7 @@ public class TodoCenterManage { projectApplication.setIsConstruct(Boolean.TRUE); } projectApplication.setProjectVersion(project.getVersion()); - boolean result = projectApplicationService.save(projectApplication); -// // 保存应用关联的核心业务 -// List coreBusinessList = application.getCoreBusinessList(); -// Boolean hasCoreBusiness = CollUtil.isNotEmpty(coreBusinessList) ? Boolean.TRUE : Boolean.FALSE; -// if (Boolean.TRUE.equals(result) && Boolean.TRUE.equals(hasCoreBusiness)){ -// for (ProjectCoreBusinessDTO coreBusiness : coreBusinessList) { -// ProjectCoreBusinessIndicators projectCoreBusinessIndicators = new ProjectCoreBusinessIndicators(); -// BeanUtils.copyProperties(coreBusiness, projectCoreBusinessIndicators); -// projectCoreBusinessIndicators.setApplicationId(application.getId()); -// projectCoreBusinessIndicatorsService.save(projectCoreBusinessIndicators); -// } -// } + projectApplicationService.save(projectApplication); } } return Boolean.TRUE; From 62024bd91bfbb0b129f8754a056a54e07446cc92 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 11:49:37 +0800 Subject: [PATCH 36/39] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safety/controller/SafetyRiskController.java | 35 ++-- .../pmapi/safety/manage/SafetyRiskManage.java | 178 ++++++++++++++++++++- .../safety/mapper/PersonSafetyInfoMapper.java | 15 ++ .../mapper/SupplierSafetyQualificationMapper.java | 15 ++ .../safety/model/dto/PersonSafetyInfoDTO.java | 45 ++++++ .../model/dto/SupplierSafetyQualificationDTO.java | 39 +++++ .../safety/model/entity/PersonSafetyInfo.java | 48 ++++++ .../model/entity/SupplierSafetyQualification.java | 45 ++++++ .../pmapi/safety/model/vo/PersonSafetyInfoVO.java | 43 +++++ .../pmapi/safety/model/vo/SafetyMonitorVO.java | 23 +++ .../model/vo/SupplierSafetyQualificationVO.java | 43 +++++ .../safety/service/IPersonSafetyInfoService.java | 14 ++ .../ISupplierSafetyQualificationService.java | 14 ++ .../service/impl/PersonSafetyInfoServiceImpl.java | 20 +++ .../SupplierSafetyQualificationServiceImpl.java | 20 +++ .../user/security/auth/model/UserInfoDetails.java | 12 ++ 16 files changed, 592 insertions(+), 17 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/PersonSafetyInfoMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/SupplierSafetyQualificationMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/PersonSafetyInfo.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/SupplierSafetyQualification.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/PersonSafetyInfoVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SupplierSafetyQualificationVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/service/IPersonSafetyInfoService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/service/ISupplierSafetyQualificationService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/PersonSafetyInfoServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/SupplierSafetyQualificationServiceImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java index 3badb64..a71523b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java @@ -2,16 +2,20 @@ package com.ningdatech.pmapi.safety.controller; import com.alibaba.fastjson.JSONObject; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.log.annotation.WebLog; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.safety.manage.SafetyRiskManage; +import com.ningdatech.pmapi.safety.model.dto.PersonSafetyInfoDTO; +import com.ningdatech.pmapi.safety.model.dto.SupplierSafetyQualificationDTO; import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; +import com.ningdatech.pmapi.safety.model.vo.SafetyMonitorVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; /** * @Classname SafetyRiskController @@ -33,17 +37,24 @@ public class SafetyRiskController { return safetyRiskManage.personMonitorList(req); } - @GetMapping("/person-monitor/detail/{projectCode}") - @ApiOperation("安全人员监控详情") - public ProjectMonitorVO personMonitorDetail(@PathVariable String projectCode) { - return safetyRiskManage.personMonitorDetail(projectCode); + @PostMapping("/person-monitor/save") + @ApiOperation("安全人员监控信息保存") + @WebLog("安全人员监控信息保存") + public String personMonitorSave(@Valid @RequestBody List dtos) { + return safetyRiskManage.personMonitorSave(dtos); } + @GetMapping("/supplier-safety-qualification/save") + @ApiOperation("供应商安全资质保存") + @WebLog("供应商安全资质保存") + public String supplierSafetyQualificationSave(@Valid @RequestBody List dtos) { + return safetyRiskManage.supplierSafetyQualificationSave(dtos); + } - @GetMapping("/operation-monitor/list") - @ApiOperation("安全运行监控列表") - public PageVo operationnMonitorList(ProjectListReq req) { - return safetyRiskManage.operationnMonitorList(req); + @GetMapping("/detail/{projectCode}") + @ApiOperation("安全人员管控详情") + public SafetyMonitorVO personMonitorDetail(@PathVariable String projectCode) { + return safetyRiskManage.personMonitorDetail(projectCode); } @GetMapping("/operation-monitor/search/{projectCode}") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java index eb57d94..e9c8f5a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java @@ -1,11 +1,41 @@ package com.ningdatech.pmapi.safety.manage; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.common.constant.BizConst; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; +import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.ningdatech.pmapi.safety.model.dto.PersonSafetyInfoDTO; +import com.ningdatech.pmapi.safety.model.dto.SupplierSafetyQualificationDTO; +import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; +import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; +import com.ningdatech.pmapi.safety.model.vo.PersonSafetyInfoVO; import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; +import com.ningdatech.pmapi.safety.model.vo.SafetyMonitorVO; +import com.ningdatech.pmapi.safety.model.vo.SupplierSafetyQualificationVO; +import com.ningdatech.pmapi.safety.service.IPersonSafetyInfoService; +import com.ningdatech.pmapi.safety.service.ISupplierSafetyQualificationService; +import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; +import com.ningdatech.pmapi.user.util.LoginUserUtil; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + /** * @Classname SafetyRiskManage * @Description @@ -13,22 +43,160 @@ import org.springframework.stereotype.Component; * @Author PoffyZhang */ @Component +@Slf4j +@AllArgsConstructor public class SafetyRiskManage { + private final IProjectService projectService; + + private final ISupplierSafetyQualificationService supplierSafetyQualificationService; + + private final IPersonSafetyInfoService personSafetyInfoService; + /** + * 列表 + * @param req + * @return + */ public PageVo personMonitorList(ProjectListReq req) { - return null; + LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest, Boolean.TRUE) + .ge(Project::getStatus, ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()) + .ne(Project::getStatus, ProjectStatusEnum.OPERATION.getCode()) + .like(StringUtils.isNotBlank(req.getProjectName()),Project::getProjectName,req.getProjectName()) + .like(StringUtils.isNotBlank(req.getBuildOrgName()),Project::getBuildOrgName,req.getBuildOrgName()); + checkAuth(query,LoginUserUtil.loginUserDetail()); + Page page = projectService.page(req.page(), query); + long total; + if ((total = page.getTotal()) == 0) { + return PageVo.empty(); + } + List records = CollUtils.convert(page.getRecords(), + p -> BeanUtil.copyProperties(p,ProjectMonitorVO.class)); + return PageVo.of(records, total); } - public ProjectMonitorVO personMonitorDetail(String projectCode) { - return null; + /** + * 权限控制 + * @param query + * @param user + */ + private void checkAuth(LambdaQueryWrapper query, UserInfoDetails user) { + //如果是超管 + if(user.getSuperAdmin()){ + log.info(user.getUsername() + " 是超管,可以看所有项目"); + }else if(user.getRegionAdmin()){ + //如果是区域管理员 + log.info(user.getUsername() + " 是区管,可以看本区域" + user.getRegionCode() + "项目"); + query.eq(Project::getAreaCode,user.getRegionCode()); + }else if(user.getIsOrgAdmin()){ + //单位管理员 + log.info(user.getUsername() + " 是单位管理员,可以看单位 " + user.getEmpPosUnitName() + " 项目"); + query.eq(Project::getBuildOrgCode,user.getEmpPosUnitCode()); + }else{ + //其它角色全都看不见 + query.eq(Project::getId,0L); + } } - public PageVo operationnMonitorList(ProjectListReq req) { - return null; + public SafetyMonitorVO personMonitorDetail(String projectCode) { + SafetyMonitorVO vo = new SafetyMonitorVO(); + Project project = projectService.getOne(Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest, Boolean.TRUE) + .eq(Project::getProjectCode, projectCode) + .last(BizConst.LIMIT_1)); + + if(Objects.isNull(project)){ + return null; + } + + List ssq = supplierSafetyQualificationService.list(Wrappers.lambdaQuery(SupplierSafetyQualification.class) + .eq(SupplierSafetyQualification::getProjectCode, projectCode)); + if(CollUtil.isNotEmpty(ssq)){ + vo.setSupplierSafetyQualification(ssq.stream() + .map(s -> BeanUtil.copyProperties(s, SupplierSafetyQualificationVO.class)) + .collect(Collectors.toList())); + } + + List psi = personSafetyInfoService.list(Wrappers.lambdaQuery(PersonSafetyInfo.class) + .eq(PersonSafetyInfo::getProjectCode, projectCode)); + if(CollUtil.isNotEmpty(psi)){ + vo.setPersonSafetyInfo(psi.stream() + .map(p -> BeanUtil.copyProperties(p, PersonSafetyInfoVO.class)) + .collect(Collectors.toList())); + } + + return vo; } public JSONObject operationnMonitorSearch(String projectCode) { return null; } + + /** + * 保存 供应商安全资质 + * @param dtos + * @return + */ + public String supplierSafetyQualificationSave(List dtos) { + if(CollUtil.isEmpty(dtos)){ + return "数据为空"; + } + + UserInfoDetails user = LoginUserUtil.loginUserDetail(); + + Integer sucessNum = 0; + for(SupplierSafetyQualificationDTO dto : dtos){ + String projectCode = dto.getProjectCode(); + Project project = projectService.getOne(Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest, Boolean.TRUE) + .eq(Project::getProjectCode, projectCode) + .last(BizConst.LIMIT_1)); + + VUtils.isTrue(Objects.isNull(project)).throwMessage("此项目并不存在!"); + + SupplierSafetyQualification entity = BeanUtil.copyProperties(dto, SupplierSafetyQualification.class); + entity.setCreateBy(user.getUsername()); + entity.setCreateOn(LocalDateTime.now()); + entity.setProjectId(project.getId()); + entity.setUpdateBy(user.getUsername()); + entity.setUpdateOn(LocalDateTime.now()); + if(supplierSafetyQualificationService.save(entity)){ + sucessNum ++; + } + } + + return "保存成功" + sucessNum + "条"; + } + + public String personMonitorSave(List dtos) { + if(CollUtil.isEmpty(dtos)){ + return "数据为空"; + } + + UserInfoDetails user = LoginUserUtil.loginUserDetail(); + + Integer sucessNum = 0; + for(PersonSafetyInfoDTO dto : dtos){ + String projectCode = dto.getProjectCode(); + Project project = projectService.getOne(Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest, Boolean.TRUE) + .eq(Project::getProjectCode, projectCode) + .last(BizConst.LIMIT_1)); + + VUtils.isTrue(Objects.isNull(project)).throwMessage("此项目并不存在!"); + + PersonSafetyInfo entity = BeanUtil.copyProperties(dto, PersonSafetyInfo.class); + entity.setCreateBy(user.getUsername()); + entity.setCreateOn(LocalDateTime.now()); + entity.setProjectId(project.getId()); + entity.setUpdateBy(user.getUsername()); + entity.setUpdateOn(LocalDateTime.now()); + if(personSafetyInfoService.save(entity)){ + sucessNum ++; + } + } + + return "保存成功" + sucessNum + "条"; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/PersonSafetyInfoMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/PersonSafetyInfoMapper.java new file mode 100644 index 0000000..3316418 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/PersonSafetyInfoMapper.java @@ -0,0 +1,15 @@ +package com.ningdatech.pmapi.safety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; + +/** + *

+ *

+ * + * @author ZPF + * @since 2023-08-2 + */ +public interface PersonSafetyInfoMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/SupplierSafetyQualificationMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/SupplierSafetyQualificationMapper.java new file mode 100644 index 0000000..39e897b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/mapper/SupplierSafetyQualificationMapper.java @@ -0,0 +1,15 @@ +package com.ningdatech.pmapi.safety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; + +/** + *

+ *

+ * + * @author ZPF + * @since 2023-08-2 + */ +public interface SupplierSafetyQualificationMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java new file mode 100644 index 0000000..afcca6a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java @@ -0,0 +1,45 @@ +package com.ningdatech.pmapi.safety.model.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 安全人员信息 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@ApiModel(value = "PersonSafetyInfo对象", description = "安全人员信息") +public class PersonSafetyInfoDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("项目编号") + @NotBlank(message = "项目编号不能为空") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("人员姓名") + private String username; + + @ApiModelProperty("调查报告") + private String investigationReport; + + private LocalDateTime createOn; + private LocalDateTime updateOn; + private String createBy; + private String updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java new file mode 100644 index 0000000..9da9fbe --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java @@ -0,0 +1,39 @@ +package com.ningdatech.pmapi.safety.model.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + *

+ * 供应商安全资质 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@ApiModel(value = "SupplierSafetyQualification对象", description = "供应商安全资质") +public class SupplierSafetyQualificationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("项目编号") + @NotBlank(message = "项目编号不能为空") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("安全资质") + private String safetyQualification; + + @ApiModelProperty("安全协议") + private String safetyProtocol; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/PersonSafetyInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/PersonSafetyInfo.java new file mode 100644 index 0000000..0b7139e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/PersonSafetyInfo.java @@ -0,0 +1,48 @@ +package com.ningdatech.pmapi.safety.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.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 安全人员信息 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@TableName("nd_person_safety_info") +@ApiModel(value = "PersonSafetyInfo对象", description = "安全人员信息") +public class PersonSafetyInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("项目编号") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("人员姓名") + private String username; + + @ApiModelProperty("调查报告") + private String investigationReport; + + private LocalDateTime createOn; + private LocalDateTime updateOn; + private String createBy; + private String updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/SupplierSafetyQualification.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/SupplierSafetyQualification.java new file mode 100644 index 0000000..c2632b6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/entity/SupplierSafetyQualification.java @@ -0,0 +1,45 @@ +package com.ningdatech.pmapi.safety.model.entity; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 供应商安全资质 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@TableName("nd_supplier_safety_qualification") +@ApiModel(value = "SupplierSafetyQualification对象", description = "供应商安全资质") +public class SupplierSafetyQualification implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("项目编号") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("安全资质") + private String safetyQualification; + + @ApiModelProperty("安全协议") + private String safetyProtocol; + + private LocalDateTime createOn; + private LocalDateTime updateOn; + private String createBy; + private String updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/PersonSafetyInfoVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/PersonSafetyInfoVO.java new file mode 100644 index 0000000..07c7019 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/PersonSafetyInfoVO.java @@ -0,0 +1,43 @@ +package com.ningdatech.pmapi.safety.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 安全人员信息 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@ApiModel(value = "PersonSafetyInfo对象", description = "安全人员信息") +public class PersonSafetyInfoVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("项目编号") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("人员姓名") + private String username; + + @ApiModelProperty("调查报告") + private String investigationReport; + + private LocalDateTime createOn; + private LocalDateTime updateOn; + private String createBy; + private String updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java new file mode 100644 index 0000000..8ec87f2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SafetyMonitorVO.java @@ -0,0 +1,23 @@ +package com.ningdatech.pmapi.safety.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.util.List; + +/** + * @Classname SafetyMonitorVO + * @Description + * @Date 2023/8/2 9:19 + * @Author PoffyZhang + */ +@Data +@ApiModel(value = "SafetyMonitorVO", description = "监控VO") +public class SafetyMonitorVO { + + @ApiModelProperty("人员安全信息") + private List personSafetyInfo; + + @ApiModelProperty("供应商安全资质") + private List supplierSafetyQualification; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SupplierSafetyQualificationVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SupplierSafetyQualificationVO.java new file mode 100644 index 0000000..ab4943b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/SupplierSafetyQualificationVO.java @@ -0,0 +1,43 @@ +package com.ningdatech.pmapi.safety.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 供应商安全资质 + *

+ * + * @author ZPF + * @since 2023-08-02 + */ +@Data +@ApiModel(value = "SupplierSafetyQualification对象", description = "供应商安全资质") +public class SupplierSafetyQualificationVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + private Long id; + + @ApiModelProperty("项目编号") + private String projectCode; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("安全资质") + private String safetyQualification; + + @ApiModelProperty("安全协议") + private String safetyProtocol; + + private LocalDateTime createOn; + private LocalDateTime updateOn; + private String createBy; + private String updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/IPersonSafetyInfoService.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/IPersonSafetyInfoService.java new file mode 100644 index 0000000..885cf5d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/IPersonSafetyInfoService.java @@ -0,0 +1,14 @@ +package com.ningdatech.pmapi.safety.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; + +/** + * @Classname IPersonSafetyInfoService + * @Description + * @Date 2023/8/2 10:47 + * @Author PoffyZhang + */ +public interface IPersonSafetyInfoService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/ISupplierSafetyQualificationService.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/ISupplierSafetyQualificationService.java new file mode 100644 index 0000000..d68cca7 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/ISupplierSafetyQualificationService.java @@ -0,0 +1,14 @@ +package com.ningdatech.pmapi.safety.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; + +/** + * @Classname ISupplierSafetyQulificationService + * @Description + * @Date 2023/8/2 10:47 + * @Author PoffyZhang + */ +public interface ISupplierSafetyQualificationService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/PersonSafetyInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/PersonSafetyInfoServiceImpl.java new file mode 100644 index 0000000..c0bca50 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/PersonSafetyInfoServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.safety.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ningdatech.pmapi.safety.mapper.PersonSafetyInfoMapper; +import com.ningdatech.pmapi.safety.model.entity.PersonSafetyInfo; +import com.ningdatech.pmapi.safety.service.IPersonSafetyInfoService; +import org.springframework.stereotype.Service; + +/** + *

+ *

+ * + * @author ZPF + * @since 2023-08-2 + */ +@Service +public class PersonSafetyInfoServiceImpl extends ServiceImpl implements IPersonSafetyInfoService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/SupplierSafetyQualificationServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/SupplierSafetyQualificationServiceImpl.java new file mode 100644 index 0000000..dc3af89 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/service/impl/SupplierSafetyQualificationServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.safety.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ningdatech.pmapi.safety.mapper.SupplierSafetyQualificationMapper; +import com.ningdatech.pmapi.safety.model.entity.SupplierSafetyQualification; +import com.ningdatech.pmapi.safety.service.ISupplierSafetyQualificationService; +import org.springframework.stereotype.Service; + +/** + *

+ *

+ * + * @author ZPF + * @since 2023-08-2 + */ +@Service +public class SupplierSafetyQualificationServiceImpl extends ServiceImpl implements ISupplierSafetyQualificationService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java index c477497..75fec5c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java @@ -157,6 +157,18 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails { return Boolean.FALSE; } + public Boolean getRegionAdmin() { + if (CollUtil.isNotEmpty(this.userRoleList)) { + for (Role role : this.userRoleList) { + RoleEnum roleEnum = RoleEnum.mathByName(role.getCode()); + if (Objects.nonNull(roleEnum) && roleEnum.eq(RoleEnum.REGION_MANAGER.name())) { + return Boolean.TRUE; + } + } + } + return Boolean.FALSE; + } + public Boolean getIsMunicipalOrg() { //如果是丽水市本级的code 就是 if (RegionConst.RC_LS.equals(this.regionCode)) { From fadef577d9370829bc37f5ac20bab86be6bf5544 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 11:57:09 +0800 Subject: [PATCH 37/39] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java index 11d5972..12419e3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/vo/ProjectMonitorVO.java @@ -26,6 +26,9 @@ public class ProjectMonitorVO { @ApiModelProperty("项目名称") private String projectName; + @ApiModelProperty("项目编号") + private String projectCode; + @ApiModelProperty("申报单位code") private String buildOrgCode; From 161ac32989160281cf1123e253e2159da5aec078 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 12:01:34 +0800 Subject: [PATCH 38/39] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java | 3 --- .../pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java index afcca6a..8527086 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/PersonSafetyInfoDTO.java @@ -22,9 +22,6 @@ public class PersonSafetyInfoDTO implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty("主键") - private Long id; - @ApiModelProperty("项目编号") @NotBlank(message = "项目编号不能为空") private String projectCode; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java index 9da9fbe..512d9c7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/model/dto/SupplierSafetyQualificationDTO.java @@ -21,9 +21,6 @@ public class SupplierSafetyQualificationDTO implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty("主键") - private Long id; - @ApiModelProperty("项目编号") @NotBlank(message = "项目编号不能为空") private String projectCode; From 688725d9a163c5e1238ad06e818ccd5bb6c70f94 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 2 Aug 2023 12:07:41 +0800 Subject: [PATCH 39/39] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ningdatech/pmapi/safety/controller/SafetyRiskController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java index a71523b..aa4708c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/controller/SafetyRiskController.java @@ -44,7 +44,7 @@ public class SafetyRiskController { return safetyRiskManage.personMonitorSave(dtos); } - @GetMapping("/supplier-safety-qualification/save") + @PostMapping("/supplier-safety-qualification/save") @ApiOperation("供应商安全资质保存") @WebLog("供应商安全资质保存") public String supplierSafetyQualificationSave(@Valid @RequestBody List dtos) {