|  |  |  | 
|---|
|  |  |  | 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()); | 
|---|
|  |  |  | //牛眼坐标转WCS库位号 | 
|---|
|  |  |  | public static String xyzToLocNo(int x, int y, int z) { | 
|---|
|  |  |  | int[] ints = NyXyzToWCSXyz(x, y, z); | 
|---|
|  |  |  | String locNo = Utils.getLocNo(ints[0],ints[1],ints[2]); | 
|---|
|  |  |  | return locNo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //xyz轴转库位号 | 
|---|
|  |  |  | public static String xyzToLocNo(int x, int y, int z) { | 
|---|
|  |  |  | String locNo = Utils.getLocNo(x, y, z); | 
|---|
|  |  |  | return locNo; | 
|---|
|  |  |  | //WCS系统坐标转牛眼坐标 | 
|---|
|  |  |  | public static int[] WCSXyzToNyXyz(int x, int y, int z) { | 
|---|
|  |  |  | //WCS系统Y轴 => 牛眼X轴转换公式 | 
|---|
|  |  |  | int x1 = Math.abs(y - 61) + 11; | 
|---|
|  |  |  | //WCS系统X轴 => 牛眼Y轴转换公式 | 
|---|
|  |  |  | int y1 = x + 10; | 
|---|
|  |  |  | return new int[]{x1, y1, z}; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //牛眼坐标转WCS系统坐标 | 
|---|
|  |  |  | public static int[] NyXyzToWCSXyz(int x, int y, int z) { | 
|---|
|  |  |  | //牛眼X轴 => WCS系统Y轴公式 | 
|---|
|  |  |  | int y1 = Math.abs(x - 11 - 61); | 
|---|
|  |  |  | //牛眼Y轴 => WCS系统X轴公式 | 
|---|
|  |  |  | int x1 = y - 10; | 
|---|
|  |  |  | return new int[]{x1, y1, z}; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //xyz轴转坐标编号 | 
|---|
|  |  |  | 
|---|
|  |  |  | return Short.parseShort(basDevp.getQrCodeValue()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return Short.parseShort(locMast.getQrCodeValue()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //转换行号,实际中最底层可能是第一行,在数组中最底层是最后一行,因此需要进行转换才可以匹配数据 | 
|---|
|  |  |  | public static int covertRow(int row) { | 
|---|
|  |  |  | NavigateMapData mapData = new NavigateMapData(); | 
|---|
|  |  |  | int[][] data = mapData.getData(); | 
|---|
|  |  |  | //实际行数 | 
|---|
|  |  |  | int realRow = data.length - 1; | 
|---|
|  |  |  | return realRow - row; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static int[] coverPosition(int col,int row) { | 
|---|