| | |
| | | * 检索库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | public StartupDto getLocNo(Integer staDescId, Integer sourceStaNo, Long hostId, LocTypeDto locTypeDto, int times) { |
| | | // 目标库位 |
| | | LocMast locMast = null; |
| | | |
| | |
| | | // } |
| | | |
| | | //搜索整个空库位组 |
| | | locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo); |
| | | locMast = getLocNoStepSingle(locTypeDto, staDescId, sourceStaNo, hostId); |
| | | if (locMast != null) { |
| | | //找到库位,返回dto |
| | | return getLocNoStep6(staDescId, sourceStaNo, locMast);//返回dto |
| | |
| | | } |
| | | |
| | | // 搜索单品(整个库位组) |
| | | private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo) { |
| | | private LocMast getLocNoStepSingle(LocTypeDto locTypeDto, Integer staDescId, Integer sourceStaNo, Long hostId) { |
| | | LocMast locMast = null; |
| | | // 获取目标站 |
| | | LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<StaDesc>() |
| | | .eq(StaDesc::getTypeNo, staDescId) |
| | | .eq(StaDesc::getStnNo, sourceStaNo); |
| | | .eq(StaDesc::getStnNo, sourceStaNo) |
| | | .eq(StaDesc::getHostId, hostId); |
| | | StaDesc staDesc = staDescService.getOne(wrapper); |
| | | if (staDesc == null) { |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O"));//搜索货物 |
| | | List<LocMast> locMasts = locMastService.list(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocSts, "O").eq(LocMast::getHostId, hostId));//搜索货物 |
| | | |
| | | if (locMasts == null) { |
| | | return null; |