feat: 지붕재 목록 조회 api, 모듈 타입별 아이템 목록 조회 api 추가
- open feign을 사용하여 qsq로 api 요청 후 응답값을 전달하는 api
This commit is contained in:
parent
eed0d36ff8
commit
a6977abcd8
@ -0,0 +1,33 @@
|
|||||||
|
package com.interplug.qcast.biz.master;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiModuleTpResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiRoofMaterialResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/v1/master")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Tag(name = "MasterController", description = "Master API")
|
||||||
|
public class MasterController {
|
||||||
|
private final MasterService masterService;
|
||||||
|
|
||||||
|
@Operation(description = "지붕재 목록을 조회한다.")
|
||||||
|
@GetMapping("/getRoofMaterialList")
|
||||||
|
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList() {
|
||||||
|
return masterService.getRoofMaterialList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
||||||
|
@GetMapping("/getModuleTypeItemList/{roofMaterialCd}")
|
||||||
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
|
@PathVariable("roofMaterialCd") String roofMaterialCd) {
|
||||||
|
return masterService.getModuleTypeItemList(roofMaterialCd);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,11 +1,22 @@
|
|||||||
package com.interplug.qcast.biz.master;
|
package com.interplug.qcast.biz.master;
|
||||||
|
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiModuleTpResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiResponse;
|
||||||
|
import com.interplug.qcast.biz.master.dto.ApiRoofMaterialResponse;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
// @FeignClient(name = "master", url = "${feign.master.url}")
|
// @FeignClient(name = "master", url = "${feign.master.url}")
|
||||||
@FeignClient(name = "master", url = "http://localhost:8081/api")
|
@FeignClient(name = "master", url = "${qsp.url}/api/master")
|
||||||
public interface MasterService {
|
public interface MasterService {
|
||||||
|
|
||||||
// @GetMapping("/sample")
|
// 지붕재 목록 조회
|
||||||
// public List<SampleResponse> getSamepleList();
|
@GetMapping("/roofMaterialList")
|
||||||
|
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList();
|
||||||
|
|
||||||
|
// 모듈 타입별 아이템 목록 조회
|
||||||
|
@GetMapping("/moduleTypeItemList")
|
||||||
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
|
@RequestParam("roofMaterialCd") String roofMaterialCd);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiModuleTpItemResponse {
|
||||||
|
|
||||||
|
/** Item Id */
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
/** Item Name */
|
||||||
|
private String itemNm;
|
||||||
|
|
||||||
|
/** Basic Materail */
|
||||||
|
private String goodsNo;
|
||||||
|
|
||||||
|
/** Item Type(A1, A2, A1A2, B, B1 등등) */
|
||||||
|
private String itemTp;
|
||||||
|
|
||||||
|
/** Color */
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
/** Long Axix(장경) */
|
||||||
|
private String longAxis;
|
||||||
|
|
||||||
|
/** Short Axis(단경1) */
|
||||||
|
private String shortAxis;
|
||||||
|
|
||||||
|
/** Thickness(두께) */
|
||||||
|
private String thickness;
|
||||||
|
|
||||||
|
/** Power Class */
|
||||||
|
private String wpOut;
|
||||||
|
|
||||||
|
/** Mix Module No */
|
||||||
|
private String mixMatlNo;
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiModuleTpRequest {
|
||||||
|
|
||||||
|
/** Language Code */
|
||||||
|
private String langCd;
|
||||||
|
|
||||||
|
/** Roofing Material Code */
|
||||||
|
private String roofMatlCd;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiModuleTpResponse {
|
||||||
|
|
||||||
|
/** Item Id */
|
||||||
|
private String itemId;
|
||||||
|
|
||||||
|
/** Item Name */
|
||||||
|
private String itemNm;
|
||||||
|
|
||||||
|
/** Basic Materail */
|
||||||
|
private String goodsNo;
|
||||||
|
|
||||||
|
/** Item Type(A1, A2, A1A2, B, B1 등등) */
|
||||||
|
private String itemTp;
|
||||||
|
|
||||||
|
/** Mix Module No */
|
||||||
|
private String mixMatlNo;
|
||||||
|
|
||||||
|
/** Mix Module Yn */
|
||||||
|
private String mixItemTpYn;
|
||||||
|
|
||||||
|
/** Module Type Code Japan */
|
||||||
|
private List<ApiModuleTpItemResponse> itemList;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiResponse<T> {
|
||||||
|
private List<T> data;
|
||||||
|
private List<T> data2;
|
||||||
|
private ApiResultResponse result;
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiResultResponse {
|
||||||
|
private Integer code;
|
||||||
|
private String resultCode;
|
||||||
|
private String message;
|
||||||
|
private String resultMsg;
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.interplug.qcast.biz.master.dto;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ApiRoofMaterialResponse {
|
||||||
|
|
||||||
|
/** Roof Material Code */
|
||||||
|
private String roofMatlCd;
|
||||||
|
|
||||||
|
/** Roof Material Code Name */
|
||||||
|
private String roofMatlNm;
|
||||||
|
|
||||||
|
/** Roof Material Code Name Japan */
|
||||||
|
private String roofMatlNmJp;
|
||||||
|
|
||||||
|
/** Width Auth(R:READ, C: Create, 빈값:미노출) */
|
||||||
|
private String widAuth;
|
||||||
|
|
||||||
|
/** Width Base */
|
||||||
|
private String widBase;
|
||||||
|
|
||||||
|
/** Length Auth(R:READ, C: Create, 빈값:미노출) */
|
||||||
|
private String lenAuth;
|
||||||
|
|
||||||
|
/** Length Base */
|
||||||
|
private String lenBase;
|
||||||
|
|
||||||
|
/** Roof Pitch Auth(R:READ, C: Create, 빈값:미노출) */
|
||||||
|
private String roofPchAuth;
|
||||||
|
|
||||||
|
/** Roof Pitch Base */
|
||||||
|
private String roofPchBase;
|
||||||
|
|
||||||
|
/** Rafter Auth(R:READ, C: Create, 빈값:미노출) */
|
||||||
|
private String raftAuth;
|
||||||
|
|
||||||
|
/** Rafter Base */
|
||||||
|
private String raftBaseCd;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user