From 5697b0975497ab1886a43ee07145084b00077c7e Mon Sep 17 00:00:00 2001 From: liangzhou <594755172@qq.com> Date: Tue, 4 Mar 2025 21:48:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E4=BD=8D=E5=AF=BB=E6=89=BE=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/app/service/impl/AppLocationServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLocationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLocationServiceImpl.java index 24599213..4193810b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLocationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/app/service/impl/AppLocationServiceImpl.java @@ -124,8 +124,10 @@ public class AppLocationServiceImpl implements IAppLocationService { AppLocation resultLocation = null; // 可用库位列表 List availableLocationList = appLocationList.stream().filter(item -> - item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0).sorted(Comparator - .comparingInt(AppLocation::getwCol).thenComparingInt(AppLocation::getwLayer).thenComparingInt(AppLocation::getwDepth)).collect(Collectors.toList()); + item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0) + .sorted(Comparator.comparingInt(AppLocation::getwDepth).reversed()) + .sorted(Comparator.comparingInt(location -> location.getwCol() + location.getwLayer())) + .collect(Collectors.toList()); // 排序 for (AppLocation appLocation : availableLocationList) { if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {