| | |
| | | |
| | | |
| | | private readonly static object _locker_FL = new object(); |
| | | static List<LocationCache> locationCaches_FL= new List<LocationCache>(); |
| | | static List<LocationCache> locationCaches_FL = new List<LocationCache>(); |
| | | /// <summary> |
| | | /// 板材仓货位分配 |
| | | /// </summary> |
| | |
| | | |
| | | |
| | | //未定义类型的空货位 |
| | | List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList(); |
| | | List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenByDescending(x => x.Column).ThenBy(x => x.Row).ToList(); |
| | | |
| | | List<Dt_LocationInfo> definedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList(); |
| | | |
| | | if (heightType == 1) |
| | | { |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList(); |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer > 7).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer > 7).ToList(); |
| | | } |
| | | else if (heightType == 2) |
| | | if (undefinedTypeEmptyLocations == null) |
| | | { |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 13).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 13).ToList(); |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList(); |
| | | } |
| | | else if (heightType == 3) |
| | | if (heightType == 2) |
| | | { |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 4).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 4).ToList(); |
| | | undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList(); |
| | | definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList(); |
| | | } |
| | | |
| | | //else |
| | | //{ |
| | | // undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => false).ToList(); |