From c40a570d5bca4ada030adbb913d322f4f025b097 Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Sun, 8 Oct 2023 09:13:51 +0800
Subject: [PATCH] 统一在locationAllocationService.getRoadWay中打乱巷道获取顺序

---
 huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
index 00cd2a4..9d8a609 100644
--- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
+++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
@@ -135,7 +135,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService 
         if (roadWays == null || roadWays.size() == 0) {
             throw new JeecgBootException("分配库位时, 可用巷道为空");
         }
-        Collections.shuffle(roadWays);
+//        Collections.shuffle(roadWays);
         Integer roadWay = locationAllocationService.getRoadWay(roadWays, materialCode, zoneCode, warehouseCode);
         // 优先找外侧库位
         LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
@@ -215,7 +215,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService 
         if (roadWays == null || roadWays.size() == 0) {
             throw new JeecgBootException("分配库位时, 可用巷道为空");
         }
-        Collections.shuffle(roadWays);
+//        Collections.shuffle(roadWays);
         Integer roadWay = locationAllocationService.getRoadWay(roadWays, materialCode, zoneCode, warehouseCode);
         LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
         locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay)
@@ -319,7 +319,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService 
         if (roadWays == null || roadWays.size() == 0) {
             throw new JeecgBootException("分配库位时, 巷道为空");
         }
-        Collections.shuffle(roadWays);
+        Collections.shuffle(roadWays);// 打乱巷道排序
         int roadWay = roadWays.get(0);
         if (roadWays.size() == 1) {
             return roadWay;
--
libgit2 0.22.2