md
This commit is contained in:
parent
759ae9df72
commit
fbbda1f594
@ -67,4 +67,7 @@ public interface EmisWaybillAttachmentMapper extends BaseMapper<EmisWaybillAttac
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillAttachmentByIds(Long[] ids);
|
||||
|
||||
|
||||
public int deleteEmisWaybillAttachmentByWaybillId(Long waybillId);
|
||||
}
|
||||
|
||||
@ -67,4 +67,7 @@ public interface EmisWaybillCargoMapper extends BaseMapper<EmisWaybillCargo>
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillCargoByIds(Long[] ids);
|
||||
|
||||
|
||||
public int deleteEmisWaybillCargoByWaybillId(Long waybillId);
|
||||
}
|
||||
|
||||
@ -67,4 +67,7 @@ public interface EmisWaybillFeeitemMapper extends BaseMapper<EmisWaybillFeeitem>
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillFeeitemByIds(Long[] ids);
|
||||
|
||||
|
||||
public int deleteEmisWaybillFeeitemByWaybillId(Long waybillId);
|
||||
}
|
||||
|
||||
@ -66,4 +66,7 @@ public interface IEmisWaybillAttachmentService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillAttachmentById(Long id);
|
||||
|
||||
|
||||
public int deleteEmisWaybillAttachmentByWaybillId(Long waybillId);
|
||||
}
|
||||
|
||||
@ -66,4 +66,9 @@ public interface IEmisWaybillCargoService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillCargoById(Long id);
|
||||
|
||||
|
||||
|
||||
public int deleteEmisWaybillCargoByWaybillId(Long WaybillId);
|
||||
|
||||
}
|
||||
|
||||
@ -66,4 +66,7 @@ public interface IEmisWaybillFeeitemService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillFeeitemById(Long id);
|
||||
|
||||
|
||||
public int deleteEmisWaybillFeeitemByWaybillId(Long waybillId);
|
||||
}
|
||||
|
||||
@ -101,4 +101,10 @@ public class EmisWaybillAttachmentServiceImpl implements IEmisWaybillAttachmentS
|
||||
return emisWaybillAttachmentMapper.deleteEmisWaybillAttachmentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteEmisWaybillAttachmentByWaybillId(Long waybillId)
|
||||
{
|
||||
return emisWaybillAttachmentMapper.deleteEmisWaybillAttachmentByWaybillId(waybillId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -101,4 +101,11 @@ public class EmisWaybillCargoServiceImpl implements IEmisWaybillCargoService
|
||||
return emisWaybillCargoMapper.deleteEmisWaybillCargoById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteEmisWaybillCargoByWaybillId(Long waybillId)
|
||||
{
|
||||
return emisWaybillCargoMapper.deleteEmisWaybillCargoByWaybillId(waybillId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -101,4 +101,13 @@ public class EmisWaybillFeeitemServiceImpl implements IEmisWaybillFeeitemService
|
||||
return emisWaybillFeeitemMapper.deleteEmisWaybillFeeitemById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteEmisWaybillFeeitemByWaybillId(Long waybillId)
|
||||
{
|
||||
return emisWaybillFeeitemMapper.deleteEmisWaybillFeeitemByWaybillId(waybillId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -437,11 +437,38 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
// 基础信息更新
|
||||
emisWaybillMapper.updateEmisWaybill(emisWaybillSave);
|
||||
|
||||
// 更新资费
|
||||
// 删除旧信息
|
||||
emisWaybillFeeitemMapper.deleteEmisWaybillFeeitemByWaybillId(emisWaybillSave.getId());
|
||||
|
||||
// 更新产品
|
||||
emisWaybillCargoMapper.deleteEmisWaybillCargoByWaybillId(emisWaybillSave.getId());
|
||||
|
||||
// 更新附件
|
||||
// 产生主键插入其他数据
|
||||
// 插入费用
|
||||
List<EmisWaybillFeeitem> feeitemList=emisWaybillSave.getFeeitemList();
|
||||
if(!CollectionUtils.isEmpty(feeitemList)){
|
||||
for (EmisWaybillFeeitem feeItem:feeitemList) {
|
||||
feeItem.setWaybillId(emisWaybillSave.getId());
|
||||
emisWaybillFeeitemMapper.insertEmisWaybillFeeitem(feeItem);
|
||||
}
|
||||
}
|
||||
|
||||
// 插入商品信息
|
||||
if(!CollectionUtil.isEmpty(emisWaybillSave.getCargoList() )){
|
||||
List<EmisWaybillCargo> cargoList=emisWaybillSave.getCargoList();
|
||||
for (EmisWaybillCargo cargoItem:cargoList) {
|
||||
cargoItem.setWaybillId(emisWaybillSave.getId());
|
||||
emisWaybillCargoMapper.insertEmisWaybillCargo(cargoItem);
|
||||
}
|
||||
}
|
||||
|
||||
// 插入附件信息
|
||||
if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
|
||||
List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
|
||||
for (EmisWaybillAttachment attachmentItem:attachmentList) {
|
||||
attachmentItem.setWaybillId(emisWaybillSave.getId());
|
||||
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
<select id="selectEmisWaybillAttachmentList" parameterType="EmisWaybillAttachment" resultMap="EmisWaybillAttachmentResult">
|
||||
<include refid="selectEmisWaybillAttachmentVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
||||
<if test="attachType != null and attachType != ''"> and attach_type like concat('%', #{attachType}, '%')</if>
|
||||
@ -104,13 +105,19 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWaybillAttachmentById" parameterType="Long">
|
||||
delete from emis_waybill_attachment where id = #{id}
|
||||
update emis_waybill_attachment set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWaybillAttachmentByIds" parameterType="String">
|
||||
delete from emis_waybill_attachment where id in
|
||||
update emis_waybill_attachment set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteEmisWaybillAttachmentByWaybillId" parameterType="Long">
|
||||
update emis_waybill_attachment set del_flag='1' where waybill_id = #{waybillId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -49,6 +49,7 @@
|
||||
<select id="selectEmisWaybillCargoList" parameterType="EmisWaybillCargo" resultMap="EmisWaybillCargoResult">
|
||||
<include refid="selectEmisWaybillCargoVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
||||
<if test="goodsCode != null and goodsCode != ''"> and goods_code like concat('%', #{goodsCode}, '%')</if>
|
||||
@ -214,13 +215,20 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWaybillCargoById" parameterType="Long">
|
||||
delete from emis_waybill_cargo where id = #{id}
|
||||
update emis_waybill_cargo set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWaybillCargoByIds" parameterType="String">
|
||||
delete from emis_waybill_cargo where id in
|
||||
update emis_waybill_cargo set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWaybillCargoByWaybillId" parameterType="Long">
|
||||
update emis_waybill_cargo set del_flag='1' where waybill_id = #{waybillId}
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -33,6 +33,7 @@
|
||||
<select id="selectEmisWaybillFeeitemList" parameterType="EmisWaybillFeeitem" resultMap="EmisWaybillFeeitemResult">
|
||||
<include refid="selectEmisWaybillFeeitemVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="waybillId != null "> and waybill_id = #{waybillId}</if>
|
||||
<if test="feeCode != null and feeCode != ''"> and fee_code like concat('%', #{feeCode}, '%')</if>
|
||||
@ -133,14 +134,23 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<delete id="deleteEmisWaybillFeeitemById" parameterType="Long">
|
||||
delete from emis_waybill_feeitem where id = #{id}
|
||||
update emis_waybill_feeitem set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWaybillFeeitemByIds" parameterType="String">
|
||||
delete from emis_waybill_feeitem where id in
|
||||
update emis_waybill_feeitem set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteEmisWaybillFeeitemByWaybillId" parameterType="Long">
|
||||
update emis_waybill_feeitem set del_flag='1' where waybill_id = #{waybillId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user