From 6022619231312b4797f156e3ad9c493ac99548fe Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 13 Nov 2024 09:02:50 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EB=B0=B0=EC=B9=98=20=EC=A3=BC=EC=84=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interplug/qcast/batch/system/CommonCodeConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/interplug/qcast/batch/system/CommonCodeConfiguration.java b/src/main/java/com/interplug/qcast/batch/system/CommonCodeConfiguration.java index 350aa3d5..f4d9936f 100644 --- a/src/main/java/com/interplug/qcast/batch/system/CommonCodeConfiguration.java +++ b/src/main/java/com/interplug/qcast/batch/system/CommonCodeConfiguration.java @@ -26,7 +26,7 @@ import com.interplug.qcast.biz.commCode.dto.HeadCodeRequest; import com.interplug.qcast.util.InterfaceQsp; import lombok.extern.slf4j.Slf4j; -/** 영업사원 동기화 배치 */ +/** 공통코드 동기화 배치 */ @Configuration @Slf4j public class CommonCodeConfiguration implements JobExecutionListener { From 6ad6ce2cd34222ff73278fef80b2993a9bd7a18b Mon Sep 17 00:00:00 2001 From: "LAPTOP-L3VE7KK2\\USER" Date: Wed, 13 Nov 2024 09:07:03 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20API=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateMapper.java | 5 +- .../qcast/biz/estimate/EstimateService.java | 64 ++++++++++++++++-- .../biz/estimate/dto/EstimateResponse.java | 12 ++++ .../estimate/dto/EstimateSendResponse.java | 3 + .../qcast/biz/estimate/dto/ItemRequest.java | 3 + .../biz/estimate/dto/RoofInfoResponse.java | 20 ++++++ .../qcast/biz/estimate/dto/RoofResponse.java | 67 +++++++++++++++++++ .../mappers/estimate/estimateMapper.xml | 54 +++++++++++++++ 8 files changed, 222 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/interplug/qcast/biz/estimate/dto/RoofInfoResponse.java create mode 100644 src/main/java/com/interplug/qcast/biz/estimate/dto/RoofResponse.java diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java index 5e169ed3..8fcc17b6 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java @@ -21,7 +21,10 @@ public interface EstimateMapper { // 아이템 마스터 목록 조회 public List selectItemMasterList(EstimateRequest estimateRequest); - // 아이템 마스터 목록 조회 + // 견적서 지붕재 목록 조회 + public List selectEstimateRoofList(EstimateRequest estimateRequest); + + // 견적서 특이사항 목록 조회 public List selectEstimateNoteList(NoteRequest noteRequest); // 아이템 마스터 목록 조회 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 3f2dada3..fb0f62a0 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -10,9 +10,7 @@ import com.interplug.qcast.biz.object.dto.ObjectResponse; import com.interplug.qcast.biz.object.dto.PlanRequest; import com.interplug.qcast.biz.object.dto.PlanResponse; import com.interplug.qcast.biz.pwrGnrSimulation.PwrGnrSimService; -import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimGuideResponse; import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest; -import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimResponse; import com.interplug.qcast.config.Exception.ErrorCode; import com.interplug.qcast.config.Exception.QcastException; import com.interplug.qcast.config.message.Messages; @@ -115,8 +113,8 @@ public class EstimateService { /** * QSP 아이템 가격 목록 조회 * - * @param priceRequest - * @return PriceResponse + * @param priceRequest QSP 관련 아이템 목록 정보 + * @return PriceResponse QSP 아이템 가격 목록 * @throws Exception */ public EstimateApiResponse selectItemPriceList(PriceRequest priceRequest) throws Exception { @@ -156,10 +154,25 @@ public class EstimateService { return response; } + /** + * 견적 특이사항 목록 조회 + * + * @param noteRequest 견적 특이사항 조회 정보 + * @return List 견적 특이사항 목록 + * @throws Exception + */ public List selectSpecialNoteList(NoteRequest noteRequest) throws Exception { return estimateMapper.selectEstimateNoteList(noteRequest); } + /** + * 견적서 상세 조회 + * + * @param objectNo 물건번호 + * @param planNo 플랜번호 + * @return EstimateResponse 견적서 상세 정보 + * @throws Exception + */ public EstimateResponse selectEstimateDetail(String objectNo, String planNo) throws Exception { // Validation if (StringUtils.isEmpty(objectNo)) { @@ -204,6 +217,12 @@ public class EstimateService { return response; } + /** + * 견적서 저장 + * + * @param estimateRequest 견적서 저장 정보 + * @throws Exception + */ public void insertEstimate(EstimateRequest estimateRequest) throws Exception { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { @@ -522,6 +541,13 @@ public class EstimateService { } } + /** + * 견적서 복사 + * + * @param estimateRequest 견적서 복사 정보 + * @return EstimateResponse 견적서 복사 후 상세 정보 + * @throws Exception + */ public EstimateResponse insertEstimateCopy(EstimateRequest estimateRequest) throws Exception { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { @@ -613,6 +639,14 @@ public class EstimateService { return response; } + /** + * 견적서 엑셀 다운로드 + * + * @param request HttpServletRequest + * @param response HttpServletResponse + * @param estimateRequest 견적서 엑셀 다운로드 요청 정보 + * @throws Exception + */ public void excelDownload( HttpServletRequest request, HttpServletResponse response, EstimateRequest estimateRequest) throws Exception { @@ -648,6 +682,13 @@ public class EstimateService { estimateResponse.setNoteList(noteList); } + // 지붕재 목록 조회 + RoofInfoResponse roofInfoResponse = new RoofInfoResponse(); + List roofList = estimateMapper.selectEstimateRoofList(estimateRequest); + roofInfoResponse.setRoofList(roofList); + + estimateResponse.setRoofInfo(roofInfoResponse); + // 아이템 목록 조회 List estimateItemList = estimateMapper.selectEstimateItemList(estimateRequest); @@ -701,7 +742,7 @@ public class EstimateService { PwrGnrSimRequest pwrGnrSimRequest = new PwrGnrSimRequest(); pwrGnrSimRequest.setObjectNo(estimateResponse.getObjectNo()); pwrGnrSimRequest.setPlanNo(estimateResponse.getPlanNo()); - + /* PwrGnrSimResponse pwrGnrSimResponse = pwrGnrSimService.selectPwrGnrSimulation(pwrGnrSimRequest); if (pwrGnrSimResponse != null) { @@ -719,6 +760,7 @@ public class EstimateService { } estimateResponse.setPwrGnrSim(pwrGnrSimResponse); + */ excelUtil.download( request, @@ -911,6 +953,12 @@ public class EstimateService { return quoteList; } + /** + * Object => Map 변환 함수 + * + * @param vo Object + * @return Map Map 변환 정보 + */ public Map convertVoToMap(Object vo) { Map result = new HashMap(); @@ -928,6 +976,12 @@ public class EstimateService { return result; } + /** + * List => List 변환 함수 + * + * @param target List + * @return List> List 변환 정보 + */ public static List> convertListToMap(Collection target) { List> resultList = new ArrayList>(); 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 e08d0036..9fd895dc 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 @@ -80,6 +80,9 @@ public class EstimateResponse { @Schema(description = "기준풍속ID") private String standardWindSpeedId; + @Schema(description = "기준풍속명") + private String standardWindSpeedName; + @Schema(description = "가대 메이커명") private String supportMeaker; @@ -175,6 +178,12 @@ public class EstimateResponse { @Schema(description = "경칭") private String objectNameOmit; + @Schema(description = "도도부현명") + private String prefName; + + @Schema(description = "지역명") + private String areaName; + @Schema(description = "물건정보 비고") private String objectRemarks; @@ -235,6 +244,9 @@ public class EstimateResponse { @Schema(description = "첨부파일 목록") List fileList; + @Schema(description = "지붕재 정보") + RoofInfoResponse roofInfo; + @Schema(description = "발전시뮬레이션 정보") PwrGnrSimResponse pwrGnrSim; } diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateSendResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateSendResponse.java index 50955725..0c0b5aef 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateSendResponse.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateSendResponse.java @@ -19,6 +19,9 @@ public class EstimateSendResponse { @Schema(description = "물건명") private String objectName; + @Schema(description = "경칭코드") + private String objectNameOmitCd; + @Schema(description = "견적서 등록일") private String estimateDetailCreateDate; diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemRequest.java index 154ed112..560a7c27 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemRequest.java @@ -62,6 +62,9 @@ public class ItemRequest { @Schema(description = "아이템 변경 여부") private String itemChangeFlg; + @Schema(description = "PC 아이템 ID") + private String pcItemId; + @Schema(description = "W") private String pnowW; diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofInfoResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofInfoResponse.java new file mode 100644 index 00000000..3f090e04 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofInfoResponse.java @@ -0,0 +1,20 @@ +package com.interplug.qcast.biz.estimate.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +// @Data +@Getter +@Setter +public class RoofInfoResponse { + @Schema(description = "지붕면 목록") + private List roofList; + + @Schema(description = "지붕면 파워컨디셔너 목록") + private List roofPcList; + + @Schema(description = "지붕면 용량 목록") + private List roofVolList; +} diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofResponse.java new file mode 100644 index 00000000..e4d131b2 --- /dev/null +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/RoofResponse.java @@ -0,0 +1,67 @@ +package com.interplug.qcast.biz.estimate.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +// @Data +@Getter +@Setter +public class RoofResponse { + @Schema(description = "물건번호") + private String objectNo; + + @Schema(description = "플랜번호") + private String planNo; + + @Schema(description = "지붕재 번호") + private String roofNo; + + @Schema(description = "지붕면") + private String roofSurface; + + @Schema(description = "지붕재 아이템 ID") + private String roofMaterialId; + + @Schema(description = "지붕재 아이템명") + private String roofMaterialName; + + @Schema(description = "공법 ID") + private String supportMethodId; + + @Schema(description = "공법명") + private String supportMethodName; + + @Schema(description = "시공사양 ID") + private String constructSpecification; + + @Schema(description = "시공사양명") + private String constructSpecificationName; + + @Schema(description = "지붕재 아이템명") + private String roofMaterialIdMulti; + + @Schema(description = "공법명") + private String supportMethodIdMulti; + + @Schema(description = "시공방법명") + private String constructSpecificationMulti; + + @Schema(description = "가대메이커명") + private String supportMeaker; + + @Schema(description = "경사") + private String slope; + + @Schema(description = "각도") + private String angle; + + @Schema(description = "방위각") + private String azimuth; + + @Schema(description = "면조도구분") + private String surfaceType; + + @Schema(description = "설치높이") + private String setupHeight; +} diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index f2c9f9af..48c295d1 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -84,7 +84,9 @@ SELECT P.OBJECT_NO , P.PLAN_NO + , CONVERT(VARCHAR(10), P.DRAWING_ESTIMATE_CREATE_DATE, 121) AS DRAWING_ESTIMATE_CREATE_DATE , P.ESTIMATE_VALIDITY_TERM + , P.SNOWFALL , P.ESTIMATE_TYPE , P.ESTIMATE_OPTION , P.PKG_ASP @@ -94,9 +96,20 @@ , O.OBJECT_NAME , O.OBJECT_NAME_OMIT , (SELECT SALE_STORE_ID FROM M_USER WHERE USER_ID = O.CREATE_USER) AS CREATE_SALE_STORE_ID + , ISNULL(MP.PREF_NAME, '') AS PREF_NAME + , ISNULL(MPA.AREA_NAME, '') AS AREA_NAME + , ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_NAME FROM T_PLAN P WITH (NOLOCK) INNER JOIN T_OBJECT O WITH (NOLOCK) ON P.OBJECT_NO = O.OBJECT_NO + LEFT OUTER JOIN M_PREFECTURE MP WITH (NOLOCK) + ON O.PREF_ID = MP.PREF_ID + LEFT OUTER JOIN M_PREFECTURE_AREA MPA WITH (NOLOCK) + ON O.PREF_ID = MPA.PREF_ID + AND O.AREA_ID = MPA.AREA_ID + LEFT OUTER JOIN M_COMM_L C1 WITH (NOLOCK) + ON C1.HEAD_CD = '202000' + AND P.STANDARD_WIND_SPEED_ID = C1.CODE WHERE P.OBJECT_NO = #{objectNo} AND P.PLAN_NO = #{planNo} ) T @@ -112,6 +125,7 @@ O.OBJECT_NO , O.SALE_STORE_ID , O.OBJECT_NAME + , O.OBJECT_NAME_OMIT , O.RECEIVE_COMPANY_NAME , O.RECEIVE_USER , O.DELIVERY_ZIP_NO @@ -139,6 +153,7 @@ , CONVERT(NVARCHAR(10), P.CREATE_DATETIME, 121) AS ESTIMATE_DETAIL_CREATE_DATE , P.LAST_EDIT_DATETIME , P.LAST_EDIT_USER + , (SELECT CODE FROM M_COMM_L WHERE HEAD_CD = '200800' AND CODE_NM = O.OBJECT_NAME_OMIT) AS OBJECT_NAME_OMIT_CD FROM T_PLAN P WITH (NOLOCK) INNER JOIN T_OBJECT O WITH (NOLOCK) ON P.OBJECT_NO = O.OBJECT_NO @@ -167,6 +182,7 @@ , PE.SPECIAL_NOTE_CD , PE.ITEM_CHANGE_FLG , I.PNOW_W + , I.ITEM_GROUP , CASE WHEN I.ITEM_GROUP = 'MODULE_' THEN '1' ELSE '0' END AS MODULE_FLG FROM T_PART_ESTIMATE PE WITH (NOLOCK) INNER JOIN M_ITEM I WITH (NOLOCK) @@ -199,6 +215,40 @@ + + + + + + + + /* sqlid : com.interplug.qcast.biz.estimate.selectEstimateRoofVolList */ SELECT - T.OBJECT_NO + T.OBJECT_NO , T.PLAN_NO + , T.ROOF_NO , T.ROOF_SURFACE , T.SLOPE , SUM(T.AMOUNT) AS AMOUNT - , ROUND(SUM(T.AMOUNT * T.SPECIFICATION / 1000), 4) AS VOL + , ROUND(SUM(T.AMOUNT * T.SPECIFICATION / 1000), 4) AS VOL_KW FROM ( SELECT P.OBJECT_NO , P.PLAN_NO + , RE.ROOF_NO , RE.ROOF_SURFACE , ROUND(CAST(RE.SLOPE AS FLOAT), 2) AS SLOPE , RIE.AMOUNT @@ -323,7 +367,7 @@ AND I.ITEM_GROUP = #{schItemGroup} ) T - GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_SURFACE, T.SLOPE + GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_NO, T.ROOF_SURFACE, T.SLOPE