| | |
| | | public static List<String> getGroupOuterLoc(String locNo){ |
| | | int row = getRow(locNo); |
| | | List<String> result = new ArrayList<>(); |
| | | if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) { |
| | | for (Integer integer : CommonService.SECOND_GROUP_ROW_LIST) { |
| | | if (integer < row) { |
| | | result.add(zerofill(String.valueOf(integer), 2) + locNo.substring(2)); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } else if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) { |
| | | if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) { |
| | | List<Integer> clone = Arrays.asList(new Integer[CommonService.FIRST_GROUP_ROW_LIST.size()]); |
| | | Collections.copy(clone, CommonService.FIRST_GROUP_ROW_LIST); |
| | | Collections.reverse(clone); |
| | |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | // throw new RuntimeException("库位解析异常"); |
| | | } else if (CommonService.FIRST_GROUP_ROW_LIST_SHORT.contains(row)){ |
| | | List<Integer> clone = Arrays.asList(new Integer[CommonService.FIRST_GROUP_ROW_LIST_SHORT.size()]); |
| | | Collections.copy(clone, CommonService.FIRST_GROUP_ROW_LIST_SHORT); |
| | | Collections.reverse(clone); |
| | | for (Integer integer : clone) { |
| | | 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 if (CommonService.THIRD_GROUP_ROW_LIST.contains(row)){ |
| | | for (Integer integer : CommonService.THIRD_GROUP_ROW_LIST) { |
| | | if (integer < row) { |
| | | result.add(zerofill(String.valueOf(integer), 2) + locNo.substring(2)); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |