From c2eeffa0deaa27122f1003745a75030538a05a8f Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Thu, 23 Apr 2026 15:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/BaseInfo/SteelService.cs | 11 +- SGGL/BLL/BoSheng/BOSHENGService.cs | 107 +++++++++++------- SGGL/BLL/CQMS/Check/CheckEquipmentService.cs | 10 +- SGGL/BLL/CQMS/Check/DesignService.cs | 8 +- .../CQMS/Check/TechnicalContactListService.cs | 8 +- .../CQMS/DataBase/DataTypeProjectService.cs | 10 +- SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs | 24 ++-- SGGL/BLL/CQMS/WBS/BreakdownService.cs | 4 +- SGGL/BLL/CQMS/WBS/DivisionService.cs | 10 +- SGGL/BLL/DoorServer/InOutService.cs | 28 +++-- .../Check/Check_ProjectLeaderCheckService.cs | 12 +- SGGL/BLL/HSSE/SitePerson/PersonService.cs | 21 ++-- SGGL/BLL/ZHGL/RealName/LeavePostService.cs | 10 +- SGGL/BLL/ZHGL/RealName/OnPostService.cs | 16 +-- .../DataShow/QualityAcceptance.aspx.cs | 70 +++++++++--- .../DataShow/QualityControlPoint.aspx.cs | 17 +-- 16 files changed, 223 insertions(+), 143 deletions(-) diff --git a/SGGL/BLL/BaseInfo/SteelService.cs b/SGGL/BLL/BaseInfo/SteelService.cs index 7aafbe3b..d3acbaf9 100644 --- a/SGGL/BLL/BaseInfo/SteelService.cs +++ b/SGGL/BLL/BaseInfo/SteelService.cs @@ -20,10 +20,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.BS_Steel orderby x.STE_Code select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.BS_Steel orderby x.STE_Code select x; /// /// 获取材质列表 @@ -36,7 +36,8 @@ namespace BLL /// public static IEnumerable GetListData(string searchItem, string searchValue, int startRowIndex, int maximumRows) { - IQueryable q = qq; + Model.SGGLDB db = Funs.DB; + IQueryable q = from x in db.BS_Steel orderby x.STE_Code select x; if (searchItem != "0") { if (!string.IsNullOrEmpty(searchValue)) diff --git a/SGGL/BLL/BoSheng/BOSHENGService.cs b/SGGL/BLL/BoSheng/BOSHENGService.cs index 5913b952..bc571f6b 100644 --- a/SGGL/BLL/BoSheng/BOSHENGService.cs +++ b/SGGL/BLL/BoSheng/BOSHENGService.cs @@ -20,12 +20,12 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getUnits = from x in Funs.DB.Bo_Sheng_Unit - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getUnits = from x in Funs.DB.Bo_Sheng_Unit + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -35,7 +35,12 @@ namespace BLL /// public static IEnumerable getUnitListData(string projectId, string departName, string departCode, Grid Grid1) { - IQueryable getDataList = getUnits.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + + IQueryable 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; } - /// - /// 定义变量 - /// - private static IQueryable getPersons = from x in Funs.DB.Bo_Sheng_Person - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getPersons = from x in Funs.DB.Bo_Sheng_Person + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -103,7 +108,11 @@ namespace BLL /// public static IEnumerable getPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1) { - IQueryable getDataList = getPersons.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + + IQueryable 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; } - /// - /// 定义变量 - /// - private static IQueryable getTrains = from x in Funs.DB.Bo_Sheng_Train - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getTrains = from x in Funs.DB.Bo_Sheng_Train + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -213,7 +222,10 @@ namespace BLL /// public static IEnumerable getTrainListData(string projectId, string trainType, string recordName, Grid Grid1) { - IQueryable getDataList = getTrains.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + IQueryable 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; } - /// - /// 定义变量 - /// - private static IQueryable getTrainPersons = from x in Funs.DB.Bo_Sheng_TrainPerson - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getTrainPersons = from x in Funs.DB.Bo_Sheng_TrainPerson + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -295,7 +307,10 @@ namespace BLL /// public static IEnumerable getTrainPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1) { - IQueryable getDataList = getTrainPersons.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + IQueryable 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; } - /// - /// 定义变量 - /// - private static IQueryable getExams = from x in Funs.DB.Bo_Sheng_Exam - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getExams = from x in Funs.DB.Bo_Sheng_Exam + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -383,7 +398,12 @@ namespace BLL /// public static IEnumerable getExamListData(string projectId, string qsnCode, string qsnContent, Grid Grid1) { - IQueryable getDataList = getExams.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + IQueryable getDataList = from x in db.Bo_Sheng_Exam + where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null) + select x; + + //IQueryable getDataList = getExams.Where(x => x.ProjectId == projectId); if (!string.IsNullOrEmpty(qsnCode)) { @@ -438,12 +458,12 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getPersonTrainRecords = from x in Funs.DB.Bo_Sheng_PersonTrainRecord - where (x.DeleteTag == "False" || x.DeleteTag == null) - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getPersonTrainRecords = from x in Funs.DB.Bo_Sheng_PersonTrainRecord + // where (x.DeleteTag == "False" || x.DeleteTag == null) + // select x; /// /// 获取分页列表 @@ -453,7 +473,10 @@ namespace BLL /// public static IEnumerable getPersonTrainRecordListData(string projectId, string departName, string name, string identifyID, Grid Grid1) { - IQueryable getDataList = getPersonTrainRecords.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + IQueryable getDataList = from x in db.Bo_Sheng_PersonTrainRecord + where x.ProjectId == projectId && (x.DeleteTag == "False" || x.DeleteTag == null) + select x; if (!string.IsNullOrEmpty(name)) { diff --git a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs index 7c53b642..370c3189 100644 --- a/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs +++ b/SGGL/BLL/CQMS/Check/CheckEquipmentService.cs @@ -21,10 +21,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x; /// /// 获取分页列表 @@ -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 q = qq; + IQueryable q = from x in db.Check_CheckEquipment orderby x.CompileDate descending select x; if (!string.IsNullOrEmpty(projectId)) { q = q.Where(e => e.ProjectId == projectId); diff --git a/SGGL/BLL/CQMS/Check/DesignService.cs b/SGGL/BLL/CQMS/Check/DesignService.cs index a14ea9a0..1b52664d 100644 --- a/SGGL/BLL/CQMS/Check/DesignService.cs +++ b/SGGL/BLL/CQMS/Check/DesignService.cs @@ -22,10 +22,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.Check_Design orderby x.DesignDate descending select x; public static string CovBool(bool? b) diff --git a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs index ac72a144..b1dcbeea 100644 --- a/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs +++ b/SGGL/BLL/CQMS/Check/TechnicalContactListService.cs @@ -399,11 +399,11 @@ namespace BLL else return null; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.Check_TechnicalContactList orderby x.CompileDate descending select x; /// /// 获取分页列表 /// diff --git a/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs b/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs index 688829af..dcb5785b 100644 --- a/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs +++ b/SGGL/BLL/CQMS/DataBase/DataTypeProjectService.cs @@ -20,10 +20,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x; /// /// 获取项目列表 @@ -35,7 +35,7 @@ namespace BLL /// public static IEnumerable getListData(int startRowIndex, int maximumRows) { - IQueryable q = qq; + IQueryable q = from x in Funs.DB.DataBase_DataTypeProject orderby x.SortIndex select x; count = q.Count(); if (count == 0) { diff --git a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs index 98e72f0e..c94b8da8 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs @@ -38,10 +38,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.WBS_BreakdownProject orderby x.SortIndex select x; /// /// 获取项目列表 @@ -53,7 +53,7 @@ namespace BLL /// public static IEnumerable getListData(string projectId, string divisionProjectId, string name, int startRowIndex, int maximumRows) { - IQueryable q = qq; + IQueryable 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; } - /// - /// 定义变量 - /// - private static IQueryable qq2 = from x in Funs.DB.View_WBS select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq2 = from x in Funs.DB.View_WBS select x; /// /// 获取项目已选择的WBS列表 @@ -120,7 +120,7 @@ namespace BLL /// public static IEnumerable getListData2(string projectId, int startRowIndex, int maximumRows) { - IQueryable q = qq2; + IQueryable 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 /// /// 定义变量 /// - private static IQueryable qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x; + //private static IQueryable qq3 = from x in Funs.DB.View_WBS_BreakdownProject orderby x.SortIndex select x; /// /// 获取项目列表 @@ -176,7 +176,7 @@ namespace BLL /// public static IEnumerable getListData3(string projectId, string divisionProjectId, string name, int startRowIndex, int maximumRows) { - IQueryable q = qq3; + IQueryable 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); diff --git a/SGGL/BLL/CQMS/WBS/BreakdownService.cs b/SGGL/BLL/CQMS/WBS/BreakdownService.cs index 54befe05..b9c729ef 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownService.cs @@ -23,7 +23,7 @@ namespace BLL /// /// 定义变量 /// - private static IQueryable qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x; + //private static IQueryable qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x; /// /// 获取项目列表 @@ -35,7 +35,7 @@ namespace BLL /// public static IEnumerable getListData(string divisionId, string name, int startRowIndex, int maximumRows) { - IQueryable q = qq; + IQueryable q = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x; if (!string.IsNullOrEmpty(divisionId)) { q = q.Where(e => e.DivisionId == divisionId); diff --git a/SGGL/BLL/CQMS/WBS/DivisionService.cs b/SGGL/BLL/CQMS/WBS/DivisionService.cs index 90a41829..86aaa61c 100644 --- a/SGGL/BLL/CQMS/WBS/DivisionService.cs +++ b/SGGL/BLL/CQMS/WBS/DivisionService.cs @@ -20,10 +20,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.WBS_Division orderby x.SortIndex select x; /// /// 获取项目列表 @@ -35,7 +35,7 @@ namespace BLL /// public static IEnumerable getListData(int startRowIndex, int maximumRows) { - IQueryable q = qq; + IQueryable q = from x in Funs.DB.WBS_Division orderby x.SortIndex select x; count = q.Count(); if (count == 0) { diff --git a/SGGL/BLL/DoorServer/InOutService.cs b/SGGL/BLL/DoorServer/InOutService.cs index 18fc7804..22371fc0 100644 --- a/SGGL/BLL/DoorServer/InOutService.cs +++ b/SGGL/BLL/DoorServer/InOutService.cs @@ -21,15 +21,15 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable qq = from x in Funs.DB.T_d_facerecord - orderby x.DateTimeRecord descending - select x; - private static IQueryable qq1 = from x in Funs.DB.T_d_validcardevent - orderby x.RecordDateTime descending - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable qq = from x in Funs.DB.T_d_facerecord + // orderby x.DateTimeRecord descending + // select x; + //private static IQueryable qq1 = from x in Funs.DB.T_d_validcardevent + // orderby x.RecordDateTime descending + // select x; /// /// 获取分页列表 @@ -42,7 +42,10 @@ namespace BLL Model.SGGLDB db = Funs.DB; if (type == "1") { - IQueryable q1 = qq1.Where(x => x.ProjectId == projectId); + IQueryable 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 q = qq.Where(x => x.ProjectId == projectId); + IQueryable 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 == "微信端"); diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs index 9528c317..6c39c500 100644 --- a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -34,11 +34,11 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck + // select x; /// /// 数据列表 @@ -49,7 +49,7 @@ namespace BLL public static IEnumerable getListData(string projectId, string startTime, string endTime, Grid Grid1) { Model.SGGLDB db = Funs.DB; - IQueryable getDataList = getDataLists; + IQueryable getDataList = from x in db.Check_ProjectLeaderCheck select x; if (!string.IsNullOrEmpty(projectId)) { getDataList = getDataList.Where(x => x.ProjectId == projectId); diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 2d628661..5f2df69e 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -22,11 +22,11 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getDataLists = from x in Funs.DB.View_SitePerson_Person - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getDataLists = from x in Funs.DB.View_SitePerson_Person + // select x; /// /// 数据列表 @@ -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 getDataList = getDataLists.OrderBy(x => x.ProjectId).ThenBy(x => x.UnitId); if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { @@ -110,10 +111,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getPersonLists = from x in Funs.DB.View_SitePerson_Person select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getPersonLists = from x in Funs.DB.View_SitePerson_Person select x; /// /// 获取分页列表 @@ -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 getPersonList = getPersonLists.Where(x => x.ProjectId == projectId); if (!string.IsNullOrEmpty(unitId)) { diff --git a/SGGL/BLL/ZHGL/RealName/LeavePostService.cs b/SGGL/BLL/ZHGL/RealName/LeavePostService.cs index 86dfe085..105cda46 100644 --- a/SGGL/BLL/ZHGL/RealName/LeavePostService.cs +++ b/SGGL/BLL/ZHGL/RealName/LeavePostService.cs @@ -18,10 +18,10 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getLeavePosts = from x in Funs.DB.RealName_LeavePost select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getLeavePosts = from x in Funs.DB.RealName_LeavePost select x; /// /// 获取分页列表 @@ -31,7 +31,7 @@ namespace BLL /// public static IEnumerable getListData(string states, string projectCode, string personName, string identityCard, Grid Grid1) { - IQueryable getLeavePostList = getLeavePosts; + IQueryable getLeavePostList = from x in Funs.DB.RealName_LeavePost select x; if (states == "1") { getLeavePostList = getLeavePostList.Where(x => x.OutTime.HasValue); diff --git a/SGGL/BLL/ZHGL/RealName/OnPostService.cs b/SGGL/BLL/ZHGL/RealName/OnPostService.cs index a7289700..8b310ba2 100644 --- a/SGGL/BLL/ZHGL/RealName/OnPostService.cs +++ b/SGGL/BLL/ZHGL/RealName/OnPostService.cs @@ -19,12 +19,12 @@ namespace BLL set; } - /// - /// 定义变量 - /// - private static IQueryable getDataLists = from x in Funs.DB.SitePerson_Person - where x.IsUsed == true - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getDataLists = from x in Funs.DB.SitePerson_Person + // where x.IsUsed == true + // select x; /// /// @@ -38,7 +38,9 @@ namespace BLL Grid Grid1) { Model.SGGLDB db = Funs.DB; - IQueryable getDataList = getDataLists; + IQueryable 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); diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs index befcfb27..b655f528 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs @@ -122,19 +122,19 @@ namespace FineUIPro.Web.DataShow } #endregion - /// - /// 定义变量 - /// - private static IQueryable 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 - }; + ///// + ///// 定义变量 + ///// + //private static IQueryable 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 + // }; /// /// 数量 @@ -143,6 +143,17 @@ namespace FineUIPro.Web.DataShow /// protected int Count1(object projectId) { + Model.SGGLDB db = Funs.DB; + IQueryable 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 /// protected int Count2(object projectId) { + Model.SGGLDB db = Funs.DB; + IQueryable 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 /// protected int Count3(object projectId) { + Model.SGGLDB db = Funs.DB; + IQueryable 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 /// protected string Count4(object projectId) { + Model.SGGLDB db = Funs.DB; + IQueryable 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) { diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs index 62ec109f..93d03eed 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs @@ -59,7 +59,7 @@ namespace FineUIPro.Web.DataShow // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -164,7 +164,7 @@ namespace FineUIPro.Web.DataShow int cout1 = 0; if (projectId != null) { - cout1= getcount(projectId.ToString(), "B"); + cout1 = getcount(projectId.ToString(), "B"); } return cout1; } @@ -178,11 +178,11 @@ namespace FineUIPro.Web.DataShow } return cout1; } - /// - /// 定义变量 - /// - private static IQueryable getDataLists = from x in Funs.DB.WBS_BreakdownProject - select x; + ///// + ///// 定义变量 + ///// + //private static IQueryable getDataLists = from x in Funs.DB.WBS_BreakdownProject + // select x; /// /// /// @@ -191,7 +191,8 @@ namespace FineUIPro.Web.DataShow /// private int getcount(string projectId, string level) { - int count = 0; + 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;