查询优化

This commit is contained in:
2026-04-23 15:18:39 +08:00
parent 746cb57619
commit c2eeffa0de
16 changed files with 223 additions and 143 deletions
+5 -5
View File
@@ -18,10 +18,10 @@ namespace BLL
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.RealName_LeavePost> getLeavePosts = from x in Funs.DB.RealName_LeavePost select x;
///// <summary>
///// 定义变量
///// </summary>
//private static IQueryable<Model.RealName_LeavePost> getLeavePosts = from x in Funs.DB.RealName_LeavePost select x;
/// <summary>
/// 获取分页列表
@@ -31,7 +31,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string states, string projectCode, string personName, string identityCard, Grid Grid1)
{
IQueryable<Model.RealName_LeavePost> getLeavePostList = getLeavePosts;
IQueryable<Model.RealName_LeavePost> getLeavePostList = from x in Funs.DB.RealName_LeavePost select x;
if (states == "1")
{
getLeavePostList = getLeavePostList.Where(x => x.OutTime.HasValue);