自动化立体仓库 - WMS系统
#
luxiaotao1123
2023-02-06 8f227a0901d120f6f364712800e7a5d5d985e908
src/main/java/com/zy/common/service/CommonService.java
@@ -211,21 +211,23 @@
        }
        // 库区锁定
        LocRule locRule = locRuleService.find(Cools.isEmpty(matNos) ? null : matNos.get(0), null, start, end);
        if (!Cools.isEmpty(locRule)) {
            List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1()
                    , locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
            for (LocMast one : locMasts) {
                List<String> groupLoc = Utils.getGroupLoc(one.getLocNo());
                LocMast locMast0 = locMastService.findOutMost(groupLoc);
                if (null != locMast0) {
                    // 浅库位符合尺寸检测
                    if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) {
                        // 浅库位对应堆垛机必须可用且无异常
                        if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) {
                            crnNo = locMast0.getCrnNo();
                            locMast = locMast0;
                            break;
        if (Cools.isEmpty(locMast)) {
            LocRule locRule = locRuleService.find(Cools.isEmpty(matNos) ? null : matNos.get(0), null, start, end);
            if (!Cools.isEmpty(locRule)) {
                List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1()
                        , locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd());
                for (LocMast one : locMasts) {
                    List<String> groupLoc = Utils.getGroupLoc(one.getLocNo());
                    LocMast locMast0 = locMastService.findOutMost(groupLoc);
                    if (null != locMast0) {
                        // 浅库位符合尺寸检测
                        if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) {
                            // 浅库位对应堆垛机必须可用且无异常
                            if (basCrnpService.checkSiteError(locMast0.getCrnNo(), true)) {
                                crnNo = locMast0.getCrnNo();
                                locMast = locMast0;
                                break;
                            }
                        }
                    }
                }
@@ -345,10 +347,8 @@
                }
            }
            // 因库位移转、需预留空库位 todo:luxiaotao
//            if (!locMastService.checkEmptyCount(locMast)) {
//                locMast = null;
//            }
            // 因库位移转、需预留空库位
            if (!locMastService.checkEmptyCount(locMast, 10)) { locMast = null; }
        }
        // 2.无库位时,无视区域锁定,重新查找库位