123
ZY
2025-05-10 d9c906634caef1128f0976b346c676f5c97032d6
src/main/java/com/zy/asrs/utils/Utils.java
@@ -87,11 +87,11 @@
     */
    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);
        if(row==9 ||  row==15 ){
//        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int shallowRow ;
        if(row==31){
            shallowRow = row + 1;
        }else if(row==12 ||  row==18 ){
        }else if(row==34){
            shallowRow = row - 1;
        }else {
            return null;
@@ -112,31 +112,17 @@
     */
    public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
        int row = getRow(shallowLoc);
//        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int targetRow;
        switch (row){
            case 10:
                targetRow = 9;
            case 32:
                targetRow = 31;
                break;
            case 11:
                targetRow = 12;
                break;
            case 16:
                targetRow = 15;
                break;
            case 17:
                targetRow = 18;
            case 33:
                targetRow = 34;
                break;
            default:
                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);
    }
@@ -144,11 +130,11 @@
     * 获取 浅库位排对应的深库位排
     */
    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) {
        if (shallowRow == 32) {
            targetRow = shallowRow - 1;
        } else if (remainder == 3) {
        } else if (shallowRow == 33) {
            targetRow = shallowRow + 1;
        } else {
            throw new RuntimeException(shallowRow + "不是浅库位排,系统繁忙");