pcs 메이커 시리즈 조회 api 추가
This commit is contained in:
parent
d1fc048dbf
commit
1a6d6398dc
@ -1,240 +1,244 @@
|
|||||||
package com.interplug.qcast.biz.master;
|
package com.interplug.qcast.biz.master;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.master.dto.ApiConstructionResponse;
|
import com.interplug.qcast.biz.master.dto.*;
|
||||||
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 com.interplug.qcast.biz.master.dto.ApiTrestleDetailResponse;
|
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
|
|
||||||
import com.interplug.qcast.config.Exception.ErrorCode;
|
import com.interplug.qcast.config.Exception.ErrorCode;
|
||||||
import com.interplug.qcast.config.Exception.QcastException;
|
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.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;
|
||||||
|
|
||||||
@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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiConstructionBuilder apiConstructionBuilder =
|
@Operation(description = "모듈 타입별 아이템 목록을 조회한다.")
|
||||||
new ApiConstructionBuilder(
|
@GetMapping("/getModuleTypeItemList")
|
||||||
moduleTpCd,
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
roofMatlCd,
|
@Parameter(description = "지붕재 코드 목록") @RequestParam("arrRoofMatlCd")
|
||||||
trestleMkrCd,
|
List<String> roofMaterialCd)
|
||||||
constMthdCd,
|
throws QcastException {
|
||||||
roofBaseCd,
|
if (roofMaterialCd == null
|
||||||
illuminationTp,
|
|| roofMaterialCd.isEmpty()
|
||||||
instHt,
|
|| roofMaterialCd.size() > 4
|
||||||
stdWindSpeed,
|
|| roofMaterialCd.stream().anyMatch(s -> s == null || s.trim().isEmpty())) {
|
||||||
stdSnowLd,
|
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE);
|
||||||
inclCd,
|
}
|
||||||
raftBaseCd,
|
return masterService.getModuleTypeItemList(roofMaterialCd);
|
||||||
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 =
|
@Operation(description = "가대 목록 조회한다.")
|
||||||
ApiTrestleDetailBuilder.builder()
|
@GetMapping("/getTrestleList")
|
||||||
.moduleTpCd(moduleTpCd)
|
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
||||||
.roofMatlCd(roofMatlCd)
|
@Parameter(description = "모듈타입코드") @RequestParam(required = false) String moduleTpCd,
|
||||||
.trestleMkrCd(trestleMkrCd)
|
@Parameter(description = "지붕재코드") @RequestParam(required = false) String roofMatlCd,
|
||||||
.constMthdCd(constMthdCd)
|
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
|
||||||
.roofBaseCd(roofBaseCd)
|
@Parameter(description = "가대메이커코드") @RequestParam(required = false) String trestleMkrCd,
|
||||||
.illuminationTp(illuminationTp)
|
@Parameter(description = "공법코드") @RequestParam(required = false) String constMthdCd,
|
||||||
.instHt(instHt)
|
@Parameter(description = "지붕기초코드") @RequestParam(required = false) String roofBaseCd) {
|
||||||
.stdWindSpeed(stdWindSpeed)
|
|
||||||
.stdSnowLd(stdSnowLd)
|
|
||||||
.inclCd(inclCd)
|
|
||||||
.constTp(constTp)
|
|
||||||
.mixMatlNo(mixMatlNo)
|
|
||||||
.roofPitch(roofPitch)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
return masterService.getTrestleDetailList(
|
ApiTrestleBuilder apiTrestleInfoBuilder =
|
||||||
atdb.getModuleTpCd(),
|
new ApiTrestleBuilder(
|
||||||
atdb.getRoofMatlCd(),
|
moduleTpCd, roofMatlCd, raftBaseCd, trestleMkrCd, constMthdCd, roofBaseCd);
|
||||||
atdb.getTrestleMkrCd(),
|
ApiTrestleBuilder atb =
|
||||||
atdb.getConstMthdCd(),
|
apiTrestleInfoBuilder
|
||||||
atdb.getRoofBaseCd(),
|
.setModuleTpCd(moduleTpCd)
|
||||||
atdb.getIlluminationTp(),
|
.setRoofMatlCdCd(roofMatlCd)
|
||||||
atdb.getInstHt(),
|
.setRaftBaseCd(raftBaseCd)
|
||||||
atdb.getStdWindSpeed(),
|
.setTrestleMkrCd(trestleMkrCd)
|
||||||
atdb.getStdSnowLd(),
|
.setConstMthdCd(constMthdCd)
|
||||||
atdb.getInclCd(),
|
.setRoofBaseCd(roofBaseCd)
|
||||||
atdb.getConstTp(),
|
.build();
|
||||||
atdb.getMixMatlNo(),
|
return masterService.getTrestleList(
|
||||||
atdb.getRoofPitch());
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
ApiConstructionBuilder apiConstructionBuilder =
|
||||||
|
new ApiConstructionBuilder(
|
||||||
|
moduleTpCd,
|
||||||
|
roofMatlCd,
|
||||||
|
trestleMkrCd,
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,69 +1,70 @@
|
|||||||
package com.interplug.qcast.biz.master;
|
package com.interplug.qcast.biz.master;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.master.dto.ApiConstructionResponse;
|
import com.interplug.qcast.biz.master.dto.*;
|
||||||
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 com.interplug.qcast.biz.master.dto.ApiTrestleDetailResponse;
|
|
||||||
import com.interplug.qcast.biz.master.dto.ApiTrestleResponse;
|
|
||||||
import java.util.List;
|
|
||||||
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
// @FeignClient(name = "master", url = "${feign.master.url}")
|
// @FeignClient(name = "master", url = "${feign.master.url}")
|
||||||
@FeignClient(name = "master", url = "${qsp.url}/api/master")
|
@FeignClient(name = "master", url = "${qsp.url}/api/master")
|
||||||
public interface MasterService {
|
public interface MasterService {
|
||||||
|
|
||||||
// 지붕재 목록 조회
|
// 지붕재 목록 조회
|
||||||
@GetMapping("/roofMaterialList")
|
@GetMapping("/roofMaterialList")
|
||||||
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList();
|
public ApiResponse<ApiRoofMaterialResponse> getRoofMaterialList();
|
||||||
|
|
||||||
// 모듈 타입별 아이템 목록 조회
|
// 모듈 타입별 아이템 목록 조회
|
||||||
@GetMapping("/moduleTypeItemList")
|
@GetMapping("/moduleTypeItemList")
|
||||||
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
public ApiResponse<ApiModuleTpResponse> getModuleTypeItemList(
|
||||||
@RequestParam("arrRoofMatlCd") List<String> roofMaterialCd);
|
@RequestParam("arrRoofMatlCd") List<String> roofMaterialCd);
|
||||||
|
|
||||||
// 가대 목록 조회
|
// 가대 목록 조회
|
||||||
@GetMapping("/trestle")
|
@GetMapping("/trestle")
|
||||||
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
public ApiResponse<ApiTrestleResponse> getTrestleList(
|
||||||
@RequestParam(required = false) String moduleTpCd,
|
@RequestParam(required = false) String moduleTpCd,
|
||||||
@RequestParam(required = false) String roofMatlCd,
|
@RequestParam(required = false) String roofMatlCd,
|
||||||
@RequestParam(required = false) String raftBaseCd,
|
@RequestParam(required = false) String raftBaseCd,
|
||||||
@RequestParam(required = false) String trestleMkrCd,
|
@RequestParam(required = false) String trestleMkrCd,
|
||||||
@RequestParam(required = false) String constMthdCd,
|
@RequestParam(required = false) String constMthdCd,
|
||||||
@RequestParam(required = false) String roofBaseCd);
|
@RequestParam(required = false) String roofBaseCd);
|
||||||
|
|
||||||
// 시공법 목록 조회
|
// 시공법 목록 조회
|
||||||
@GetMapping("/construction")
|
@GetMapping("/construction")
|
||||||
public ApiResponse<ApiConstructionResponse> getConstructionList(
|
public ApiResponse<ApiConstructionResponse> getConstructionList(
|
||||||
@RequestParam String moduleTpCd,
|
@RequestParam String moduleTpCd,
|
||||||
@RequestParam String roofMatlCd,
|
@RequestParam String roofMatlCd,
|
||||||
@RequestParam String trestleMkrCd,
|
@RequestParam String trestleMkrCd,
|
||||||
@RequestParam String constMthdCd,
|
@RequestParam String constMthdCd,
|
||||||
@RequestParam String roofBaseCd,
|
@RequestParam String roofBaseCd,
|
||||||
@RequestParam String illuminationTp,
|
@RequestParam String illuminationTp,
|
||||||
@RequestParam String instHt,
|
@RequestParam String instHt,
|
||||||
@RequestParam String stdWindSpeed,
|
@RequestParam String stdWindSpeed,
|
||||||
@RequestParam String stdSnowLd,
|
@RequestParam String stdSnowLd,
|
||||||
@RequestParam String inclCd,
|
@RequestParam String inclCd,
|
||||||
@RequestParam(required = false) String raftBaseCd,
|
@RequestParam(required = false) String raftBaseCd,
|
||||||
@RequestParam(required = false) Integer roofPitch);
|
@RequestParam(required = false) Integer roofPitch);
|
||||||
|
|
||||||
// 가대 상세 조회
|
// 가대 상세 조회
|
||||||
@GetMapping(value = "/trestle/detail", consumes = "application/json")
|
@GetMapping(value = "/trestle/detail", consumes = "application/json")
|
||||||
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(
|
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(
|
||||||
@RequestParam String moduleTpCd,
|
@RequestParam String moduleTpCd,
|
||||||
@RequestParam String roofMatlCd,
|
@RequestParam String roofMatlCd,
|
||||||
@RequestParam String trestleMkrCd,
|
@RequestParam String trestleMkrCd,
|
||||||
@RequestParam String constMthdCd,
|
@RequestParam String constMthdCd,
|
||||||
@RequestParam String roofBaseCd,
|
@RequestParam String roofBaseCd,
|
||||||
@RequestParam String illuminationTp,
|
@RequestParam String illuminationTp,
|
||||||
@RequestParam String instHt,
|
@RequestParam String instHt,
|
||||||
@RequestParam String stdWindSpeed,
|
@RequestParam String stdWindSpeed,
|
||||||
@RequestParam String stdSnowLd,
|
@RequestParam String stdSnowLd,
|
||||||
@RequestParam String inclCd,
|
@RequestParam String inclCd,
|
||||||
@RequestParam String constTp,
|
@RequestParam String constTp,
|
||||||
@RequestParam(required = false) Integer mixMatlNo,
|
@RequestParam(required = false) Integer mixMatlNo,
|
||||||
@RequestParam(required = false) Integer roofPitch);
|
@RequestParam(required = false) Integer roofPitch);
|
||||||
|
|
||||||
|
// PCS Maker, 시리즈 목록 조회
|
||||||
|
@GetMapping("/pcsMakerList")
|
||||||
|
public ApiResponse<ApiPcsMakerResponse> getPcsMakerList(@RequestParam(required = false) String pcsMkrCd,
|
||||||
|
@RequestParam(required = false) String mixMatlNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
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 = "PCS 메이커, 시리즈 목록 조회")
|
||||||
|
public class ApiPcsMakerResponse {
|
||||||
|
|
||||||
|
@Schema(description = "PCS메이커코드")
|
||||||
|
private String pcsMkrCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS메이커코드명")
|
||||||
|
private String pcsMkrNm;
|
||||||
|
|
||||||
|
@Schema(description = "PCS메이커코드명(일본)")
|
||||||
|
private String pcsMkrNmJp;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈멀티선택타입(멀티:MULTI, 단독:SINGLE, 단독(병설):SINGLE-P)")
|
||||||
|
private String pcsMkrMultiType;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈코드")
|
||||||
|
private String pcsSerCd;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈코드명")
|
||||||
|
private String pcsSerNm;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈코드명(일본)")
|
||||||
|
private String pcsSerNmJp;
|
||||||
|
|
||||||
|
@Schema(description = "PCS시리즈 병설 여부")
|
||||||
|
private String pcsSerParallelYn;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user