From b3e2b3fc8c2c068a0e602eb759bd9dc80c4b73e1 Mon Sep 17 00:00:00 2001 From: zhaoqing <3160641494@qq.com> Date: Tue, 9 Jun 2026 15:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=87=BA=E5=8F=A3=E5=8D=95=E8=AF=81?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sinessDocumentOrderApplicationService.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java index 24b434c6e..949c9dd10 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java @@ -222,16 +222,16 @@ public class BusinessDocumentOrderApplicationService { // 4. 构建推送数据 Map body = new HashMap<>(); - body.put("erpBillNo", order.getGoodsNumber()); + body.put("erpBillNo", order.getGoodsNumber() != null ? order.getGoodsNumber() : ""); String billDate = order.getDocumentDate() != null ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(order.getDocumentDate()) - : null; + : ""; body.put("billDate", billDate); // 商品类型取第一个cargo的productType(0料件,1半成品,2成品) Integer goodsType = (cargoList != null && !cargoList.isEmpty()) ? cargoList.get(0).getProductType() : null; - body.put("goodsType", goodsType); - body.put("ieFlag", order.getIeType() != null ? order.getIeType() : null); - body.put("corpCode", corpCode); + body.put("goodsType", goodsType != null ? goodsType : ""); + body.put("ieFlag", order.getIeType() != null ? order.getIeType() : ""); + body.put("corpCode", corpCode != null ? corpCode : ""); List> billList = new ArrayList<>(); if (cargoList != null && !cargoList.isEmpty()) { @@ -239,9 +239,9 @@ public class BusinessDocumentOrderApplicationService { for (BusinessDocumentCargoMulti cargo : cargoList) { Map billMap = new HashMap<>(); billMap.put("gNo", gNo++); - billMap.put("goodsCode", cargo.getMaterialCode() != null ? cargo.getMaterialCode() : null); - billMap.put("packNo", cargo.getCargoNum()); - billMap.put("erpQty", cargo.getCargoNum()); + billMap.put("goodsCode", cargo.getMaterialCode() != null ? cargo.getMaterialCode() : ""); + billMap.put("packNo", cargo.getCargoNum() != null ? cargo.getCargoNum() : ""); + billMap.put("erpQty", cargo.getCargoNum() != null ? cargo.getCargoNum() : ""); // 查询物料基础信息,计算净重和毛重 if (cargo.getMaterialBaseInfoId() != null) { @@ -249,11 +249,21 @@ public class BusinessDocumentOrderApplicationService { if (material != null && cargo.getCargoNum() != null) { if (material.getWeightLimit() != null) { billMap.put("netWt", material.getWeightLimit().multiply(cargo.getCargoNum())); + } else { + billMap.put("netWt", ""); } if (material.getGrossWeight() != null) { billMap.put("grossWt", material.getGrossWeight().multiply(cargo.getCargoNum())); + } else { + billMap.put("grossWt", ""); } + } else { + billMap.put("netWt", ""); + billMap.put("grossWt", ""); } + } else { + billMap.put("netWt", ""); + billMap.put("grossWt", ""); } billList.add(billMap); }