自动化立体仓库 - WMS系统
#1
dubin
2 天以前 9739f6cc03f34716a61a5f31237fbe310d9556e1
src/main/java/com/zy/common/service/CommonService.java
@@ -316,7 +316,14 @@
        // 1.按规则查找库位
        if (Cools.isEmpty(locMast) && crnNo != 0) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O"));
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type1",locTypeDto.getLocType1()));
            if (Cools.isEmpty(locMasts)){
                // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归
                if (times < rowCount) {
                    times = times + 1;
                    return getLocNo(1, staDescId, sourceStaNo, matnr, batch, grade, moveCrnNo, locTypeDto, times);
                }
            }
            List<LocMast> locMastList = new ArrayList<>();
            locMasts.sort(new Comparator<LocMast>() {
                @Override
@@ -338,11 +345,26 @@
                    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 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc));
                if (Cools.isEmpty(locMast2)){
                    continue;
                }
                if (locMast2.getLocSts().equals("P")||locMast2.getLocSts().equals("Q")||locMast2.getLocSts().equals("R")||locMast2.getLocSts().equals("S")){
                    continue;
                }
                if (!Cools.isEmpty(locMast2)&&locMast2.getLocSts().equals("O")){
                    locMast = locMast2;
                    break;
                }
                if (!Cools.isEmpty(locMast2)&&(locMast2.getLocSts().equals("F")||locMast2.getLocSts().equals("D"))){
                    locMast = locMast1;
                    break;
                }
//                LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc).eq("loc_sts", "O"));
//                if (Cools.isEmpty(locMast2)) {
//                    locMast = locMast1;
//                    break;
//                }
            }
        }