自动化立体仓库 - WCS系统
Junjie
2023-03-27 4fc00c0045dcd4cafdb5c9ea998cb2c71ea80fbe
src/main/java/com/zy/common/utils/NavigatePositionConvert.java
@@ -15,6 +15,19 @@
        return newPosition;
    }
    //xy轴转坐标编号
    public static Short xyToPosition(int x, int y) {
        StringBuffer sb = new StringBuffer();
        sb.append(x);
        if (x < 10) {
            sb.append("00");
        } else if (x < 100) {
            sb.append("0");
        }
        sb.append(y);
        return Short.parseShort(sb.toString());
    }
    //转换行号,实际中最底层可能是第一行,在数组中最底层是最后一行,因此需要进行转换才可以匹配数据
    public static int covertRow(int row) {
        NavigateMapData mapData = new NavigateMapData();
@@ -25,7 +38,7 @@
    }
    public static int[] coverPosition(int col,int row) {
        return new int[]{row, col};
        return new int[]{col, row};
    }
}