wangxinhui
23 小时以前 2c889b38311883ceb703c4e0034c798fdaa2e21c
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs
@@ -465,10 +465,52 @@
            for (int j = location.Depth + 1; j <= maxDepth; j++)
            {
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row + 1));
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                #region æµ‹è¯•架、PP判断同组货位
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 2 || row == 5))
                {
                    locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                }
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 2);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 2);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                }
                #endregion
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);
@@ -478,10 +520,41 @@
            for (int j = location.Depth - 1; j >= 1; j--)
            {
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row -1));
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                #region æµ‹è¯•架、PP判断同组货位
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 2);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 2);
                    }
                }
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 2 || row == 5))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                #endregion
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);
@@ -505,10 +578,52 @@
            for (int j = location.Depth + 1; j <= maxDepth; j++)
            {
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                #region æµ‹è¯•架、PP判断同组货位
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 2 || row == 5))
                {
                    locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                }
                if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 2);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 2);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                }
                #endregion
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);
@@ -518,10 +633,41 @@
            for (int j = location.Depth - 1; j >= 1; j--)
            {
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1));
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4))
                #region æµ‹è¯•架、PP判断同组货位
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2));
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 2);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 2);
                    }
                }
                if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 2 || row == 5))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                if (j == 2 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6))
                {
                    if (row <= maxDepth)
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row <= maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row + 1);
                    }
                    else
                    {
                        locationInfo = locationInfos.FirstOrDefault(x => x.Row > maxDepth && x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row - 1);
                    }
                }
                #endregion
                if (locationInfo != null)
                {
                    groupLocations.Add(locationInfo);