Compare commits

..

No commits in common. "4e023e7f9b4bae6771a230b62931ccd85189a88c" and "3ddc61b5f3d76b9e3f3339258fc0a25e30f1c37e" have entirely different histories.

3 changed files with 37 additions and 35 deletions

View File

@ -1571,7 +1571,13 @@ public class EstimateService {
estimateResponse.setDrawingImg1(drawingImg1); estimateResponse.setDrawingImg1(drawingImg1);
} }
log.debug("url1 ::: {}", url); 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(); String baseDrawingImgName2 = estimateRequest.getObjectNo() + "_" + estimateRequest.getPlanNo();
URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png"); URL url2 = new URL(drawingDirPath + File.separator + baseDrawingImgName2 + "_2.png");
URLConnection con2 = url2.openConnection(); URLConnection con2 = url2.openConnection();
@ -1583,7 +1589,13 @@ public class EstimateService {
estimateResponse.setDrawingImg2(drawingImg2); estimateResponse.setDrawingImg2(drawingImg2);
} }
log.debug("url2 ::: {}", url2); 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 정보 조회 //userId 따른 영업점 주소, 전화, fax 정보 조회
if(estimateRequest.getSaleStoreId() != null && "T01".equals(estimateRequest.getSaleStoreId())){ if(estimateRequest.getSaleStoreId() != null && "T01".equals(estimateRequest.getSaleStoreId())){
@ -1646,9 +1658,9 @@ public class EstimateService {
String userId = estimateRequest.getUserId(); String userId = estimateRequest.getUserId();
String storeLvl = estimateRequest.getStoreLvl(); String storeLvl = estimateRequest.getStoreLvl();
String createStoreId = estimateRequest.getCreateStoreId(); String saleStoreId = estimateRequest.getSaleStoreId();
if(storeLvl != null && storeLvl.equals("2")){ if(storeLvl != null && storeLvl.equals("2")){
if(!Objects.equals(createStoreId, userId)) if(!Objects.equals(Objects.requireNonNull(saleStoreId), userId))
templateFilePath = "pdf_download_quotation_detail_template2.html"; templateFilePath = "pdf_download_quotation_detail_template2.html";
} }
@ -1697,17 +1709,15 @@ public class EstimateService {
Workbook workbook = null; Workbook workbook = null;
String excelTemplateNam = "excel_download_quotation_detail_template.xlsx"; String excelTemplateNam = "excel_download_quotation_detail_template.xlsx";
String userId = estimateRequest.getUserId(); String userId = estimateRequest.getUserId();
String storeLvl = estimateRequest.getStoreLvl(); String storeLvl = estimateRequest.getStoreLvl();
String createStoreId = estimateRequest.getCreateStoreId(); String saleStoreId = estimateRequest.getSaleStoreId();
if(storeLvl != null && storeLvl.equals("2")){ if(storeLvl != null && storeLvl.equals("2")){
if(!Objects.equals(createStoreId, userId)) if(!Objects.equals(Objects.requireNonNull(saleStoreId), userId))
excelTemplateNam = "excel_download_quotation_detail_template2.xlsx"; excelTemplateNam = "excel_download_quotation_detail_template2.xlsx";
} }
// itemGroup이 "STAND_" 아닌 항목들만 필터링하여 새로운 리스트 생성 // itemGroup이 "STAND_" 아닌 항목들만 필터링하여 새로운 리스트 생성
List<ItemResponse> estimateItemList15 = estimateItemList.stream() List<ItemResponse> estimateItemList15 = estimateItemList.stream()
.filter(item -> !"STAND_".equals(item.getItemGroup())) .filter(item -> !"STAND_".equals(item.getItemGroup()))
@ -2115,15 +2125,13 @@ public class EstimateService {
+ StringUtils.defaultString(itemResponse.getItemName()) + "</td>"); + StringUtils.defaultString(itemResponse.getItemName()) + "</td>");
sb.append("<td style='width:120px;'>" + StringUtils.defaultString(itemResponse.getItemNo()) sb.append("<td style='width:120px;'>" + StringUtils.defaultString(itemResponse.getItemNo())
+ "</td>"); + "</td>");
sb.append( sb.append("<td style='width:80px;text-align:right;'>"
"<td class='hide-column' style='width:80px;text-align:right;'>" + StringUtils.defaultString(itemResponse.getSalePrice()) + "</td>");
+ StringUtils.defaultString(itemResponse.getSalePrice())
+ "</td>");
sb.append("<td style='width:60px;text-align:right;'>" sb.append("<td style='width:60px;text-align:right;'>"
+ StringUtils.defaultString(itemResponse.getAmount()) + "</td>"); + StringUtils.defaultString(itemResponse.getAmount()) + "</td>");
sb.append( sb.append(
"<td style='width:60px;'>" + StringUtils.defaultString(itemResponse.getUnit()) + "</td>"); "<td style='width:60px;'>" + StringUtils.defaultString(itemResponse.getUnit()) + "</td>");
sb.append("<td class='hide-column' style='width:80px;text-align:right;'>" sb.append("<td style='width:80px;text-align:right;'>"
+ StringUtils.defaultString(itemResponse.getSaleTotPrice()) + "</td>"); + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + "</td>");
sb.append("</tr>"); sb.append("</tr>");
} }

View File

@ -219,6 +219,4 @@ public class EstimateRequest {
@Schema(description = "판매점레벨") @Schema(description = "판매점레벨")
private String storeLvl; private String storeLvl;
@Schema(description = "견적서생성판매점코드")
private String createStoreId;
} }

View File

@ -390,10 +390,6 @@
font-size: 8px; font-size: 8px;
} }
.hide-column {
display: none;
}
</style> </style>
</head> </head>
<body> <body>
@ -496,7 +492,7 @@
<th style="width: 110px;">価格</th> <th style="width: 110px;">価格</th>
</tr> </tr>
</thead> </thead>
<tbody id="itemList_detail" > <tbody id="itemList_detail2">
<!-- <tr>--> <!-- <tr>-->
<!-- <td>1</td>--> <!-- <td>1</td>-->
<!-- <td>Re.RISE 415</td>--> <!-- <td>Re.RISE 415</td>-->
@ -517,16 +513,16 @@
<!-- </tr>--> <!-- </tr>-->
<tr> <tr>
<td class="al-r" colspan="6">小計</td> <td class="al-r" colspan="6">小計</td>
<td class="al-r hide-column" id="supplyPrice"></td> <td class="al-r" ></td>
</tr> </tr>
<tr> <tr>
<td class="al-r" colspan="5">消費税</td> <td class="al-r" colspan="5">消費税</td>
<td class="al-r">(10%)</td> <td class="al-r">(10%)</td>
<td class="al-r hide-column" id="vatPrice"></td> <td class="al-r" ></td>
</tr> </tr>
<tr> <tr>
<td class="al-r end" colspan="6">合計金額</td> <td class="al-r end" colspan="6">合計金額</td>
<td class="al-r end hide-column" id="totPrice1"></td> <td class="al-r end" ></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>