Merge pull request 'dev' (#327) from dev into prd-deploy
Reviewed-on: #327
This commit is contained in:
commit
213ec64cc4
@ -1335,8 +1335,18 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// 견적서 상세 조회
|
// 견적서 상세 조회
|
||||||
estimateResponse = estimateMapper.selectEstimatePdfDetail(estimateRequest);
|
estimateResponse = estimateMapper.selectEstimatePdfDetail(estimateRequest);
|
||||||
|
|
||||||
|
// 1차점이 2차점 견적서를 만들어 준 경우 - 2차점 사용자가 다운받을 시 무조건 정가로만 표시
|
||||||
|
String userId = estimateRequest.getUserId();
|
||||||
|
String storeLvl = estimateRequest.getStoreLvl();
|
||||||
|
if (storeLvl != null && !storeLvl.equals("1")) {
|
||||||
|
if (!Objects.equals(estimateResponse.getCreateSaleStoreId(), userId)) {
|
||||||
|
estimateRequest.setSchUnitPriceFlg("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// file Name 명이 없는경우
|
// file Name 명이 없는경우
|
||||||
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
|
if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) {
|
||||||
@ -1662,15 +1672,8 @@ public class EstimateService {
|
|||||||
String[] arrSection = new String[6];
|
String[] arrSection = new String[6];
|
||||||
int iSection = 0;
|
int iSection = 0;
|
||||||
|
|
||||||
String templateFilePath = "pdf_download_quotation_detail_template.html";
|
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("1")){
|
|
||||||
if(!Objects.equals(estimateResponse.getCreateSaleStoreId(), userId))
|
|
||||||
templateFilePath = "pdf_download_quotation_detail_template2.html";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 템플릿 html 조회
|
// 템플릿 html 조회
|
||||||
Document doc = PdfUtil.getPdfDoc(request, templateFilePath);
|
Document doc = PdfUtil.getPdfDoc(request, templateFilePath);
|
||||||
@ -1718,16 +1721,6 @@ public class EstimateService {
|
|||||||
|
|
||||||
String excelTemplateNam = "excel_download_quotation_detail_template.xlsx";
|
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("1")){
|
|
||||||
if(!Objects.equals(estimateResponse.getCreateSaleStoreId(), userId))
|
|
||||||
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()))
|
||||||
@ -2124,7 +2117,7 @@ public class EstimateService {
|
|||||||
elm.text(StringUtils.defaultString(data.getTotVolKw()));
|
elm.text(StringUtils.defaultString(data.getTotVolKw()));
|
||||||
|
|
||||||
elm = doc.getElementById("totPrice");
|
elm = doc.getElementById("totPrice");
|
||||||
elm.text(StringUtils.defaultString(data.getTotPrice()));
|
elm.text(StringUtils.defaultString(data.getTotPrice()));
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (ItemResponse itemResponse : list) {
|
for (ItemResponse itemResponse : list) {
|
||||||
@ -2163,7 +2156,7 @@ public class EstimateService {
|
|||||||
}
|
}
|
||||||
elm = doc.getElementById("itemList_detail");
|
elm = doc.getElementById("itemList_detail");
|
||||||
elm.before(sb.toString());
|
elm.before(sb.toString());
|
||||||
|
|
||||||
elm = doc.getElementById("supplyPrice");
|
elm = doc.getElementById("supplyPrice");
|
||||||
elm.text(StringUtils.defaultString(data.getSupplyPrice()));
|
elm.text(StringUtils.defaultString(data.getSupplyPrice()));
|
||||||
|
|
||||||
@ -2171,7 +2164,7 @@ public class EstimateService {
|
|||||||
elm.text(StringUtils.defaultString(data.getVatPrice()));
|
elm.text(StringUtils.defaultString(data.getVatPrice()));
|
||||||
|
|
||||||
elm = doc.getElementById("totPrice1");
|
elm = doc.getElementById("totPrice1");
|
||||||
elm.text(StringUtils.defaultString(data.getTotPrice()));
|
elm.text(StringUtils.defaultString(data.getTotPrice()));
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(data.getRemarks())) {
|
if (!StringUtils.isEmpty(data.getRemarks())) {
|
||||||
elm = doc.getElementById("remarks");
|
elm = doc.getElementById("remarks");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user