Browse Source

fix:情路无效的包

dist.1.3.0
pref_mail@163.com 9 months ago
parent
commit
314fc5aef3
  1. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

39
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<DistributionLoadscanEntity> distributionLoadscanEntities = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())
);
// 使用流式操作和映射,提取包条Id并创建新的列表
// List<Long> 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<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>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<DistributionParcelListEntity>().lambda()
// .in(DistributionParcelListEntity::getId,packageIdList)
// .set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yizhuangche.getValue())
// );
//
// //提取订单Id(去重)
// List<Long> OrderList = distributionLoadscanEntities.stream().map(DistributionLoadscanEntity::getOrderId).distinct().collect(Collectors.toList());
// //查询修改订单状态
// List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListMapper.selectList(new QueryWrapper<DistributionParcelListEntity>().lambda()
// .in(DistributionParcelListEntity::getStockArticleId, OrderList)
// //.eq(DistributionParcelListEntity::get)
// //todo 修改订单状态
// );
}
/**

Loading…
Cancel
Save