Browse Source

1.修改自提确认报错

master
pref_mail@163.com 8 months ago
parent
commit
b4bff691e8
  1. 41
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

41
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -3512,7 +3512,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
.eq(DistrilbutionBillPackageEntity::getBillLadingId, billId) .eq(DistrilbutionBillPackageEntity::getBillLadingId, billId)
.eq(DistrilbutionBillPackageEntity::getStockArticleId, ids) .eq(DistrilbutionBillPackageEntity::getStockArticleId, ids)
); );
List<DistributionBillLadingScanEntity> scanEntityList = new ArrayList<>();
AtomicReference<Integer> num = new AtomicReference<>(0); AtomicReference<Integer> num = new AtomicReference<>(0);
if (ObjectUtils.isNotNull(list) && !list.isEmpty()) { if (ObjectUtils.isNotNull(list) && !list.isEmpty()) {
//签收记录 //签收记录
@ -3523,41 +3522,29 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
Iterator<DistrilbutionBillPackageEntity> iterator = list.iterator(); Iterator<DistrilbutionBillPackageEntity> iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
DistrilbutionBillPackageEntity next = iterator.next(); DistrilbutionBillPackageEntity next = iterator.next();
boolean b = list1.stream().anyMatch(q -> q.getParcelListId().equals(next.getParceListId())); if(ObjectUtils.isNotNull(next.getParceListId())){
if (b) { boolean b = list1.stream().anyMatch(q -> {
//删除包件
iterator.remove(); if(ObjectUtils.isNotNull(q.getParcelListId())){
return q.getParcelListId().equals(next.getParceListId());
}
return false;
});
if (b) {
//删除包件
iterator.remove();
}
} }
}
//添加包件签收记录 }
// list.stream().forEach(i ->{
// distributionParcelListService.lambdaUpdate()
// .set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue())
// .eq(DistributionParcelListEntity::getId, i);
// DistributionBillLadingScanEntity billLadingScan = new DistributionBillLadingScanEntity();
// billLadingScan.setMaterialType("2");
// billLadingScan.setScanType(2);
// billLadingScan.setParcelListId(i.getParceListId());
// billLadingScan.setStockArticleId(i.getStockArticleId());
// billLadingScan.setBillLadingId(billId);
// billLadingScan.setPacketBarCode( i.getPacketBarCode());
// billLadingScan.setQuantity(i.getPacketNumber());
// scanEntityList.add(billLadingScan);
// });
//回退包件信息 //回退包件信息
list.stream().forEach(i -> { list.forEach(i -> {
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity(); DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
parcelListEntity.setId(i.getParceListId()); parcelListEntity.setId(i.getParceListId());
parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
distributionParcelListService.updateById(parcelListEntity); distributionParcelListService.updateById(parcelListEntity);
num.getAndSet(num.get() + 1); num.getAndSet(num.get() + 1);
}); });
// if(!scanEntityList.isEmpty()){
// distributionBillLadingScanService.saveBatch(scanEntityList);
// }
} }
return num.get(); return num.get();
} }

Loading…
Cancel
Save