#
cp
2025-06-19 e64b1d5ec0b3ca0c42048903f4ab5f9d588349e8
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/CommonService.java
@@ -160,7 +160,7 @@
            List<LocMast> locMasts = locMastService.queryFreeLocMast2(locTypeDto.getLocType1(), locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd(), hostId,WHS_TYPE);
            for (LocMast locMast0 : locMasts) {
                //预留空库位
                if (locMastService.checkEmptyCount(locMast0, 10, hostId)) {
                if (locMastService.checkEmptyCount(locMast0, 5, hostId)) {
                    return locMast0;
                }
            }
@@ -321,7 +321,10 @@
        LambdaQueryWrapper<LocMast> wrapper1 = new LambdaQueryWrapper<LocMast>()
                .eq(LocMast::getLocSts, "O")
                .eq(LocMast::getHostId, hostId)
                .in(LocMast::getRow1, curRow)
                .eq(LocMast::getLocType1, locTypeDto.getLocType1())
                .le(LocMast::getRow1, eRow)
                .ge(LocMast::getRow1, sRow)
//                .in(LocMast::getRow1, curRow)
                .orderByAsc(LocMast::getLev1)
                .orderByAsc(LocMast::getBay1);
@@ -340,18 +343,43 @@
        for (LocMast mast : locMasts) {
            LocMast innerLoc = null;
            for (String loc : Utils.getGroupLoc(mast.getLocNo(), hostId)) {
                //1 2
                LocMast one = locMastService.getOne(new LambdaQueryWrapper<LocMast>().eq(LocMast::getLocNo, loc).eq(LocMast::getHostId, hostId));
                if (!one.getLocSts().equals("O")) {
                    innerLoc = null;
//                    innerLoc = null;
                    continue;
                }
                if (innerLoc == null) {
                    List<Integer> innerDeepRow = locDirectionService.getInnerDeepRow(hostId);
                    if (innerDeepRow.contains(one.getRow1())) {
                        innerLoc = one;
                if(Utils.getRow(one.getLocNo())==2){
                    LocMast locMast1=locMastService.getOne(new LambdaQueryWrapper<LocMast>()
                            .eq(LocMast::getRow1, 1)
                            .eq(LocMast::getBay1,one.getBay1())
                            .eq(LocMast::getLev1,one.getLev1())
                            .eq(LocMast::getHostId, hostId));
                    if(!locMast1.getLocSts().equals("F")){
                        continue;
                    }else if (locMast1.getLocSts().equals("O")){
                        one=locMast1;
                    }
                }else if(Utils.getRow(one.getLocNo())==3){
                    LocMast locMast1=locMastService.getOne(new LambdaQueryWrapper<LocMast>()
                            .eq(LocMast::getRow1, 4)
                            .eq(LocMast::getBay1,one.getBay1())
                            .eq(LocMast::getLev1,one.getLev1())
                            .eq(LocMast::getHostId, hostId));
                    if(!locMast1.getLocSts().equals("F")){
                        continue;
                    }else if (locMast1.getLocSts().equals("O")){
                        one=locMast1;
                    }
                }
                innerLoc = one;
//                if (innerLoc == null) {
//                    List<Integer> innerDeepRow = locDirectionService.getInnerDeepRow(hostId);
////                    if (innerDeepRow.contains(one.getRow1())) {
//                    innerLoc = one;
////                    }
//                }
            }
            if(innerLoc == null) {