Browse Source

Part of against shoplifting systems

master
han\hanst 3 weeks ago
parent
commit
4c7277eb23
  1. 10
      src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java
  2. BIN
      src/main/resources/templates/TX/declaration-all-template.xlsx
  3. BIN
      src/main/resources/templates/TX/export-goods-template.xlsx

10
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); .reduce(BigDecimal.ZERO, BigDecimal::add);
template.addVar("hs_code_desc", data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N")? template.addVar("hs_code_desc", data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N")?
sbEn:sb); sbEn:sb);
String hsCodes = nodifyDetailList.stream()
String buNo = notifyHeader.getBuNo();
List<String> hsCodeList = nodifyDetailList.stream()
.map(m -> Objects.toString(m.get("hsCode"), "")) .map(m -> Objects.toString(m.get("hsCode"), ""))
.filter(s -> !s.isEmpty()) // 去掉空值 .filter(s -> !s.isEmpty()) // 去掉空值
.distinct() // 去重 .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)); template.addVar("hs_code", stringInput(hsCodes));
Set<String> poNoSet = new LinkedHashSet<>(); Set<String> poNoSet = new LinkedHashSet<>();
@ -3007,7 +3012,6 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService {
} }
boolean showOrderNoFlag = data != null && Boolean.TRUE.equals(data.getShowOrderNoFlag()); boolean showOrderNoFlag = data != null && Boolean.TRUE.equals(data.getShowOrderNoFlag());
boolean showInvoiceFlag = data != null && Boolean.TRUE.equals(data.getShowInvoiceFlag()); boolean showInvoiceFlag = data != null && Boolean.TRUE.equals(data.getShowInvoiceFlag());
String buNo = notifyHeader == null ? "" : notifyHeader.getBuNo();
String poNoDisplayText = formatPoNoForDisplay(poNoSet); String poNoDisplayText = formatPoNoForDisplay(poNoSet);
if (isShowOrderNoBu(buNo)) { if (isShowOrderNoBu(buNo)) {
poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : ""; poNoDisplayText = showOrderNoFlag ? formatPoNoForHwDesc(poNoSet) : "";

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

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

Loading…
Cancel
Save