견적서 특이사항 API 추가
This commit is contained in:
parent
71f0c14221
commit
c031f1a45a
@ -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<NoteResponse> selectSpecialNoteList(NoteRequest noteRequest) throws Exception {
|
||||
return estimateService.selectSpecialNoteList(noteRequest);
|
||||
}
|
||||
|
||||
@Operation(description = "견적서 상세를 조회한다.")
|
||||
@GetMapping("/{objectNo}/{planNo}/detail")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
@ -124,6 +124,10 @@ public class EstimateService {
|
||||
return response;
|
||||
}
|
||||
|
||||
public List<NoteResponse> 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<RoofRequest> 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]. 아이템 관련 데이터 셋팅
|
||||
|
||||
@ -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 = "다른 지붕재여부")
|
||||
|
||||
@ -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 = "다른 지붕재여부")
|
||||
|
||||
@ -23,6 +23,9 @@ public class RoofRequest {
|
||||
@Schema(description = "공법명")
|
||||
private String supportMethodIdMulti;
|
||||
|
||||
@Schema(description = "시공방법명")
|
||||
private String constructSpecificationMulti;
|
||||
|
||||
@Schema(description = "가대메이커명")
|
||||
private String supportMeaker;
|
||||
}
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user