Browse Source

debug 查询最新项目

tags/24080901
PoffyZhang 1 year ago
parent
commit
cfc1de17c7
2 changed files with 3 additions and 2 deletions
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareChoiceAction.java
  2. +1
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/action/ProjectDeclareChoiceAction.java View File

@@ -53,11 +53,13 @@ public class ProjectDeclareChoiceAction implements Action<ProjectStatusEnum, Pro
log.info("立项批复之后,项目的状态为:{}" + project.getStatus()); log.info("立项批复之后,项目的状态为:{}" + project.getStatus());
// 判断 是否有初次创建的应用 // 判断 是否有初次创建的应用
if (CollUtil.isEmpty(projectApplications)){ if (CollUtil.isEmpty(projectApplications)){
project.setStage(ProjectStatusEnum.PROJECT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.TO_BE_PURCHASED.getCode()); project.setStatus(ProjectStatusEnum.TO_BE_PURCHASED.getCode());
} }
projectApplications.stream().forEach(app -> { projectApplications.stream().forEach(app -> {
Integer isFirst = app.getIsFirst(); Integer isFirst = app.getIsFirst();
if(isFirst.equals(CommonEnum.YES.getCode())){ if(isFirst.equals(CommonEnum.YES.getCode())){
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.TO_BE_APP_REGISTER.getCode()); project.setStatus(ProjectStatusEnum.TO_BE_APP_REGISTER.getCode());
return; return;
} }


+ 1
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java View File

@@ -23,9 +23,8 @@ public class ProjectApplicationServiceImpl extends ServiceImpl<ProjectApplicatio


@Override @Override
public List<ProjectApplication> getApplicationsByProject(Project project) { public List<ProjectApplication> getApplicationsByProject(Project project) {
Long projectId = project.getId();
List<ProjectApplication> apps = this.list(Wrappers.lambdaQuery(ProjectApplication.class) List<ProjectApplication> apps = this.list(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId, projectId));
.eq(ProjectApplication::getProjectCode, project.getProjectCode()));
return apps; return apps;
} }
} }

Loading…
Cancel
Save