查询优化
This commit is contained in:
parent
746cb57619
commit
c2eeffa0de
|
|
@ -20,10 +20,10 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.BS_Steel> qq = from x in Funs.DB.BS_Steel orderby x.STE_Code select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.BS_Steel> qq = from x in Funs.DB.BS_Steel orderby x.STE_Code select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取材质列表
|
||||
|
|
@ -36,7 +36,8 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable GetListData(string searchItem, string searchValue, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.BS_Steel> q = qq;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.BS_Steel> q = from x in db.BS_Steel orderby x.STE_Code select x;
|
||||
if (searchItem != "0")
|
||||
{
|
||||
if (!string.IsNullOrEmpty(searchValue))
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_Unit> getUnits = from x in Funs.DB.Bo_Sheng_Unit
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_Unit> getUnits = from x in Funs.DB.Bo_Sheng_Unit
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -35,7 +35,12 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getUnitListData(string projectId, string departName, string departCode, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_Unit> getDataList = getUnits.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
IQueryable<Model.Bo_Sheng_Unit> getDataList = from x in db.Bo_Sheng_Unit
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(departName))
|
||||
{
|
||||
|
|
@ -88,12 +93,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_Person> getPersons = from x in Funs.DB.Bo_Sheng_Person
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_Person> getPersons = from x in Funs.DB.Bo_Sheng_Person
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -103,7 +108,11 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_Person> getDataList = getPersons.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
IQueryable<Model.Bo_Sheng_Person> getDataList = from x in db.Bo_Sheng_Person
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(departName))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
|
||||
|
|
@ -198,12 +207,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_Train> getTrains = from x in Funs.DB.Bo_Sheng_Train
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_Train> getTrains = from x in Funs.DB.Bo_Sheng_Train
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -213,7 +222,10 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getTrainListData(string projectId, string trainType, string recordName, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_Train> getDataList = getTrains.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.Bo_Sheng_Train> getDataList = from x in db.Bo_Sheng_Train
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(trainType))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.TrainType.Contains(trainType));
|
||||
|
|
@ -280,12 +292,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_TrainPerson> getTrainPersons = from x in Funs.DB.Bo_Sheng_TrainPerson
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_TrainPerson> getTrainPersons = from x in Funs.DB.Bo_Sheng_TrainPerson
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -295,7 +307,10 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getTrainPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_TrainPerson> getDataList = getTrainPersons.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.Bo_Sheng_TrainPerson> getDataList = from x in db.Bo_Sheng_TrainPerson
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(departName))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
|
||||
|
|
@ -368,12 +383,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_Exam> getExams = from x in Funs.DB.Bo_Sheng_Exam
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_Exam> getExams = from x in Funs.DB.Bo_Sheng_Exam
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -383,7 +398,12 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getExamListData(string projectId, string qsnCode, string qsnContent, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_Exam> getDataList = getExams.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.Bo_Sheng_Exam> getDataList = from x in db.Bo_Sheng_Exam
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
|
||||
//IQueryable<Model.Bo_Sheng_Exam> getDataList = getExams.Where(x => x.ProjectId == projectId);
|
||||
|
||||
if (!string.IsNullOrEmpty(qsnCode))
|
||||
{
|
||||
|
|
@ -438,12 +458,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Bo_Sheng_PersonTrainRecord> getPersonTrainRecords = from x in Funs.DB.Bo_Sheng_PersonTrainRecord
|
||||
where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Bo_Sheng_PersonTrainRecord> getPersonTrainRecords = from x in Funs.DB.Bo_Sheng_PersonTrainRecord
|
||||
// where (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -453,7 +473,10 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getPersonTrainRecordListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.Bo_Sheng_PersonTrainRecord> getDataList = getPersonTrainRecords.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.Bo_Sheng_PersonTrainRecord> getDataList = from x in db.Bo_Sheng_PersonTrainRecord
|
||||
where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null)
|
||||
select x;
|
||||
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.DataBase_DataTypeProject> qq = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.DataBase_DataTypeProject> qq = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
|
|
@ -35,7 +35,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData(int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.DataBase_DataTypeProject> q = qq;
|
||||
IQueryable<Model.DataBase_DataTypeProject> q = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x;
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_BreakdownProject> qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.WBS_BreakdownProject> qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string projectId, string divisionProjectId, string name, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.WBS_BreakdownProject> q = qq;
|
||||
IQueryable<Model.WBS_BreakdownProject> q = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
q = q.Where(e => e.ProjectId == projectId);
|
||||
|
|
@ -105,10 +105,10 @@ namespace BLL
|
|||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_WBS> qq2 = from x in Funs.DB.View_WBS select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.View_WBS> qq2 = from x in Funs.DB.View_WBS select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目已选择的WBS列表
|
||||
|
|
@ -120,7 +120,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData2(string projectId, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.View_WBS> q = qq2;
|
||||
IQueryable<Model.View_WBS> q = from x in Funs.DB.View_WBS select x;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
q = q.Where(e => e.ProjectId == projectId);
|
||||
|
|
@ -164,7 +164,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_WBS_BreakdownProject> qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
//private static IQueryable<Model.View_WBS_BreakdownProject> qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
|
|
@ -176,7 +176,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData3(string projectId, string divisionProjectId, string name, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.View_WBS_BreakdownProject> q = qq3;
|
||||
IQueryable<Model.View_WBS_BreakdownProject> q = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
q = q.Where(e => e.ProjectId == projectId);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_Breakdown> qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
//private static IQueryable<Model.WBS_Breakdown> qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
|
|
@ -35,7 +35,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string divisionId, string name, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.WBS_Breakdown> q = qq;
|
||||
IQueryable<Model.WBS_Breakdown> q = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
if (!string.IsNullOrEmpty(divisionId))
|
||||
{
|
||||
q = q.Where(e => e.DivisionId == divisionId);
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_Division> qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.WBS_Division> qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
|
|
@ -35,7 +35,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getListData(int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.WBS_Division> q = qq;
|
||||
IQueryable<Model.WBS_Division> q = from x in Funs.DB.WBS_Division orderby x.SortIndex select x;
|
||||
count = q.Count();
|
||||
if (count == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.T_d_facerecord> qq = from x in Funs.DB.T_d_facerecord
|
||||
orderby x.DateTimeRecord descending
|
||||
select x;
|
||||
private static IQueryable<Model.T_d_validcardevent> qq1 = from x in Funs.DB.T_d_validcardevent
|
||||
orderby x.RecordDateTime descending
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.T_d_facerecord> qq = from x in Funs.DB.T_d_facerecord
|
||||
// orderby x.DateTimeRecord descending
|
||||
// select x;
|
||||
//private static IQueryable<Model.T_d_validcardevent> qq1 = from x in Funs.DB.T_d_validcardevent
|
||||
// orderby x.RecordDateTime descending
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -42,7 +42,10 @@ namespace BLL
|
|||
Model.SGGLDB db = Funs.DB;
|
||||
if (type == "1")
|
||||
{
|
||||
IQueryable<Model.T_d_validcardevent> q1 = qq1.Where(x => x.ProjectId == projectId);
|
||||
IQueryable<Model.T_d_validcardevent> q1 = from x in db.T_d_validcardevent
|
||||
where x.ProjectId == projectId
|
||||
orderby x.RecordDateTime descending
|
||||
select x;
|
||||
|
||||
if (!string.IsNullOrEmpty(startDate))
|
||||
{
|
||||
|
|
@ -88,7 +91,10 @@ namespace BLL
|
|||
}
|
||||
else
|
||||
{
|
||||
IQueryable<Model.T_d_facerecord> q = qq.Where(x => x.ProjectId == projectId);
|
||||
IQueryable<Model.T_d_facerecord> q = from x in db.T_d_facerecord
|
||||
where x.ProjectId == projectId
|
||||
orderby x.DateTimeRecord descending
|
||||
select x;
|
||||
if (type == "2")
|
||||
{
|
||||
q = q.Where(e => e.RoleID == "微信端");
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 数据列表
|
||||
|
|
@ -49,7 +49,7 @@ namespace BLL
|
|||
public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.Check_ProjectLeaderCheck> getDataList = getDataLists;
|
||||
IQueryable<Model.Check_ProjectLeaderCheck> getDataList = from x in db.Check_ProjectLeaderCheck select x;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in Funs.DB.View_SitePerson_Person
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.View_SitePerson_Person> getDataLists = from x in Funs.DB.View_SitePerson_Person
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
/// 数据列表
|
||||
|
|
@ -42,6 +42,7 @@ namespace BLL
|
|||
public static IEnumerable getListData(string projetcId, string unitId, string workPostId, string name, string idCard, string states, Grid Grid1)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getDataLists = from x in db.View_SitePerson_Person select x;
|
||||
IQueryable<Model.View_SitePerson_Person> getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId);
|
||||
if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
|
||||
{
|
||||
|
|
@ -110,10 +111,10 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.View_SitePerson_Person> getPersonLists = from x in Funs.DB.View_SitePerson_Person select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.View_SitePerson_Person> getPersonLists = from x in Funs.DB.View_SitePerson_Person select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -124,6 +125,8 @@ namespace BLL
|
|||
public static IEnumerable getListData(string projectId, string unitId, string personName, string identityCard, string treamGroupId, string workPostIds,
|
||||
bool ckTrain, string postType, bool ckJT, bool ckIdCardInfoNotOK, bool chManager, bool isHsse, bool isCQMS, Grid Grid1,bool isBlack=false)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getPersonLists = from x in db.View_SitePerson_Person select x;
|
||||
IQueryable<Model.View_SitePerson_Person> getPersonList = getPersonLists.Where(x => x.ProjectId == projectId);
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ namespace BLL
|
|||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.SitePerson_Person> getDataLists = from x in Funs.DB.SitePerson_Person
|
||||
where x.IsUsed == true
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.SitePerson_Person> getDataLists = from x in Funs.DB.SitePerson_Person
|
||||
// where x.IsUsed == true
|
||||
// select x;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
|
@ -38,7 +38,9 @@ namespace BLL
|
|||
Grid Grid1)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.SitePerson_Person> getDataList = getDataLists;
|
||||
IQueryable<Model.SitePerson_Person> getDataList = from x in db.SitePerson_Person
|
||||
where x.IsUsed == true
|
||||
select x;
|
||||
if (projectId != Const._Null && !string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.ProjectId == projectId);
|
||||
|
|
|
|||
|
|
@ -122,19 +122,19 @@ namespace FineUIPro.Web.DataShow
|
|||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
ProjectId = z.ProjectId,
|
||||
CheckAcceptType = z.CheckAcceptType,
|
||||
IsOnceQualified = y.IsOnceQualified
|
||||
};
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in Funs.DB.ProcessControl_InspectionManagementDetail
|
||||
// join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
// join z in Funs.DB.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
// select new Model.QualityAcceptanceItem
|
||||
// {
|
||||
// InspectionDetailId = x.InspectionDetailId,
|
||||
// ProjectId = z.ProjectId,
|
||||
// CheckAcceptType = z.CheckAcceptType,
|
||||
// IsOnceQualified = y.IsOnceQualified
|
||||
// };
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
|
|
@ -143,6 +143,17 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <returns></returns>
|
||||
protected int Count1(object projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in db.ProcessControl_InspectionManagementDetail
|
||||
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in db.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
ProjectId = z.ProjectId,
|
||||
CheckAcceptType = z.CheckAcceptType,
|
||||
IsOnceQualified = y.IsOnceQualified
|
||||
};
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
|
|
@ -159,6 +170,17 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <returns></returns>
|
||||
protected int Count2(object projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in db.ProcessControl_InspectionManagementDetail
|
||||
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in db.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
ProjectId = z.ProjectId,
|
||||
CheckAcceptType = z.CheckAcceptType,
|
||||
IsOnceQualified = y.IsOnceQualified
|
||||
};
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
|
|
@ -175,6 +197,17 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <returns></returns>
|
||||
protected int Count3(object projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in db.ProcessControl_InspectionManagementDetail
|
||||
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in db.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
ProjectId = z.ProjectId,
|
||||
CheckAcceptType = z.CheckAcceptType,
|
||||
IsOnceQualified = y.IsOnceQualified
|
||||
};
|
||||
int cout1 = 0;
|
||||
if (projectId != null)
|
||||
{
|
||||
|
|
@ -192,6 +225,17 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <returns></returns>
|
||||
protected string Count4(object projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.QualityAcceptanceItem> getDataItemLists = from x in db.ProcessControl_InspectionManagementDetail
|
||||
join y in db.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
|
||||
join z in db.WBS_BreakdownProject on x.ControlPointType equals z.BreakdownProjectId
|
||||
select new Model.QualityAcceptanceItem
|
||||
{
|
||||
InspectionDetailId = x.InspectionDetailId,
|
||||
ProjectId = z.ProjectId,
|
||||
CheckAcceptType = z.CheckAcceptType,
|
||||
IsOnceQualified = y.IsOnceQualified
|
||||
};
|
||||
string rate = string.Empty;
|
||||
if (projectId != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,11 +178,11 @@ namespace FineUIPro.Web.DataShow
|
|||
}
|
||||
return cout1;
|
||||
}
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_BreakdownProject> getDataLists = from x in Funs.DB.WBS_BreakdownProject
|
||||
select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.WBS_BreakdownProject> getDataLists = from x in Funs.DB.WBS_BreakdownProject
|
||||
// select x;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
@ -191,6 +191,7 @@ namespace FineUIPro.Web.DataShow
|
|||
/// <returns></returns>
|
||||
private int getcount(string projectId, string level)
|
||||
{
|
||||
var getDataLists = from x in Funs.DB.WBS_BreakdownProject select x;
|
||||
int count = 0;
|
||||
count = getDataLists.Where(x => x.ProjectId == projectId && x.Class.Contains(level)).Count();
|
||||
return count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue