Browse Source

Merge branch 'dev' into pre-production

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

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

@ -3518,7 +3518,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()) {
//签收记录
@ -3529,41 +3528,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(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();
}

Loading…
Cancel
Save