diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
index 6dd463b..7afcac3 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
+++ b/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;
/**
*
@@ -175,9 +174,9 @@ public class MeetingController {
}
@GetMapping("/option/project")
- @ApiOperation("项目列表")
- public List projectList(@RequestParam String meetingType) {
- return meetingManage.optionProject(meetingType);
+ @ApiOperation("项目列表(创建会议添加项目)")
+ public PageVo projectList(MeetingOptionProjectReq req) {
+ return meetingManage.optionProject(req);
}
}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingOptionProjectReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingOptionProjectReq.java
new file mode 100644
index 0000000..596eea4
--- /dev/null
+++ b/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;
+
+/**
+ *
+ * MeetingOptionProjectReq
+ *
+ *
+ * @author WendyYang
+ * @since 11:50 2023/3/16
+ */
+@Data
+@EqualsAndHashCode
+public class MeetingOptionProjectReq extends PagePo {
+
+ private String meetingType;
+
+}
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
index 911687f..261f4a1 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
+++ b/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 optionProject(String meetingType) {
+ public PageVo optionProject(MeetingOptionProjectReq req) {
+ String meetingType = req.getMeetingType();
LambdaQueryWrapper 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 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 page = projectService.page(req.page(), query);
+ PageVo result = PageVo.of(null, page.getTotal());
+ if (result.getTotal() > 0) {
+ List 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 query, String meetingType, ProjectStatusEnum status) {