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)); } }