自动化立体仓库 - WMS系统
#
LSH
2023-10-25 cee9ae96ca3e2831ea659e8ccdc979f22b820ace
src/main/java/com/zy/asrs/utils/Utils.java
@@ -250,7 +250,12 @@
    //库位排号分配
    public static int[] LocNecessaryParameters(Integer whsType, Integer curRow, Integer crnNumber) {
        return LocNecessaryParametersDoubleExtension(whsType, curRow, crnNumber);
        switch (whsType){
            case 1://经典双伸库位
                return LocNecessaryParametersDoubleExtension(whsType, curRow, crnNumber);
            default:
                return LocNecessaryParametersMove(whsType, curRow, crnNumber);//moveCrnNo
        }
    }
    //经典双伸库位
@@ -288,6 +293,22 @@
        return necessaryParameters;
    }
    //移库
    public static int[] LocNecessaryParametersMove(Integer whsType, Integer curRow, Integer moveCrnNo) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        necessaryParameters[0] = 2; // 轮询次数
        if (curRow.equals(moveCrnNo*4-2)){
            necessaryParameters[1] = curRow+2;    //curRow   最深库位排
            necessaryParameters[2] = moveCrnNo;     //crnNo     堆垛机号
            necessaryParameters[3] = curRow+1;    //nearRow  最浅库位排
        }else {
            necessaryParameters[1] = curRow-2;    //curRow   最深库位排
            necessaryParameters[2] = moveCrnNo;     //crnNo     堆垛机号
            necessaryParameters[3] = curRow-1;    //nearRow  最浅库位排
        }
        return necessaryParameters;
    }
    public static void main(String[] args) {
        List<LocMast> locS = new ArrayList<LocMast>();