From 28e317b39fd413517560482d6bf0463d1dffe1e1 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 18 May 2022 10:58:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/ProjectController.java | 4 ++-- .../src/main/java/com/epmet/service/ProjectService.java | 2 +- .../java/com/epmet/service/impl/ProjectServiceImpl.java | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index f76ac99242..2f862559de 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -359,8 +359,8 @@ public class ProjectController { * @date 2022/5/18 10:03 */ @PostMapping("satisfaction-evaluation-list") - public Result> satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ + public Result satisfactionEvaluationList(@RequestBody SatisfactionEvaluationListFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO, SatisfactionEvaluationListFormDTO.SatisfactionEvaluationListForm.class); - return new Result>().ok(projectService.satisfactionEvaluationList(formDTO)); + return new Result().ok(projectService.satisfactionEvaluationList(formDTO)); } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 9b6dc38247..7e86778fd0 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -382,6 +382,6 @@ public interface ProjectService extends BaseService { * @author zxc * @date 2022/5/18 10:03 */ - List satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); + PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 32e62465a6..6214f00200 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -3239,7 +3239,8 @@ public class ProjectServiceImpl extends BaseServiceImpl satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + public PageData satisfactionEvaluationList(SatisfactionEvaluationListFormDTO formDTO) { + PageData data = new PageData<>(new ArrayList<>(),NumConstant.ZERO); PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> satisfactionDetailDao.satisfactionEvaluationList(formDTO.getProjectId())); List result = pageInfo.getList(); if (CollectionUtils.isNotEmpty(result)){ @@ -3248,8 +3249,10 @@ public class ProjectServiceImpl extends BaseServiceImpl result.stream().filter(r -> r.getUserId().equals(u.getUserId())).forEach(r -> r.setEvaluationUser(u.getRealName()))); + data.setList(result); + data.setTotal(Integer.valueOf(String.valueOf(pageInfo.getTotal()))); } - return result; + return data; } /**