|
|
|
@ -3512,7 +3512,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
.eq(DistrilbutionBillPackageEntity::getBillLadingId, billId) |
|
|
|
|
.eq(DistrilbutionBillPackageEntity::getStockArticleId, ids) |
|
|
|
|
); |
|
|
|
|
List<DistributionBillLadingScanEntity> scanEntityList = new ArrayList<>(); |
|
|
|
|
AtomicReference<Integer> num = new AtomicReference<>(0); |
|
|
|
|
if (ObjectUtils.isNotNull(list) && !list.isEmpty()) { |
|
|
|
|
//签收记录
|
|
|
|
@ -3523,41 +3522,29 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
|
|
|
|
|
Iterator<DistrilbutionBillPackageEntity> 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(); |
|
|
|
|
} |
|
|
|
|