This commit is contained in:
linfso 2025-01-07 15:14:52 +08:00
parent 4218dc32f3
commit ce6d8744f9

View File

@ -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<EmisWaybillCargo> 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);