| | |
| | | throw new CoolException("入库路径不存在"); |
| | | } |
| | | |
| | | //找相同空托盘 |
| | | LambdaQueryWrapper<LocMast> wrapper0 = new LambdaQueryWrapper<LocMast>() |
| | | .eq(LocMast::getLocSts, "D") |
| | | .eq(LocMast::getLocType1, locTypeDto.getLocType1()) |
| | | .eq(LocMast::getCrnNo, staDesc.getDeviceNo()) |
| | | .eq(LocMast::getHostId, hostId); |
| | | |
| | | LambdaQueryWrapper<LocMast> wrapper1 = new LambdaQueryWrapper<LocMast>() |
| | | .eq(LocMast::getLocSts, "O") |
| | | .eq(LocMast::getLocType1, locTypeDto.getLocType1()) |
| | |
| | | wrapper1.le(LocMast::getLev1, locRangeDto.getTargetLev()); |
| | | } |
| | | |
| | | List<LocMast> locMasts = locMastService.list(wrapper1); |
| | | if (!locMasts.isEmpty()) { |
| | | for (LocMast loc : locMasts) { |
| | | List<LocMast> locMasts0 = locMastService.list(wrapper0); |
| | | if (!locMasts0.isEmpty()) { |
| | | for (LocMast loc : locMasts0) { |
| | | LocMast locMast0 = locMastService.findNearloc(loc.getLocNo(), hostId, locRangeDto); |
| | | if (null != locMast0) { |
| | | locMast = locMast0; |
| | |
| | | } |
| | | |
| | | if (locMast == null) { |
| | | List<LocMast> locMasts = locMastService.list(wrapper1); |
| | | if (!locMasts.isEmpty()) { |
| | | for (LocMast loc : locMasts) { |
| | | LocMast locMast0 = locMastService.findNearloc(loc.getLocNo(), hostId, locRangeDto); |
| | | if (null != locMast0) { |
| | | locMast = locMast0; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (locMast == null) { |
| | | throw new CoolException("缺少空库位"); |
| | | } |
| | | } |