|
|
|
@ -965,6 +965,15 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
|| "02-Hardtag".equalsIgnoreCase(buNoTrim); |
|
|
|
} |
|
|
|
|
|
|
|
private boolean isShowOrderNoBu(String buNo) { |
|
|
|
if (StringUtils.isBlank(buNo)) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
String buNoTrim = buNo.trim(); |
|
|
|
return "05-Alpha".equalsIgnoreCase(buNoTrim) |
|
|
|
|| "02-Hardtag".equalsIgnoreCase(buNoTrim); |
|
|
|
} |
|
|
|
|
|
|
|
private String buildDefaultVoyage(EcssCoDelNotifyHeaderData notifyHeader) { |
|
|
|
if (notifyHeader == null) { |
|
|
|
return ""; |
|
|
|
@ -2010,6 +2019,36 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
return result.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 出口货物委托书货物描述下方 PO 显示格式:中间 '/' 分隔,每4个换一行。 |
|
|
|
*/ |
|
|
|
private String formatPoNoForHwDesc(Collection<String> poNoCollection) { |
|
|
|
if (poNoCollection == null || poNoCollection.isEmpty()) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
List<String> poNoList = poNoCollection.stream() |
|
|
|
.filter(Objects::nonNull) |
|
|
|
.map(String::trim) |
|
|
|
.filter(StringUtils::isNotBlank) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (poNoList.isEmpty()) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
StringBuilder result = new StringBuilder(); |
|
|
|
for (int i = 0; i < poNoList.size(); i++) { |
|
|
|
if (i > 0) { |
|
|
|
if (i % 4 == 0) { |
|
|
|
result.append("\n"); |
|
|
|
} else { |
|
|
|
result.append(" / "); |
|
|
|
} |
|
|
|
} |
|
|
|
result.append(poNoList.get(i)); |
|
|
|
} |
|
|
|
return result.toString(); |
|
|
|
} |
|
|
|
|
|
|
|
private void extractedInvoice(EcssDeclarationHeaderData data, ExcelTemplateAdapter template, |
|
|
|
EcssCoDelNotifyHeaderData notifyHeader) { |
|
|
|
List<EcssCoDelNotifyDetailData> notifyDetailList = data.getNotifyPartDetailList(); |
|
|
|
@ -2911,7 +2950,13 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
} |
|
|
|
ttlAmount = ttlAmount.add((BigDecimal) map.get("ttl_amount")); |
|
|
|
} |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet)); |
|
|
|
boolean showOrderNoFlag = data != null && Boolean.TRUE.equals(data.getShowOrderNoFlag()); |
|
|
|
String buNo = notifyHeader == null ? "" : notifyHeader.getBuNo(); |
|
|
|
String poNoDisplayText = formatPoNoForDisplay(poNoSet); |
|
|
|
if (isShowOrderNoBu(buNo)) { |
|
|
|
poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : ""; |
|
|
|
} |
|
|
|
template.addVar("hw_desc", sb + "\n" +poNoDisplayText); |
|
|
|
template.addVar("shipping_port", stringInput(notifyHeader.getCnative())); |
|
|
|
template.addVar("cmc_invoice", stringInput(notifyHeader.getCmcInvoice())); |
|
|
|
// 导出时默认,可编辑的栏目 |
|
|
|
|