| | |
| | | return result; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(JSON.toJSONString(getGroupInsideLoc("2300101"))); |
| | | } |
| | | |
| | | // 内侧方向的货位 优先入库方向/优先出库方向 ===>> 反之 |
| | | public static List<String> getGroupInsideLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | |
| | | return result; |
| | | } |
| | | |
| | | // 外侧方向的货位 优先入库方向/优先出库方向 ===>> 反之 |
| | | public static List<String> getGroupOutsideLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | | List<String> result = new ArrayList<>(); |
| | | if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) { |
| | | for (Integer integer : CommonService.FIRST_GROUP_ROW_LIST) { |
| | | if (integer < row) { |
| | | result.add(zerofill(String.valueOf(integer), 2) + locNo.substring(2)); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } else if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) { |
| | | List<Integer> clone = Arrays.asList(new Integer[CommonService.SECOND_GROUP_ROW_LIST.size()]); |
| | | Collections.copy(clone, CommonService.SECOND_GROUP_ROW_LIST); |
| | | Collections.reverse(clone); |
| | | for (Integer integer : clone) { |
| | | if (integer > row) { |
| | | result.add(zerofill(String.valueOf(integer), 2) + locNo.substring(2)); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | // throw new RuntimeException("库位解析异常"); |
| | | } |
| | | if (!Cools.isEmpty(result)) { |
| | | Collections.reverse(result); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(JSON.toJSONString(getGroupOutsideLoc("0500201"))); |
| | | } |
| | | |
| | | } |