diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java index 449e6a14d..7f02f11b2 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/EmisBaseService.java @@ -306,9 +306,26 @@ public class EmisBaseService { order.put("goodsInfo", waybill.getGoodsInfo()); order.put("remark", waybill.getRemark()); - order.put("parcelQty", waybill.getParcelQty().toString()); - order.put("billWeight", waybill.getBillWeight().stripTrailingZeros().toPlainString()); - order.put("totalVolume", waybill.getTotalVolume().stripTrailingZeros().toPlainString()); + String billWeight="0.0"; + String totalVolume="0.0"; + String parcelQty="0"; + + if(waybill.getParcelQty()!=null){ + parcelQty=waybill.getParcelQty().toString() + } + + if(waybill.getBillWeight()!=null){ + billWeight=waybill.getBillWeight().stripTrailingZeros().toPlainString() + } + + if(waybill.getTotalVolume()!=null){ + totalVolume=waybill.getTotalVolume().stripTrailingZeros().toPlainString() + } + + + order.put("parcelQty", parcelQty); + order.put("billWeight", billWeight); + order.put("totalVolume", totalVolume); order.put("packType", DictUtils.getDictLabel("emis_tab_packing_type",waybill.getPackType()) ); order.put("paymentType", DictUtils.getDictLabel("emis_payment_type",waybill.getPaymentType())); order.put("printDay", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,new Date()));