dengjunjie
6 天以前 f56f8d4bf3bf088579a169519ef2547d40586f76
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/RGVLocationInfoService.cs
@@ -98,19 +98,19 @@
                    List<Dt_RGVLocationInfo> dt_RGVLocationInfos = BaseDal.QueryData(x => x.RoadwayNo == items.Key);//查找当前巷道号货位
                    if (item.LocationType == 1)
                    {
                        rGVLocationInfo = dt_RGVLocationInfos.Where(x => x.Depth < item.Depth && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt()).FirstOrDefault();//判断浅深度货位是否有货
                        rGVLocationInfo = dt_RGVLocationInfos.Where(x => x.Depth < item.Depth && x.LocationStatus != LocationStatusEnum.Free.ObjToInt()).FirstOrDefault();//判断浅深度货位是否有货
                        if (rGVLocationInfo != null) break;
                        return item;
                    }
                    else
                    {
                        rGVLocationInfo = dt_RGVLocationInfos.Where(x => x.Depth < item.Depth && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt()).OrderByDescending(x => x.Depth).FirstOrDefault();//判断浅深度货位是否有货
                        rGVLocationInfo = dt_RGVLocationInfos.Where(x => x.Depth < item.Depth && x.LocationStatus != LocationStatusEnum.Free.ObjToInt()).OrderByDescending(x => x.Depth).FirstOrDefault();//判断浅深度货位是否有货
                        if (rGVLocationInfo != null)
                        {
                            rGVLocationInfo = dt_RGVLocationInfos.Where(x => x.Depth > rGVLocationInfo.Depth && x.LocationStatus == LocationStatusEnum.Free.ObjToInt()).OrderBy(x => x.Depth).FirstOrDefault();
                            if (rGVLocationInfo != null)
                            {
                                if (dt_RGVLocationInfos.Where(x => x.Depth > rGVLocationInfo.Depth && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt()).Any()) rGVLocationInfo = null;
                                if (dt_RGVLocationInfos.Where(x => x.Depth > rGVLocationInfo.Depth && x.LocationStatus != LocationStatusEnum.Free.ObjToInt()).Any()) rGVLocationInfo = null;
                                else return rGVLocationInfo;
                            }
                        }