qinchulong
2025-03-08 73e0e7c3886bc88e7ed37db24d28d8f6d159f1c0
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_WMSPart/LocationInfoService.cs
@@ -74,7 +74,7 @@
                List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
                for (int i = 1; i < 38; i++)
                {
                    for (int a = 1; a < 7; a++)
                    for (int a = 1; a < 12; a++)
                    {
                        for (int g = 1; g < 3; g++)
                        {
@@ -134,6 +134,26 @@
                    }
                    location = locations[0];
                }
                if (location!=null)
                {
                    //查找相邻的库位
                    Dt_LocationInfo Towlocation = new Dt_LocationInfo();
                    var Onelocation = BaseDal.QueryFirst(v => v.LocationCode == location.LocationCode);
                    if (Onelocation.Depth == 1)
                    {
                        Towlocation = BaseDal.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 2);
                    }
                    else
                    {
                        Towlocation = BaseDal.QueryFirst(v => v.Row == Onelocation.Row && v.Column == Onelocation.Column && v.Depth == 1);
                    }
                    location.LocationStatus = (int)LocationStatusEnum.Lock;
                    Towlocation.LocationStatus = (int)LocationStatusEnum.Lock;
                    BaseDal.UpdateData(location);
                    BaseDal.UpdateData(Towlocation);
                }
            }
            catch (Exception ex)
            {