自动化立体仓库 - WMS系统
#
zzgtfwq
1 天以前 8ea4c0fa09a08ec40e5f453bcde0fc7397b15b0d
src/main/java/com/zy/asrs/utils/Utils.java
@@ -357,6 +357,13 @@
        return false;
    }
    public static boolean BooleanWhsTypeSta(Integer whsType) {
        if (whsType == 1 || whsType == 2 || whsType == 5 || whsType==3 || whsType==4 || whsType == 9) {
            return true;
        }
        return false;
    }
    public static boolean BooleanWhsTypeSta(RowLastno rowLastno, Integer staDescId) {//站点路径更新
        if (rowLastno.getPointSwitch().equals("Y") && staDescId != 11 && staDescId != 111) {
            return true;
@@ -384,7 +391,8 @@
    public static int[] LocNecessaryParameters(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        switch (rowLastno.getTypeId()) {
            case 1://经典双伸库位
                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //已完善
//                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
            case 2://经典单伸库位(2排货架)
                return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //已完善
            case 3://经典单双伸库位  左单右双(小单大双)
@@ -397,9 +405,59 @@
                return LocNecessaryParametersDoubleExtension6(rowLastno, curRow, crnNumber); //已完善
            case 7://平库  CTU库
                return LocNecessaryParametersDoubleExtension7(rowLastno, curRow, crnNumber); //已完善
            case 9://前双伸 后左单右双(小单大双)  港投定制
                return LocNecessaryParametersDoubleExtension9(rowLastno, curRow, crnNumber); //已完善
            default:
                return LocNecessaryParametersMove(rowLastno, curRow, crnNumber);//moveCrnNo
        }
    }
    public static int[] LocNecessaryParametersDoubleExtension9(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        necessaryParameters[0] = crnNumber; // 轮询次数
        //满板正常入库
        if (curRow.equals(14)) {
            necessaryParameters[1] = 1;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 2;    //nearRow  最浅库位排
        } else if (curRow.equals(11)) {
            necessaryParameters[1] = 4;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 3;    //nearRow  最浅库位排
        } else if (curRow.equals(10)) {
            necessaryParameters[1] = 14;    //curRow   最深库位排
            necessaryParameters[2] = 4;     //crnNo     堆垛机号
            necessaryParameters[3] = 13;    //nearRow  最浅库位排
        } else if (curRow.equals(9)) {
            necessaryParameters[1] = 11;    //curRow   最深库位排
            necessaryParameters[2] = 4;     //crnNo     堆垛机号
            necessaryParameters[3] = 12;    //nearRow  最浅库位排
        } else if (curRow.equals(8)) {
            necessaryParameters[1] = 10;    //curRow   最深库位排
            necessaryParameters[2] = 3;     //crnNo     堆垛机号
            necessaryParameters[3] = 10;    //nearRow  最浅库位排
        } else if (curRow.equals(5)) {
            necessaryParameters[1] = 9;    //curRow   最深库位排
            necessaryParameters[2] = 3;     //crnNo     堆垛机号
            necessaryParameters[3] = 9;    //nearRow  最浅库位排
        } else if (curRow.equals(4)) {
            necessaryParameters[1] = 8;    //curRow   最深库位排
            necessaryParameters[2] = 2;     //crnNo     堆垛机号
            necessaryParameters[3] = 7;    //nearRow  最浅库位排
        } else if (curRow.equals(1)) {
            necessaryParameters[1] = 5;    //curRow   最深库位排
            necessaryParameters[2] = 2;     //crnNo     堆垛机号
            necessaryParameters[3] = 6;    //nearRow  最浅库位排
        } else {
            necessaryParameters[1] = 1;    //curRow   最深库位排
            necessaryParameters[2] = 1;     //crnNo     堆垛机号
            necessaryParameters[3] = 2;    //nearRow  最浅库位排
        }
        return necessaryParameters;
    }
    //经典双伸库位
@@ -425,12 +483,12 @@
            }
            if ((curRow - (sRow-1)) % 4 == 0) {
                necessaryParameters[1] = curRow;    //curRow   最深库位排
                necessaryParameters[2] = (curRow - sRow + 2) / 4 + sCrnNo - 1;     //crnNo     堆垛机号
                necessaryParameters[3] = curRow + 1;    //nearRow  最浅库位排
                necessaryParameters[2] = (curRow - (sRow-1)) / 4 + sCrnNo - 1;     //crnNo     堆垛机号
                necessaryParameters[3] = curRow - 1;    //nearRow  最浅库位排
            } else if ((curRow - (sRow-1)-1) % 4 == 0) {
                necessaryParameters[1] = curRow;    //curRow   最深库位排
                necessaryParameters[2] = (curRow - sRow + 1) / 4 + sCrnNo - 1;     //crnNo     堆垛机号
                necessaryParameters[3] = curRow - 1;    //nearRow  最浅库位排
                necessaryParameters[2] = (curRow - (sRow-1)-1) / 4 + sCrnNo;     //crnNo     堆垛机号
                necessaryParameters[3] = curRow + 1;    //nearRow  最浅库位排
            } else {
                throw new CoolException("库位排号异常:排号:" + curRow);
            }