自动化立体仓库 - WMS系统
#1
dubin
2025-10-30 5ee8d702138b67a8070e850ba622aa4b07d64fb9
src/main/java/com/zy/common/service/CommonService.java
@@ -206,7 +206,7 @@
        }
        if (signRule1) {
            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_type2",locTypeDto.getLocType2()));
            for (LocMast locMast1 : locMasts) {
                if (VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
@@ -260,7 +260,7 @@
        // 靠近摆放规则 --- 空托 //互通版
        if (staDescId == 10) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow));
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow).eq("loc_type2",locTypeDto.getLocType2()));
            if (locMasts.size() > 0) {
                for (LocMast loc : locMasts) {
                    if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) {
@@ -318,29 +318,29 @@
        if (Cools.isEmpty(locMast) && crnNo != 0) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type2",locTypeDto.getLocType2()));
            List<LocMast> locMastList = new ArrayList<>();
            locMasts.sort(new Comparator<LocMast>() {
                @Override
                public int compare(LocMast o1, LocMast o2) {
                    int b1 = o1.getBay1();
                    int b2 = o2.getBay1();
                    if (o1.getBay1() >= 15) {
                        b1 = Math.abs(15 - o1.getBay1());
                    }
                    if (o2.getBay1() >= 15) {
                        b2 = Math.abs(15 - o2.getBay1());
                    }
                    return b2 - b1;
                }
            });
//            locMasts.sort(new Comparator<LocMast>() {
//                @Override
//                public int compare(LocMast o1, LocMast o2) {
//                    int b1 = o1.getBay1();
//                    int b2 = o2.getBay1();
//                    if (o1.getBay1() >= 15) {
//                        b1 = Math.abs(15 - o1.getBay1());
//                    }
//                    if (o2.getBay1() >= 15) {
//                        b2 = Math.abs(15 - o2.getBay1());
//                    }
//                    return b2 - b1;
//                }
//            });
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    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;
                LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("loc_type2",locTypeDto.getLocType2()));
                if (Cools.isEmpty(locMast2)) {
                    locMast = locMast1;
                    break;
                }
            }