diff --git a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java index 5b4342f5..60d761aa 100644 --- a/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/ecss/service/impl/CoDelServiceImpl.java @@ -135,10 +135,11 @@ public class CoDelServiceImpl implements CoDelService { summary.put("destination", dataList.get(0).getDestination()); summary.put("shippingMode", dataList.get(0).getShippingMode()); - // 检查是否已存在 + // 检查是否已存在,如果已存在则跳过 List existingHeaders = coDelMapper.checkIfHasHeader(invoice); - boolean exists = !existingHeaders.isEmpty(); - summary.put("exists", exists); + if (!existingHeaders.isEmpty()) { + return; // 跳过已存在的发票号 + } // 检查物料存在性 List invalidMaterials = invalidMaterialsByInvoice.get(invoice); @@ -151,10 +152,7 @@ public class CoDelServiceImpl implements CoDelService { } // 设置状态信息 - if (exists) { - summary.put("status", "已存在"); - summary.put("statusType", "warning"); - } else if (hasInvalidMaterials) { + if (hasInvalidMaterials) { summary.put("status", "物料不存在"); summary.put("statusType", "error"); } else { @@ -1996,11 +1994,11 @@ public class CoDelServiceImpl implements CoDelService { PageSetup pageSetup = worksheet.getPageSetup(); // 设置页面方向(纵向) - pageSetup.setOrientation(PageOrientationType.PORTRAIT); + pageSetup.setOrientation(i==2?PageOrientationType.LANDSCAPE:PageOrientationType.PORTRAIT); // 设置纸张大小(A4) pageSetup.setPaperSize(PaperSizeType.PAPER_A_4); // 设置缩放比例 - pageSetup.setZoom(65); + pageSetup.setZoom(90); // 设置边距 pageSetup.setLeftMargin(0.5); pageSetup.setRightMargin(0.5); @@ -2496,7 +2494,10 @@ public class CoDelServiceImpl implements CoDelService { int totalQty=palletDetailList.stream().mapToInt(o -> Integer.parseInt(o.get("total_qty").toString())).sum(); Map palletMap = palletDetailList.stream().collect(Collectors.toMap( o -> o.get("part_no"), o -> o)); template.addVar("hs_code_desc", stringInput(nodifyDetailList.get(0).get("hsCodeDescEn")!=null?sbEn.toString():"")); - template.addVar("hs_code", stringInput(nodifyDetailList.get(0).get("hsCode").toString())); + String hsCodes = nodifyDetailList.stream() + .map(m -> Objects.toString(m.get("hsCode"), "")) + .collect(Collectors.joining("\n")); + template.addVar("hs_code", stringInput(hsCodes)); Map poNoMap = new HashMap<>(); BigDecimal ttlAmount = BigDecimal.ZERO; BigDecimal grossWeight = BigDecimal.valueOf(0.0); diff --git a/src/main/resources/mapper/ecss/EcssCommonMapper.xml b/src/main/resources/mapper/ecss/EcssCommonMapper.xml index 22159ef2..afb1f28c 100644 --- a/src/main/resources/mapper/ecss/EcssCommonMapper.xml +++ b/src/main/resources/mapper/ecss/EcssCommonMapper.xml @@ -46,7 +46,7 @@ select b.po_no as customerPO,b.part_no,b.qty, a.box_qty as boxQty,b.rolls,b.pn,a.gross_weight as grossWeight,a.net_weight as netWeight, #{cmcInvoice} as cmcInvoice,#{shippingMode} as shippingMode,#{destination} as destination, - c.remark,CONVERT(varchar(10), #{readyDate}, 120) AS readyDate + c.cmc_comment,CONVERT(varchar(10), #{readyDate}, 120) AS readyDate from ecss_CoDelBoxList a left join ecss_CoDelPalletDetail b on a.site=b.site and a.bu_no=b.bu_no and a.delNo=b.delNo and a.item_no=b.seq_no left join ecss_CoDelNotifydetail c on b.site=c.site and b.bu_no=c.bu_no and b.delNo=c.delNo and b.notify_detail_item_no=c.item_no diff --git a/src/main/resources/templates/declaration-all-template-pdf.xlsx b/src/main/resources/templates/declaration-all-template-pdf.xlsx index 9a20e964..cf34da3d 100644 Binary files a/src/main/resources/templates/declaration-all-template-pdf.xlsx and b/src/main/resources/templates/declaration-all-template-pdf.xlsx differ diff --git a/src/main/resources/templates/declaration-all-template.xlsx b/src/main/resources/templates/declaration-all-template.xlsx index ae6faaf5..639bd959 100644 Binary files a/src/main/resources/templates/declaration-all-template.xlsx and b/src/main/resources/templates/declaration-all-template.xlsx differ diff --git a/src/main/resources/templates/export-goods-template.xlsx b/src/main/resources/templates/export-goods-template.xlsx index 90c4d335..6f553e46 100644 Binary files a/src/main/resources/templates/export-goods-template.xlsx and b/src/main/resources/templates/export-goods-template.xlsx differ diff --git a/src/main/resources/templates/packing-template.xlsx b/src/main/resources/templates/packing-template.xlsx index 61206dd4..1e55f8b5 100644 Binary files a/src/main/resources/templates/packing-template.xlsx and b/src/main/resources/templates/packing-template.xlsx differ