diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java index a6ae6091..269a23e6 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java @@ -1,12 +1,9 @@ package com.interplug.qcast.biz.estimate; -import com.interplug.qcast.biz.estimate.dto.EstimateRequest; -import com.interplug.qcast.biz.estimate.dto.EstimateResponse; -import com.interplug.qcast.biz.estimate.dto.PriceRequest; -import com.interplug.qcast.biz.estimate.dto.PriceResponse; -import com.interplug.qcast.biz.object.dto.*; +import com.interplug.qcast.biz.estimate.dto.*; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; @@ -35,6 +32,13 @@ public class EstimateController { return estimateService.selectItemPriceList(priceRequest); } + @Operation(description = "견적서 특이사항 목록을 조회한다.") + @GetMapping("/special-note-list") + @ResponseStatus(HttpStatus.OK) + public List selectSpecialNoteList(NoteRequest noteRequest) throws Exception { + return estimateService.selectSpecialNoteList(noteRequest); + } + @Operation(description = "견적서 상세를 조회한다.") @GetMapping("/{objectNo}/{planNo}/detail") @ResponseStatus(HttpStatus.OK) diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java index 9f9c4685..a34e3aa7 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -124,6 +124,10 @@ public class EstimateService { return response; } + public List selectSpecialNoteList(NoteRequest noteRequest) throws Exception { + return estimateMapper.selectEstimateNoteList(noteRequest); + } + public EstimateResponse selectEstimateDetail(String objectNo, String planNo) throws Exception { // Validation if (StringUtils.isEmpty(objectNo)) { @@ -212,16 +216,18 @@ public class EstimateService { // [2]. 지붕재 관련 데이터 셋팅 List roofList = estimateRequest.getRoofList(); + // 지붕재 시공사양 ID + String constructSpecifications = ""; // 지붕재 아이템 ID String roofMaterialIds = ""; // 지붕재 공법 ID String supportMethodIds = ""; - // 지붕재 시공사양 ID - String constructSpecifications = ""; // 지붕재 아이템명 String roofMaterialIdMultis = ""; // 지붕재 공법명 String supportMethodIdMultis = ""; + // 지붕재 시공사양명 + String constructSpecificationMultis = ""; // 가대 메이커명 String supportMeakers = ""; for (RoofRequest roofRequest : roofList) { @@ -250,6 +256,12 @@ public class EstimateService { supportMethodIdMultis += roofRequest.getSupportMethodIdMulti(); } + if (!StringUtils.isEmpty(roofRequest.getConstructSpecificationMulti())) { + constructSpecificationMultis += + !StringUtils.isEmpty(constructSpecificationMultis) ? splitStr : ""; + constructSpecificationMultis += roofRequest.getConstructSpecificationMulti(); + } + if (!StringUtils.isEmpty(roofRequest.getSupportMeaker())) { supportMeakers += !StringUtils.isEmpty(supportMeakers) ? splitStr : ""; supportMeakers += roofRequest.getSupportMeaker(); @@ -262,6 +274,7 @@ public class EstimateService { estimateRequest.setConstructSpecification(constructSpecifications); estimateRequest.setRoofMaterialIdMulti(roofMaterialIdMultis); estimateRequest.setSupportMethodIdMulti(supportMethodIdMultis); + estimateRequest.setConstructSpecificationMulti(constructSpecificationMultis); estimateRequest.setSupportMeaker(supportMeakers); // [3]. 아이템 관련 데이터 셋팅 diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java index b44bc869..c3d7d2ea 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java @@ -84,7 +84,7 @@ public class EstimateRequest { @Schema(description = "기준풍속ID") private String standardWindSpeedId; - @Schema(description = "가대 메이커") + @Schema(description = "가대 메이커명") private String supportMeaker; @Schema(description = "소비세ID") @@ -105,13 +105,16 @@ public class EstimateRequest { @Schema(description = "북면설치여부") private String northArrangement; - @Schema(description = "지붕재") + @Schema(description = "시공방법명") + private String constructSpecificationMulti; + + @Schema(description = "지붕재명") private String roofMaterialIdMulti; - @Schema(description = "가대") + @Schema(description = "가대명") private String supportMethodIdMulti; - @Schema(description = "가대 메이커") + @Schema(description = "가대 메이커명") private String supportMeakerMulti; @Schema(description = "다른 지붕재여부") diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java index bc00f717..28e55fc3 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java @@ -76,7 +76,7 @@ public class EstimateResponse { @Schema(description = "기준풍속ID") private String standardWindSpeedId; - @Schema(description = "가대 메이커") + @Schema(description = "가대 메이커명") private String supportMeaker; @Schema(description = "소비세ID") @@ -97,13 +97,16 @@ public class EstimateResponse { @Schema(description = "북면설치여부") private String northArrangement; - @Schema(description = "지붕재") + @Schema(description = "시공방법명") + private String constructSpecificationMulti; + + @Schema(description = "지붕재명") private String roofMaterialIdMulti; - @Schema(description = "가대") + @Schema(description = "가대명") private String supportMethodIdMulti; - @Schema(description = "가대 메이커") + @Schema(description = "가대 메이커명") private String supportMeakerMulti; @Schema(description = "다른 지붕재여부") diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofRequest.java index 091b4e0f..6f64f8c4 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofRequest.java @@ -23,6 +23,9 @@ public class RoofRequest { @Schema(description = "공법명") private String supportMethodIdMulti; + @Schema(description = "시공방법명") + private String constructSpecificationMulti; + @Schema(description = "가대메이커명") private String supportMeaker; } diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index 8f4a0066..95df4597 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -34,6 +34,7 @@ , P.STATUS , P.PC_TYPE_NO , P.NORTH_ARRANGEMENT + , P.CONSTRUCT_SPECIFICATION_MULTI , P.ROOF_MATERIAL_ID_MULTI , P.SUPPORT_METHOD_ID_MULTI , P.SUPPORT_MEAKER_MULTI @@ -231,6 +232,7 @@ , STANDARD_WIND_SPEED_ID = #{standardWindSpeedId} , SUPPORT_MEAKER = #{supportMeaker} , NORTH_ARRANGEMENT = #{northArrangement} + , CONSTRUCT_SPECIFICATION_MULTI = #{constructSpecificationMulti} , ROOF_MATERIAL_ID_MULTI = #{roofMaterialIdMulti} , SUPPORT_METHOD_ID_MULTI = #{supportMethodIdMulti} , SUPPORT_MEAKER_MULTI = #{supportMeaker}