diff --git a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java index 7e352deb..bcac62b5 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java @@ -2989,11 +2989,16 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { .reduce(BigDecimal.ZERO, BigDecimal::add); template.addVar("hs_code_desc", data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N")? sbEn:sb); - String hsCodes = nodifyDetailList.stream() + String buNo = notifyHeader.getBuNo(); + List hsCodeList = nodifyDetailList.stream() .map(m -> Objects.toString(m.get("hsCode"), "")) .filter(s -> !s.isEmpty()) // 去掉空值 .distinct() // 去重 - .collect(Collectors.joining("、")); // 用换行拼接 + .collect(Collectors.toList()); + if (isAntennaBu(buNo) && hsCodeList.size() > 2) { + hsCodeList = hsCodeList.subList(0, 2); + } + String hsCodes = String.join("、", hsCodeList); // 用分隔符拼接 template.addVar("hs_code", stringInput(hsCodes)); Set poNoSet = new LinkedHashSet<>(); @@ -3007,7 +3012,6 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { } boolean showOrderNoFlag = data != null && Boolean.TRUE.equals(data.getShowOrderNoFlag()); boolean showInvoiceFlag = data != null && Boolean.TRUE.equals(data.getShowInvoiceFlag()); - String buNo = notifyHeader == null ? "" : notifyHeader.getBuNo(); String poNoDisplayText = formatPoNoForDisplay(poNoSet); if (isShowOrderNoBu(buNo)) { poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : ""; diff --git a/src/main/resources/templates/TX/declaration-all-template.xlsx b/src/main/resources/templates/TX/declaration-all-template.xlsx index 2fdc8471..c7c6ca73 100644 Binary files a/src/main/resources/templates/TX/declaration-all-template.xlsx and b/src/main/resources/templates/TX/declaration-all-template.xlsx differ diff --git a/src/main/resources/templates/TX/export-goods-template.xlsx b/src/main/resources/templates/TX/export-goods-template.xlsx index a21bdf7c..d9aa5a37 100644 Binary files a/src/main/resources/templates/TX/export-goods-template.xlsx and b/src/main/resources/templates/TX/export-goods-template.xlsx differ