Browse Source

硬标/Alpha复选框(显示订单号),默认不勾选,勾选了就显示PO号

master
han\hanst 19 hours ago
parent
commit
2cc297bcc6
  1. 1
      src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java
  2. 47
      src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java
  3. BIN
      src/main/resources/templates/ALPHA/declaration-all-template.xlsx
  4. BIN
      src/main/resources/templates/ALPHA/export-goods-template.xlsx
  5. BIN
      src/main/resources/templates/YB/declaration-all-template.xlsx
  6. BIN
      src/main/resources/templates/YB/export-goods-template.xlsx

1
src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java

@ -71,5 +71,6 @@ public class EcssDeclarationHeaderData extends EcssDeclarationHeader{
private Boolean showWeight; private Boolean showWeight;
private BigDecimal allWeight; private BigDecimal allWeight;
private Boolean mexicoShippingMarkFlag; private Boolean mexicoShippingMarkFlag;
private Boolean showOrderNoFlag;
private String modelContentStr; private String modelContentStr;
} }

47
src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java

@ -965,6 +965,15 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService {
|| "02-Hardtag".equalsIgnoreCase(buNoTrim); || "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) { private String buildDefaultVoyage(EcssCoDelNotifyHeaderData notifyHeader) {
if (notifyHeader == null) { if (notifyHeader == null) {
return ""; return "";
@ -2010,6 +2019,36 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService {
return result.toString(); 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, private void extractedInvoice(EcssDeclarationHeaderData data, ExcelTemplateAdapter template,
EcssCoDelNotifyHeaderData notifyHeader) { EcssCoDelNotifyHeaderData notifyHeader) {
List<EcssCoDelNotifyDetailData> notifyDetailList = data.getNotifyPartDetailList(); List<EcssCoDelNotifyDetailData> notifyDetailList = data.getNotifyPartDetailList();
@ -2911,7 +2950,13 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService {
} }
ttlAmount = ttlAmount.add((BigDecimal) map.get("ttl_amount")); 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("shipping_port", stringInput(notifyHeader.getCnative()));
template.addVar("cmc_invoice", stringInput(notifyHeader.getCmcInvoice())); template.addVar("cmc_invoice", stringInput(notifyHeader.getCmcInvoice()));
// 导出时默认可编辑的栏目 // 导出时默认可编辑的栏目

BIN
src/main/resources/templates/ALPHA/declaration-all-template.xlsx

BIN
src/main/resources/templates/ALPHA/export-goods-template.xlsx

BIN
src/main/resources/templates/YB/declaration-all-template.xlsx

BIN
src/main/resources/templates/YB/export-goods-template.xlsx

Loading…
Cancel
Save