pan
2025-11-22 7bafd627066668f8162690890f106d00e18d7bcd
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -140,7 +140,7 @@
                List<string> lockLocationCodes = locationCaches.Select(x => x.LocationCode).ToList();
                Dictionary<string, OrderByType> orderBy = new Dictionary<string, OrderByType>()
                Dictionary<string, SqlSugar.OrderByType> orderBy = new Dictionary<string, OrderByType>()
                {
                    { nameof(Dt_LocationInfo.RoadwayNo),OrderByType.Asc },
                    { nameof(Dt_LocationInfo.Layer),OrderByType.Asc },
@@ -153,7 +153,11 @@
                if (first != null)
                {
                    locationCaches.Add(new LocationCache { LocationCode = first?.LocationCode, DateTime = DateTime.Now });
                }
                    Db.Updateable<Dt_LocationInfo>().SetColumns(x => new Dt_LocationInfo
                    {
                        LocationStatus = (int)LocationStatusEnum.InStockLock,
                    }).Where(x => x.Id == first.Id).ExecuteCommand();
                }
                return first;
            }
@@ -182,8 +186,10 @@
                };
                var first = BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode), orderBy);//查询空货位信息并排除5分钟内分配的货位,根据层、列、深度、行排序
                locationCaches.Add(new LocationCache { LocationCode = first.LocationCode, DateTime = DateTime.Now });
                if (first != null)
                {
                    locationCaches.Add(new LocationCache { LocationCode = first.LocationCode, DateTime = DateTime.Now });
                }
                return first;
            }