From a7a27e086b86789408fd9993d5554b190cb1a234 Mon Sep 17 00:00:00 2001 From: geh <1923421292@qq.com> Date: Wed, 9 Jul 2025 11:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=8A=A5=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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; }