Browse Source

自提取消BUG修复

pull/8/head
汤建军 10 months ago
parent
commit
70ea2416ad
  1. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -1034,6 +1034,19 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<Long> packageIds = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()); List<Long> packageIds = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
//将这些包件还原成可操作状态 //将这些包件还原成可操作状态
Integer num = distributionParcelListService.restorePakcageByIds(packageIds); Integer num = distributionParcelListService.restorePakcageByIds(packageIds);
log.info("######################取消自提单释放包件>>>>>:{}",num);
ids.forEach(id ->{
//查询自提单存在的零担订单
List<DistributionReservationZeroPackageEntity> reservationZeroPackageEntities = distributionZeroPackageService.list(Wrappers.<DistributionReservationZeroPackageEntity>query().lambda()
.eq(DistributionReservationZeroPackageEntity::getReservationId, id)
.ne(DistributionReservationZeroPackageEntity::getZeroPackageStatus, "2")
);
if (Func.isNotEmpty(reservationZeroPackageEntities)){
List<Long> collect = reservationZeroPackageEntities.stream().map(DistributionReservationZeroPackageEntity::getStockArticleId).distinct().collect(Collectors.toList());
//释放零担资源
distributionZeroPackageService.recoverZeroPackage(id,collect);
}
});
//维护订单状态 //维护订单状态
String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(",")); String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(orderCodes, myCurrentWarehouse.getId()); distributionStockArticleService.maintenanceOrderInfo(orderCodes, myCurrentWarehouse.getId());
@ -1058,7 +1071,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
//对所有的库存品相关进行取消标识 //对所有的库存品相关进行取消标识
UpdateWrapper<DistributionDeliveryDetailsEntity> updateWrapper = new UpdateWrapper<>(); UpdateWrapper<DistributionDeliveryDetailsEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.lambda() updateWrapper.lambda()
.set(DistributionDeliveryDetailsEntity::getInventoryStatus, 3) .set(DistributionDeliveryDetailsEntity::getInventoryStatus, 2)
.set(DistributionDeliveryDetailsEntity::getQuantity, 0) .set(DistributionDeliveryDetailsEntity::getQuantity, 0)
.in(DistributionDeliveryDetailsEntity::getBillLadingId, ids); .in(DistributionDeliveryDetailsEntity::getBillLadingId, ids);
distributionDeliveryDetailsService.update(updateWrapper); distributionDeliveryDetailsService.update(updateWrapper);

Loading…
Cancel
Save