33
schangxiang@126.com
2024-12-07 9597b1df912c1ca4401a74970d9472e268b3a9c2
CC/iWareSql/DataAccess/StationHandlerV2.cs
@@ -190,11 +190,14 @@
                    int placeType = TCSCommon.GetPlaceTypeByWidthLength(upiObj, upiObj.Length, upiObj.Width, ref usePlaceTypeList);
                    //优先查询
                    var my_emptyStationList = emptyStationList.Where(x => usePlaceTypeList.Contains(x.PlaceType)).OrderBy(x => x.PlaceType).ToList();
                    //重新排序
                    my_emptyStationList = my_emptyStationList.OrderBy(x => x.LaneNo).ThenBy(x => x.LayerNo).ThenBy(x => x.ColumnNo).ToList();
                    //分组排序
                    if (my_emptyStationList?.Count() > 0)
                    {
                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(my_emptyStationList.First().Id, edm);
                        var gg = my_emptyStationList.GroupBy(x => x.PlaceType).OrderBy(x => x.Key);
                        var fistGG = gg.First();
                        //重新排序
                        var new_List = fistGG.ToList().OrderBy(x => x.LaneNo).ThenBy(x => x.ColumnNo).ToList();
                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(new_List.First().Id, edm);
                        return toPlace;
                    }
                    else