自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-10-24 8094fe926cc835f27b0d4d057783d1c15552cc57
#
1个文件已修改
31 ■■■■■ 已修改文件
src/main/java/com/zy/common/service/CommonService.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java
@@ -292,7 +292,38 @@
//                locMast = null;
//            }
            } else {
                if (Utils.isShallowLoc(slaveProperties, curRow)) {
                    Integer deepRow = Utils.getDeepRow(slaveProperties, curRow);
                    locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1());
                    // todo:luxiaotao 如果用浅排找到的深库位,那么则需要判断这个深库位对应的浅库位是否有货(F、X、D)
                    // 因库位移转、需预留空库位
                    if (locMast !=null && !locMastService.checkEmptyCount(locMast)) {
                        locMast = null;
                    }
                }
                if (Cools.isEmpty(locMast)) {
                    locMast = locMastService.queryFreeLocMast(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;
                        }
                    }
                }
            }
        }