自动化立体仓库 - WMS系统
#1
lsh
2 天以前 04d820b5444d73570ce8ea654c4b64bf90a39840
src/main/java/com/zy/common/service/CommonService.java
@@ -160,7 +160,7 @@
            throw new CoolException("数据异常,请联系管理员");
        }
        // ===============>>>> 开始执行
        if (sourceStaNo == 118 || sourceStaNo == 122){
        if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
            curRow = rowLastno.getCurrentRow1();
        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
            curRow = rowLastno.getCurrentRow2();
@@ -178,7 +178,7 @@
        }
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i < crnNumber*2; i++) {
        for (int i = times; i < crnNumber*4; i++) {
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber);
            curRow = locNecessaryParameters[1];
            crnNo = locNecessaryParameters[2];
@@ -230,7 +230,7 @@
                        if (locMast2.getCrnNo()==1 || locMast2.getCrnNo()==6){
                            continue;
                        }
                        if (sourceStaNo == 118 || sourceStaNo == 122){
                        if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
                            if (locMast2.getCrnNo()>3){
                                continue;
                            }
@@ -262,7 +262,7 @@
                        if (shallowLoc.getCrnNo()==1 || shallowLoc.getCrnNo()==6){
                            continue;
                        }
                        if (sourceStaNo == 118 || sourceStaNo == 122){
                        if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
                            if (shallowLoc.getCrnNo()>3){
                                continue;
                            }
@@ -355,7 +355,7 @@
        // 更新库位排号
        if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
            if (sourceStaNo == 118 || sourceStaNo == 122){
            if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
                rowLastno.setCurrentRow1(curRow);
            } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                rowLastno.setCurrentRow2(curRow);
@@ -423,7 +423,7 @@
        // 递归查询
        if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) {
            // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归
            if (times < rowCount) {
            if (times < rowCount*4) {
                times = times + 1;
                return getLocNoRun(1, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times);
            }
@@ -491,7 +491,7 @@
            throw new CoolException("数据异常,请联系管理员");
        }
        // ===============>>>> 开始执行
        if (sourceStaNo == 118 || sourceStaNo == 122){
        if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
            curRow = rowLastno.getCurrentRow1();
        } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
            curRow = rowLastno.getCurrentRow2();
@@ -509,7 +509,7 @@
        }
        //此程序用于优化堆垛机异常时的运行时间
        for (int i = times; i < crnNumber; i++) {
        for (int i = times; i < crnNumber*4; i++) {
            int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber);
            curRow = locNecessaryParameters[1];
            crnNo = locNecessaryParameters[2];
@@ -671,7 +671,7 @@
        // 更新库位排号
        if (Utils.BooleanWhsTypeSta(whsType, staDescId) && Cools.isEmpty(locMast)) {
            if (sourceStaNo == 118 || sourceStaNo == 122){
            if (sourceStaNo == 118 || sourceStaNo == 122 || sourceStaNo == 1901){
                rowLastno.setCurrentRow1(curRow);
            } else if (sourceStaNo == 120 || sourceStaNo == 121 || sourceStaNo == 123 || sourceStaNo == 171){
                rowLastno.setCurrentRow2(curRow);
@@ -685,7 +685,11 @@
        // 1.按规则查找库位
        if (Cools.isEmpty(locMast) && crnNo != 0) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true));
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O")
                    .orderBy("lev1",true).orderBy("bay1",true));
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
@@ -697,6 +701,35 @@
                    break;
                }
            }
            if (Cools.isEmpty(locMast)){
                for (LocMast locMast1 : locMasts) {
                    if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                        continue;
                    }
                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                            .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                    if (!Cools.isEmpty(locMast2)) {
                        locMast = locMast2;
                        break;
                    } else {
                        locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                .eq("loc_no", shallowLoc).eq("loc_sts", "F"));
                        if (!Cools.isEmpty(locMast2)) {
                            locMast = locMast1;
                            break;
                        } else {
                            locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("loc_no", shallowLoc).eq("loc_sts", "D"));
                            if (!Cools.isEmpty(locMast2)) {
                                locMast = locMast1;
                                break;
                            }
                        }
                    }
                }
            }
        }
        if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) {
@@ -706,7 +739,7 @@
        // 递归查询
        if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) {
            // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归
            if (times < rowCount) {
            if (times < rowCount*4) {
                times = times + 1;
                return getLocNoRun(1, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times,rgvNo);
            }