Преглед на файлове

项目进度详情修改

tags/24080901
CMM преди 1 година
родител
ревизия
8263635b28
променени са 3 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java
  2. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java
  3. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectStatusChange.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/util/StateMachineUtils.java Целия файл

@@ -89,6 +89,7 @@ public class StateMachineUtils {
projectStatusChange.setAfterStatus(project.getStatus());
projectStatusChange.setEvent(event.name());
projectStatusChange.setCreateOn(LocalDateTime.now());
projectStatusChange.setProjectCode(project.getProjectCode());
// 插入项目状态变更表中
projectStatusChangeService.save(projectStatusChange);
log.info("调用状态机后的项目状态为>>>>>>>>>>{}" + project.getStatus());


+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java Целия файл

@@ -81,16 +81,16 @@ public class ProjectApprovalHandle extends AbstractProcessBusinessHandle {
if (ProjectStatusEnum.TO_BE_APPROVED.getCode().equals(status)){
// 根据建设方案评审通过的时间获取
ProjectStatusChange projectStatusChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.eq(ProjectStatusChange::getProjectId, projectId)
.eq(ProjectStatusChange::getProjectCode, project.getProjectCode())
.eq(ProjectStatusChange::getEvent, ProjectStatusChangeEvent.PLAN_REVIEW_PASS.name())
.last("limit 1"));
processDetailVO.setFinishTime(projectStatusChange.getCreateOn());
processDetailVO.setStepStatus(StepStatusEnum.ON_GOING);

} else {
} else {
// 取 状态机 改变状态时间
ProjectStatusChange projectStatusChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.eq(ProjectStatusChange::getProjectId, projectId)
.eq(ProjectStatusChange::getProjectCode, project.getProjectCode())
.eq(ProjectStatusChange::getEvent, ProjectStatusChangeEvent.PROJECT_APPROVAL.name())
.last("limit 1"));
if (Objects.nonNull(projectStatusChange)) {


+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectStatusChange.java Целия файл

@@ -48,4 +48,9 @@ public class ProjectStatusChange implements Serializable {

@ApiModelProperty("状态变更发生的时间")
private LocalDateTime createOn;

@ApiModelProperty("项目code")
private String projectCode;


}

Loading…
Отказ
Запис