Преглед изворни кода

会议评审列表增加会议ID

master
WendyYang пре 1 година
родитељ
комит
60d1747a48
3 измењених фајлова са 43 додато и 16 уклоњено
  1. +2
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  2. +21
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingOptionProjectReq.java
  3. +20
    -13
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 2
- 3
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java Прегледај датотеку

@@ -16,7 +16,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
* <p>
@@ -176,8 +175,8 @@ public class MeetingController {

@GetMapping("/option/project")
@ApiOperation("项目列表")
public List<ProjectLibListItemVO> projectList(@RequestParam String meetingType) {
return meetingManage.optionProject(meetingType);
public PageVo<ProjectLibListItemVO> projectList(MeetingOptionProjectReq req) {
return meetingManage.optionProject(req);
}

}

+ 21
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingOptionProjectReq.java Прегледај датотеку

@@ -0,0 +1,21 @@
package com.ningdatech.pmapi.meeting.entity.req;

import com.ningdatech.basic.model.PagePo;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* <p>
* MeetingOptionProjectReq
* </p>
*
* @author WendyYang
* @since 11:50 2023/3/16
*/
@Data
@EqualsAndHashCode
public class MeetingOptionProjectReq extends PagePo {

private String meetingType;

}

+ 20
- 13
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java Прегледај датотеку

@@ -705,7 +705,8 @@ public class MeetingManage {
return PageVo.of(page.getRecords(), page.getTotal());
}

public List<ProjectLibListItemVO> optionProject(String meetingType) {
public PageVo<ProjectLibListItemVO> optionProject(MeetingOptionProjectReq req) {
String meetingType = req.getMeetingType();
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class);
switch (MeetingReviewTypeEnum.getByCode(meetingType)) {
case PRELIMINARY_SCHEME_REVIEW:
@@ -721,18 +722,24 @@ public class MeetingManage {
query.eq(Project::getStatus, ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW);
break;
default:
return Collections.emptyList();
}
List<Project> projects = projectService.list(query);
return CollUtils.convert(projects, w -> ProjectLibListItemVO
.builder()
.id(w.getId())
.projectName(w.getProjectName())
.declaredAmount(w.getDeclareAmount())
.projectType(w.getProjectType())
.projectYear(w.getProjectYear())
.buildOrg(w.getBuildOrgName())
.build());
return PageVo.empty();
}
Page<Project> page = projectService.page(req.page(), query);
PageVo<ProjectLibListItemVO> result = PageVo.of(null, page.getTotal());
if (result.getTotal() > 0) {
List<ProjectLibListItemVO> projects = CollUtils.convert(page.getRecords(),
w -> ProjectLibListItemVO
.builder()
.id(w.getId())
.projectName(w.getProjectName())
.declaredAmount(w.getDeclareAmount())
.projectType(w.getProjectType())
.projectYear(w.getProjectYear())
.buildOrg(w.getBuildOrgName())
.build());
result.setRecords(projects);
}
return result;
}

private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatusEnum status) {


Loading…
Откажи
Сачувај