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 e3d59025..3de29103 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -10,16 +10,7 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Base64; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; import com.interplug.qcast.biz.canvaspopupstatus.CanvasPopupStatusService; @@ -1580,13 +1571,7 @@ public class EstimateService { estimateResponse.setDrawingImg1(drawingImg1); } log.debug("url1 ::: {}", url); -// File file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); -// if (file.exists()) { -// InputStream imageInputStream = -// new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_1.png"); -// byte[] drawingImg1 = Util.toByteArray(imageInputStream); -// estimateResponse.setDrawingImg1(drawingImg1); -// } + String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo(); URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); URLConnection con2 = url2.openConnection(); @@ -1598,13 +1583,7 @@ public class EstimateService { estimateResponse.setDrawingImg2(drawingImg2); } log.debug("url2 ::: {}", url2); -// file = new File(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); -// if (file.exists()) { -// InputStream imageInputStream2 = -// new FileInputStream(drawingDirPath + File.separator + baseDrawingImgName + "_2.png"); -// byte[] drawingImg2 = Util.toByteArray(imageInputStream2); -// estimateResponse.setDrawingImg2(drawingImg2); -// } + //userId 에 따른 영업점 주소, 전화, fax 정보 조회 if(estimateRequest.getSaleStoreId() != null && "T01".equals(estimateRequest.getSaleStoreId())){ @@ -1665,6 +1644,14 @@ public class EstimateService { String templateFilePath = "pdf_download_quotation_detail_template.html"; + String userId = estimateRequest.getUserId(); + String storeLvl = estimateRequest.getStoreLvl(); + String createStoreId = estimateRequest.getCreateStoreId(); + if(storeLvl != null && storeLvl.equals("2")){ + if(!Objects.equals(createStoreId, userId)) + templateFilePath = "pdf_download_quotation_detail_template2.html"; + } + // 템플릿 html 조회 Document doc = PdfUtil.getPdfDoc(request, templateFilePath); @@ -1711,6 +1698,16 @@ public class EstimateService { String excelTemplateNam = "excel_download_quotation_detail_template.xlsx"; + String userId = estimateRequest.getUserId(); + String storeLvl = estimateRequest.getStoreLvl(); + String createStoreId = estimateRequest.getCreateStoreId(); + if(storeLvl != null && storeLvl.equals("2")){ + if(!Objects.equals(createStoreId, userId)) + excelTemplateNam = "excel_download_quotation_detail_template2.xlsx"; + } + + + // itemGroup이 "STAND_"가 아닌 항목들만 필터링하여 새로운 리스트 생성 List estimateItemList15 = estimateItemList.stream() .filter(item -> !"STAND_".equals(item.getItemGroup())) @@ -2118,13 +2115,15 @@ public class EstimateService { + StringUtils.defaultString(itemResponse.getItemName()) + ""); sb.append("" + StringUtils.defaultString(itemResponse.getItemNo()) + ""); - sb.append("" - + StringUtils.defaultString(itemResponse.getSalePrice()) + ""); + sb.append( + "" + + StringUtils.defaultString(itemResponse.getSalePrice()) + + ""); sb.append("" + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append( "" + StringUtils.defaultString(itemResponse.getUnit()) + ""); - sb.append("" + sb.append("" + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + ""); sb.append(""); } diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java index 01fde921..f473cdd6 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java @@ -216,4 +216,9 @@ public class EstimateRequest { @Schema(description = "2차 SAP 판매점코드") private String secSapSalesStoreCd; + @Schema(description = "판매점레벨") + private String storeLvl; + + @Schema(description = "견적서생성판매점코드") + private String createStoreId; } diff --git a/src/main/resources/template/excel/excel_download_quotation_detail_template2.xlsx b/src/main/resources/template/excel/excel_download_quotation_detail_template2.xlsx new file mode 100644 index 00000000..2bb706e5 Binary files /dev/null and b/src/main/resources/template/excel/excel_download_quotation_detail_template2.xlsx differ diff --git a/src/main/resources/template/pdf/pdf_download_quotation_detail_template2.html b/src/main/resources/template/pdf/pdf_download_quotation_detail_template2.html new file mode 100644 index 00000000..03c75132 --- /dev/null +++ b/src/main/resources/template/pdf/pdf_download_quotation_detail_template2.html @@ -0,0 +1,956 @@ + + + + + + +
+

御 見 積 書

+ + + + + + + + +
+
+
+ + +
+
+ 見積有効期限 : + +
+
+ 件名 : + + +
+
+
+
+
+
+ 見積書番号 : + +
+ +
+
+ 日付 : + +
+
+ 法人番号 : + +
+
+
+ + +
+ TEL : + +
+
+ FAX : + +
+
+ + + + + + + + + + + + + +
承認担当
+
+
+
+ 太陽電池容量 : + + KW +
+
+
+ お見積金額 + + 円 (消費税込) +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
No品名型番単価数量単位価格
小計
消費税(10%)
合計金額
+ + + + + + + + + + + +
備考
+
+
※ 受注発注品の納期はお問合せください。
+
※ 別紙添付ファイルにて各拾い出し部材の注意事項・備考一覧をご確認ください。
+
+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
物件番号作成日
都道府県日射量観測地点
システム容量年間予測発電量
積雪条件風速条件
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
1月2月3月4月5月6月7月8月9月10月11月12月
+
+
+ ● 予測発電量[kWh] +
+ + + + + + + + + + + + + + + + + + + + + + + +
1月2月3月4月5月6月7月8月9月10月11月12月合計
+ + + + + + + + + + + + + +
屋根面傾斜角度方位角(度)太陽電池モジュール枚数(枚)
+ + + + + + + + + +
パワーコンディショナー
+
+ ● Hanwha Japan 年間発電量シミュレーション案内事項 +
+
+
+        
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
物件番号作成日
物件名積雪条件
モジュール容量認定容量風速条件
都道府県日射量観測地点
+ +
+
+
+ +
+ +
+
+ + + + + + + + + + + +
No部材名数量
+ + + + + + + + + + +
Noパワーコンディショナ型式
+ + + + + + + + + + + + + + + + + +
屋根面勾配設置枚数容量(kW)
合計
+ +
+
+            ■注意事項
+             ・本図面は見積作成の為、太陽電池モジュールの配列及び枚数、架台のレールの種類数量、
+              および、支持点数を示すものであり、実際の施工においては、現地調査で支持点の位置を確認し、
+              施工マニュアルに従って施工して下さい。
+
+             ・各屋根材の動き流れ寸法は下記と仮定して作図しております。
+              実際の寸法を確認のうえ、施工マニュアルに従った施工を行って下さい。
+              和瓦53A:235㎜、和瓦53B:225㎜、平板瓦(C、D型):280㎜、S瓦:260㎜、セメント瓦:345㎜、スレート:182㎜
+              アスファルトシングル:143㎜、金属横葺:182㎜
+
+            ・設置可能地域であっても、錆やよごれ等による外観について保証するものではありません。
+            ・垂直積雪量は特定行政庁の判断により更新される場合があります。設置される地域の特定行政庁への確認を必ず行って下さい。
+        
+
+ + + + + + + + + + + + + + + +
屋根面屋根材種類勾配施工レベル施工方法面粗度区分設置高さ
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
物件番号作成日
物件名積雪条件
モジュール容量認定容量風速条件
都道府県日射量観測地点
+ +
+
+
+
+
+
+ + + + + + + + + + + +
No部材名数量
+ +
+
+            ■注意事項
+             ・本図面は見積作成の為、太陽電池モジュールの配列及び枚数、架台のレールの種類数量、
+              および、支持点数を示すものであり、実際の施工においては、現地調査で支持点の位置を確認し、
+              施工マニュアルに従って施工して下さい。
+
+             ・各屋根材の動き流れ寸法は下記と仮定して作図しております。
+              実際の寸法を確認のうえ、施工マニュアルに従った施工を行って下さい。
+              和瓦53A:235㎜、和瓦53B:225㎜、平板瓦(C、D型):280㎜、S瓦:260㎜、セメント瓦:345㎜、スレート:182㎜
+              アスファルトシングル:143㎜、金属横葺:182㎜
+
+            ・設置可能地域であっても、錆やよごれ等による外観について保証するものではありません。
+            ・垂直積雪量は特定行政庁の判断により更新される場合があります。設置される地域の特定行政庁への確認を必ず行って下さい。
+        
+
+ + + + + + + + + + + + + + + + +
屋根面屋根材種類勾配施工レベル施工方法面粗度区分設置高さ
+ +
+
+ +
+
+ 重量算出シート +
+
+ + + + + + + + + + + + +
物件番号:
案件名: + + +
+ + + +
+ システム重量合計: kg +
+ + +
+ ※システム重量は製品公差により変わる可能性があります。 +
+ + + + + + + + + + + + + + + + + +
品 名型 番数 量重量(kg)単位重量(kg)
+ + + + + + + + + + + + + +
架台重量表備考
+
・製品重量は、実測を元に作成していますが、
+
 製品公差により変わる場合があります。予めご了承ください。
+
・ケーブルの重量は、見積書に記載されたのケーブルセット数の総重量を表示しています。
+
・コーキングの重量は、見積書に記載されたコーキング数の総重量を表示しています。
+
・予告なく変更する場合があります。予めご了承ください。
+
+ +
+ + \ No newline at end of file