自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-12-05 c282d35d7761327eb4cf0ae2aa71c004733887cc
#
1个文件已修改
40 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/utils/Utils.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java
@@ -252,10 +252,6 @@
        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);
@@ -288,4 +284,40 @@
        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")));
    }
}