自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-12-08 b9bcd8b66f99d4fae15ae6e2e9fad63c0f415050
src/main/java/com/zy/common/service/CommonService.java
@@ -114,11 +114,11 @@
        int end = 30;
        int dualCrnNo;
        switch (sourceStaNo) {
            case 107:
            case 203:
                whsType = 1;
                dualCrnNo = 2;
                break;
            case 118:
            case 102:
                whsType = 2;
                start = 31;
                end = 32;
@@ -277,6 +277,14 @@
            if (whsType == 1) {
                List<Integer> rows = Utils.getGroupLoc(curRow);
//                Iterator<Integer> iterator = rows.iterator();
//                while (iterator.hasNext()) {
//                    Integer next = iterator.next();
//                    if (next.equals(17) || next.equals(18)) {
//                        iterator.remove();
//                    }
//                }
                List<LocMast> locMasts = locMastService.queryFreeLocMast(rows, rows.size(), locTypeDto.getLocType1());
                if (!Cools.isEmpty(locMasts)) {
                    Integer innermostRow = Utils.getOutLayerRow(locMasts.get(0).getLocNo(), false);
@@ -292,7 +300,37 @@
//                locMast = null;
//            }
            } else {
                if (Utils.isShallowLoc(slaveProperties, curRow)) {
                    Integer deepRow = Utils.getDeepRow(slaveProperties, curRow);
                    locMast = locMastService.queryFreeLocMast0(deepRow, locTypeDto.getLocType1());
                    // 因库位移转、需预留空库位
                    if (locMast !=null && !locMastService.checkEmptyCount(locMast)) {
                        locMast = null;
                    }
                }
                if (Cools.isEmpty(locMast)) {
                    locMast = locMastService.queryFreeLocMast0(curRow, locTypeDto.getLocType1());
                    // 因库位移转、需预留空库位
                    if (!locMastService.checkEmptyCount(locMast)) {
                        locMast = null;
                    }
                    // 目标库位 ===>> 浅库位, 则校验其深库位是否为 F D X
                    if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) {
                        LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo()));
                        if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) {
                            locMast = null;
                        }
                    }
                    // 目标库位 ===>> 深库位, 则校验其浅库位是否为 O
                    if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) {
                        LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo()));
                        if (!shallowLoc.getLocSts().equals("O")) {
                            locMast = null;
                        }
                    }
                }
            }
        }