From ec3daa05f122738f18d4474b9257e4cf794dc5cf Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期五, 06 三月 2026 10:36:01 +0800
Subject: [PATCH] 接口新增
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 42 +++++-------------------------------------
1 files changed, 5 insertions(+), 37 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
index e2fe74b..575d393 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/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;
}
@@ -147,11 +115,11 @@
// 閽堝甯冨皵绫诲瀷瀛楁杩涜绮剧‘鏌ヨ
if (searchParametersList[i].Value.ToLower() == "true" || searchParametersList[i].Value.ToLower() == "false")
{
- where += $" and {searchParametersList[i].Name} = '{searchParametersList[i].Value.ToLower()}'";
+ where += $" and [{searchParametersList[i].Name}] = '{searchParametersList[i].Value.ToLower()}'";
}
else
{
- where += $" and {searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
+ where += $" and [{searchParametersList[i].Name}] like '%{searchParametersList[i].Value}%'";
}
}
}
--
Gitblit v1.9.3