库位寻找策略修改
This commit is contained in:
parent
ec9df671e2
commit
5697b09754
|
|
@ -124,8 +124,10 @@ public class AppLocationServiceImpl implements IAppLocationService {
|
||||||
AppLocation resultLocation = null;
|
AppLocation resultLocation = null;
|
||||||
// 可用库位列表
|
// 可用库位列表
|
||||||
List<AppLocation> availableLocationList = appLocationList.stream().filter(item ->
|
List<AppLocation> availableLocationList = appLocationList.stream().filter(item ->
|
||||||
item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0).sorted(Comparator
|
item.getIsWorking() == 0 && item.getIsLock() == 0 && item.getLocationStatus() == 0)
|
||||||
.comparingInt(AppLocation::getwCol).thenComparingInt(AppLocation::getwLayer).thenComparingInt(AppLocation::getwDepth)).collect(Collectors.toList());
|
.sorted(Comparator.comparingInt(AppLocation::getwDepth).reversed())
|
||||||
|
.sorted(Comparator.comparingInt(location -> location.getwCol() + location.getwLayer()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
// 排序
|
// 排序
|
||||||
for (AppLocation appLocation : availableLocationList) {
|
for (AppLocation appLocation : availableLocationList) {
|
||||||
if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {
|
if (appLocation.getIsWorking() == 1 || appLocation.getIsLock() == 1 || appLocation.getLocationStatus() == 1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user