feat: 견적서 아이템 조회 api 추가

This commit is contained in:
Daseul Kim 2025-01-10 17:02:10 +09:00
parent ddfa00ea3a
commit de39551f21
7 changed files with 542 additions and 215 deletions

View File

@ -6,20 +6,22 @@ import com.interplug.qcast.config.Exception.QcastException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/api/v1/master")
@RequiredArgsConstructor
@Tag(name = "MasterController", description = "Master API")
public class MasterController {
private final MasterService masterService;
private final QuotationService quotationService;
@Operation(description = "지붕재 목록을 조회한다.")
@GetMapping("/getRoofMaterialList")
@ -236,9 +238,17 @@ public class MasterController {
@Operation(description = "PCS 메이커, 시리즈 조회한다.")
@GetMapping("/pcsMakerList")
public ApiResponse<ApiPcsMakerResponse> getPcsMakerList(@Parameter(description = "PCS 메이커 코드") @RequestParam(required = false) String pcsMkrCd,
public ApiResponse<ApiPcsMakerResponse> getPcsMakerList(
@Parameter(description = "PCS 메이커 코드") @RequestParam(required = false) String pcsMkrCd,
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) String mixMatlNo) {
return masterService.getPcsMakerList(pcsMkrCd, mixMatlNo);
}
@Operation(description = "견적서 아이템을 조회한다.")
@PostMapping("/getQuotationItem")
public ApiResponse<ApiQuotationItemResponse> getQuotationItem(
@RequestBody ApiQuotationItemRequest quotationItemRequest) {
return quotationService.getQuotationItem(quotationItemRequest);
}
}

View File

@ -0,0 +1,17 @@
package com.interplug.qcast.biz.master;
import com.interplug.qcast.biz.master.dto.ApiQuotationItemRequest;
import com.interplug.qcast.biz.master.dto.ApiQuotationItemResponse;
import com.interplug.qcast.biz.master.dto.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "quotation", url = "${qsp.url}/api/quotation")
public interface QuotationService {
// 견적서 아이템 조회
@PostMapping("/item")
public ApiResponse<ApiQuotationItemResponse> getQuotationItem(
@RequestBody ApiQuotationItemRequest req);
}

View File

@ -0,0 +1,23 @@
package com.interplug.qcast.biz.master.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "Api 견적서 아이템 조회 모듈 요청 객체")
public class ApiQuotationItemModuleRequest {
@Schema(description = "모듈타입코드")
@NotNull
public String moduleTpCd;
@Schema(description = "모듈제품ID", maxLength = 20)
@NotNull
public String moduleItemId;
@Schema(description = "모듈 수")
@NotNull
public Integer moduleCnt;
}

View File

@ -0,0 +1,87 @@
package com.interplug.qcast.biz.master.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "Api 견적서 아이템 조회 모듈 단 정보 요청 객체")
public class ApiQuotationItemModuleRowRequest {
@Schema(description = "순번")
@NotNull
public Integer seq;
@Schema(description = "모듈제품ID", maxLength = 20)
@NotNull
public String moduleItemId;
@Schema(description = "모듈타입코드")
@NotNull
public String moduleTpCd;
@Schema(description = "모듈 수")
@NotNull
public Integer moduleCnt;
@Schema(description = "노출 하면 수")
@NotNull
public Integer exposedBottomCnt;
@Schema(description = "노출 반 하면 수")
@NotNull
public Integer exposedHalfBottomCnt;
@Schema(description = "노출 상면 수")
@NotNull
public Integer exposedTopCnt;
@Schema(description = "노출 반 상면 수")
@NotNull
public Integer exposedHalfTopCnt;
@Schema(description = "접면 수")
@NotNull
public Integer touchedSurfaceCnt;
@Schema(description = "반 접면 수")
@NotNull
public Integer touchedHalfSurfaceCnt;
@Schema(description = "노출 하면 브라켓(지지금구) 수")
@NotNull
public Integer exposedBottomBracketCnt;
@Schema(description = "노출 반 하면 브라켓(지지금구) 수")
@NotNull
public Integer exposedHalfBottomBracketCnt;
@Schema(description = "노출 상면 브라켓(지지금구) 수")
@NotNull
public Integer exposedTopBracketCnt;
@Schema(description = "노출 반 상면 브라켓(지지금구) 수")
@NotNull
public Integer exposedHalfTopBracketCnt;
@Schema(description = "접면 브라켓(지지금구) 수")
@NotNull
public Integer touchedSurfaceBracketCnt;
@Schema(description = "반 접면 브라켓(지지금구) 수")
@NotNull
public Integer touchedHalfSurfaceBracketCnt;
@Schema(description = "처마커버 수")
@NotNull
public Integer eavesCnt;
@Schema(description = "반 처마커버 수")
@NotNull
public Integer eavesHalfCnt;
@Schema(description = "처마커버 측면 노출 수")
@NotNull
public Integer exposedSideEavesCnt;
}

View File

@ -0,0 +1,27 @@
package com.interplug.qcast.biz.master.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "Api 견적서 아이템 조회 랙 요청 객체")
public class ApiQuotationItemRackRequest {
@Schema(description = "랙 순번")
@NotNull
public Integer seq;
@Schema(description = "아이템ID")
@NotNull
public String itemId;
@Schema(description = "랙 단 수")
@NotNull
public Integer rackRows;
@Schema(description = "랙 지지금구 수")
@NotNull
public Integer rackFittingCnt;
}

View File

@ -0,0 +1,146 @@
package com.interplug.qcast.biz.master.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "Api 견적서 아이템 조회 요청 객체")
public class ApiQuotationItemRequest {
@Schema(description = "모듈타입코드")
@NotNull
public String moduleTpCd;
@Schema(description = "지붕재코드")
@NotNull
public String roofMatlCd;
@Schema(description = "가대메이커코드")
@NotNull
public String trestleMkrCd;
@Schema(description = "공법코드")
@NotNull
public String constMthdCd;
@Schema(description = "지붕기초코드")
@NotNull
public String roofBaseCd;
@Schema(description = "면조도")
@NotNull
public String illuminationTp;
@Schema(description = "설치높이")
@NotNull
public String instHt;
@Schema(description = "풍속")
@NotNull
public String stdWindSpeed;
@Schema(description = "적설량")
@NotNull
public Integer stdSnowLd;
@Schema(description = "경사도코드")
@NotNull
public String inclCd;
@Schema(description = "시공법")
@NotNull
public String constTp;
@Schema(description = "혼합모듈번호")
public Integer mixMatlNo;
@Schema(description = "서까래기초코드")
public String raftBaseCd;
@Schema(description = "하제(망둥어)피치")
public Integer roofPitch;
@Schema(description = "처마커버설치여부")
@NotNull
public String cvrYn;
@Schema(description = "낙설방지금구설치여부")
@NotNull
public String snowGdYn;
@Schema(description = "치조배치여부")
@NotNull
public String plvrYn;
@Schema(description = "모듈 총 수")
@NotNull
public Integer moduleTotCnt;
@Schema(description = "모듈 총 단 수")
@NotNull
public Integer moduleRowsTotCnt;
@Schema(description = "노출 하면 총 수")
@NotNull
public Integer exposedBottomTotCnt;
@Schema(description = "노출 반 하면 총 수")
@NotNull
public Integer exposedHalfBottomTotCnt;
@Schema(description = "노출 최 하면 총 수")
@NotNull
public Integer exposedLowerBottomTotCnt;
@Schema(description = "노출 상면 총 수")
@NotNull
public Integer exposedTopTotCnt;
@Schema(description = "노출 반 상면 총 수")
@NotNull
public Integer exposedHalfTopTotCnt;
@Schema(description = "접면 총 수")
@NotNull
public Integer touchedSurfaceTotCnt;
@Schema(description = "반 접면 총 수")
@NotNull
public Integer touchedHalfSurfaceTotCnt;
@Schema(description = "처마커버 총 수")
@NotNull
public Integer eavesTotCnt;
@Schema(description = "반 처마커버 총 수")
@NotNull
public Integer eavesHalfTotCnt;
@Schema(description = "모듈")
@NotNull
public List<ApiQuotationItemModuleRequest> modules;
@Schema(description = "모듈 단 정보")
@NotNull
public List<ApiQuotationItemModuleRowRequest> moduleRows;
@Schema(description = "랙 사용 여부")
@NotNull
public String rackYn;
@Schema(description = "랙 총 수")
@NotNull
public Integer rackTotCnt;
@Schema(description = "랙 지지금구 총 수")
@NotNull
public Integer rackFittingTotCnt;
@Schema(description = "")
@NotNull
public List<ApiQuotationItemRackRequest> racks;
}

View File

@ -0,0 +1,17 @@
package com.interplug.qcast.biz.master.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Schema(description = "Api 견적서 아이템 조회 응답 객체")
public class ApiQuotationItemResponse {
@Schema(description = "아이템 ID")
public String itemId;
@Schema(description = "수량")
public Integer amount;
}