From 293a1a3a82527efbb73420d84e359937420d0989 Mon Sep 17 00:00:00 2001 From: jungpyo Date: Wed, 14 Jan 2026 14:02:13 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=9D=B4=EC=A0=95=ED=91=9C]=20=EA=B2=AC?= =?UTF-8?q?=EC=A0=81=EC=84=9C=20PDF=202=EC=B0=A8=EC=A0=90=20=EA=B0=80?= =?UTF-8?q?=EA=B2=A9=20=EC=88=A8=EA=B9=80=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/biz/estimate/EstimateService.java | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) 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 875b87b3..aa57e894 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -1664,19 +1664,23 @@ public class EstimateService { String templateFilePath = "pdf_download_quotation_detail_template.html"; + String userId = estimateRequest.getUserId(); String storeLvl = estimateRequest.getStoreLvl(); String createStoreId = estimateRequest.getCreateStoreId(); + String hiddenYn = "N"; if(storeLvl != null && !storeLvl.equals("1")){ if(!Objects.equals(estimateResponse.getCreateSaleStoreId(), userId)) - templateFilePath = "pdf_download_quotation_detail_template2.html"; + hiddenYn = 'Y'; + //templateFilePath = "pdf_download_quotation_detail_template2.html"; } + // 템플릿 html 조회 Document doc = PdfUtil.getPdfDoc(request, templateFilePath); // 견적서 상세 pdf Html 생성 - doc = this.estimatePdfHtml(doc, estimateResponse, estimateItemList); + doc = this.estimatePdfHtml(doc, estimateResponse, estimateItemList, hiddenYn); // 발전시뮬레이션 pdf Html 생성 doc = pwrGnrSimService.pwrGnrSimPdfHtml(doc, pwrGnrSimResponse); @@ -2070,7 +2074,7 @@ public class EstimateService { * @throws IOException * @throws QcastException */ - public Document estimatePdfHtml(Document doc, EstimateResponse data, List list) + public Document estimatePdfHtml(Document doc, EstimateResponse data, List list, String hiddenYn) throws IOException, QcastException { Element elm; @@ -2123,8 +2127,10 @@ public class EstimateService { elm = doc.getElementById("totVolKw1"); elm.text(StringUtils.defaultString(data.getTotVolKw())); - elm = doc.getElementById("totPrice"); - elm.text(StringUtils.defaultString(data.getTotPrice())); + if (!"Y".equals(hiddenYn)) { + elm = doc.getElementById("totPrice"); + elm.text(StringUtils.defaultString(data.getTotPrice())); + } StringBuilder sb = new StringBuilder(); for (ItemResponse itemResponse : list) { @@ -2137,14 +2143,14 @@ public class EstimateService { + ""); sb.append( "" - + StringUtils.defaultString(itemResponse.getSalePrice()) + + !"Y".equals(hiddenYn) ? StringUtils.defaultString(itemResponse.getSalePrice()) : "" + ""); sb.append("" + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append( "" + StringUtils.defaultString(itemResponse.getUnit()) + ""); sb.append("" - + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + ""); + + !"Y".equals(hiddenYn) ? StringUtils.defaultString(itemResponse.getSaleTotPrice()) : "" + ""); sb.append(""); } if ("Y".equals(data.getPkgYn())) { @@ -2158,20 +2164,22 @@ public class EstimateService { + StringUtils.defaultString(data.getTotVol()) + ""); sb.append("W"); sb.append("" - + StringUtils.defaultString(data.getPkgTotPrice()) + ""); + + !"Y".equals(hiddenYn) ? StringUtils.defaultString(data.getPkgTotPrice()) : "" + ""); sb.append(""); } elm = doc.getElementById("itemList_detail"); elm.before(sb.toString()); - elm = doc.getElementById("supplyPrice"); - elm.text(StringUtils.defaultString(data.getSupplyPrice())); - - elm = doc.getElementById("vatPrice"); - elm.text(StringUtils.defaultString(data.getVatPrice())); - - elm = doc.getElementById("totPrice1"); - elm.text(StringUtils.defaultString(data.getTotPrice())); + if (!"Y".equals(hiddenYn)) { + elm = doc.getElementById("supplyPrice"); + elm.text(StringUtils.defaultString(data.getSupplyPrice())); + + elm = doc.getElementById("vatPrice"); + elm.text(StringUtils.defaultString(data.getVatPrice())); + + elm = doc.getElementById("totPrice1"); + elm.text(StringUtils.defaultString(data.getTotPrice())); + } if (!StringUtils.isEmpty(data.getRemarks())) { elm = doc.getElementById("remarks");