Browse Source

优化 进度条的 立项批复

master
PoffyZhang 1 year ago
parent
commit
bf88771baf
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java

+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java View File

@@ -1,6 +1,9 @@
package com.ningdatech.pmapi.projectlib.handle;

import java.util.*;
import java.util.stream.Collectors;

import cn.hutool.core.collection.CollUtil;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
@@ -68,14 +71,16 @@ public class ProjectApprovalHandle extends AbstractProcessBusinessHandle {
void businessHandle(Long projectId, List<ProcessDetailVO> processSchedule) {
ProcessDetailVO processDetailVO = new ProcessDetailVO();

Project project = projectService.getById(projectId);
Project project = projectService.getNewProject(projectId);
//查出历史版本的 所有项目ID
List<Long> allVersionProjectIds = projectService.getAllVersionProjectId(project);
Integer status = project.getStatus();
List<Integer> fieldList = CollUtils.fieldList(PROJECT_APPROVAL_LIST_STATUS, ProjectStatusEnum::getCode);
if(Objects.isNull(status)){
return;
}

// 项目状态为待立项批复之前的状态
if (fieldList.contains(status)){
if (status < ProjectStatusEnum.TO_BE_APPROVED.getCode()){
processDetailVO.setStepStatus(StepStatusEnum.NOT_START);
processDetailVO.setProcessName(CommonConst.PROJECT_APPROVAL);
processSchedule.add(processDetailVO);


Loading…
Cancel
Save