|
|
|
@ -1522,9 +1522,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
case "0": |
|
|
|
|
//订制品
|
|
|
|
|
// v.forEach(ord -> {
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId()); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId()); |
|
|
|
|
for (DistributionParcelListEntity parcelListEntity : parcelListEntities) { |
|
|
|
|
DistributionLoadscanEntity packageLoadingScan = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
|
List<DistributionLoadscanEntity> packageLoadingScans = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId()).eq(DistributionLoadscanEntity::getPackageId, parcelListEntity.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())); |
|
|
|
|
DistributionLoadscanEntity packageLoadingScan=null; |
|
|
|
|
if(packageLoadingScans!=null&&!packageLoadingScans.isEmpty()){ |
|
|
|
|
log.info(">>>>>>>>> 包件查询 的装车件数:{}",packageLoadingScans.size()); |
|
|
|
|
packageLoadingScan = packageLoadingScans.get(0); |
|
|
|
|
} |
|
|
|
|
//无装车数据包件进行装车
|
|
|
|
|
if (Func.isEmpty(packageLoadingScan)) { |
|
|
|
|
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); |
|
|
|
@ -2439,6 +2444,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
@Override |
|
|
|
|
public List<DistributionAppReservationVO> getAppDeliveryreservationListPage( DistributionAppDeliveryListDTO distributionDeliveryList) { |
|
|
|
|
//查询客户
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId()); |
|
|
|
|
for (DistributionAppReservationVO distributionAppReservationVO : customList) { |
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId()); |
|
|
|
@ -2454,7 +2460,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
//统计托盘数
|
|
|
|
|
//查询所有包件
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId()); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(),myCurrentWarehouse.getId()); |
|
|
|
|
parcelListEntities.forEach(p -> { |
|
|
|
|
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity(); |
|
|
|
|
warehouseTrayGoodsEntity.setAssociationId(p.getId()); |
|
|
|
@ -3723,6 +3729,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
// if (distributionAppStockArticleVO.getLoadingNub() >=distributionAppStockArticleVO.getReservationNum()) {ordCount +=1;}
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
|
|
|
|
|
DistributionDeliveryListEntity distributionDeliveryListEntity = baseMapper.selectById(distributionAppDeliveryListDTO.getId()); |
|
|
|
|
DistributionAppDeliveryListVO distributionAppDeliveryListVO = Func.copy(distributionDeliveryListEntity, DistributionAppDeliveryListVO.class); |
|
|
|
|
//查询该配送所有包条
|
|
|
|
@ -3754,7 +3762,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
reservationStockarticleEntityList.forEach(rs -> { |
|
|
|
|
if (rs.getIsZero().equals(IsOrNoConstant.no.getValue())) { |
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId()); |
|
|
|
|
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.selectPackageByReservationAndStockArticle(rs.getReservationId(), rs.getStockArticleId(),myCurrentWarehouse.getId()); |
|
|
|
|
List<DistributionLoadscanEntity> packageLoadingList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getDeliveryId, distributionAppDeliveryListDTO.getId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()).eq(DistributionLoadscanEntity::getReservationId, rs.getReservationId()).in(DistributionLoadscanEntity::getPackageId, parcelListEntityList.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList()))); |
|
|
|
|
if (Func.isNotEmpty(packageLoadingList)) { |
|
|
|
|
signNubSr.getAndAdd(packageLoadingList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum()); |
|
|
|
|