diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index d98790833..a78348955 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -3512,7 +3512,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl scanEntityList = new ArrayList<>(); AtomicReference num = new AtomicReference<>(0); if (ObjectUtils.isNotNull(list) && !list.isEmpty()) { //签收记录 @@ -3523,41 +3522,29 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl iterator = list.iterator(); while (iterator.hasNext()) { DistrilbutionBillPackageEntity next = iterator.next(); - boolean b = list1.stream().anyMatch(q -> q.getParcelListId().equals(next.getParceListId())); - if (b) { - //删除包件 - iterator.remove(); + if(ObjectUtils.isNotNull(next.getParceListId())){ + boolean b = list1.stream().anyMatch(q -> { + + 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(); parcelListEntity.setId(i.getParceListId()); parcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue()); distributionParcelListService.updateById(parcelListEntity); num.getAndSet(num.get() + 1); }); - - -// if(!scanEntityList.isEmpty()){ -// distributionBillLadingScanService.saveBatch(scanEntityList); -// } } return num.get(); }