自动化立体仓库 - WMS系统
#
zzgtfwq
3 天以前 f5c89a9b01b0cae70a7e0ccd878fb75121743929
src/main/java/com/zy/asrs/utils/Utils.java
@@ -208,6 +208,9 @@
     */
    public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) {
        int row = getRow(deepLoc);
        if (row==9 || row == 10){
            return deepLoc;
        }
        boolean deepLocLeft = isDeepLocLeft(slaveProperties, row);
        boolean deepLocRight = isDeepLocRight(slaveProperties, row);
        int targetRow;
@@ -234,6 +237,9 @@
     */
    public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) {
        int row = getRow(shallowLoc);
        if (row==9 || row == 10){
            return shallowLoc;
        }
        boolean deepLocLeft = isDeepLocLeft(slaveProperties, row-1);
        boolean deepLocRight = isDeepLocRight(slaveProperties, row+1);
        int targetRow;
@@ -264,6 +270,9 @@
     * 获取 浅库位排对应的深库位排
     */
    public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) {
        if (shallowRow==9 || shallowRow == 10){
            return shallowRow;
        }
        boolean deepLocLeft = isDeepLocLeft(slaveProperties, shallowRow-1);
        boolean deepLocRight = isDeepLocRight(slaveProperties, shallowRow+1);
        int targetRow;
@@ -357,6 +366,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 +400,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,11 +414,61 @@
                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;
    }
    //经典双伸库位
    public static int[] LocNecessaryParametersDoubleExtension(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};