Browse Source

托书品名类型(仅硬标/Alpha/天线生效)

master
han\hanst 3 weeks ago
parent
commit
6d4ed7b612
  1. 1
      src/main/java/com/xujie/sys/modules/ecss/entity/EcssDeclarationHeaderData.java
  2. 19
      src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelExcelTXServiceImpl.java

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

@ -56,6 +56,7 @@ public class EcssDeclarationHeaderData extends EcssDeclarationHeader{
private Boolean hsCodeDesc; private Boolean hsCodeDesc;
private Boolean contractFlag; private Boolean contractFlag;
private String hsCodeDescType;// 选择品名中文还是英文 private String hsCodeDescType;// 选择品名中文还是英文
private String hsCodeDescTypeBooking;// 托书品名中文还是英文
private Boolean goodsLabel;// 货物明细 RFID LABEL等 private Boolean goodsLabel;// 货物明细 RFID LABEL等
private Boolean boxChange;// 显示箱数零头 private Boolean boxChange;// 显示箱数零头
private Boolean hsCodeFlag;// 显示Hs Code private Boolean hsCodeFlag;// 显示Hs Code

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

@ -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 "";

Loading…
Cancel
Save