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 7623258a..7be260bf 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -1603,6 +1603,7 @@ public class EstimateService { // 도면 이미지 셋팅 String baseDrawingImgName = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); + // 풀사이즈 이미지 (P1, P2 시트용) URL url = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); byte[] drawingImg1 = loadDrawingImage(url); if (drawingImg1 != null) { @@ -1610,14 +1611,31 @@ public class EstimateService { } log.debug("url1 ::: {}", url); - String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); - URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); + URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); byte[] drawingImg2 = loadDrawingImage(url2); if (drawingImg2 != null) { estimateResponse.setDrawingImg2(drawingImg2); } log.debug("url2 ::: {}", url2); + // 셀범위용 이미지 (割付図・系統図, 架台図 시트용) + URL urlCell1 = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_1_cell.png"); + byte[] drawingImg1Cell = loadDrawingImage(urlCell1); + if (drawingImg1Cell != null) { + estimateResponse.setDrawingImg1Cell(drawingImg1Cell); + } else { + // cell 이미지가 없으면 풀사이즈로 폴백 + estimateResponse.setDrawingImg1Cell(drawingImg1); + } + + URL urlCell2 = new URL(drawingDirPath + File.separator + baseDrawingImgName + "_2_cell.png"); + byte[] drawingImg2Cell = loadDrawingImage(urlCell2); + if (drawingImg2Cell != null) { + estimateResponse.setDrawingImg2Cell(drawingImg2Cell); + } else { + estimateResponse.setDrawingImg2Cell(drawingImg2); + } + //userId 에 따른 영업점 주소, 전화, fax 정보 조회 if(estimateRequest.getSaleStoreId() != null && "T01".equals(estimateRequest.getSaleStoreId())){ 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 56d442c1..5b79dcb8 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 @@ -221,12 +221,18 @@ public class EstimateResponse { @Schema(description = "염해지역 아이템사용 여부") private String saltAreaFlg; - @Schema(description = "도면이미지1") + @Schema(description = "도면이미지1 (풀사이즈)") private byte[] drawingImg1; - @Schema(description = "도면이미지2") + @Schema(description = "도면이미지2 (풀사이즈)") private byte[] drawingImg2; + @Schema(description = "도면이미지1 (셀범위용)") + private byte[] drawingImg1Cell; + + @Schema(description = "도면이미지2 (셀범위용)") + private byte[] drawingImg2Cell; + // 판매점 정보 @Schema(description = "고객 판매점명") private String custSaleStoreName;