From 78ff339257ce087f672d2f52f64cbc502c6224be Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 15 十二月 2022 08:57:36 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 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 abc32af..a85ae4b 100644 --- a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java @@ -82,24 +82,31 @@ } 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; + if (result == null) { + result = locMast; + } } else { break; } } + } else if (locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D")) { + if (result != null) { + result = null; + } } } - return null; + return result; } @Override -- Gitblit v1.9.1