自动化立体仓库 - WMS系统
#
Junjie
2025-10-16 2f8dcd296b25a93b6dd2e5f98d1455883db1f57c
src/main/java/com/zy/common/service/CommonService.java
@@ -171,10 +171,14 @@
        List<String> locNos = locDetlService.getSameDetlList(findLocNoAttributeVo.getMatnr());
        for (String locNo : locNos) {
            //获取通道组
            List<Integer> locRowGroupDesc = Utils.getLocRowGroupDesc(slaveProperties, Utils.getRow(locNo));
            List<Integer> locRowGroupDesc = Utils.getLocGroupDesc(slaveProperties, locNo);
            for (Integer row : locRowGroupDesc) {
                String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                LocMast deepLoc = locMastService.selectById(deepLocNo);
                if (deepLoc == null) {
                    continue;
                }
                if (deepLoc.getLocSts().equals("F")) {
                    continue;
                } else if (deepLoc.getLocSts().equals("O")) {
@@ -194,6 +198,9 @@
            List<Integer> levList = basCrnpService.getLevList();
            Collections.shuffle(levList);
            List<Integer> locLevList = locMastService.getLevList();
            levList.addAll(locLevList);
            for (Integer lev : levList) {
                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                        .eq("loc_sts", "O")
@@ -202,12 +209,16 @@
                for (LocMast locMast : locMasts) {
                    String locNo = locMast.getLocNo();
                    //获取通道组
                    List<Integer> locRowGroupDesc = Utils.getLocRowGroupDesc(slaveProperties, Utils.getRow(locNo));
                    List<Integer> locRowGroupDesc = Utils.getLocGroupDesc(slaveProperties, locNo);
                    boolean flag = true;
                    for (Integer row : locRowGroupDesc) {
                        String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                        LocMast deepLoc = locMastService.selectById(deepLocNo);
                        if (deepLoc == null) {
                            continue;
                        }
                        if (!deepLoc.getLocSts().equals("O")) {
                            flag = false;
                            break;
@@ -215,10 +226,16 @@
                    }
                    if (flag) {
                        Integer firstRow = locRowGroupDesc.get(0);
                        String deepLocNo = Utils.getLocNo(firstRow, Utils.getBay(locNo), Utils.getLev(locNo));
                        LocMast deepLoc = locMastService.selectById(deepLocNo);
                        targetLocMast = deepLoc;
                        for (Integer row : locRowGroupDesc) {
                            String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                            LocMast deepLoc = locMastService.selectById(deepLocNo);
                            if (deepLoc == null) {
                                continue;
                            }
                            targetLocMast = deepLoc;
                            break;
                        }
                        break;
                    }
                }
@@ -241,10 +258,14 @@
        for (LocMast locMast : locMastsD) {
            String locNo = locMast.getLocNo();
            //获取通道组
            List<Integer> locRowGroupDesc = Utils.getLocRowGroupDesc(slaveProperties, Utils.getRow(locNo));
            List<Integer> locRowGroupDesc = Utils.getLocGroupDesc(slaveProperties, locNo);
            for (Integer row : locRowGroupDesc) {
                String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                LocMast deepLoc = locMastService.selectById(deepLocNo);
                if (deepLoc == null) {
                    continue;
                }
                if (deepLoc.getLocSts().equals("F")) {
                    continue;
                } else if (deepLoc.getLocSts().equals("O")) {
@@ -263,6 +284,9 @@
            List<Integer> levList = basCrnpService.getLevList();
            Collections.shuffle(levList);
            List<Integer> locLevList = locMastService.getLevList();
            levList.addAll(locLevList);
            for (Integer lev : levList) {
                //相近物料匹配失败,搜索可用空库位组
                List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
@@ -272,12 +296,16 @@
                for (LocMast locMast : locMasts) {
                    String locNo = locMast.getLocNo();
                    //获取通道组
                    List<Integer> locRowGroupDesc = Utils.getLocRowGroupDesc(slaveProperties, Utils.getRow(locNo));
                    List<Integer> locRowGroupDesc = Utils.getLocGroupDesc(slaveProperties, locNo);
                    boolean flag = true;
                    for (Integer row : locRowGroupDesc) {
                        String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                        LocMast deepLoc = locMastService.selectById(deepLocNo);
                        if (deepLoc == null) {
                            continue;
                        }
                        if (!deepLoc.getLocSts().equals("O")) {
                            flag = false;
                            break;
@@ -285,7 +313,16 @@
                    }
                    if (flag) {
                        targetLocMast = locMast;
                        for (Integer row : locRowGroupDesc) {
                            String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                            LocMast deepLoc = locMastService.selectById(deepLocNo);
                            if (deepLoc == null) {
                                continue;
                            }
                            targetLocMast = deepLoc;
                            break;
                        }
                        break;
                    }
                }