|
|
@ -2987,8 +2987,8 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
BigDecimal totalQty = palletDetailList.stream() |
|
|
BigDecimal totalQty = palletDetailList.stream() |
|
|
.map(o -> new BigDecimal(o.get("total_qty").toString())) |
|
|
.map(o -> new BigDecimal(o.get("total_qty").toString())) |
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
template.addVar("hs_code_desc", data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N")? |
|
|
|
|
|
sbEn:sb); |
|
|
|
|
|
|
|
|
String bookingHsCodeDescType = resolveBookingHsCodeDescType(data); |
|
|
|
|
|
template.addVar("hs_code_desc", "N".equals(bookingHsCodeDescType) ? sbEn : sb); |
|
|
String buNo = notifyHeader.getBuNo(); |
|
|
String buNo = notifyHeader.getBuNo(); |
|
|
List<String> hsCodeList = nodifyDetailList.stream() |
|
|
List<String> hsCodeList = nodifyDetailList.stream() |
|
|
.map(m -> Objects.toString(m.get("hsCode"), "")) |
|
|
.map(m -> Objects.toString(m.get("hsCode"), "")) |
|
|
@ -3016,7 +3016,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
if (isShowOrderNoBu(buNo)) { |
|
|
if (isShowOrderNoBu(buNo)) { |
|
|
poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : ""; |
|
|
poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : ""; |
|
|
} |
|
|
} |
|
|
String hsCodeDescText = data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N") ? sbEn : sb; |
|
|
|
|
|
|
|
|
String hsCodeDescText = "N".equals(bookingHsCodeDescType) ? sbEn : sb; |
|
|
String hwDescText = hsCodeDescText + "\n" + poNoDisplayText; |
|
|
String hwDescText = hsCodeDescText + "\n" + poNoDisplayText; |
|
|
if (isShowOrderNoBu(buNo) && showInvoiceFlag) { |
|
|
if (isShowOrderNoBu(buNo) && showInvoiceFlag) { |
|
|
String cmcInvoiceText = stringInput(notifyHeader.getCmcInvoice()); |
|
|
String cmcInvoiceText = stringInput(notifyHeader.getCmcInvoice()); |
|
|
@ -3117,6 +3117,19 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
template.addVar("poNos", formatPoNoForHwDesc(poNoSet)); |
|
|
template.addVar("poNos", formatPoNoForHwDesc(poNoSet)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String resolveBookingHsCodeDescType(EcssDeclarationHeaderData data) { |
|
|
|
|
|
if (data == null) { |
|
|
|
|
|
return "N"; |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(data.getHsCodeDescTypeBooking())) { |
|
|
|
|
|
return data.getHsCodeDescTypeBooking(); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotBlank(data.getHsCodeDescType())) { |
|
|
|
|
|
return data.getHsCodeDescType(); |
|
|
|
|
|
} |
|
|
|
|
|
return "N"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private String getContactField(List<Map> contacts, String field) { |
|
|
private String getContactField(List<Map> contacts, String field) { |
|
|
if (contacts == null || contacts.isEmpty()) { |
|
|
if (contacts == null || contacts.isEmpty()) { |
|
|
return ""; |
|
|
return ""; |
|
|
|