From 0f02ab0168748ecdc075f904de35d1a71dc3fcc5 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 16 十二月 2022 10:33:44 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 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..5ff2572 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,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