#
Junjie
2024-05-24 4dcdd93603aad2ab27ee4976a6dd7b5d47dd5da4
zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/CommonService.java
@@ -228,6 +228,13 @@
                throw new CoolException("入库路径不存在");
            }
            //找相同空托盘
            LambdaQueryWrapper<LocMast> wrapper0 = new LambdaQueryWrapper<LocMast>()
                    .eq(LocMast::getLocSts, "D")
                    .eq(LocMast::getLocType1, locTypeDto.getLocType1())
                    .eq(LocMast::getCrnNo, staDesc.getDeviceNo())
                    .eq(LocMast::getHostId, hostId);
            LambdaQueryWrapper<LocMast> wrapper1 = new LambdaQueryWrapper<LocMast>()
                    .eq(LocMast::getLocSts, "O")
                    .eq(LocMast::getLocType1, locTypeDto.getLocType1())
@@ -245,6 +252,18 @@
                wrapper1.le(LocMast::getLev1, locRangeDto.getTargetLev());
            }
            List<LocMast> locMasts0 = locMastService.list(wrapper0);
            if (!locMasts0.isEmpty()) {
                for (LocMast loc : locMasts0) {
                    LocMast locMast0 = locMastService.findNearloc(loc.getLocNo(), hostId, locRangeDto);
                    if (null != locMast0) {
                        locMast = locMast0;
                        break;
                    }
                }
            }
            if (locMast == null) {
            List<LocMast> locMasts = locMastService.list(wrapper1);
            if (!locMasts.isEmpty()) {
                for (LocMast loc : locMasts) {
@@ -255,6 +274,7 @@
                    }
                }
            }
            }
            if (locMast == null) {
                throw new CoolException("缺少空库位");