diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 9f0e90ce0..cd353fc1b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -61,7 +61,6 @@ import org.springblade.common.constant.stockup.StockupTypeConstant; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.utils.Func; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; @@ -130,44 +129,6 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { List distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper().lambda() .eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId()) ); - // 使用流式操作和映射,提取包条Id并创建新的列表 -// List packageIdList = distributionLoadscanEntities.stream().map(DistributionLoadscanEntity::getPackageId).collect(Collectors.toList()); -// for (Long aLong : packageIdList) { -// DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(aLong); -// parcelListEntity.setOrderPackageStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue()); -// distributionParcelListService.updateById(parcelListEntity); -// //查询到这个包件信息,这里就需要根据包件去对订单状态机进行变更 -// List parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.query().lambda().eq(DistributionParcelListEntity::getStockArticleId, parcelListEntity.getStockArticleId())); -// boolean flag = parcelListEntityList.stream().allMatch(l -> Integer.parseInt(l.getOrderPackageStatus()) > Integer.parseInt(OrderPackageStatusConstant.yizhuangche.getValue())); -// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleService.getById(parcelListEntity.getStockArticleId()); -// if (flag){ -// //这里就需要将订单进行已出库的状态修改 -// stockArticleEntity.setOrderStatus(OrderStatusConstant.zhuangche.getValue()); -// }else { -// stockArticleEntity.setOrderStatus(OrderStatusConstant.bufenzhuangche.getValue()); -// //这里就是订单的部分出库 -// } -// distributionStockArticleService.updateById(stockArticleEntity); -// } - -// Long reservationId = distrilbutionloadingscanDTO.getReservationId(); -// -// //TODO 包件状态变更 -// -// //修改状态包条状态 -// distributionParcelListService.update(new UpdateWrapper().lambda() -// .in(DistributionParcelListEntity::getId,packageIdList) -// .set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yizhuangche.getValue()) -// ); -// -// //提取订单Id(去重) -// List OrderList = distributionLoadscanEntities.stream().map(DistributionLoadscanEntity::getOrderId).distinct().collect(Collectors.toList()); -// //查询修改订单状态 -// List distributionParcelListEntities = distributionParcelListMapper.selectList(new QueryWrapper().lambda() -// .in(DistributionParcelListEntity::getStockArticleId, OrderList) -// //.eq(DistributionParcelListEntity::get) -// //todo 修改订单状态 -// ); } /**