*
lsh
2025-03-05 a4ee07370c382cebf1400b1c399df373b5784d49
src/main/java/com/zy/asrs/utils/Utils.java
@@ -89,6 +89,13 @@
        int row = getRow(deepLoc);
        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int shallowRow = remainder == 1 ? (row + 1) : (row - 1);
        if(row==31){
            shallowRow = row + 1;
        }else if(row==34){
            shallowRow = row - 1;
        }else {
            return null;
        }
        return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
    }
@@ -105,14 +112,16 @@
     */
    public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
        int row = getRow(shallowLoc);
        int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount());
        int targetRow;
        if (remainder == 2) {
            targetRow = row - 1;
        } else if (remainder == 3) {
            targetRow = row + 1;
        } else {
            throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
        switch (row){
            case 32:
                targetRow = 31;
                break;
            case 33:
                targetRow = 34;
                break;
            default:
                throw new RuntimeException(shallowLoc + "不是浅库位,系统繁忙");
        }
        return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
    }
@@ -164,6 +173,9 @@
    public static void main(String[] args) {
        SlaveProperties slaveProperties = new SlaveProperties();
        slaveProperties.setDoubleDeep(true);
        String aa = getDeepLoc(slaveProperties,"1604402");
        List<Integer> list = new ArrayList<>();
        list.add(1);list.add(4);list.add(5);list.add(8);list.add(9);list.add(12);
        slaveProperties.setDoubleLocs(list);