diff --git a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs index dc67ffe..2e03aaf 100644 --- a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs +++ b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs @@ -634,8 +634,7 @@ namespace BLL EquipmentInspectionNum = inspectionEquipmentList.Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(), PersonInspectionNum = inspectionPersonList.Count(), - PersonInspectionQualifiedNum = - inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(), + PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.ValidityDate == null || (x.ValidityDate.HasValue && x.ValidityDate >= DateTime.Now)).Count(), MachineInspectionNum = inspectionMachineList.Count(), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(), @@ -718,8 +717,7 @@ namespace BLL EquipmentInspectionQualifiedNum = inspectionEquipmentList .Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(), PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid), - PersonInspectionQualifiedNum = inspectionPersonList - .Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(), + PersonInspectionQualifiedNum = inspectionPersonList.Where(x => (x.ValidityDate == null || (x.ValidityDate.HasValue && x.ValidityDate >= DateTime.Now)) && x.ProjectId == projectid).Count(), MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(), @@ -1178,14 +1176,14 @@ namespace BLL } /// - /// 获取人员报验 + /// 获取人员报验(总数取在场人员) /// /// public static List GetComprehensive_InspectionPerson() { var result = (from x in Funs.DB.Comprehensive_InspectionPerson - where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime - select x).ToList(); + where BeUnderConstructionList.Contains(x.ProjectId) && x.IsOnSite.HasValue && x.IsOnSite == true && x.CompileDate > Const.DtmarkTime + select x).ToList(); return result; }