feat: 견적서 아이템 조회 api 추가
This commit is contained in:
parent
ddfa00ea3a
commit
de39551f21
@ -6,239 +6,249 @@ import com.interplug.qcast.config.Exception.QcastException;
|
|||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import java.util.List;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1/master")
|
@RequestMapping("/api/v1/master")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Tag(name = "MasterController", description = "Master API")
|
@Tag(name = "MasterController", description = "Master API")
|
||||||
public class MasterController {
|
public class MasterController {
|
||||||
private final MasterService masterService;
|
private final MasterService masterService;
|
||||||
|
private final QuotationService quotationService;
|
||||||
|
|
||||||
@Operation(description = "지붕재 목록을 조회한다.")
|
@Operation(description = "지붕재 목록을 조회한다.")
|
||||||
@GetMapping("/getRoofMaterialList")
|
@GetMapping("/getRoofMaterialList")
|
||||||
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList() {
|
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList() {
|
||||||
return masterService.getRoofMaterialList();
|
return masterService.getRoofMaterialList();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
||||||
|
@GetMapping("/getModuleTypeItemList")
|
||||||
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
|
@Parameter(description = "지붕재 코드 목록") @RequestParam("arrRoofMatlCd")
|
||||||
|
List<String> roofMaterialCd)
|
||||||
|
throws QcastException {
|
||||||
|
if (roofMaterialCd == null
|
||||||
|
|| roofMaterialCd.isEmpty()
|
||||||
|
|| roofMaterialCd.size() > 4
|
||||||
|
|| roofMaterialCd.stream().anyMatch(s -> s == null || s.trim().isEmpty())) {
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
|
}
|
||||||
|
return masterService.getModuleTypeItemList(roofMaterialCd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "가대 목록 조회한다.")
|
||||||
|
@GetMapping("/getTrestleList")
|
||||||
|
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
||||||
|
@Parameter(description = "모듈타입코드") @RequestParam(required = false) String moduleTpCd,
|
||||||
|
@Parameter(description = "지붕재코드") @RequestParam(required = false) String roofMatlCd,
|
||||||
|
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
|
||||||
|
@Parameter(description = "가대메이커코드") @RequestParam(required = false) String trestleMkrCd,
|
||||||
|
@Parameter(description = "공법코드") @RequestParam(required = false) String constMthdCd,
|
||||||
|
@Parameter(description = "지붕기초코드") @RequestParam(required = false) String roofBaseCd) {
|
||||||
|
|
||||||
|
ApiTrestleBuilder apiTrestleInfoBuilder =
|
||||||
|
new ApiTrestleBuilder(
|
||||||
|
moduleTpCd, roofMatlCd, raftBaseCd, trestleMkrCd, constMthdCd, roofBaseCd);
|
||||||
|
ApiTrestleBuilder atb =
|
||||||
|
apiTrestleInfoBuilder
|
||||||
|
.setModuleTpCd(moduleTpCd)
|
||||||
|
.setRoofMatlCdCd(roofMatlCd)
|
||||||
|
.setRaftBaseCd(raftBaseCd)
|
||||||
|
.setTrestleMkrCd(trestleMkrCd)
|
||||||
|
.setConstMthdCd(constMthdCd)
|
||||||
|
.setRoofBaseCd(roofBaseCd)
|
||||||
|
.build();
|
||||||
|
return masterService.getTrestleList(
|
||||||
|
atb.getModuleTpCd(),
|
||||||
|
atb.getRoofMatlCd(),
|
||||||
|
atb.getRaftBaseCd(),
|
||||||
|
atb.getTrestleMkrCd(),
|
||||||
|
atb.getConstMthdCd(),
|
||||||
|
atb.getRoofBaseCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "시공법 목록 조회한다.")
|
||||||
|
@GetMapping("/getConstructionList")
|
||||||
|
public ApiResponse<ApiConstructionResponse> getConstructionList(
|
||||||
|
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
|
||||||
|
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
|
||||||
|
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
|
||||||
|
@Parameter(description = "공법코드") @RequestParam String constMthdCd,
|
||||||
|
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
|
||||||
|
@Parameter(description = "면조도") @RequestParam String illuminationTp,
|
||||||
|
@Parameter(description = "설치높이") @RequestParam String instHt,
|
||||||
|
@Parameter(description = "풍속") @RequestParam String stdWindSpeed,
|
||||||
|
@Parameter(description = "적설량") @RequestParam String stdSnowLd,
|
||||||
|
@Parameter(description = "경사도코드") @RequestParam String inclCd,
|
||||||
|
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
|
||||||
|
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
|
||||||
|
throws QcastException {
|
||||||
|
|
||||||
|
if (moduleTpCd == null
|
||||||
|
|| moduleTpCd.trim().isEmpty()
|
||||||
|
|| roofMatlCd == null
|
||||||
|
|| roofMatlCd.trim().isEmpty()
|
||||||
|
|| trestleMkrCd == null
|
||||||
|
|| trestleMkrCd.trim().isEmpty()
|
||||||
|
|| constMthdCd == null
|
||||||
|
|| constMthdCd.trim().isEmpty()
|
||||||
|
|| roofBaseCd == null
|
||||||
|
|| roofBaseCd.trim().isEmpty()
|
||||||
|
|| illuminationTp == null
|
||||||
|
|| illuminationTp.trim().isEmpty()
|
||||||
|
|| instHt == null
|
||||||
|
|| instHt.trim().isEmpty()
|
||||||
|
|| stdWindSpeed == null
|
||||||
|
|| stdWindSpeed.trim().isEmpty()
|
||||||
|
|| stdSnowLd == null
|
||||||
|
|| stdSnowLd.trim().isEmpty()
|
||||||
|
|| inclCd == null
|
||||||
|
|| inclCd.trim().isEmpty()) {
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
ApiConstructionBuilder apiConstructionBuilder =
|
||||||
@GetMapping("/getModuleTypeItemList")
|
new ApiConstructionBuilder(
|
||||||
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
moduleTpCd,
|
||||||
@Parameter(description = "지붕재 코드 목록") @RequestParam("arrRoofMatlCd")
|
roofMatlCd,
|
||||||
List<String> roofMaterialCd)
|
trestleMkrCd,
|
||||||
throws QcastException {
|
constMthdCd,
|
||||||
if (roofMaterialCd == null
|
roofBaseCd,
|
||||||
|| roofMaterialCd.isEmpty()
|
illuminationTp,
|
||||||
|| roofMaterialCd.size() > 4
|
instHt,
|
||||||
|| roofMaterialCd.stream().anyMatch(s -> s == null || s.trim().isEmpty())) {
|
stdWindSpeed,
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
stdSnowLd,
|
||||||
}
|
inclCd,
|
||||||
return masterService.getModuleTypeItemList(roofMaterialCd);
|
raftBaseCd,
|
||||||
|
roofPitch);
|
||||||
|
ApiConstructionBuilder acb =
|
||||||
|
apiConstructionBuilder
|
||||||
|
.setModuleTpCd(moduleTpCd)
|
||||||
|
.setRoofMatlCd(roofMatlCd)
|
||||||
|
.setTrestleMkrCd(trestleMkrCd)
|
||||||
|
.setConstMthdCd(constMthdCd)
|
||||||
|
.setRoofBaseCd(roofBaseCd)
|
||||||
|
.setIlluminationTp(illuminationTp)
|
||||||
|
.setInstHt(instHt)
|
||||||
|
.setStdWindSpeed(stdWindSpeed)
|
||||||
|
.setStdSnowLd(stdSnowLd)
|
||||||
|
.setInclCd(inclCd)
|
||||||
|
.setRaftBaseCd(raftBaseCd)
|
||||||
|
.setRoofPitch(roofPitch)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
return masterService.getConstructionList(
|
||||||
|
acb.getModuleTpCd(),
|
||||||
|
acb.getRoofMatlCd(),
|
||||||
|
acb.getTrestleMkrCd(),
|
||||||
|
acb.getConstMthdCd(),
|
||||||
|
acb.getRoofBaseCd(),
|
||||||
|
acb.getIlluminationTp(),
|
||||||
|
acb.getInstHt(),
|
||||||
|
acb.getStdWindSpeed(),
|
||||||
|
acb.getStdSnowLd(),
|
||||||
|
acb.getInclCd(),
|
||||||
|
acb.getRaftBaseCd(),
|
||||||
|
acb.getRoofPitch());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(description = "가대 상세 조회한다.")
|
||||||
|
@GetMapping("/getTrestleDetailList")
|
||||||
|
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(
|
||||||
|
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
|
||||||
|
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
|
||||||
|
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
|
||||||
|
@Parameter(description = "공법코드") @RequestParam String constMthdCd,
|
||||||
|
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
|
||||||
|
@Parameter(description = "면조도") @RequestParam String illuminationTp,
|
||||||
|
@Parameter(description = "설치높이") @RequestParam String instHt,
|
||||||
|
@Parameter(description = "풍속") @RequestParam String stdWindSpeed,
|
||||||
|
@Parameter(description = "적설량") @RequestParam String stdSnowLd,
|
||||||
|
@Parameter(description = "경사도코드") @RequestParam String inclCd,
|
||||||
|
@Parameter(description = "시공법") @RequestParam String constTp,
|
||||||
|
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) Integer mixMatlNo,
|
||||||
|
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
|
||||||
|
throws QcastException {
|
||||||
|
|
||||||
|
if (moduleTpCd == null
|
||||||
|
|| moduleTpCd.trim().isEmpty()
|
||||||
|
|| roofMatlCd == null
|
||||||
|
|| roofMatlCd.trim().isEmpty()
|
||||||
|
|| trestleMkrCd == null
|
||||||
|
|| trestleMkrCd.trim().isEmpty()
|
||||||
|
|| constMthdCd == null
|
||||||
|
|| constMthdCd.trim().isEmpty()
|
||||||
|
|| roofBaseCd == null
|
||||||
|
|| roofBaseCd.trim().isEmpty()
|
||||||
|
|| illuminationTp == null
|
||||||
|
|| illuminationTp.trim().isEmpty()
|
||||||
|
|| instHt == null
|
||||||
|
|| instHt.trim().isEmpty()
|
||||||
|
|| stdWindSpeed == null
|
||||||
|
|| stdWindSpeed.trim().isEmpty()
|
||||||
|
|| stdSnowLd == null
|
||||||
|
|| stdSnowLd.trim().isEmpty()
|
||||||
|
|| inclCd == null
|
||||||
|
|| inclCd.trim().isEmpty()
|
||||||
|
|| constTp == null
|
||||||
|
|| constTp.trim().isEmpty()) {
|
||||||
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(description = "가대 목록 조회한다.")
|
ApiTrestleDetailBuilder atdb =
|
||||||
@GetMapping("/getTrestleList")
|
ApiTrestleDetailBuilder.builder()
|
||||||
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
.moduleTpCd(moduleTpCd)
|
||||||
@Parameter(description = "모듈타입코드") @RequestParam(required = false) String moduleTpCd,
|
.roofMatlCd(roofMatlCd)
|
||||||
@Parameter(description = "지붕재코드") @RequestParam(required = false) String roofMatlCd,
|
.trestleMkrCd(trestleMkrCd)
|
||||||
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
|
.constMthdCd(constMthdCd)
|
||||||
@Parameter(description = "가대메이커코드") @RequestParam(required = false) String trestleMkrCd,
|
.roofBaseCd(roofBaseCd)
|
||||||
@Parameter(description = "공법코드") @RequestParam(required = false) String constMthdCd,
|
.illuminationTp(illuminationTp)
|
||||||
@Parameter(description = "지붕기초코드") @RequestParam(required = false) String roofBaseCd) {
|
.instHt(instHt)
|
||||||
|
.stdWindSpeed(stdWindSpeed)
|
||||||
|
.stdSnowLd(stdSnowLd)
|
||||||
|
.inclCd(inclCd)
|
||||||
|
.constTp(constTp)
|
||||||
|
.mixMatlNo(mixMatlNo)
|
||||||
|
.roofPitch(roofPitch)
|
||||||
|
.build();
|
||||||
|
|
||||||
ApiTrestleBuilder apiTrestleInfoBuilder =
|
return masterService.getTrestleDetailList(
|
||||||
new ApiTrestleBuilder(
|
atdb.getModuleTpCd(),
|
||||||
moduleTpCd, roofMatlCd, raftBaseCd, trestleMkrCd, constMthdCd, roofBaseCd);
|
atdb.getRoofMatlCd(),
|
||||||
ApiTrestleBuilder atb =
|
atdb.getTrestleMkrCd(),
|
||||||
apiTrestleInfoBuilder
|
atdb.getConstMthdCd(),
|
||||||
.setModuleTpCd(moduleTpCd)
|
atdb.getRoofBaseCd(),
|
||||||
.setRoofMatlCdCd(roofMatlCd)
|
atdb.getIlluminationTp(),
|
||||||
.setRaftBaseCd(raftBaseCd)
|
atdb.getInstHt(),
|
||||||
.setTrestleMkrCd(trestleMkrCd)
|
atdb.getStdWindSpeed(),
|
||||||
.setConstMthdCd(constMthdCd)
|
atdb.getStdSnowLd(),
|
||||||
.setRoofBaseCd(roofBaseCd)
|
atdb.getInclCd(),
|
||||||
.build();
|
atdb.getConstTp(),
|
||||||
return masterService.getTrestleList(
|
atdb.getMixMatlNo(),
|
||||||
atb.getModuleTpCd(),
|
atdb.getRoofPitch());
|
||||||
atb.getRoofMatlCd(),
|
}
|
||||||
atb.getRaftBaseCd(),
|
|
||||||
atb.getTrestleMkrCd(),
|
|
||||||
atb.getConstMthdCd(),
|
|
||||||
atb.getRoofBaseCd());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(description = "시공법 목록 조회한다.")
|
@Operation(description = "PCS 메이커, 시리즈 조회한다.")
|
||||||
@GetMapping("/getConstructionList")
|
@GetMapping("/pcsMakerList")
|
||||||
public ApiResponse<ApiConstructionResponse> getConstructionList(
|
public ApiResponse<ApiPcsMakerResponse> getPcsMakerList(
|
||||||
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
|
@Parameter(description = "PCS 메이커 코드") @RequestParam(required = false) String pcsMkrCd,
|
||||||
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
|
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) String mixMatlNo) {
|
||||||
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
|
|
||||||
@Parameter(description = "공법코드") @RequestParam String constMthdCd,
|
|
||||||
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
|
|
||||||
@Parameter(description = "면조도") @RequestParam String illuminationTp,
|
|
||||||
@Parameter(description = "설치높이") @RequestParam String instHt,
|
|
||||||
@Parameter(description = "풍속") @RequestParam String stdWindSpeed,
|
|
||||||
@Parameter(description = "적설량") @RequestParam String stdSnowLd,
|
|
||||||
@Parameter(description = "경사도코드") @RequestParam String inclCd,
|
|
||||||
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
|
|
||||||
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
|
|
||||||
throws QcastException {
|
|
||||||
|
|
||||||
if (moduleTpCd == null
|
return masterService.getPcsMakerList(pcsMkrCd, mixMatlNo);
|
||||||
|| moduleTpCd.trim().isEmpty()
|
}
|
||||||
|| roofMatlCd == null
|
|
||||||
|| roofMatlCd.trim().isEmpty()
|
|
||||||
|| trestleMkrCd == null
|
|
||||||
|| trestleMkrCd.trim().isEmpty()
|
|
||||||
|| constMthdCd == null
|
|
||||||
|| constMthdCd.trim().isEmpty()
|
|
||||||
|| roofBaseCd == null
|
|
||||||
|| roofBaseCd.trim().isEmpty()
|
|
||||||
|| illuminationTp == null
|
|
||||||
|| illuminationTp.trim().isEmpty()
|
|
||||||
|| instHt == null
|
|
||||||
|| instHt.trim().isEmpty()
|
|
||||||
|| stdWindSpeed == null
|
|
||||||
|| stdWindSpeed.trim().isEmpty()
|
|
||||||
|| stdSnowLd == null
|
|
||||||
|| stdSnowLd.trim().isEmpty()
|
|
||||||
|| inclCd == null
|
|
||||||
|| inclCd.trim().isEmpty()) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiConstructionBuilder apiConstructionBuilder =
|
@Operation(description = "견적서 아이템을 조회한다.")
|
||||||
new ApiConstructionBuilder(
|
@PostMapping("/getQuotationItem")
|
||||||
moduleTpCd,
|
public ApiResponse<ApiQuotationItemResponse> getQuotationItem(
|
||||||
roofMatlCd,
|
@RequestBody ApiQuotationItemRequest quotationItemRequest) {
|
||||||
trestleMkrCd,
|
return quotationService.getQuotationItem(quotationItemRequest);
|
||||||
constMthdCd,
|
}
|
||||||
roofBaseCd,
|
|
||||||
illuminationTp,
|
|
||||||
instHt,
|
|
||||||
stdWindSpeed,
|
|
||||||
stdSnowLd,
|
|
||||||
inclCd,
|
|
||||||
raftBaseCd,
|
|
||||||
roofPitch);
|
|
||||||
ApiConstructionBuilder acb =
|
|
||||||
apiConstructionBuilder
|
|
||||||
.setModuleTpCd(moduleTpCd)
|
|
||||||
.setRoofMatlCd(roofMatlCd)
|
|
||||||
.setTrestleMkrCd(trestleMkrCd)
|
|
||||||
.setConstMthdCd(constMthdCd)
|
|
||||||
.setRoofBaseCd(roofBaseCd)
|
|
||||||
.setIlluminationTp(illuminationTp)
|
|
||||||
.setInstHt(instHt)
|
|
||||||
.setStdWindSpeed(stdWindSpeed)
|
|
||||||
.setStdSnowLd(stdSnowLd)
|
|
||||||
.setInclCd(inclCd)
|
|
||||||
.setRaftBaseCd(raftBaseCd)
|
|
||||||
.setRoofPitch(roofPitch)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
return masterService.getConstructionList(
|
|
||||||
acb.getModuleTpCd(),
|
|
||||||
acb.getRoofMatlCd(),
|
|
||||||
acb.getTrestleMkrCd(),
|
|
||||||
acb.getConstMthdCd(),
|
|
||||||
acb.getRoofBaseCd(),
|
|
||||||
acb.getIlluminationTp(),
|
|
||||||
acb.getInstHt(),
|
|
||||||
acb.getStdWindSpeed(),
|
|
||||||
acb.getStdSnowLd(),
|
|
||||||
acb.getInclCd(),
|
|
||||||
acb.getRaftBaseCd(),
|
|
||||||
acb.getRoofPitch());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(description = "가대 상세 조회한다.")
|
|
||||||
@GetMapping("/getTrestleDetailList")
|
|
||||||
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(
|
|
||||||
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
|
|
||||||
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
|
|
||||||
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
|
|
||||||
@Parameter(description = "공법코드") @RequestParam String constMthdCd,
|
|
||||||
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
|
|
||||||
@Parameter(description = "면조도") @RequestParam String illuminationTp,
|
|
||||||
@Parameter(description = "설치높이") @RequestParam String instHt,
|
|
||||||
@Parameter(description = "풍속") @RequestParam String stdWindSpeed,
|
|
||||||
@Parameter(description = "적설량") @RequestParam String stdSnowLd,
|
|
||||||
@Parameter(description = "경사도코드") @RequestParam String inclCd,
|
|
||||||
@Parameter(description = "시공법") @RequestParam String constTp,
|
|
||||||
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) Integer mixMatlNo,
|
|
||||||
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
|
|
||||||
throws QcastException {
|
|
||||||
|
|
||||||
if (moduleTpCd == null
|
|
||||||
|| moduleTpCd.trim().isEmpty()
|
|
||||||
|| roofMatlCd == null
|
|
||||||
|| roofMatlCd.trim().isEmpty()
|
|
||||||
|| trestleMkrCd == null
|
|
||||||
|| trestleMkrCd.trim().isEmpty()
|
|
||||||
|| constMthdCd == null
|
|
||||||
|| constMthdCd.trim().isEmpty()
|
|
||||||
|| roofBaseCd == null
|
|
||||||
|| roofBaseCd.trim().isEmpty()
|
|
||||||
|| illuminationTp == null
|
|
||||||
|| illuminationTp.trim().isEmpty()
|
|
||||||
|| instHt == null
|
|
||||||
|| instHt.trim().isEmpty()
|
|
||||||
|| stdWindSpeed == null
|
|
||||||
|| stdWindSpeed.trim().isEmpty()
|
|
||||||
|| stdSnowLd == null
|
|
||||||
|| stdSnowLd.trim().isEmpty()
|
|
||||||
|| inclCd == null
|
|
||||||
|| inclCd.trim().isEmpty()
|
|
||||||
|| constTp == null
|
|
||||||
|| constTp.trim().isEmpty()) {
|
|
||||||
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiTrestleDetailBuilder atdb =
|
|
||||||
ApiTrestleDetailBuilder.builder()
|
|
||||||
.moduleTpCd(moduleTpCd)
|
|
||||||
.roofMatlCd(roofMatlCd)
|
|
||||||
.trestleMkrCd(trestleMkrCd)
|
|
||||||
.constMthdCd(constMthdCd)
|
|
||||||
.roofBaseCd(roofBaseCd)
|
|
||||||
.illuminationTp(illuminationTp)
|
|
||||||
.instHt(instHt)
|
|
||||||
.stdWindSpeed(stdWindSpeed)
|
|
||||||
.stdSnowLd(stdSnowLd)
|
|
||||||
.inclCd(inclCd)
|
|
||||||
.constTp(constTp)
|
|
||||||
.mixMatlNo(mixMatlNo)
|
|
||||||
.roofPitch(roofPitch)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
return masterService.getTrestleDetailList(
|
|
||||||
atdb.getModuleTpCd(),
|
|
||||||
atdb.getRoofMatlCd(),
|
|
||||||
atdb.getTrestleMkrCd(),
|
|
||||||
atdb.getConstMthdCd(),
|
|
||||||
atdb.getRoofBaseCd(),
|
|
||||||
atdb.getIlluminationTp(),
|
|
||||||
atdb.getInstHt(),
|
|
||||||
atdb.getStdWindSpeed(),
|
|
||||||
atdb.getStdSnowLd(),
|
|
||||||
atdb.getInclCd(),
|
|
||||||
atdb.getConstTp(),
|
|
||||||
atdb.getMixMatlNo(),
|
|
||||||
atdb.getRoofPitch());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(description = "PCS 메이커, 시리즈 조회한다.")
|
|
||||||
@GetMapping("/pcsMakerList")
|
|
||||||
public ApiResponse<ApiPcsMakerResponse> getPcsMakerList(@Parameter(description = "PCS 메이커 코드") @RequestParam(required = false) String pcsMkrCd,
|
|
||||||
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) String mixMatlNo) {
|
|
||||||
|
|
||||||
return masterService.getPcsMakerList(pcsMkrCd, mixMatlNo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user