From 7e9b34eab80355fab490fded01a8c8f4119c1558 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Mon, 10 Jul 2023 17:05:02 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=A0=B9=E6=8D=AE=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B7=A1=E6=A3=80=E5=86=85=E5=AE=B9=E3=80=81?= =?UTF-8?q?=E5=B7=A1=E6=A3=80=E9=A1=B9=E7=9B=AE=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=88service=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzinfo/inspect/obj/feign/ProjectClient.java | 10 +++++++--- .../hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java | 3 +-- .../com/hnac/hzinfo/inspect/obj/web/ProjectController.java | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ProjectClient.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ProjectClient.java index 585ff00..83b0650 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ProjectClient.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ProjectClient.java @@ -3,6 +3,7 @@ package com.hnac.hzinfo.inspect.obj.feign; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzinfo.inspect.obj.dto.ContentDTO; import com.hnac.hzinfo.inspect.obj.dto.ProjectDTO; +import com.hnac.hzinfo.inspect.obj.request.ProjectContentRequest; import com.hnac.hzinfo.inspect.obj.services.ProjectService; import com.hnac.hzinfo.inspect.obj.vo.ProjectVO; import io.swagger.annotations.ApiOperation; @@ -41,9 +42,12 @@ public class ProjectClient extends BladeController implements IProjectClient { } @Override - @GetMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE) - public R getProjectAndContentByEmCode(@NotNull @Valid String emCode, ContentDTO content, Query query) { - return R.data(projectService.getProjectAndContentByEmCode(emCode,content,query)); + @PostMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE) + public R getProjectAndContentByEmCode(@RequestBody ProjectContentRequest request) { + Query query = new Query(); + query.setSize(request.getSize()); + query.setCurrent(request.getCurrent()); + return R.data(projectService.getProjectAndContentByEmCode(request.getEmCode(), request.getContentDTO(), query)); } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java index 5cd8fec..d2ecc0c 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java @@ -123,8 +123,7 @@ public class ProjectServiceImpl extends BaseServiceImpl wrapper = Condition.getQueryWrapper(BeanUtil.copy(content,ContentEntity.class)).lambda(); wrapper.in(CollectionUtil.isNotEmpty(contentIdList),ContentEntity::getId, contentIdList); IPage page = contentService.page(Condition.getPage(query), wrapper); - page.setRecords(ContentWrapper.build().listVO(page.getRecords())); - projectVO.setContentList(page); + projectVO.setContentList(ContentWrapper.build().listVO(page.getRecords())); } return projectVO; } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java index c22f3c9..7a95a9b 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java @@ -154,7 +154,7 @@ public class ProjectController { @GetMapping("/getProjectAndContentByEmCode") @ApiOperation(value = "根据设备编号获取项目以及内容列表(分页展示)") @ApiOperationSupport(order = 7) - public R getProjectAndContentByEmCode(@NotNull @Valid String emCode, ContentDTO content, Query query) { + public R getProjectAndContentByEmCode(String emCode, ContentDTO content, Query query) { return R.data(projectService.getProjectAndContentByEmCode(emCode,content,query)); } }