#
zzgtfwq
17 小时以前 d91d1fc34a8af84513416cb2a03c75d96fb0304e
src/main/java/com/zy/asrs/utils/Utils.java
@@ -87,8 +87,14 @@
     */
    public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) {
        int row = getRow(deepLoc);
        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
        int shallowRow = row;
        if (row==1 || row == 5 || row==11){
            shallowRow = row+1;
        } else if (row==4 || row==8 || row == 14){
            shallowRow = row-1;
        }
//        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
//        int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
        return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
    }
@@ -105,15 +111,23 @@
     */
    public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
        int row = getRow(shallowLoc);
        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
//        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int targetRow;
        if (remainder == 2) {
            targetRow = row - 1;
        } else if (remainder == 3) {
            targetRow = row + 1;
        } else {
//        int targetRow = row;
        if (row==2 || row == 6 || row==12){
            targetRow = row-1;
        } else if (row==3 || row==7 || row == 13){
            targetRow = row+1;
        }else {
            throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
        }
//        if (remainder == 2) {
//            targetRow = row - 1;
//        } else if (remainder == 3) {
//            targetRow = row + 1;
//        } else {
//            throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
//        }
        return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
    }
@@ -121,14 +135,23 @@
     * 获取 浅库位排对应的深库位排
     */
    public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) {
        int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount());
//        int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount());
        int targetRow;
        if (remainder == 2) {
            targetRow = shallowRow - 1;
        } else if (remainder == 3) {
            targetRow = shallowRow + 1;
        } else {
            throw new RuntimeException(shallowRow + "不是浅库位排,系统繁忙");
//        if (remainder == 2) {
//            targetRow = shallowRow - 1;
//        } else if (remainder == 3) {
//            targetRow = shallowRow + 1;
//        } else {
//            throw new RuntimeException(shallowRow + "不是浅库位排,系统繁忙");
//        }
//        int targetRow = row;
        if (shallowRow==2 || shallowRow == 6 || shallowRow==12){
            targetRow = shallowRow-1;
        } else if (shallowRow==3 || shallowRow==7 || shallowRow == 13){
            targetRow = shallowRow+1;
        }else {
            throw new RuntimeException(shallowRow + "不是浅库位,系统繁忙");
        }
        return targetRow;
    }
@@ -217,18 +240,19 @@
//                {680103, 731550, 1115, 882, 1215, 775, 1125, 882},
                // 直线区间(0-134400)
//                {起点, 终点, 类型, x1, y1, x2, y2,
                {0.0, 120000.0, 0, 390.0, 750.0, 60.0, 750.0},
                // 圆弧区间(拐点116-115)新参数:圆心(1115,775)
                {120000.0, 127500.0, 2, 60.0, 750.0, 10.0, 800.0, 60.0, 800.0}, // 修正终点坐标
                {127500.0, 134900.0, 2, 10.0, 800.0, 60.0, 850.0, 60.0, 800.0},
                {134900.0, 680103.0,0, 60.0, 850.0, 1100.0, 850.0},
                {680103.0, 731550.0, 2, 1100.0, 850.0, 1200.0, 750.0, 1100.0, 750.0},
                {731550.0, 972950.0,0, 1200.0, 750.0, 1200.0, 100.0},
                {972950.0, 1016193.0, 2, 1200.0, 100.0, 1150.0, 50.0, 1150.0, 100.0},
                {1016193.0, 1063563.0, 2, 1150.0, 50.0, 1100.0, 100.0, 1150.0, 100.0},
                {1063563.0, 1315250.0,0, 1100.0, 100.0, 1100.0, 700.0},
                {1315250.0, 1322829.0, 2, 1100.0, 700.0, 1050.0, 750.0, 1050.0, 700.0},
                {1322829.0, 1737000.0,0, 1050.0, 750.0, 390.0, 750.0},
                {0.0, 240000.0, 0, 100.0, 225.0, 1100.0, 225.0},
                {1000000.0, 1240000.0, 0, 100.0, 625.0, 1100.0, 625.0},
//                // 圆弧区间(拐点116-115)新参数:圆心(1115,775)
//                {120000.0, 127500.0, 2, 60.0, 750.0, 10.0, 800.0, 60.0, 800.0}, // 修正终点坐标
//                {127500.0, 134900.0, 2, 10.0, 800.0, 60.0, 850.0, 60.0, 800.0},
//                {134900.0, 680103.0,0, 60.0, 850.0, 1100.0, 850.0},
//                {680103.0, 731550.0, 2, 1100.0, 850.0, 1200.0, 750.0, 1100.0, 750.0},
//                {731550.0, 972950.0,0, 1200.0, 750.0, 1200.0, 100.0},
//                {972950.0, 1016193.0, 2, 1200.0, 100.0, 1150.0, 50.0, 1150.0, 100.0},
//                {1016193.0, 1063563.0, 2, 1150.0, 50.0, 1100.0, 100.0, 1150.0, 100.0},
//                {1063563.0, 1315250.0,0, 1100.0, 100.0, 1100.0, 700.0},
//                {1315250.0, 1322829.0, 2, 1100.0, 700.0, 1050.0, 750.0, 1050.0, 700.0},
//                {1322829.0, 1737000.0,0, 1050.0, 750.0, 390.0, 750.0},
        };
        for (Object[] interval : intervals) {