Browse Source

# 根据设备查询巡检内容、巡检项目接口调整(api)

zhongwei
haungxing 2 years ago
parent
commit
ea674b4b2e
  1. 11
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/feign/IProjectClient.java
  2. 35
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/request/ProjectContentRequest.java
  3. 6
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/vo/ProjectVO.java

11
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 namerecordTypecheckType
* @param query 分页
* @param query 分页参数
* @return
*/
@GetMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE)
R<ProjectVO> getProjectAndContentByEmCode(@NotNull @Valid String emCode, ContentDTO content, Query query);
@PostMapping(GET_PROJECT_AND_CONTENT_BY_EM_CODE)
R<ProjectVO> getProjectAndContentByEmCode(@RequestBody ProjectContentRequest request);
}

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

6
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<ContentVO> contentList;
private List<ContentVO> contentList;
}

Loading…
Cancel
Save