From 414f272bac3f455d23a0da75cc7a308b95d23567 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 14 二月 2023 10:43:29 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java index 4d0af43..5ff2572 100644 --- a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java @@ -63,7 +63,7 @@ @Override public Boolean isOutMost(String locNo, Boolean pakin) { - return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutLayerRow(locNo, true); + return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutLayerRow(locNo, pakin); } public static void main(String[] args) { @@ -82,24 +82,30 @@ } else { throw new RuntimeException("搴撲綅瑙f瀽寮傚父"); } + LocMast result = null; // 鍏ュ簱澶栧眰搴撲綅婊炵┖ for (int i = 0; i<locNos.size() - 1; i++) { LocMast locMast = this.selectById(locNos.get(i)); if (locMast.getLocSts().equals("O")) { if (i == 0) { - return locMast; + result = locMast; } else { LocMast lastLoc = this.selectById(locNos.get(i - 1)); if (lastLoc.getLocSts().equals("F") || lastLoc.getLocSts().equals("D") || lastLoc.getLocSts().equals("S") || lastLoc.getLocSts().equals("X")) { - return locMast; - } else { - break; + if (result == null) { + result = locMast; + } } + } + } else if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") + || locMast.getLocSts().equals("P") || locMast.getLocSts().equals("R")) { + if (result != null) { + result = null; } } } - return null; + return result; } @Override -- Gitblit v1.9.1