自动化立体仓库 - WMS系统
Junjie
2023-05-26 c9e446957405d666a3fb45d8cbfa434625fa960d
src/main/java/com/zy/common/service/CommonService.java
@@ -272,13 +272,18 @@
        List<LocMast> locMasts = locMastService.findOutMast(locTypeDto.getLocType1(), crnNos);
        for (LocMast locMast0 : locMasts) {
            //检测当前库位内侧其他库位是否为R或S(出入库预约状态)
            boolean flag = false;
            List<String> insideLoc = Utils.getGroupInsideLoc(locMast0.getLocNo());
            List<LocMast> insideLocMast = locMastService.selectByLocNos(insideLoc);
            for (LocMast mast : insideLocMast) {
                if (mast.getLocSts().equals("R") || mast.getLocSts().equals("S")) {
                    //R或S(出入库预约状态,不能选定这个外侧库位)
                    continue;
                    flag = true;
                    break;
                }
            }
            if (flag) {
                continue;
            }
            // 浅库位符合尺寸检测
@@ -299,8 +304,34 @@
    //低频类型,直接找混放区域
    private LocMast getLocNoStep4(LocTypeDto locTypeDto) {
        LocMast locMast = null;
        LocMast locMast0 = locMastService.findEmptyLowFrequencyLocMast(locTypeDto.getLocType1());
        if (locMast0 != null) {
        List<LocMast> locMasts = locMastService.findEmptyLowFrequencyLocMast(locTypeDto.getLocType1());
        for (LocMast locMast0 : locMasts) {
            //检测当前库位内侧其他库位是否为R或S(出入库预约状态)
            boolean flag = false;
            List<String> insideLoc = Utils.getGroupInsideLoc(locMast0.getLocNo());
            List<LocMast> insideLocMast = locMastService.selectByLocNos(insideLoc);
            for (LocMast mast : insideLocMast) {
                if (mast.getLocSts().equals("R") || mast.getLocSts().equals("S")) {
                    //R或S(出入库预约状态,不能选定这个外侧库位)
                    flag = true;
                    break;
                }
            }
            //检测当前库位外侧库位是否为O(空库位)
            List<String> outerLoc = Utils.getGroupOuterLoc(locMast0.getLocNo());
            List<LocMast> outerLocMast = locMastService.selectByLocNos(outerLoc);
            for (LocMast mast : outerLocMast) {
                if (!mast.getLocSts().equals("O")) {
                    //不是空库位,找下一个
                    flag = true;
                    break;
                }
            }
            if (flag) {
                continue;
            }
            // 浅库位符合尺寸检测
            if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) {
                // 浅库位对应堆垛机必须可用且无异常