| | |
| | | Dt_LocationInfo undefinedTypeEmptyLocation = undefinedTypeEmptyLocations[i]; |
| | | Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType, palletTypeInfo); |
| | | //判断货位两深及以上是否存在出库锁定货位 |
| | | if (locationInfo?.Depth == 1) |
| | | { |
| | | Dt_LocationInfo? IsBebusyLocation = locationInfos.Where(x => x.Row == (locationInfo?.Row == 2 ? locationInfo?.Row - 1 : locationInfo?.Row + 1) && x.Column == locationInfo?.Column && x.Layer == locationInfo?.Layer).FirstOrDefault(); |
| | | if (IsBebusyLocation != null && (IsBebusyLocation.LocationStatus < LocationStatusEnum.InStock.ObjToInt())) |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | //if (locationInfo?.Depth == 1) |
| | | //{ |
| | | // Dt_LocationInfo? IsBebusyLocation = locationInfos.Where(x => x.Row == (locationInfo?.Row == 2 ? locationInfo?.Row - 1 : locationInfo?.Row + 1) && x.Column == locationInfo?.Column && x.Layer == locationInfo?.Layer).FirstOrDefault(); |
| | | // if (IsBebusyLocation != null && (IsBebusyLocation.LocationStatus < LocationStatusEnum.InStock.ObjToInt())) |
| | | // { |
| | | // continue; |
| | | // } |
| | | //} |
| | | if (locationInfo != null) |
| | | { |
| | | //UpdateLocationStatus(locationInfo, palletType, LocationStatusEnum.Lock, locationInfo.WarehouseId); |
| | |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Dt_LocationInfo undefinedTypeEmptyLocation = undefinedTypeEmptyLocations.FirstOrDefault(); |
| | | Dt_LocationInfo? locationInfo = GetUsableLocation_BC(locationInfos, undefinedTypeEmptyLocation, palletType, palletTypeInfo); |
| | | locationCaches_BC.Add(new LocationCache { LocationCode = locationInfo.LocationCode, DateTime = DateTime.Now }); |
| | | return locationInfo; |
| | | } |
| | | |
| | | } |
| | | return null; |