刘磊
2025-06-25 2de09bec5cc05bf875543fa8956167ca7db73021
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -46,44 +46,12 @@
        public virtual PageGridData<TEntity> GetPageData(PageDataOptions options)
        {
            string wheres = ValidatePageOptions(options);
            string wheres = options.ValidatePageOptions(TProperties);
            //鑾峰彇鎺掑簭瀛楁
            Dictionary<string, OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
            Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(TProperties);
            PageGridData<TEntity> pageGridData = new PageGridData<TEntity>();
            //if (QueryRelativeExpression != null)
            //{
            //    queryable = QueryRelativeExpression.Invoke(queryable);
            //}
            //if (options.Export)
            //{
            //    queryable = queryable.GetIQueryableOrderBy(orderbyDic);
            //    if (Limit > 0)
            //    {
            //        queryable = queryable.Take(Limit);
            //    }
            //    pageGridData.rows = queryable.ToList();
            //}
            //else
            //{
            //    pageGridData.rows = repository.IQueryablePage(queryable,
            //                        options.Page,
            //                        options.Rows,
            //                        out int rowCount,
            //                        orderbyDic).ToList();
            //    pageGridData.total = rowCount;
            //    //鏌ヨ鐣岄潰缁熻姹傜瓑瀛楁
            //    if (SummaryExpress != null)
            //    {
            //        pageGridData.summary = SummaryExpress.Invoke(queryable);
            //        //Func<T, T> groupExpress = x =>x;
            //        //pageGridData.summary = queryable.GroupBy(groupExpress).Select(SummaryExpress).FirstOrDefault();
            //    }
            //}
            //GetPageDataOnExecuted?.Invoke(pageGridData);
            pageGridData = BaseDal.QueryPage
                (wheres, options.Page, options.Rows, orderbyDic);
            pageGridData = BaseDal.QueryPage(wheres, options.Page, options.Rows, orderbyDic);
            return pageGridData;
        }