Browse Source

立项批复时间

tags/24080901
PoffyZhang 1 year ago
parent
commit
9a5f160478
1 changed files with 7 additions and 10 deletions
  1. +7
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java

+ 7
- 10
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java View File

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

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;

import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.wflow.workflow.bean.vo.ProcessDetailVO;
@@ -31,10 +28,9 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*;
@Order(7)
@Component
public class ProjectApprovalHandle extends AbstractProcessBusinessHandle {

private final AnnualPlanLibManage annualPlanLibManage;
private final INdProjectStatusChangeService projectStatusChangeService;
private final IProjectService projectService;
private final AnnualPlanLibManage annualPlanLibManage;

/**
* 项目状态为:待立项批复之前的状态
@@ -91,11 +87,12 @@ public class ProjectApprovalHandle extends AbstractProcessBusinessHandle {
processDetailVO.setStepStatus(StepStatusEnum.ON_GOING);

} else {
// 当前项目状态为待立项批复之后的状态
// 根据立项批复的时间获取
LocalDate approvalDate = project.getApprovalDate();
LocalDateTime approvalDateTime = approvalDate.atStartOfDay();
processDetailVO.setFinishTime(approvalDateTime);
// 取 状态机 改变状态时间
ProjectStatusChange projectStatusChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.eq(ProjectStatusChange::getProjectId, projectId)
.eq(ProjectStatusChange::getEvent, ProjectStatusChangeEvent.PROJECT_APPROVAL.name())
.last("limit 1"));
processDetailVO.setFinishTime(projectStatusChange.getCreateOn());
processDetailVO.setStepStatus(StepStatusEnum.COMPLETED);
}
processDetailVO.setProcessName(CommonConst.PROJECT_APPROVAL);


Loading…
Cancel
Save