Commit c40a570d5bca4ada030adbb913d322f4f025b097

Authored by 谭毅彬
1 parent 0a49b549

统一在locationAllocationService.getRoadWay中打乱巷道获取顺序

Signed-off-by: TanYibin <5491541@qq.com>
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... ... @@ -135,7 +135,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
135 135 if (roadWays == null || roadWays.size() == 0) {
136 136 throw new JeecgBootException("分配库位时, 可用巷道为空");
137 137 }
138   - Collections.shuffle(roadWays);
  138 +// Collections.shuffle(roadWays);
139 139 Integer roadWay = locationAllocationService.getRoadWay(roadWays, materialCode, zoneCode, warehouseCode);
140 140 // 优先找外侧库位
141 141 LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
... ... @@ -215,7 +215,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
215 215 if (roadWays == null || roadWays.size() == 0) {
216 216 throw new JeecgBootException("分配库位时, 可用巷道为空");
217 217 }
218   - Collections.shuffle(roadWays);
  218 +// Collections.shuffle(roadWays);
219 219 Integer roadWay = locationAllocationService.getRoadWay(roadWays, materialCode, zoneCode, warehouseCode);
220 220 LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
221 221 locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay)
... ... @@ -319,7 +319,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
319 319 if (roadWays == null || roadWays.size() == 0) {
320 320 throw new JeecgBootException("分配库位时, 巷道为空");
321 321 }
322   - Collections.shuffle(roadWays);
  322 + Collections.shuffle(roadWays);// 打乱巷道排序
323 323 int roadWay = roadWays.get(0);
324 324 if (roadWays.size() == 1) {
325 325 return roadWay;
... ...