@@ -3,9 +3,9 @@ package com.ningdatech.pmapi.projectlib.controller; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | ||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | 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.ProjectDetailVO; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
@@ -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<StepStatusEnum> enums){ | |||||
return enums.contains(e); | |||||
} | |||||
} |
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.projectlib.handle; | 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; | import java.util.List; | ||||
@@ -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.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; | import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | 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.*; | import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; | ||||
@@ -4,15 +4,15 @@ package com.ningdatech.pmapi.projectlib.handle; | |||||
import java.util.List; | import java.util.List; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | 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.ProjectStatusChange; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; | import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService; | ||||
/** | /** | ||||
@@ -7,15 +7,15 @@ import java.util.Objects; | |||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.basic.util.NdDateUtils; | import com.ningdatech.basic.util.NdDateUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | 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.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | import com.wflow.workflow.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
@@ -7,15 +7,15 @@ import java.util.Objects; | |||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.basic.util.NdDateUtils; | import com.ningdatech.basic.util.NdDateUtils; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | 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.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | import com.wflow.workflow.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
@@ -5,13 +5,13 @@ import com.google.common.collect.Lists; | |||||
import com.ningdatech.basic.util.NdDateUtils; | import com.ningdatech.basic.util.NdDateUtils; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | 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.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | 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.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
import com.wflow.workflow.enums.StepStatusEnum; | |||||
import com.wflow.workflow.service.ProcessInstanceService; | import com.wflow.workflow.service.ProcessInstanceService; | ||||
import org.springframework.core.annotation.Order; | import org.springframework.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -1,6 +1,6 @@ | |||||
package com.ningdatech.pmapi.projectlib.handle; | 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 org.springframework.stereotype.Component; | ||||
import java.util.Collections; | import java.util.Collections; | ||||
@@ -6,6 +6,8 @@ import java.util.*; | |||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | 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.constant.CommonConst; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | 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.manage.AnnualPlanLibManage; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange; | 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.INdProjectStatusChangeService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
@@ -1,10 +1,10 @@ | |||||
package com.ningdatech.pmapi.projectlib.handle; | package com.ningdatech.pmapi.projectlib.handle; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | 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.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -9,15 +9,15 @@ import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.wflow.workflow.bean.process.ProgressNode; | 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.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
import com.wflow.workflow.enums.StepStatusEnum; | |||||
import com.wflow.workflow.service.ProcessInstanceService; | import com.wflow.workflow.service.ProcessInstanceService; | ||||
import org.springframework.core.annotation.Order; | import org.springframework.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProcessDetailVO; | |||||
/** | /** | ||||
@@ -5,6 +5,8 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; | |||||
import java.util.Arrays; | import java.util.Arrays; | ||||
import java.util.List; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | 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.constant.CommonConst; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | 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.ProjectStatusChange; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | 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.INdProjectStatusChangeService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
@@ -4,6 +4,8 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; | |||||
import java.util.*; | 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.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | 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.constant.CommonConst; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | 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.ProjectStatusChange; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | 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.INdProjectStatusChangeService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
@@ -11,11 +11,11 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | 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.process.ProgressNode; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | |||||
import com.wflow.workflow.bean.vo.ProcessProgressVo; | import com.wflow.workflow.bean.vo.ProcessProgressVo; | ||||
import com.wflow.workflow.enums.ProcessStatusEnum; | import com.wflow.workflow.enums.ProcessStatusEnum; | ||||
import com.wflow.workflow.enums.StepStatusEnum; | |||||
import com.wflow.workflow.service.ProcessInstanceService; | import com.wflow.workflow.service.ProcessInstanceService; | ||||
import org.springframework.core.annotation.Order; | import org.springframework.core.annotation.Order; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -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.entity.ProjectRenewalFundDeclaration; | ||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.AnnualAmountVO; | 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.ProjectDetailVO; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; | import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; | import com.ningdatech.pmapi.projectlib.service.IProjectRenewalFundDeclarationService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -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; | |||||
} |
@@ -1,6 +1,5 @@ | |||||
package com.ningdatech.pmapi.staging.enums; | package com.ningdatech.pmapi.staging.enums; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.StepStatusEnum; | |||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Getter; | import lombok.Getter; | ||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
@@ -9,6 +9,7 @@ import com.ningdatech.basic.function.VUtils; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.pmapi.common.constant.CommonConst; | 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.model.entity.ExcelExportWriter; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | 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.req.ToBeProcessedReq; | ||||
import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO; | import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO; | ||||
import com.ningdatech.pmapi.user.entity.UserInfo; | 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.service.IUserInfoService; | ||||
import com.ningdatech.pmapi.user.util.LoginUserUtil; | import com.ningdatech.pmapi.user.util.LoginUserUtil; | ||||
import com.wflow.contants.HisProInsEndActId; | import com.wflow.contants.HisProInsEndActId; | ||||
@@ -97,6 +99,7 @@ public class TodoCenterManage { | |||||
private final INdWorkNoticeStagingService workNoticeStagingService; | private final INdWorkNoticeStagingService workNoticeStagingService; | ||||
private final DefaultDeclaredProjectManage defaultDeclaredProjectManage; | private final DefaultDeclaredProjectManage defaultDeclaredProjectManage; | ||||
private final IProjectApplicationService projectApplicationService; | private final IProjectApplicationService projectApplicationService; | ||||
private final UserInfoHelper userInfoHelper; | |||||
/** | /** | ||||
@@ -363,14 +366,27 @@ public class TodoCenterManage { | |||||
} else { | } else { | ||||
// 当前登录用户不是流程发起人 | // 当前登录用户不是流程发起人 | ||||
List<ProgressNode> currentProgressInfo = currentInstanceDetail.getProgressInfo(); | List<ProgressNode> currentProgressInfo = currentInstanceDetail.getProgressInfo(); | ||||
ProgressNode progressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); | |||||
ProgressNode beforeProgressNode; | |||||
ProgressNode currentProgressNode; | |||||
// 说明当前节点是子流程节点 | |||||
if (progressNode.getNodeType().name().equals(NodeTypeEnum.SUB.name())) { | |||||
List<ProgressNode> 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(); | ProcessInstanceUserDto beforeUser = beforeProgressNode.getUser(); | ||||
UserFullInfoDTO beforeUserInfo = userInfoHelper.getUserFullInfo(Long.valueOf(beforeUser.getUserId())); | |||||
// 获取当前当前工作流任务当前审核人信息 | // 获取当前当前工作流任务当前审核人信息 | ||||
ProgressNode currentProgressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); | |||||
ProcessInstanceUserDto currentUser = currentProgressNode.getUser(); | 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)); | boolean userFlag = beforeUser.getUserId().equals(String.valueOf(userId)); | ||||
if (!orgFlag) { | if (!orgFlag) { | ||||
throw new BizException("下一个审核人和您不是同一个部门,无法撤回!"); | throw new BizException("下一个审核人和您不是同一个部门,无法撤回!"); | ||||