From ea674b4b2e56aacfd9a8e8b8abe2b103e981c514 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Mon, 10 Jul 2023 17:06:05 +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=88api=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzinfo/inspect/obj/feign/IProjectClient.java | 11 ++++--- .../inspect/obj/request/ProjectContentRequest.java | 35 ++++++++++++++++++++++ .../com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java | 6 ++-- 3 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/request/ProjectContentRequest.java diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IProjectClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IProjectClient.java index c7306b5..2f9131c 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IProjectClient.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IProjectClient.java @@ -4,10 +4,13 @@ import com.hnac.hzinfo.inspect.Constants; import com.hnac.hzinfo.inspect.obj.dto.ContentDTO; import com.hnac.hzinfo.inspect.obj.dto.ProjectDTO; import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity; +import com.hnac.hzinfo.inspect.obj.request.ProjectContentRequest; import com.hnac.hzinfo.inspect.obj.vo.ProjectVO; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -34,12 +37,12 @@ public interface IProjectClient { /** * - * @param emCode 设备名称 + * @param emCode 设备编号 * @param content name、recordType、checkType - * @param query 分页 + * @param query 分页参数 * @return */ - @GetMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE) - R getProjectAndContentByEmCode(@NotNull @Valid String emCode, ContentDTO content, Query query); + @PostMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE) + R getProjectAndContentByEmCode(@RequestBody ProjectContentRequest request); } diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/request/ProjectContentRequest.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/request/ProjectContentRequest.java new file mode 100644 index 0000000..e504194 --- /dev/null +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/request/ProjectContentRequest.java @@ -0,0 +1,35 @@ +package com.hnac.hzinfo.inspect.obj.request; + +import com.hnac.hzinfo.inspect.obj.dto.ContentDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @ClassName ProjectContentRequest + * @description: + * @author: hx + * @create: 2023-07-10 15:53 + * @Version 4.0 + **/ +@Data +@ApiModel("巡检项目-巡检内容feign接口查询对象") +@EqualsAndHashCode +public class ProjectContentRequest implements Serializable { + + @ApiModelProperty("设备编号") + private String emCode; + + @ApiModelProperty("巡检内容查询条件") + private ContentDTO contentDTO; + + @ApiModelProperty("当前页") + private int current; + + @ApiModelProperty("当前页条数,-1为查询所有") + private int size; + +} diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java index 8d50281..8012269 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java @@ -1,6 +1,7 @@ package com.hnac.hzinfo.inspect.obj.vo; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzinfo.inspect.obj.dto.ProjectDTO; import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity; import io.swagger.annotations.ApiModel; @@ -8,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.io.Serializable; import java.util.List; /** @@ -20,9 +22,9 @@ import java.util.List; @ApiModel("项目VO对象") @Data @EqualsAndHashCode -public class ProjectVO extends ProjectEntity { +public class ProjectVO extends ProjectEntity implements Serializable { @ApiModelProperty("巡检内容列表") - private IPage contentList; + private List contentList; }