diff --git a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs index 9b2d0b53..03328bbe 100644 --- a/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs +++ b/SGGL/BLL/CQMS/ProcessControl/InspectionManagementService.cs @@ -315,7 +315,6 @@ 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") { @@ -331,6 +330,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -347,7 +347,6 @@ 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)) @@ -368,6 +367,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -384,7 +384,6 @@ 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") { @@ -400,6 +399,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -446,7 +446,6 @@ 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) { @@ -458,6 +457,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -474,7 +474,6 @@ 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)) @@ -495,6 +494,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -512,7 +512,6 @@ 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") { @@ -528,6 +527,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); } @@ -546,7 +546,6 @@ 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)) @@ -567,6 +566,7 @@ namespace BLL } if (SoptDate != null) { + SoptDate = SoptDate.AddDays(1); //InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate <= SoptDate).ToList(); InspectionMangementList = InspectionMangementList.Where(x => x.CompileDate < SoptDate).ToList(); }