견적서 특이사항 API 추가
This commit is contained in:
parent
71f0c14221
commit
c031f1a45a
@ -1,12 +1,9 @@
|
|||||||
package com.interplug.qcast.biz.estimate;
|
package com.interplug.qcast.biz.estimate;
|
||||||
|
|
||||||
import com.interplug.qcast.biz.estimate.dto.EstimateRequest;
|
import com.interplug.qcast.biz.estimate.dto.*;
|
||||||
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 io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@ -35,6 +32,13 @@ public class EstimateController {
|
|||||||
return estimateService.selectItemPriceList(priceRequest);
|
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 = "견적서 상세를 조회한다.")
|
@Operation(description = "견적서 상세를 조회한다.")
|
||||||
@GetMapping("/{objectNo}/{planNo}/detail")
|
@GetMapping("/{objectNo}/{planNo}/detail")
|
||||||
@ResponseStatus(HttpStatus.OK)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
|||||||
@ -124,6 +124,10 @@ public class EstimateService {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<NoteResponse> selectSpecialNoteList(NoteRequest noteRequest) throws Exception {
|
||||||
|
return estimateMapper.selectEstimateNoteList(noteRequest);
|
||||||
|
}
|
||||||
|
|
||||||
public EstimateResponse selectEstimateDetail(String objectNo, String planNo) throws Exception {
|
public EstimateResponse selectEstimateDetail(String objectNo, String planNo) throws Exception {
|
||||||
// Validation
|
// Validation
|
||||||
if (StringUtils.isEmpty(objectNo)) {
|
if (StringUtils.isEmpty(objectNo)) {
|
||||||
@ -212,16 +216,18 @@ public class EstimateService {
|
|||||||
// [2]. 지붕재 관련 데이터 셋팅
|
// [2]. 지붕재 관련 데이터 셋팅
|
||||||
List<RoofRequest> roofList = estimateRequest.getRoofList();
|
List<RoofRequest> roofList = estimateRequest.getRoofList();
|
||||||
|
|
||||||
|
// 지붕재 시공사양 ID
|
||||||
|
String constructSpecifications = "";
|
||||||
// 지붕재 아이템 ID
|
// 지붕재 아이템 ID
|
||||||
String roofMaterialIds = "";
|
String roofMaterialIds = "";
|
||||||
// 지붕재 공법 ID
|
// 지붕재 공법 ID
|
||||||
String supportMethodIds = "";
|
String supportMethodIds = "";
|
||||||
// 지붕재 시공사양 ID
|
|
||||||
String constructSpecifications = "";
|
|
||||||
// 지붕재 아이템명
|
// 지붕재 아이템명
|
||||||
String roofMaterialIdMultis = "";
|
String roofMaterialIdMultis = "";
|
||||||
// 지붕재 공법명
|
// 지붕재 공법명
|
||||||
String supportMethodIdMultis = "";
|
String supportMethodIdMultis = "";
|
||||||
|
// 지붕재 시공사양명
|
||||||
|
String constructSpecificationMultis = "";
|
||||||
// 가대 메이커명
|
// 가대 메이커명
|
||||||
String supportMeakers = "";
|
String supportMeakers = "";
|
||||||
for (RoofRequest roofRequest : roofList) {
|
for (RoofRequest roofRequest : roofList) {
|
||||||
@ -250,6 +256,12 @@ public class EstimateService {
|
|||||||
supportMethodIdMultis += roofRequest.getSupportMethodIdMulti();
|
supportMethodIdMultis += roofRequest.getSupportMethodIdMulti();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!StringUtils.isEmpty(roofRequest.getConstructSpecificationMulti())) {
|
||||||
|
constructSpecificationMultis +=
|
||||||
|
!StringUtils.isEmpty(constructSpecificationMultis) ? splitStr : "";
|
||||||
|
constructSpecificationMultis += roofRequest.getConstructSpecificationMulti();
|
||||||
|
}
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(roofRequest.getSupportMeaker())) {
|
if (!StringUtils.isEmpty(roofRequest.getSupportMeaker())) {
|
||||||
supportMeakers += !StringUtils.isEmpty(supportMeakers) ? splitStr : "";
|
supportMeakers += !StringUtils.isEmpty(supportMeakers) ? splitStr : "";
|
||||||
supportMeakers += roofRequest.getSupportMeaker();
|
supportMeakers += roofRequest.getSupportMeaker();
|
||||||
@ -262,6 +274,7 @@ public class EstimateService {
|
|||||||
estimateRequest.setConstructSpecification(constructSpecifications);
|
estimateRequest.setConstructSpecification(constructSpecifications);
|
||||||
estimateRequest.setRoofMaterialIdMulti(roofMaterialIdMultis);
|
estimateRequest.setRoofMaterialIdMulti(roofMaterialIdMultis);
|
||||||
estimateRequest.setSupportMethodIdMulti(supportMethodIdMultis);
|
estimateRequest.setSupportMethodIdMulti(supportMethodIdMultis);
|
||||||
|
estimateRequest.setConstructSpecificationMulti(constructSpecificationMultis);
|
||||||
estimateRequest.setSupportMeaker(supportMeakers);
|
estimateRequest.setSupportMeaker(supportMeakers);
|
||||||
|
|
||||||
// [3]. 아이템 관련 데이터 셋팅
|
// [3]. 아이템 관련 데이터 셋팅
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public class EstimateRequest {
|
|||||||
@Schema(description = "기준풍속ID")
|
@Schema(description = "기준풍속ID")
|
||||||
private String standardWindSpeedId;
|
private String standardWindSpeedId;
|
||||||
|
|
||||||
@Schema(description = "가대 메이커")
|
@Schema(description = "가대 메이커명")
|
||||||
private String supportMeaker;
|
private String supportMeaker;
|
||||||
|
|
||||||
@Schema(description = "소비세ID")
|
@Schema(description = "소비세ID")
|
||||||
@ -105,13 +105,16 @@ public class EstimateRequest {
|
|||||||
@Schema(description = "북면설치여부")
|
@Schema(description = "북면설치여부")
|
||||||
private String northArrangement;
|
private String northArrangement;
|
||||||
|
|
||||||
@Schema(description = "지붕재")
|
@Schema(description = "시공방법명")
|
||||||
|
private String constructSpecificationMulti;
|
||||||
|
|
||||||
|
@Schema(description = "지붕재명")
|
||||||
private String roofMaterialIdMulti;
|
private String roofMaterialIdMulti;
|
||||||
|
|
||||||
@Schema(description = "가대")
|
@Schema(description = "가대명")
|
||||||
private String supportMethodIdMulti;
|
private String supportMethodIdMulti;
|
||||||
|
|
||||||
@Schema(description = "가대 메이커")
|
@Schema(description = "가대 메이커명")
|
||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
|
|
||||||
@Schema(description = "다른 지붕재여부")
|
@Schema(description = "다른 지붕재여부")
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class EstimateResponse {
|
|||||||
@Schema(description = "기준풍속ID")
|
@Schema(description = "기준풍속ID")
|
||||||
private String standardWindSpeedId;
|
private String standardWindSpeedId;
|
||||||
|
|
||||||
@Schema(description = "가대 메이커")
|
@Schema(description = "가대 메이커명")
|
||||||
private String supportMeaker;
|
private String supportMeaker;
|
||||||
|
|
||||||
@Schema(description = "소비세ID")
|
@Schema(description = "소비세ID")
|
||||||
@ -97,13 +97,16 @@ public class EstimateResponse {
|
|||||||
@Schema(description = "북면설치여부")
|
@Schema(description = "북면설치여부")
|
||||||
private String northArrangement;
|
private String northArrangement;
|
||||||
|
|
||||||
@Schema(description = "지붕재")
|
@Schema(description = "시공방법명")
|
||||||
|
private String constructSpecificationMulti;
|
||||||
|
|
||||||
|
@Schema(description = "지붕재명")
|
||||||
private String roofMaterialIdMulti;
|
private String roofMaterialIdMulti;
|
||||||
|
|
||||||
@Schema(description = "가대")
|
@Schema(description = "가대명")
|
||||||
private String supportMethodIdMulti;
|
private String supportMethodIdMulti;
|
||||||
|
|
||||||
@Schema(description = "가대 메이커")
|
@Schema(description = "가대 메이커명")
|
||||||
private String supportMeakerMulti;
|
private String supportMeakerMulti;
|
||||||
|
|
||||||
@Schema(description = "다른 지붕재여부")
|
@Schema(description = "다른 지붕재여부")
|
||||||
|
|||||||
@ -23,6 +23,9 @@ public class RoofRequest {
|
|||||||
@Schema(description = "공법명")
|
@Schema(description = "공법명")
|
||||||
private String supportMethodIdMulti;
|
private String supportMethodIdMulti;
|
||||||
|
|
||||||
|
@Schema(description = "시공방법명")
|
||||||
|
private String constructSpecificationMulti;
|
||||||
|
|
||||||
@Schema(description = "가대메이커명")
|
@Schema(description = "가대메이커명")
|
||||||
private String supportMeaker;
|
private String supportMeaker;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
, P.STATUS
|
, P.STATUS
|
||||||
, P.PC_TYPE_NO
|
, P.PC_TYPE_NO
|
||||||
, P.NORTH_ARRANGEMENT
|
, P.NORTH_ARRANGEMENT
|
||||||
|
, P.CONSTRUCT_SPECIFICATION_MULTI
|
||||||
, P.ROOF_MATERIAL_ID_MULTI
|
, P.ROOF_MATERIAL_ID_MULTI
|
||||||
, P.SUPPORT_METHOD_ID_MULTI
|
, P.SUPPORT_METHOD_ID_MULTI
|
||||||
, P.SUPPORT_MEAKER_MULTI
|
, P.SUPPORT_MEAKER_MULTI
|
||||||
@ -231,6 +232,7 @@
|
|||||||
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
, STANDARD_WIND_SPEED_ID = #{standardWindSpeedId}
|
||||||
, SUPPORT_MEAKER = #{supportMeaker}
|
, SUPPORT_MEAKER = #{supportMeaker}
|
||||||
, NORTH_ARRANGEMENT = #{northArrangement}
|
, NORTH_ARRANGEMENT = #{northArrangement}
|
||||||
|
, CONSTRUCT_SPECIFICATION_MULTI = #{constructSpecificationMulti}
|
||||||
, ROOF_MATERIAL_ID_MULTI = #{roofMaterialIdMulti}
|
, ROOF_MATERIAL_ID_MULTI = #{roofMaterialIdMulti}
|
||||||
, SUPPORT_METHOD_ID_MULTI = #{supportMethodIdMulti}
|
, SUPPORT_METHOD_ID_MULTI = #{supportMethodIdMulti}
|
||||||
, SUPPORT_MEAKER_MULTI = #{supportMeaker}
|
, SUPPORT_MEAKER_MULTI = #{supportMeaker}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user