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 ffd65444..766f860a 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 @@ -2403,7 +2403,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { } if (notifyHeader.getBuNo().equals("04-MHM")) { designationContent = designationContent + "\n"+(data.getHsCodeDescType()!=null&& data.getHsCodeDescType().equals("N") - ?(eorder.get("hsCodeDescEn")!=null?eorder.get("hsCodeDescEn"):"") :eorder.get("hsCodeDesc")); + ?(eorder.get("hsCodeDescEn")!=null?eorder.get("hsCodeDescEn"):"") :(eorder.get("hsCodeDesc")!=null?eorder.get("hsCodeDesc"):"")); } eorder.put("designation", designationContent); @@ -2564,7 +2564,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { displayedPalletSeqSet.add(palletSeqNo); } Integer palletQty = palletQtyMap.get(palletSeqNo); - eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : 1) : ""); + eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : "") : ""); eorder.put("volume", isFirstRow ? volume : ""); //eorder.put("gross_weight", isFirstRow ? ((BigDecimal) list.get(m).get("gross_weight")).setScale(2, RoundingMode.HALF_UP) : ""); eorder.put("net_weight",isFirstRow ? ((BigDecimal) list.get(m).get("net_weight")).setScale(2, RoundingMode.HALF_UP) : ""); @@ -2650,13 +2650,14 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { template.addVar("pallet_weight_name", palletWeight.compareTo(BigDecimal.ZERO)==0?"":"pallet weight:"); template.addVar("pallet_weight", palletWeight.compareTo(BigDecimal.ZERO)==0?"":palletWeight.setScale(0, RoundingMode.HALF_UP)); } - String plt = "CTN"; - if (!palletHeaderDataList.isEmpty()) { - plt = "PLT"; - } else { - totalPlt = totalCartons.setScale(0, RoundingMode.HALF_UP).intValue(); + if (palletHeaderDataList.isEmpty()) { + totalPlt = 0; + } + if (totalPlt>0) { + template.addVar("total_plt", totalPlt+"PLT"); + template.addVar("plt(", "(="); + template.addVar("plt)", ")"); } - template.addVar("total_plt", totalPlt+plt); // 孟加拉需要的 if (data.getMaterial()!=null && data.getMaterial()) { template.addVar("RFIDBase", "RFID Base Material"); @@ -2817,7 +2818,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { Integer palletQty = palletQtyMap.get(palletSeqNo); // 第一列展示托号(pallet_no),按托盘首行显示,后续行留空再做按托合并 eorder.put("seq_no", showPalletQty ? palletNo : ""); - eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : 1) : ""); + eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : "") : ""); eorder.put("volume", isFirstRow ? volume : ""); eorder.put("gross_weight", isFirstRow ? ((BigDecimal) list.get(m).get("gross_weight")).setScale(2, RoundingMode.HALF_UP) : ""); eorder.put("net_weight", isFirstRow ? ((BigDecimal) list.get(m).get("net_weight")).setScale(2, RoundingMode.HALF_UP) : ""); @@ -3063,7 +3064,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { Integer palletQty = palletQtyMap.get(palletSeqNo); // 第一列展示托号(pallet_no),按托盘首行显示,后续行留空再做按托合并 eorder.put("seq_no", showPalletQty ? palletNo : ""); - eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : 1) : ""); + eorder.put("total_pallets", showPalletQty ? (palletQty != null ? palletQty : "") : ""); eorder.put("volume", isFirstRow ? volume : ""); eorder.put("gross_weight", isFirstRow ? ((BigDecimal) list.get(m).get("gross_weight")).setScale(2, RoundingMode.HALF_UP) : ""); eorder.put("net_weight", isFirstRow ? ((BigDecimal) list.get(m).get("net_weight")).setScale(2, RoundingMode.HALF_UP) : ""); diff --git a/src/main/resources/templates/ALPHA/declaration-all-template-pdf.xlsx b/src/main/resources/templates/ALPHA/declaration-all-template-pdf.xlsx index 7b4b8f64..a5c93068 100644 Binary files a/src/main/resources/templates/ALPHA/declaration-all-template-pdf.xlsx and b/src/main/resources/templates/ALPHA/declaration-all-template-pdf.xlsx differ diff --git a/src/main/resources/templates/ALPHA/declaration-all-template.xlsx b/src/main/resources/templates/ALPHA/declaration-all-template.xlsx index 1784dbcf..6e37601a 100644 Binary files a/src/main/resources/templates/ALPHA/declaration-all-template.xlsx and b/src/main/resources/templates/ALPHA/declaration-all-template.xlsx differ diff --git a/src/main/resources/templates/TX/declaration-all-template-pdf.xlsx b/src/main/resources/templates/TX/declaration-all-template-pdf.xlsx index 8c9c3475..4bac666c 100644 Binary files a/src/main/resources/templates/TX/declaration-all-template-pdf.xlsx and b/src/main/resources/templates/TX/declaration-all-template-pdf.xlsx differ diff --git a/src/main/resources/templates/TX/declaration-all-template.xlsx b/src/main/resources/templates/TX/declaration-all-template.xlsx index 9c6d6ad8..3a8955e7 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/declaration-packingList-template.xlsx b/src/main/resources/templates/TX/declaration-packingList-template.xlsx index 3ce14e5d..3b7300c1 100644 Binary files a/src/main/resources/templates/TX/declaration-packingList-template.xlsx and b/src/main/resources/templates/TX/declaration-packingList-template.xlsx differ