|
|
|
@ -1758,23 +1758,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
return Resp.scanFail("备货失败", "备货失败!"); |
|
|
|
|
} else { |
|
|
|
|
List<DistributionStockEntity> list1 = new ArrayList<>(); |
|
|
|
|
String collect = voList.stream().map(DistributionStockPackageVO::getPacketBarCode).collect(Collectors.joining(",")); |
|
|
|
|
Long warehouseId ; |
|
|
|
|
if(one.getStockUpType().equals("3")){ |
|
|
|
|
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingMapper.selectById(stockupDTO.getReservationId()); |
|
|
|
|
warehouseId = distrilbutionBillLadingEntity.getWarehouseId(); |
|
|
|
|
}else{ |
|
|
|
|
DistributionReservationEntity byId1 = distributionReservationService.getById(stockupDTO.getReservationId()); |
|
|
|
|
warehouseId = byId1.getWarehouseId(); |
|
|
|
|
} |
|
|
|
|
if(ObjectUtils.isNull(warehouseId)){ |
|
|
|
|
throw new ServiceException("预约信息不存在,无法备货!"); |
|
|
|
|
} |
|
|
|
|
//货位下架
|
|
|
|
|
R r = warehouseUpdownTypeClient.downPackage(collect,warehouseId ); |
|
|
|
|
if(r.getCode() != 200){ |
|
|
|
|
throw new ServiceException("下架失败!!"); |
|
|
|
|
} |
|
|
|
|
voList.forEach(i -> { |
|
|
|
|
//查询是否已备货
|
|
|
|
|
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getParcelListId()); |
|
|
|
@ -1825,6 +1808,23 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
|
|
|
|
|
list1.add(distributionStock); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
String collect = voList.stream().map(DistributionStockPackageVO::getPacketBarCode).collect(Collectors.joining(",")); |
|
|
|
|
Long warehouseId ; |
|
|
|
|
if(one.getStockUpType().equals("3")){ |
|
|
|
|
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingMapper.selectById(stockupDTO.getReservationId()); |
|
|
|
|
warehouseId = distrilbutionBillLadingEntity.getWarehouseId(); |
|
|
|
|
}else{ |
|
|
|
|
DistributionReservationEntity byId1 = distributionReservationService.getById(stockupDTO.getReservationId()); |
|
|
|
|
warehouseId = byId1.getWarehouseId(); |
|
|
|
|
} |
|
|
|
|
if(ObjectUtils.isNull(warehouseId)){ |
|
|
|
|
throw new ServiceException("预约信息不存在,无法备货!"); |
|
|
|
|
} |
|
|
|
|
//货位下架
|
|
|
|
|
R r = warehouseUpdownTypeClient.downPackage(collect,warehouseId ); |
|
|
|
|
if(r.getCode() != 200){ |
|
|
|
|
throw new ServiceException("下架失败!!"); |
|
|
|
|
} |
|
|
|
|
//TODO 其他操作
|
|
|
|
|
//添加扫描记录
|
|
|
|
|
|
|
|
|
|