diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java index 13897c679..b5dfd1b79 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/domain/EmisWaybill.java @@ -499,15 +499,25 @@ public class EmisWaybill extends BaseEntity @DataAuditField(fieldComment = "扩展信息") private String extInfo; - + // 体积信息 @TableField(exist = false) private List cargoList; + + // 费用列表信息 @TableField(exist = false) private List feeitemList; + + // 附件信息 @TableField(exist = false) private List attachmentList; + // 快递报关资料信息 + @TableField(exist = false) + private List declareGoodsList; + // 陆运报关附件信息 + @TableField(exist = false) + private List declareAttachmentList; /* 扩展信息 */ @TableField(exist = false) diff --git a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillDeclareAttachmentMapper.java b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillDeclareAttachmentMapper.java index 319eb4f29..db16ef04d 100644 --- a/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillDeclareAttachmentMapper.java +++ b/emis-biz/src/main/java/com/xdadan/erp/emis/mapper/EmisWaybillDeclareAttachmentMapper.java @@ -85,4 +85,6 @@ public interface EmisWaybillDeclareAttachmentMapper extends BaseMapper cargoList=emisWaybillSave.getCargoList(); for (EmisWaybillCargo cargoItem:cargoList) { cargoItem.setWaybillId(emisWaybillSave.getId()); + cargoItem.setBillCode(emisWaybillSave.getBillCode()); emisWaybillCargoMapper.insertEmisWaybillCargo(cargoItem); } } + // 插入申报货物信息 + if(!CollectionUtil.isEmpty(emisWaybillSave.getDeclareGoodsList() )){ + List declareGoodsList=emisWaybillSave.getDeclareGoodsList(); + for (EmisWaybillDeclareGoods declareGoodsItem:declareGoodsList) { + declareGoodsItem.setWaybillId(emisWaybillSave.getId()); + declareGoodsItem.setBillCode(emisWaybillSave.getBillCode()); + emisWaybillDeclareGoodsMapper.insertEmisWaybillDeclareGoods(declareGoodsItem); + } + } + + // 插入申报资料信息 + if(!CollectionUtil.isEmpty(emisWaybillSave.getDeclareAttachmentList() )){ + List declareAttachmentList=emisWaybillSave.getDeclareAttachmentList(); + for (EmisWaybillDeclareAttachment declareAttachmentItem:declareAttachmentList) { + declareAttachmentItem.setWaybillId(emisWaybillSave.getId()); + declareAttachmentItem.setBillCode(emisWaybillSave.getBillCode()); + emisWaybillDeclareAttachmentMapper.insertEmisWaybillDeclareAttachment(declareAttachmentItem); + } + } // 通知网点有新的订单 @@ -2972,12 +2998,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 删除旧信息 - emisWaybillFeeitemMapper.deleteEmisWaybillFeeitemByWaybillId(emisWaybillSave.getId()); - - emisWaybillCargoMapper.deleteEmisWaybillCargoByWaybillId(emisWaybillSave.getId()); - - // 产生主键插入其他数据 // 插入费用 + emisWaybillFeeitemMapper.deleteEmisWaybillFeeitemByWaybillId(emisWaybillSave.getId()); List feeitemList=emisWaybillSave.getFeeitemList(); if(!CollectionUtils.isEmpty(feeitemList)){ for (EmisWaybillFeeitem feeItem:feeitemList) { @@ -2986,7 +3008,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } } - // 插入商品信息 + // 插入件模体信息 + emisWaybillCargoMapper.deleteEmisWaybillCargoByWaybillId(emisWaybillSave.getId()); if(!CollectionUtil.isEmpty(emisWaybillSave.getCargoList() )){ List cargoList=emisWaybillSave.getCargoList(); for (EmisWaybillCargo cargoItem:cargoList) { @@ -2995,6 +3018,28 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } } + // 插入申报货物信息 + emisWaybillDeclareGoodsMapper.deleteEmisWaybillDeclareGoodsByWaybillId(emisWaybillSave.getId()); + if(!CollectionUtil.isEmpty(emisWaybillSave.getDeclareGoodsList() )){ + List declareGoodsList=emisWaybillSave.getDeclareGoodsList(); + for (EmisWaybillDeclareGoods declareGoodsItem:declareGoodsList) { + declareGoodsItem.setWaybillId(emisWaybillSave.getId()); + declareGoodsItem.setBillCode(emisWaybillSave.getBillCode()); + emisWaybillDeclareGoodsMapper.insertEmisWaybillDeclareGoods(declareGoodsItem); + } + } + + // 插入申报资料信息 + emisWaybillDeclareAttachmentMapper.deleteEmisWaybillDeclareAttachmentByWaybillId(emisWaybillSave.getId()); + if(!CollectionUtil.isEmpty(emisWaybillSave.getDeclareAttachmentList() )){ + List declareAttachmentList=emisWaybillSave.getDeclareAttachmentList(); + for (EmisWaybillDeclareAttachment declareAttachmentItem:declareAttachmentList) { + declareAttachmentItem.setWaybillId(emisWaybillSave.getId()); + declareAttachmentItem.setBillCode(emisWaybillSave.getBillCode()); + emisWaybillDeclareAttachmentMapper.insertEmisWaybillDeclareAttachment(declareAttachmentItem); + } + } + } diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillDeclareAttachmentMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillDeclareAttachmentMapper.xml index 0c16a0477..d9e467701 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillDeclareAttachmentMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillDeclareAttachmentMapper.xml @@ -216,4 +216,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update emis_waybill_declare_attachment set del_flag='1' where bill_code = #{billCode} and attach_type = #{attachType} + + update emis_waybill_declare_attachment set del_flag='1' where waybill_id = #{waybillId} + + \ No newline at end of file diff --git a/emis-biz/src/main/resources/mapper/EmisWaybillDeclareGoodsMapper.xml b/emis-biz/src/main/resources/mapper/EmisWaybillDeclareGoodsMapper.xml index 8f01a2aa8..66ffae141 100644 --- a/emis-biz/src/main/resources/mapper/EmisWaybillDeclareGoodsMapper.xml +++ b/emis-biz/src/main/resources/mapper/EmisWaybillDeclareGoodsMapper.xml @@ -271,4 +271,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + + update emis_waybill_declare_goods set del_flag='1' where waybill_id = #{waybillId} + + \ No newline at end of file