From ce6d8744f91db4a2f717d705b4666fec4ab350f1 Mon Sep 17 00:00:00 2001 From: linfso Date: Tue, 7 Jan 2025 15:14:52 +0800 Subject: [PATCH] md --- .../service/impl/EmisWaybillServiceImpl.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) 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 6b55a9cea..c723fe94f 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 @@ -1436,6 +1436,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb * @return * @throws EmisBizError */ + @Transactional @Override public void confirmOrder(EmisWaybill oldEmisWaybill,EmisWaybill emisWaybillSave) throws EmisBizError{ // 已接单不允许再接单 @@ -1470,6 +1471,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb // 变为已接单 emisWaybillSave.setOrderStatus("1"); + String goodsPicsStr=emisWaybillSave.getGoodsPics(); + if(!StringUtils.isEmpty(goodsPicsStr)) { + emisWaybillSave.setGoodsPics("1"); + } + // 基础信息更新 emisWaybillMapper.updateEmisWaybill(emisWaybillSave); // 绑定专属业务员 @@ -1500,7 +1506,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } } - // 插入商品信息 + // 插入长宽高信息 if(!CollectionUtil.isEmpty(emisWaybillSave.getCargoList() )){ List cargoList=emisWaybillSave.getCargoList(); for (EmisWaybillCargo cargoItem:cargoList) { @@ -1510,14 +1516,14 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 保存货物图片 - if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){ + if(!StringUtils.isEmpty(goodsPicsStr)){ // 删除历史图片,重新插入图片 emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode); EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment(); goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode); goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode()); - goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics()); + goodsPicAttachment.setFileUrl(goodsPicsStr); goodsPicAttachment.setWaybillId(emisWaybillSave.getId()); goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode()); emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment); @@ -3157,6 +3163,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb emisWaybillSave.preUpdate(); + String goodsPicsStr=emisWaybillSave.getGoodsPics(); + if(!StringUtils.isEmpty(goodsPicsStr)) { + emisWaybillSave.setGoodsPics("1"); + } + // 基础信息更新 emisWaybillMapper.updateEmisWaybill(emisWaybillSave); @@ -3198,7 +3209,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb } // 保存货物图片 - if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){ + if(!StringUtils.isEmpty(goodsPicsStr)){ // 删除图片插入新图片 emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode); @@ -3206,7 +3217,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb goodsPicAttachment.setWaybillId(emisWaybillSave.getId()); goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode); goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode()); - goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics()); + goodsPicAttachment.setFileUrl(goodsPicsStr); emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment);