diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java index 3d76db46c..3b593abfa 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/service/impl/EmisWaybillServiceImpl.java @@ -668,7 +668,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb emisWaybillSave.setCustomsClear(customsClear); // "发送寄件/签收短信不正确" - emisWaybillSave.setBlMessage("1"); + emisWaybillSave.setBlMessage("0"); + emisWaybillSave.setBlAcceptMessage("0"); // 计算目的地 @@ -3045,28 +3046,28 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 保存货物图片 - if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){ - // 删除图片插入新图片 - emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode); - - EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment(); - goodsPicAttachment.setWaybillId(emisWaybillSave.getId()); - goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode); - goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode()); - goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics()); - - emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment); - - } +// if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){ +// // 删除图片插入新图片 +// emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode); +// +// EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment(); +// goodsPicAttachment.setWaybillId(emisWaybillSave.getId()); +// goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode); +// goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode()); +// goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics()); +// +// emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment); +// +// } // 插入其他附件信息 - if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){ - List attachmentList=emisWaybillSave.getAttachmentList(); - for (EmisWaybillAttachment attachmentItem:attachmentList) { - attachmentItem.setWaybillId(emisWaybillSave.getId()); - emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem); - } - } +// if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){ +// List attachmentList=emisWaybillSave.getAttachmentList(); +// for (EmisWaybillAttachment attachmentItem:attachmentList) { +// attachmentItem.setWaybillId(emisWaybillSave.getId()); +// emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem); +// } +// } } @@ -3558,8 +3559,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb public void calcVolumeWeight(EmisWaybill emisWaybill) throws EmisBizError { if ( - StringUtils.isEmpty(emisWaybill.getProductType()) - || emisWaybill.getTotalVolume() == null + ( StringUtils.isEmpty(emisWaybill.getProductType()) && StringUtils.isEmpty(emisWaybill.getTransLineType()) ) + || emisWaybill.getTotalVolume() == null ) { @@ -3572,11 +3573,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb double totalVolume=emisWaybill.getTotalVolume().doubleValue(); - // 获取产品信息 - EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType()); + EmisTransLine emisTransLine=null; + if(StringUtils.isEmpty(emisWaybill.getTransLineType())){ + // 获取产品信息 + EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybill.getProductType()); + // 获取泡重比,计算体积重量 + emisTransLine= getTransLineByCode(emisTransProduct.getTransLineCode()); - // 获取泡重比,计算体积重量 - EmisTransLine emisTransLine= getTransLineByCode(emisTransProduct.getTransLineCode()); + }else{ + emisTransLine= getTransLineByCode(emisWaybill.getTransLineType()); + } double volumeWeight=0.0D; if(!StringUtils.isEmpty(emisTransLine.getMeterRate())) {