From e7a6cfd76bbe809283de0c1327145fccf7ed4138 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Wed, 8 Mar 2023 10:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E9=A1=B9=E7=9B=AE=E5=BA=93?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=A4=84=E7=90=86=E8=AF=A6=E6=83=85=E5=AE=9E?= =?UTF-8?q?=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProjectLibController.java | 2 +- .../projectlib/enumeration/StepStatusEnum.java | 52 ---------------------- .../handle/AbstractProcessBusinessHandle.java | 2 +- .../pmapi/projectlib/handle/AnnualPlanHandle.java | 4 +- .../pmapi/projectlib/handle/ArchivedHandle.java | 4 +- .../handle/ConstructionPlanReviewHandle.java | 4 +- .../projectlib/handle/DeptUnitedReviewHandle.java | 4 +- .../handle/PreliminaryPreviewHandle.java | 4 +- .../handle/ProcessExecuteChainHandle.java | 2 +- .../projectlib/handle/ProjectApprovalHandle.java | 4 +- .../projectlib/handle/ProjectDeclareHandle.java | 4 +- .../handle/ProjectFinalInspectionHandle.java | 4 +- .../handle/ProjectPreliminaryInspectionHandle.java | 4 +- .../projectlib/handle/TenderPurchaseHandle.java | 4 +- .../projectlib/handle/UnitInnerAuditHandle.java | 4 +- .../pmapi/projectlib/manage/ProjectLibManage.java | 2 +- .../pmapi/projectlib/model/vo/ProcessDetailVO.java | 40 ----------------- .../pmapi/staging/enums/MsgTypeEnum.java | 1 - .../pmapi/todocenter/manage/TodoCenterManage.java | 22 +++++++-- 19 files changed, 45 insertions(+), 122 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/StepStatusEnum.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProcessDetailVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java index 54f3295..480a75d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java @@ -3,9 +3,9 @@ package com.ningdatech.pmapi.projectlib.controller; import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/StepStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/StepStatusEnum.java deleted file mode 100644 index 6fcc183..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/StepStatusEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.ningdatech.pmapi.projectlib.enumeration; - -import com.google.common.collect.Lists; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import org.apache.commons.lang3.StringUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -@Getter -@AllArgsConstructor -@NoArgsConstructor -/** - * 环节状态枚举 - * @author CMM - * @since 2023/02/24 11:51 - */ -public enum StepStatusEnum { - /** - * 环节状态 - */ - NOT_START(1, "未开始"), - ON_GOING(2, "进行中"), - REJECTED(3,"被驳回"), - COMPLETED(4,"已完成"); - - private Integer code; - private String desc; - - public static String getDescByCode(Integer code) { - if (Objects.isNull(code)) { - return StringUtils.EMPTY; - } - for (StepStatusEnum t : StepStatusEnum.values()) { - if (code.equals(t.getCode())) { - return t.desc; - } - } - return StringUtils.EMPTY; - } - - public boolean eq(String val) { - return this.name().equals(val); - } - - public static boolean contains (StepStatusEnum e, List enums){ - return enums.contains(e); - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AbstractProcessBusinessHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AbstractProcessBusinessHandle.java index 08b223c..7dbc3f0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AbstractProcessBusinessHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AbstractProcessBusinessHandle.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.projectlib.handle; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import java.util.List; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java index 8253a97..e3d9f17 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java @@ -10,12 +10,12 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.ningdatech.pmapi.common.constant.CommonConst; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java index 3e66f78..27189a6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java @@ -4,15 +4,15 @@ package com.ningdatech.pmapi.projectlib.handle; import java.util.List; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java index 9ac5438..b8340d0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java @@ -7,15 +7,15 @@ import java.util.Objects; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.wflow.workflow.bean.process.ProgressNode; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessStatusEnum; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java index 4446a28..0c43ef6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java @@ -7,15 +7,15 @@ import java.util.Objects; import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.wflow.workflow.bean.process.ProgressNode; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessStatusEnum; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java index d4c71c8..15e4b72 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/PreliminaryPreviewHandle.java @@ -5,13 +5,13 @@ import com.google.common.collect.Lists; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.wflow.workflow.bean.process.ProgressNode; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessStatusEnum; +import com.wflow.workflow.enums.StepStatusEnum; import com.wflow.workflow.service.ProcessInstanceService; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java index 7b210d7..db6e9c0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.projectlib.handle; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import org.springframework.stereotype.Component; import java.util.Collections; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java index d634354..86b6386 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java @@ -6,6 +6,8 @@ import java.util.*; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @@ -13,10 +15,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.manage.AnnualPlanLibManage; import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; import com.ningdatech.pmapi.projectlib.service.IProjectService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectDeclareHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectDeclareHandle.java index d374548..48c79a9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectDeclareHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectDeclareHandle.java @@ -1,10 +1,10 @@ package com.ningdatech.pmapi.projectlib.handle; import com.ningdatech.pmapi.common.constant.CommonConst; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java index 144d568..69a0d2d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java @@ -9,15 +9,15 @@ import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.wflow.workflow.bean.process.ProgressNode; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessStatusEnum; +import com.wflow.workflow.enums.StepStatusEnum; import com.wflow.workflow.service.ProcessInstanceService; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.common.constant.CommonConst; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java index 9d1e8a1..beffe7a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java @@ -5,6 +5,8 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; import java.util.Arrays; import java.util.List; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @@ -13,10 +15,8 @@ import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; import com.ningdatech.pmapi.projectlib.service.IProjectService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java index e5dbb08..388c90a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java @@ -4,6 +4,8 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; import java.util.*; +import com.wflow.workflow.bean.vo.ProcessDetailVO; +import com.wflow.workflow.enums.StepStatusEnum; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @@ -12,10 +14,8 @@ import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.constant.CommonConst; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; import com.ningdatech.pmapi.projectlib.service.IProjectService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java index ce3b334..286e255 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/UnitInnerAuditHandle.java @@ -11,11 +11,11 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; import com.ningdatech.pmapi.projectlib.service.IProjectInstService; import com.ningdatech.pmapi.common.constant.CommonConst; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.wflow.workflow.bean.process.ProgressNode; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.enums.ProcessStatusEnum; +import com.wflow.workflow.enums.StepStatusEnum; import com.wflow.workflow.service.ProcessInstanceService; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; 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 61a28ef..69f6453 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 @@ -17,12 +17,12 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.model.entity.ProjectRenewalFundDeclaration; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO; -import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.workflow.bean.vo.ProcessDetailVO; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProcessDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProcessDetailVO.java deleted file mode 100644 index 5cd3f02..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProcessDetailVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.ningdatech.pmapi.projectlib.model.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; -import com.wflow.workflow.bean.vo.ProcessProgressVo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.time.LocalDateTime; -import java.util.List; - -/** - * 流程进度详情VO - * - * @author CMM - * @since 2023/02/24 11:25 - */ -@ApiModel(value = "ProcessDetailVO", description = "流程进度详情VO") -@Data -public class ProcessDetailVO implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("环节状态") - private StepStatusEnum stepStatus; - - @ApiModelProperty("流程名称") - private String processName; - - @ApiModelProperty("完成时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime finishTime; - - @ApiModelProperty("流程处理进度详情") - private ProcessProgressVo processProgressVo; - - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java index 67dab2e..a12c4c5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java @@ -1,6 +1,5 @@ package com.ningdatech.pmapi.staging.enums; -import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; 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 e262694..a37a910 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 @@ -9,6 +9,7 @@ import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.constant.CommonConst; +import com.ningdatech.pmapi.common.helper.UserInfoHelper; import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; @@ -39,6 +40,7 @@ import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedExportReq; import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedReq; import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO; import com.ningdatech.pmapi.user.entity.UserInfo; +import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; import com.ningdatech.pmapi.user.service.IUserInfoService; import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.wflow.contants.HisProInsEndActId; @@ -97,6 +99,7 @@ public class TodoCenterManage { private final INdWorkNoticeStagingService workNoticeStagingService; private final DefaultDeclaredProjectManage defaultDeclaredProjectManage; private final IProjectApplicationService projectApplicationService; + private final UserInfoHelper userInfoHelper; /** @@ -363,14 +366,27 @@ public class TodoCenterManage { } else { // 当前登录用户不是流程发起人 List currentProgressInfo = currentInstanceDetail.getProgressInfo(); + + ProgressNode progressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); + ProgressNode beforeProgressNode; + ProgressNode currentProgressNode; + // 说明当前节点是子流程节点 + if (progressNode.getNodeType().name().equals(NodeTypeEnum.SUB.name())) { + List children = progressNode.getChildren(); + beforeProgressNode = children.get(children.size() - 2); + currentProgressNode = children.get(children.size() - 1); + } else { + beforeProgressNode = currentProgressInfo.get(currentProgressInfo.size() - 2); + currentProgressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); + } // 获取当前工作流任务前一个审核人信息 - ProgressNode beforeProgressNode = currentProgressInfo.get(currentProgressInfo.size() - 2); ProcessInstanceUserDto beforeUser = beforeProgressNode.getUser(); + UserFullInfoDTO beforeUserInfo = userInfoHelper.getUserFullInfo(Long.valueOf(beforeUser.getUserId())); // 获取当前当前工作流任务当前审核人信息 - ProgressNode currentProgressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); ProcessInstanceUserDto currentUser = currentProgressNode.getUser(); + UserFullInfoDTO currentUserInfo = userInfoHelper.getUserFullInfo(Long.valueOf(currentUser.getUserId())); // 判断当前工作流任务前一个审核人的部门和当前登录用户的部门是否是同一个,如果是同一个才可以撤回,否则抛出异常 - boolean orgFlag = currentUser.getOrgCode().equals(beforeUser.getOrgCode()); + boolean orgFlag = currentUserInfo.getOrganizationCode().equals(beforeUserInfo.getOrganizationCode()); boolean userFlag = beforeUser.getUserId().equals(String.valueOf(userId)); if (!orgFlag) { throw new BizException("下一个审核人和您不是同一个部门,无法撤回!");