From b4bff691e83eec128f76888f49d52c65174ee671 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Tue, 4 Jun 2024 09:53:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=87=AA=E6=8F=90=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistrilbutionBillLadingServiceImpl.java | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) 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(); }