style: 포맷터 적용

This commit is contained in:
Daseul Kim 2025-01-08 17:57:26 +09:00
parent 48dadf4dd7
commit e8b13ae9c6
3 changed files with 239 additions and 159 deletions

View File

@ -49,125 +49,207 @@ public class MasterController {
@Operation(description = "가대 목록 조회한다.") @Operation(description = "가대 목록 조회한다.")
@GetMapping("/getTrestleList") @GetMapping("/getTrestleList")
public ApiResponse<ApiTrestleResponse> getTrestleList( public ApiResponse<ApiTrestleResponse> getTrestleList(
@Parameter(description = "모듈타입코드") @RequestParam(required = false) String moduleTpCd, @Parameter(description = "모듈타입코드") @RequestParam(required = false) String moduleTpCd,
@Parameter(description = "지붕재코드") @RequestParam(required = false) String roofMatlCd, @Parameter(description = "지붕재코드") @RequestParam(required = false) String roofMatlCd,
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd, @Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
@Parameter(description = "가대메이커코드") @RequestParam(required = false) String trestleMkrCd, @Parameter(description = "가대메이커코드") @RequestParam(required = false) String trestleMkrCd,
@Parameter(description = "공법코드") @RequestParam(required = false) String constMthdCd, @Parameter(description = "공법코드") @RequestParam(required = false) String constMthdCd,
@Parameter(description = "지붕기초코드") @RequestParam(required = false) String roofBaseCd) { @Parameter(description = "지붕기초코드") @RequestParam(required = false) String roofBaseCd) {
ApiTrestleBuilder apiTrestleInfoBuilder = new ApiTrestleBuilder(moduleTpCd, roofMatlCd, raftBaseCd, trestleMkrCd, constMthdCd, roofBaseCd); ApiTrestleBuilder apiTrestleInfoBuilder =
ApiTrestleBuilder atb = apiTrestleInfoBuilder new ApiTrestleBuilder(
.setModuleTpCd(moduleTpCd) moduleTpCd, roofMatlCd, raftBaseCd, trestleMkrCd, constMthdCd, roofBaseCd);
.setRoofMatlCdCd(roofMatlCd) ApiTrestleBuilder atb =
.setRaftBaseCd(raftBaseCd) apiTrestleInfoBuilder
.setTrestleMkrCd(trestleMkrCd) .setModuleTpCd(moduleTpCd)
.setConstMthdCd(constMthdCd) .setRoofMatlCdCd(roofMatlCd)
.setRoofBaseCd(roofBaseCd) .setRaftBaseCd(raftBaseCd)
.build(); .setTrestleMkrCd(trestleMkrCd)
return masterService.getTrestleList(atb.getModuleTpCd(),atb.getRoofMatlCd(),atb.getRaftBaseCd(),atb.getTrestleMkrCd(),atb.getConstMthdCd(),atb.getRoofBaseCd()); .setConstMthdCd(constMthdCd)
.setRoofBaseCd(roofBaseCd)
.build();
return masterService.getTrestleList(
atb.getModuleTpCd(),
atb.getRoofMatlCd(),
atb.getRaftBaseCd(),
atb.getTrestleMkrCd(),
atb.getConstMthdCd(),
atb.getRoofBaseCd());
} }
@Operation(description = "시공법 목록 조회한다.") @Operation(description = "시공법 목록 조회한다.")
@GetMapping("/getConstructionList") @GetMapping("/getConstructionList")
public ApiResponse<ApiConstructionResponse> getConstructionList( public ApiResponse<ApiConstructionResponse> getConstructionList(
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd, @Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd, @Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd, @Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
@Parameter(description = "공법코드") @RequestParam String constMthdCd, @Parameter(description = "공법코드") @RequestParam String constMthdCd,
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd, @Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
@Parameter(description = "면조도") @RequestParam String illuminationTp, @Parameter(description = "면조도") @RequestParam String illuminationTp,
@Parameter(description = "설치높이") @RequestParam String instHt, @Parameter(description = "설치높이") @RequestParam String instHt,
@Parameter(description = "풍속") @RequestParam String stdWindSpeed, @Parameter(description = "풍속") @RequestParam String stdWindSpeed,
@Parameter(description = "적설량") @RequestParam String stdSnowLd, @Parameter(description = "적설량") @RequestParam String stdSnowLd,
@Parameter(description = "경사도코드") @RequestParam String inclCd, @Parameter(description = "경사도코드") @RequestParam String inclCd,
@Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd, @Parameter(description = "서까래기초코드") @RequestParam(required = false) String raftBaseCd,
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch) throws QcastException { @Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
throws QcastException {
if (moduleTpCd == null || moduleTpCd.trim().isEmpty() || if (moduleTpCd == null
roofMatlCd == null || roofMatlCd.trim().isEmpty() || || moduleTpCd.trim().isEmpty()
trestleMkrCd == null || trestleMkrCd.trim().isEmpty() || || roofMatlCd == null
constMthdCd == null || constMthdCd.trim().isEmpty() || || roofMatlCd.trim().isEmpty()
roofBaseCd == null || roofBaseCd.trim().isEmpty() || || trestleMkrCd == null
illuminationTp == null || illuminationTp.trim().isEmpty() || || trestleMkrCd.trim().isEmpty()
instHt == null || instHt.trim().isEmpty() || || constMthdCd == null
stdWindSpeed == null || stdWindSpeed.trim().isEmpty() || || constMthdCd.trim().isEmpty()
stdSnowLd == null || stdSnowLd.trim().isEmpty() || || roofBaseCd == null
inclCd == null || inclCd.trim().isEmpty()) { || roofBaseCd.trim().isEmpty()
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE); || 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 ApiConstructionBuilder apiConstructionBuilder =
, instHt, stdWindSpeed, stdSnowLd, inclCd, raftBaseCd, roofPitch); new ApiConstructionBuilder(
ApiConstructionBuilder acb = apiConstructionBuilder moduleTpCd,
.setModuleTpCd(moduleTpCd) roofMatlCd,
.setRoofMatlCd(roofMatlCd) trestleMkrCd,
.setTrestleMkrCd(trestleMkrCd) constMthdCd,
.setConstMthdCd(constMthdCd) roofBaseCd,
.setRoofBaseCd(roofBaseCd) illuminationTp,
.setIlluminationTp(illuminationTp) instHt,
.setInstHt(instHt) stdWindSpeed,
.setStdWindSpeed(stdWindSpeed) stdSnowLd,
.setStdSnowLd(stdSnowLd) inclCd,
.setInclCd(inclCd) raftBaseCd,
.setRaftBaseCd(raftBaseCd) roofPitch);
.setRoofPitch(roofPitch) ApiConstructionBuilder acb =
.build(); 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() return masterService.getConstructionList(
, acb.getInstHt(), acb.getStdWindSpeed(), acb.getStdSnowLd(), acb.getInclCd(), acb.getRaftBaseCd(), acb.getRoofPitch()); 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 = "가대 상세 조회한다.") @Operation(description = "가대 상세 조회한다.")
@GetMapping("/getTrestleDetailList") @GetMapping("/getTrestleDetailList")
public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList( public ApiResponse<ApiTrestleDetailResponse> getTrestleDetailList(
@Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd, @Parameter(description = "모듈타입코드") @RequestParam String moduleTpCd,
@Parameter(description = "지붕재코드") @RequestParam String roofMatlCd, @Parameter(description = "지붕재코드") @RequestParam String roofMatlCd,
@Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd, @Parameter(description = "가대메이커코드") @RequestParam String trestleMkrCd,
@Parameter(description = "공법코드") @RequestParam String constMthdCd, @Parameter(description = "공법코드") @RequestParam String constMthdCd,
@Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd, @Parameter(description = "지붕기초코드") @RequestParam String roofBaseCd,
@Parameter(description = "면조도") @RequestParam String illuminationTp, @Parameter(description = "면조도") @RequestParam String illuminationTp,
@Parameter(description = "설치높이") @RequestParam String instHt, @Parameter(description = "설치높이") @RequestParam String instHt,
@Parameter(description = "풍속") @RequestParam String stdWindSpeed, @Parameter(description = "풍속") @RequestParam String stdWindSpeed,
@Parameter(description = "적설량") @RequestParam String stdSnowLd, @Parameter(description = "적설량") @RequestParam String stdSnowLd,
@Parameter(description = "경사도코드") @RequestParam String inclCd, @Parameter(description = "경사도코드") @RequestParam String inclCd,
@Parameter(description = "시공법") @RequestParam String constTp, @Parameter(description = "시공법") @RequestParam String constTp,
@Parameter(description = "혼합모듈번호") @RequestParam(required = false) Integer mixMatlNo, @Parameter(description = "혼합모듈번호") @RequestParam(required = false) Integer mixMatlNo,
@Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch) throws QcastException { @Parameter(description = "하제(망둥어)피치") @RequestParam(required = false) Integer roofPitch)
throws QcastException {
if (moduleTpCd == null || moduleTpCd.trim().isEmpty() || if (moduleTpCd == null
roofMatlCd == null || roofMatlCd.trim().isEmpty() || || moduleTpCd.trim().isEmpty()
trestleMkrCd == null || trestleMkrCd.trim().isEmpty() || || roofMatlCd == null
constMthdCd == null || constMthdCd.trim().isEmpty() || || roofMatlCd.trim().isEmpty()
roofBaseCd == null || roofBaseCd.trim().isEmpty() || || trestleMkrCd == null
illuminationTp == null || illuminationTp.trim().isEmpty() || || trestleMkrCd.trim().isEmpty()
instHt == null || instHt.trim().isEmpty() || || constMthdCd == null
stdWindSpeed == null || stdWindSpeed.trim().isEmpty() || || constMthdCd.trim().isEmpty()
stdSnowLd == null || stdSnowLd.trim().isEmpty() || || roofBaseCd == null
inclCd == null || inclCd.trim().isEmpty() || || roofBaseCd.trim().isEmpty()
constTp == null || constTp.trim().isEmpty()) { || illuminationTp == null
throw new QcastException(ErrorCode.INVALID_INPUT_VALUE); || 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 apiTrestleDetailBuilder = new ApiTrestleDetailBuilder(moduleTpCd, roofMatlCd, trestleMkrCd, constMthdCd, roofBaseCd, illuminationTp ApiTrestleDetailBuilder apiTrestleDetailBuilder =
, instHt, stdWindSpeed, stdSnowLd, inclCd, constTp, mixMatlNo, roofPitch); new ApiTrestleDetailBuilder(
ApiTrestleDetailBuilder atdb = apiTrestleDetailBuilder moduleTpCd,
.setModuleTpCd(moduleTpCd) roofMatlCd,
.setRoofMatlCd(roofMatlCd) trestleMkrCd,
.setTrestleMkrCd(trestleMkrCd) constMthdCd,
.setConstMthdCd(constMthdCd) roofBaseCd,
.setRoofBaseCd(roofBaseCd) illuminationTp,
.setIlluminationTp(illuminationTp) instHt,
.setInstHt(instHt) stdWindSpeed,
.setStdWindSpeed(stdWindSpeed) stdSnowLd,
.setStdSnowLd(stdSnowLd) inclCd,
.setInclCd(inclCd) constTp,
.setConstTp(constTp) mixMatlNo,
.setMixMatlNo(mixMatlNo) roofPitch);
.setRoofPitch(roofPitch) ApiTrestleDetailBuilder atdb =
.build(); apiTrestleDetailBuilder
.setModuleTpCd(moduleTpCd)
.setRoofMatlCd(roofMatlCd)
.setTrestleMkrCd(trestleMkrCd)
.setConstMthdCd(constMthdCd)
.setRoofBaseCd(roofBaseCd)
.setIlluminationTp(illuminationTp)
.setInstHt(instHt)
.setStdWindSpeed(stdWindSpeed)
.setStdSnowLd(stdSnowLd)
.setInclCd(inclCd)
.setConstTp(constTp)
.setMixMatlNo(mixMatlNo)
.setRoofPitch(roofPitch)
.build();
return masterService.getTrestleDetailList(atdb.getModuleTpCd(), atdb.getRoofMatlCd(), atdb.getTrestleMkrCd(), atdb.getConstMthdCd(), atdb.getRoofBaseCd(), atdb.getIlluminationTp() return masterService.getTrestleDetailList(
, atdb.getInstHt(), atdb.getStdWindSpeed(), atdb.getStdSnowLd(), atdb.getInclCd(), atdb.getConstTp(), atdb.getMixMatlNo(), atdb.getRoofPitch()); 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());
} }
} }

View File

@ -27,44 +27,43 @@ public interface MasterService {
// 가대 목록 조회 // 가대 목록 조회
@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("/trestle/detail") @GetMapping("/trestle/detail")
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);
} }

View File

@ -1,8 +1,7 @@
package com.interplug.qcast.biz.master.dto; package com.interplug.qcast.biz.master.dto;
import java.util.List;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -11,12 +10,12 @@ import lombok.Setter;
@Schema(description = "결과 데이터") @Schema(description = "결과 데이터")
public class ApiResponse<T> { public class ApiResponse<T> {
@Schema(description = "목록 데이터") @Schema(description = "목록 데이터")
private List<T> data; private List<T> data;
@Schema(description = "목록 데이터2") @Schema(description = "목록 데이터2")
private List<T> data2; private List<T> data2;
@Schema(description = "API 결과 데이터") @Schema(description = "API 결과 데이터")
private ApiResultResponse result; private ApiResultResponse result;
} }