|
|
|
@ -2499,11 +2499,34 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
//查询客户
|
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(distributionDeliveryList.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询所有的预约单ID
|
|
|
|
|
List<Long> idList = customList.stream() |
|
|
|
|
.map(DistributionAppReservationVO::getId) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityLists =distributionReservationMapper.selectStockArticleByReservationIds(idList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (DistributionAppReservationVO distributionAppReservationVO : customList) { |
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId()); |
|
|
|
|
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = localFindReservationStockarticleEntityLists(reservationStockarticleEntityLists,distributionAppReservationVO.getId()); |
|
|
|
|
|
|
|
|
|
List<DistributionStockEntity> distributionStockEntities = new ArrayList<>(); |
|
|
|
|
List<DistributionLoadscanEntity> loadscanEntityList = new ArrayList<>(); |
|
|
|
|
List<WarehouseTrayGoodsEntity> trayList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Long> reaveIds=reservationStockarticleEntityList.stream() |
|
|
|
|
.map(DistributionReservationStockarticleEntity::getReservationId) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> allParcelListEntities =distributionReservationMapper.selectPackageByReservations(reaveIds, myCurrentWarehouse.getId()); |
|
|
|
|
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) { |
|
|
|
|
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())) { |
|
|
|
|
//查询订制品备货数量
|
|
|
|
@ -2513,7 +2536,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
} |
|
|
|
|
//统计托盘数
|
|
|
|
|
//查询所有包件
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(), myCurrentWarehouse.getId()); |
|
|
|
|
// List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId(), myCurrentWarehouse.getId());
|
|
|
|
|
|
|
|
|
|
List<DistributionParcelListEntity> parcelListEntities =localFindAllParcelListEntities(allParcelListEntities,reservationStockarticleEntity.getStockArticleId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parcelListEntities.forEach(p -> { |
|
|
|
|
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity(); |
|
|
|
|
warehouseTrayGoodsEntity.setAssociationId(p.getId()); |
|
|
|
@ -2586,6 +2613,38 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
|
|
|
|
|
return customList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private List<DistributionParcelListEntity> localFindAllParcelListEntities(List<DistributionParcelListEntity> allParcelListEntities, Long stockArticleId) { |
|
|
|
|
List<DistributionParcelListEntity> temp = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
allParcelListEntities.forEach(t->{ |
|
|
|
|
|
|
|
|
|
if(t.getStockArticleId().equals(stockArticleId)){ |
|
|
|
|
temp.add(t); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
log.info(">>>>>>>>> localFindAllParcelListEntities 寻找的包件集合{}",temp); |
|
|
|
|
return temp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 找寻预约单ID 相同的数据进行返回 |
|
|
|
|
* @param reservationStockarticleEntityLists |
|
|
|
|
* @param id |
|
|
|
|
* @return List |
|
|
|
|
*/ |
|
|
|
|
private List<DistributionReservationStockarticleEntity> localFindReservationStockarticleEntityLists(List<DistributionReservationStockarticleEntity> reservationStockarticleEntityLists, Long id) { |
|
|
|
|
List<DistributionReservationStockarticleEntity> temp = new ArrayList<>(); |
|
|
|
|
reservationStockarticleEntityLists.forEach(t->{ |
|
|
|
|
if(t.getReservationId().equals(id)){ |
|
|
|
|
temp.add(t); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
log.info(">>>>> localFindReservationStockarticleEntityLists 寻找匹配的预约订单集合:{} ",temp); |
|
|
|
|
return temp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<DisStockListDetailVO> selectDistributionAppDeliverywrapIn(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) { |
|
|
|
|
List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distributionAppDeliveryListDTO.getId()); |
|
|
|
|