| | |
| | | return getTargetLoc(areaId, null); |
| | | } |
| | | |
| | | public static String getTargetLoc(Long areaId, Long containerType,List<Integer> rowList) { |
| | | |
| | | Long locType = containerType; |
| | | //TODO 库位策略后续排期 |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(!Objects.isNull(locType), Loc::getType, locType) |
| | | .eq(Loc::getAreaId, areaId) |
| | | .eq(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type) |
| | | .in(Objects.nonNull(rowList) && !rowList.isEmpty(), Loc::getRow, rowList) |
| | | .orderByAsc(Loc::getLev) |
| | | .orderByAsc(Loc::getCol) |
| | | .orderByAsc(Loc::getRow) |
| | | .last("LIMIT 1") |
| | | ); |
| | | |
| | | return !Objects.isNull(loc) ? loc.getCode() : null; |
| | | } |
| | | |
| | | public static String getTargetLoc(Long areaId, Long containerType) { |
| | | Long locType = null; |
| | | // if (!Objects.isNull(containerType)) { |