From 9856aeef001d66e34a11b98c58ee9722ab887dab Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 29 八月 2022 08:56:27 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 16 +++++-----------
1 files changed, 5 insertions(+), 11 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 1245184..b1f2189 100644
--- a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java
@@ -8,10 +8,10 @@
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.service.RowLastnoService;
import com.zy.asrs.utils.Utils;
+import com.zy.common.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@@ -53,22 +53,16 @@
}
@Override
- public Boolean isOutMost(String locNo) {
- return Integer.parseInt(locNo.substring(0, 2)) == Utils.getGroupRow(locNo);
+ public Boolean isOutMost(String locNo, Boolean pakin) {
+ return Integer.parseInt(locNo.substring(0, 2)) == Utils.getGroupRow(locNo, true);
}
@Override
public LocMast findOutMost(List<String> locNos) {
List<Integer> 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);}})
- ) {
+ if (!rows.retainAll(CommonService.FIRST_GROUP_ROW_LIST)) {
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);}})
- ) {
+ } else if (!rows.retainAll(CommonService.SECOND_GROUP_ROW_LIST)) {
locNos.sort((o1, o2) -> Integer.parseInt(o2.substring(0, 2)) - Integer.parseInt(o1.substring(0, 2)));
}
for (String locNo : locNos) {
--
Gitblit v1.9.1