自动化立体仓库 - WMS系统
#
Junjie
18 小时以前 b3fcc1eda7f6305e9ae128b6ca51cf6d9f3f90c1
src/main/java/com/zy/asrs/utils/Utils.java
@@ -116,6 +116,9 @@
     */
    public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) {
        int row = getRow(deepLoc);
        if (row ==1 || row == 6){
            return deepLoc;
        }
        boolean deepLocLeft = isDeepLocLeft(slaveProperties, row);//判断是否为左深库位
        int shallowRow = deepLocLeft ? (row + 1) : (row - 1);
        return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
@@ -143,11 +146,11 @@
        if (row == 1 || row == 6) {
            return null;
        }
        //4,7,11,15,19,23
        if (row == 4 || row == 7 || row == 11 || row == 15 || row == 19 || row == 23) {
            return zerofill(String.valueOf(row + 1), 2) + shallowLoc.substring(2);
        } else {
        //2,8,11,15,19,23
        if (row == 5 || row == 8 || row == 12 || row == 16 || row == 20 || row == 24) {
            return zerofill(String.valueOf(row - 1), 2) + shallowLoc.substring(2);
        } else {
            return zerofill(String.valueOf(row + 1), 2) + shallowLoc.substring(2);
        }
    }
@@ -621,4 +624,22 @@
        return result;
    }
    /**
     * 通过库位号获取所在巷道
     */
    public static int getLaneByLocNo(String locNo) {
        int row = Utils.getRow(locNo);
        switch (row) {
            case 1:
            case 2:
            case 3:
                return 1;
            case 4:
            case 5:
            case 6:
                return 2;
        }
        return 0;
    }
}