|
|
@@ -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) { |
|
|
|