From 62a8c47ea040661045014de843c7fe1d79ec455c Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 11 Apr 2024 21:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BB=88=E9=AA=8C=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E9=80=9A=E8=BF=87=E9=A1=B9=E7=9B=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hz/pm/api/common/helper/WflowHelper.java | 2 +- .../action/ProjectStateChangeAction.java | 34 +++++----------------- .../impl/ProjectStateMachineBuilderImpl.java | 17 +++++------ .../event/ProjectStateChangeEvent.java | 8 ++--- .../hz/pm/api/meeting/manage/MeetingManage.java | 2 +- .../projectdeclared/manage/DelayedApplyManage.java | 8 ++--- .../manage/FinalAcceptanceManage.java | 4 +-- .../api/projectlib/manage/AnnualPlanLibManage.java | 10 +++---- .../model/enumeration/ProjectStatusEnum.java | 6 ++-- .../model/enumeration/WarningFlowTypeEnum.java | 2 +- .../enumeration/WarningOperationTypeEnum.java | 9 +++--- .../api/scheduler/listener/ProcessEndListener.java | 5 ---- .../hz/pm/api/todocenter/manage/HandlerManage.java | 5 ---- 13 files changed, 39 insertions(+), 73 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/WflowHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/WflowHelper.java index a81c4e8..4b5da70 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/WflowHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/WflowHelper.java @@ -97,7 +97,7 @@ public class WflowHelper { .singleResult(); }).filter(w -> w != null && "PASS".equals(w.getValue().toString())) .collect(Collectors.toList()); - if (userTaskDefineNode.getLoopCharacteristics().isSequential()) { + if (!userTaskDefineNode.getLoopCharacteristics().isSequential()) { if (variableInstances.isEmpty()) { return Boolean.FALSE; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/action/ProjectStateChangeAction.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/action/ProjectStateChangeAction.java index 687ef6c..0a10ebc 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/action/ProjectStateChangeAction.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/action/ProjectStateChangeAction.java @@ -255,13 +255,6 @@ public class ProjectStateChangeAction { project.setStatus(ProjectStatusEnum.TO_BE_APPROVED.getCode()); } - - @OnTransition(source = "UNDER_CONSTRUCTION", target = "TO_BE_FINALLY_INSPECTED") - public void PRELIMINARY_ACCEPTANCE_PUT_ON_RECORD(Message message) { - Project project = getProject(message); - project.setStatus(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode()); - } - @OnTransition(source = "UNDER_CONSTRUCTION", target = "TO_BE_PURCHASED") public void UNDER_CONSTRUCTION_WITHDRAW(Message message) { Project project = getProject(message); @@ -286,20 +279,13 @@ public class ProjectStateChangeAction { project.setStatus(ProjectStatusEnum.ON_PILOT_RUNNING.getCode()); } - @OnTransition(source = "ON_PILOT_RUNNING", target = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW") + @OnTransition(source = "ON_PILOT_RUNNING", target = "ON_FINALLY_INSPECTED") public void FINAL_ACCEPTANCE_APPLICATION(Message message) { Project project = getProject(message); - project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode()); - } - - @OnTransition(source = "TO_BE_FINALLY_INSPECTED", target = "UNDER_CONSTRUCTION") - public void TO_BE_FINALLY_INSPECTED_WITHDRAW(Message message) { - Project project = getProject(message); - project.setStatus(ProjectStatusEnum.UNDER_CONSTRUCTION.getCode()); + project.setStatus(ProjectStatusEnum.ON_FINALLY_INSPECTED.getCode()); } - - @OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "ARCHIVED") + @OnTransition(source = "ON_FINALLY_INSPECTED", target = "ARCHIVED") public void FINAL_ACCEPTANCE_PASS(Message message) { Project project = getProject(message); // 终验审核通过后,项目一级状态变更为已归档 @@ -307,22 +293,16 @@ public class ProjectStateChangeAction { project.setStatus(ProjectStatusEnum.ACCEPTED.getCode()); } - @OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "FINAL_ACCEPTANCE_REVIEW_FAILED") + @OnTransition(source = "ON_FINALLY_INSPECTED", target = "FINALLY_INSPECTED_FAILED") public void FINAL_ACCEPTANCE_REJECT(Message message) { Project project = getProject(message); - project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_REVIEW_FAILED.getCode()); - } - - @OnTransition(source = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW", target = "TO_BE_FINALLY_INSPECTED") - public void FINAL_ACCEPTANCE_IS_UNDER_REVIEW_WITHDRAW(Message message) { - Project project = getProject(message); - project.setStatus(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode()); + project.setStatus(ProjectStatusEnum.FINALLY_INSPECTED_FAILED.getCode()); } - @OnTransition(source = "FINAL_ACCEPTANCE_REVIEW_FAILED", target = "FINAL_ACCEPTANCE_IS_UNDER_REVIEW") + @OnTransition(source = "FINALLY_INSPECTED_FAILED", target = "ON_FINALLY_INSPECTED") public void FINAL_RE_ACCEPTANCE_APPLICATION(Message message) { Project project = getProject(message); - project.setStatus(ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW.getCode()); + project.setStatus(ProjectStatusEnum.ON_FINALLY_INSPECTED.getCode()); } } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java index 7ef95f2..32ae0a9 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java @@ -128,7 +128,6 @@ public class ProjectStateMachineBuilderImpl implements BaseStateMachineBuilder

purchaseInstQuery = Wrappers.lambdaQuery(PurchaseInst.class) .select(PurchaseInst::getBidId) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java index 73f3fa5..eafc5ae 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/AnnualPlanLibManage.java @@ -13,24 +13,24 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Assert; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Lists; -import com.hz.pm.api.common.model.constant.CommonConst; import com.hz.pm.api.common.enumeration.CommonEnum; import com.hz.pm.api.common.helper.UserInfoHelper; +import com.hz.pm.api.common.model.constant.CommonConst; import com.hz.pm.api.common.model.entity.ExcelExportWriter; import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil; import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.common.util.ExcelDownUtil; import com.hz.pm.api.datascope.model.DataScopeDTO; import com.hz.pm.api.datascope.utils.DataScopeUtil; -import com.hz.pm.api.projectlib.model.enumeration.ProjectLibFlagEnum; -import com.hz.pm.api.projectlib.model.enumeration.ProjectRenewalApprovalStatusEnum; -import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; import com.hz.pm.api.projectlib.helper.ProjectHelper; import com.hz.pm.api.projectlib.model.dto.AnnualLibExportDTO; import com.hz.pm.api.projectlib.model.dto.AnnualLibImportDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO; import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.ProjectRenewalFundDeclaration; +import com.hz.pm.api.projectlib.model.enumeration.ProjectLibFlagEnum; +import com.hz.pm.api.projectlib.model.enumeration.ProjectRenewalApprovalStatusEnum; +import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; import com.hz.pm.api.projectlib.model.req.ProjectApprovedReq; import com.hz.pm.api.projectlib.model.req.ProjectIdReq; import com.hz.pm.api.projectlib.model.req.ProjectListReq; @@ -92,7 +92,7 @@ public class AnnualPlanLibManage { private static final List ANNUAL_PLAN_LIST_STATUS = Arrays.asList(IN_THE_ANNUAL_PLAN, SCHEME_UNDER_REVIEW, SCHEME_REVIEW_FAILED, TO_BE_APPROVED, TO_BE_DECLARED, PLAN_TO_BE_DECLARED, PENDING_PREQUALIFICATION_CHOICE, PROJECT_APPROVED, TO_BE_PURCHASED, UNDER_CONSTRUCTION, - TO_BE_FINALLY_INSPECTED, FINAL_ACCEPTANCE_IS_UNDER_REVIEW, FINAL_ACCEPTANCE_REVIEW_FAILED, ARCHIVED); + ON_PILOT_RUNNING, ARCHIVED); public PageVo annulPlanLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/ProjectStatusEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/ProjectStatusEnum.java index 9b0ae8a..8b4a7cf 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/ProjectStatusEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/ProjectStatusEnum.java @@ -59,12 +59,10 @@ public enum ProjectStatusEnum { TO_BE_PURCHASED(20001, "待采购", GovProjectStatusEnum.APPROVED), ON_PURCHASING(20007, "采购中", GovProjectStatusEnum.APPROVED), UNDER_CONSTRUCTION(20002, "建设中", null), - TO_BE_FINALLY_INSPECTED(20003, "待终验", GovProjectStatusEnum.HAS_PRE_INS), - ON_FINALLY_INSPECTED(20010, "终验中", GovProjectStatusEnum.HAS_PRE_INS), TO_BE_FIRST_INSPECTED(20008, "待初验", null), ON_PILOT_RUNNING(20009, "试运行中", null), - FINAL_ACCEPTANCE_IS_UNDER_REVIEW(20004, "终验审核中", null), - FINAL_ACCEPTANCE_REVIEW_FAILED(20005, "终验审核不通过", null), + ON_FINALLY_INSPECTED(20004, "终验审核中", null), + FINALLY_INSPECTED_FAILED(20005, "终验审核不通过", null), /** * 项目阶段:已归档 */ diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java index 0a481ff..990bc30 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningFlowTypeEnum.java @@ -24,7 +24,7 @@ public enum WarningFlowTypeEnum { PRELIMINARY_PREVIEW(2, "建设方案申报",ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode(),"declareManage/constructionPlanDeclare"), DEPT_UNITED_REVIEW(3,"采购结果备案",ProjectStatusEnum.TO_BE_PURCHASED.getCode(),"declareManage/procurementRecord/purchaseResults"), CONSTRUCTION_PLAN_REVIEW(4,"初验备案",ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(),"declareManage/acceptanceApply/initialInspectionRecord"), - PROJECT_FINAL_INSPECTION(5,"验收申报",ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode(),"declareManage/acceptanceApply/finalInspectionDeclare"); + PROJECT_FINAL_INSPECTION(5,"验收申报",ProjectStatusEnum.ON_PILOT_RUNNING.getCode(),"declareManage/acceptanceApply/finalInspectionDeclare"); private Integer code; private String desc; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningOperationTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningOperationTypeEnum.java index 9da1fc6..100bb0b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningOperationTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/WarningOperationTypeEnum.java @@ -1,6 +1,5 @@ package com.hz.pm.api.projectlib.model.enumeration; -import io.swagger.models.auth.In; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -9,8 +8,8 @@ import org.apache.commons.lang3.StringUtils; import java.util.Objects; /** - * * 预警填报类型枚举 + * * @author CMM * @since 2023/02/24 16:14 */ @@ -21,8 +20,8 @@ public enum WarningOperationTypeEnum { /** * 预警实施类型枚举 */ - CHUYAN(1, "项目初验",ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(),"declareManage/acceptanceApply/initialInspectionRecord"), - ZHONGYAN(2, "项目终验",ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode(),"declareManage/acceptanceApply/finalInspectionDeclare"); + CHUYAN(1, "项目初验", ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(), "declareManage/acceptanceApply/initialInspectionRecord"), + ZHONGYAN(2, "项目终验", ProjectStatusEnum.ON_PILOT_RUNNING.getCode(), "declareManage/acceptanceApply/finalInspectionDeclare"); private Integer code; private String desc; @@ -56,7 +55,7 @@ public enum WarningOperationTypeEnum { return null; } - public boolean eq(Integer code){ + public boolean eq(Integer code) { return this.getCode().equals(code); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/ProcessEndListener.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/ProcessEndListener.java index e2c934b..a162494 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/ProcessEndListener.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/ProcessEndListener.java @@ -7,16 +7,13 @@ import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.ProjectInst; import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; -import com.hz.pm.api.projectlib.service.IProjectApplicationService; import com.hz.pm.api.projectlib.service.IProjectInstService; import com.hz.pm.api.projectlib.service.IProjectService; -import com.hz.pm.api.provincial.service.IJoinReviewProvincialBureauService; import com.hz.pm.api.staging.enums.MsgTypeEnum; import com.hz.pm.api.staging.service.IProjectStagingService; import com.hz.pm.api.sys.manage.NoticeManage; import com.hz.pm.api.todocenter.manage.HandlerManage; import com.ningdatech.basic.exception.BizException; -import com.ningdatech.file.service.FileService; import com.wflow.contants.HisProInsEndActId; import com.wflow.workflow.bean.process.ProgressNode; import com.wflow.workflow.bean.process.enums.NodeTypeEnum; @@ -189,8 +186,6 @@ public class ProcessEndListener { case DEPARTMENT_JOINT_REVIEW: // 当前项目状态是方案评审中 case SCHEME_UNDER_REVIEW: - // 当前项目状态是终验审核中 - case FINAL_ACCEPTANCE_IS_UNDER_REVIEW: handlerManage.updatePassProjectStatus(0L, project); break; default: diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java index 0fa2161..d9010a6 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java @@ -201,8 +201,6 @@ public class HandlerManage { case UNDER_INTERNAL_AUDIT: // 立项备案审批 case DECLARED_APPROVED_RECORD_AUDITING: - // 当前项目状态是方案评审中 - case FINAL_ACCEPTANCE_IS_UNDER_REVIEW: updatePassProjectStatus(userId, project); break; case SCHEME_UNDER_REVIEW: @@ -214,7 +212,6 @@ public class HandlerManage { case ON_PURCHASING: case TO_BE_FIRST_INSPECTED: case ON_PILOT_RUNNING: - case TO_BE_FINALLY_INSPECTED: case ON_FINALLY_INSPECTED: ProjectProcessStageEnum processStage = ProjectProcessStageEnum.get(instTypeEnum.getCode()) .orElseThrow(() -> BizException.wrap("不支持的流程类型")); @@ -447,8 +444,6 @@ public class HandlerManage { case DEPARTMENT_JOINT_REVIEW: // 当前项目状态是方案评审中 case SCHEME_UNDER_REVIEW: - // 当前项目状态是终验审核中 - case FINAL_ACCEPTANCE_IS_UNDER_REVIEW: updateWithdrawProjectStatus(userId, declaredProject); break; default: