查询优化

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
@@ -21,10 +21,10 @@ namespace BLL
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.Check_CheckEquipment> qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x;
///// <summary>
///// 定义变量
///// </summary>
//private static IQueryable<Model.Check_CheckEquipment> qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x;
/// <summary>
/// 获取分页列表
@@ -35,7 +35,7 @@ namespace BLL
public static IEnumerable getListData(string projectId, string userId, string roleId, int startRowIndex, int maximumRows)
{
Model.SGGLDB db = Funs.DB;
IQueryable<Model.Check_CheckEquipment> q = qq;
IQueryable<Model.Check_CheckEquipment> q = from x in db.Check_CheckEquipment orderby x.CompileDate descending select x;
if (!string.IsNullOrEmpty(projectId))
{
q = q.Where(e => e.ProjectId == projectId);
+4 -4
View File
@@ -22,10 +22,10 @@ namespace BLL
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.Check_Design> qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x;
///// <summary>
///// 定义变量
///// </summary>
//private static IQueryable<Model.Check_Design> qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x;
public static string CovBool(bool? b)
@@ -399,11 +399,11 @@ namespace BLL
else
return null;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.Check_TechnicalContactList> qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x;
///// <summary>
///// 定义变量
///// </summary>
//private static IQueryable<Model.Check_TechnicalContactList> qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x;
/// <summary>
/// 获取分页列表
/// </summary>