diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 5f4898ca..9b2d0b53 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -315,6 +315,7 @@ namespace BLL } public static List getInspectionManagementListByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList(); if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0") { @@ -330,7 +331,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -345,6 +347,7 @@ namespace BLL } public static List getInspectionManagementDetailListByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail select x).ToList(); if (!string.IsNullOrEmpty(projectId)) @@ -365,7 +368,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -380,6 +384,7 @@ namespace BLL } public static List getInspectionManagementDetailListByUnitIdAndDate(string projectId, string unitId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.View_CQMS_InspectionManagementDetail where x.ProjectId == projectId select x).ToList(); if (!string.IsNullOrEmpty(unitId) && unitId != "0") { @@ -395,7 +400,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -440,6 +446,7 @@ namespace BLL public static List getInspectionManagementDetailListByDate(string projectId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList(); if (isOnceQualified == true) { @@ -451,7 +458,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -466,6 +474,7 @@ namespace BLL public static List getInspectionManagementByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement select x).ToList(); if (!string.IsNullOrEmpty(projectId)) @@ -486,7 +495,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -502,6 +512,7 @@ namespace BLL public static List getInspectionManagementByUnitIdAndDate(string projectId, string unitId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList(); if (!string.IsNullOrEmpty(unitId) && unitId != "0") { @@ -517,7 +528,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{ @@ -534,6 +546,7 @@ namespace BLL public static List getViewMonthReportInspectionManagementByCNProfessionalIdAndDate(string projectId, string cNProfessionalId, DateTime startDate, DateTime SoptDate, bool isOnceQualified) { + SoptDate = SoptDate.AddDays(1); List InspectionMangementList = (from x in Funs.DB.View_MonthReport_InspectionManagement select x).ToList(); if (!string.IsNullOrEmpty(projectId)) @@ -554,7 +567,8 @@ namespace BLL } if (SoptDate != null) { - InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); + InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } //if (startDate != null && startDate != Convert.ToDateTime("2015-01-01")) //{