This commit is contained in:
linfso 2024-12-30 08:23:52 +08:00
parent fe2aa47b9c
commit 6d18ac018b

View File

@ -1258,30 +1258,25 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
}
}
// 保存货物图片
if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){
// 删除历史图片,重新插入图片
emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode);
if(CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
List<EmisWaybillAttachment> attachmentList = new ArrayList<EmisWaybillAttachment>();
EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment();
goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode);
goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode());
goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics());
attachmentList.add(goodsPicAttachment);
emisWaybillSave.setAttachmentList(attachmentList);
goodsPicAttachment.setWaybillId(emisWaybillSave.getId());
goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode());
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment);
}
}
// 插入附件信息
if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
// 商品附件图片插入到附件
List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
for (EmisWaybillAttachment attachmentItem:attachmentList) {
attachmentItem.setWaybillId(emisWaybillSave.getId());
attachmentItem.setBillCode(emisWaybillSave.getBillCode());
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
}
}
// 占用进仓单号
if(!StringUtils.isEmpty(emisWaybillSave.getWarehouseInNo())) {
@ -2606,29 +2601,21 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 保存货物图片
if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){
// 删除历史图片,重新插入图片
emisWaybillAttachmentMapper.deleteByBillCodeAndAttachType(emisWaybillSave.getBillCode(),WaybillAttachType.GOODS_PIC.typeCode);
if(CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
List<EmisWaybillAttachment> attachmentList = new ArrayList<EmisWaybillAttachment>();
EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment();
goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode);
goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode());
goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics());
attachmentList.add(goodsPicAttachment);
emisWaybillSave.setAttachmentList(attachmentList);
goodsPicAttachment.setWaybillId(emisWaybillSave.getId());
goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode());
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment);
}
}
// 插入附件信息
if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
// 商品附件图片插入到附件
List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
for (EmisWaybillAttachment attachmentItem:attachmentList) {
attachmentItem.setWaybillId(emisWaybillSave.getId());
attachmentItem.setBillCode(emisWaybillSave.getBillCode());
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
}
}
// 占用进仓单号
if(!StringUtils.isEmpty(emisWaybillSave.getWarehouseInNo())) {
String warehouseInNo = WaybillHelper.formatQueryValue(emisWaybillSave.getWarehouseInNo());
@ -2772,29 +2759,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
}
}
// 保存货物图片
// if(!StringUtils.isEmpty(emisWaybillSave.getGoodsPics())){
// if(CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
// List<EmisWaybillAttachment> attachmentList = new ArrayList<EmisWaybillAttachment>();
// EmisWaybillAttachment goodsPicAttachment = new EmisWaybillAttachment();
// goodsPicAttachment.setAttachType(WaybillAttachType.GOODS_PIC.typeCode);
// goodsPicAttachment.setBillCode(emisWaybillSave.getBillCode());
// goodsPicAttachment.setFileUrl(emisWaybillSave.getGoodsPics());
// attachmentList.add(goodsPicAttachment);
// emisWaybillSave.setAttachmentList(attachmentList);
// }
// }
// 插入附件信息
// if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
// // 商品附件图片插入到附件
// List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
// for (EmisWaybillAttachment attachmentItem:attachmentList) {
// attachmentItem.setWaybillId(emisWaybillSave.getId());
// attachmentItem.setBillCode(emisWaybillSave.getBillCode());
// emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
// }
// }
// 通知网点有新的订单
// 用户新下单
@ -2978,14 +2943,6 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
}
// 插入其他附件信息
if(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
for (EmisWaybillAttachment attachmentItem:attachmentList) {
attachmentItem.setWaybillId(emisWaybillSave.getId());
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
}
}
// 占用进仓单号
useWarehouseInNo(emisWaybillSave.getBillCode(),oldEmisWaybill.getWarehouseInNo(),emisWaybillSave.getWarehouseInNo());
@ -3049,29 +3006,7 @@ 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(!CollectionUtil.isEmpty(emisWaybillSave.getAttachmentList() )){
// List<EmisWaybillAttachment> attachmentList=emisWaybillSave.getAttachmentList();
// for (EmisWaybillAttachment attachmentItem:attachmentList) {
// attachmentItem.setWaybillId(emisWaybillSave.getId());
// emisWaybillAttachmentMapper.insertEmisWaybillAttachment(attachmentItem);
// }
// }
}