自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-10-20 69c098271a9f52c2d57073eb9c150d0f8b672323
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -58,7 +58,7 @@
    @Override
    public Boolean isOutMost(String locNo, Boolean pakin) {
        return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutermostRow(locNo, true);
        return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutLayerRow(locNo, true);
    }
    @Override
@@ -99,22 +99,19 @@
        } else {
            rows = locNos.stream().map(item -> Integer.parseInt(item.substring(0, 2))).distinct().collect(Collectors.toList());
        }
//        if (!rows.retainAll(new ArrayList<Integer>() {{ add(1);add(2);add(3);}})
//                || !rows.retainAll(new ArrayList<Integer>() {{ add(8);add(9);add(10);add(11);}})
//                || !rows.retainAll(new ArrayList<Integer>() {{ add(15);add(16);add(17);add(18);}})
//        ) {
//            locNos.sort(Comparator.comparingInt(o -> Integer.parseInt(o.substring(0, 2))));
//        } else if (!rows.retainAll(new ArrayList<Integer>() {{ add(4);add(5);add(6);add(7);}})
//                || !rows.retainAll(new ArrayList<Integer>() {{ add(12);add(13);add(14);}})
//                || !rows.retainAll(new ArrayList<Integer>() {{ add(19);add(20);add(21);}})
//        ) {
//            locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2)));
//        }
        for (String locNo : locNos) {
            LocMast locMast = this.selectById(locNo);
        for (int i = 0; i<locNos.size(); i++) {
            LocMast locMast = this.selectById(locNos.get(i));
            if (locMast.getLocSts().equals("O")) {
                return locMast;
                if (i == 0) {
                    return locMast;
                } else {
                    LocMast lastLoc = this.selectById(locNos.get(i - 1));
                    if (lastLoc.getLocSts().equals("F") || lastLoc.getLocSts().equals("D")  || lastLoc.getLocSts().equals("X")) {
                        return locMast;
                    } else {
                        break;
                    }
                }
            }
        }
        return null;
@@ -127,8 +124,10 @@
        while (iterator.hasNext()) {
            String next = iterator.next();
            LocMast locMast = this.selectById(next);
            if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || !excludeLocNos.contains(locMast.getLocNo())) {
                continue;
            if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D")) {
                if (!excludeLocNos.contains(locMast.getLocNo())) {
                    continue;
                }
            }
            iterator.remove();
        }