From 39257b0825137722387324e16a2b9534bb08a530 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 22 Nov 2024 10:57:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=AE=BF=E5=AE=A2summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/AppointmentService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs index 26abef70..516e1005 100644 --- a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs @@ -248,7 +248,7 @@ public class AppointmentService : IAppointmentService .Where(x => x.IsEnterDoorArea && ((x.DoorStart >= start && x.DoorStart <= end) || (x.DoorEnd >= start && x.DoorEnd <= end)) //|| (x.IsEnterWorkplace && ((x.WorkplaceStart >= start && x.WorkplaceStart <= end) || (x.WorkplaceEnd >= start && x.WorkplaceEnd <= end))) ) - .Where(x => SqlFunc.Subqueryable().Where(p => p.Factory == factory).Any()) + .Where(x => SqlFunc.Subqueryable().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any()) .CountAsync(); var @in = await _dbContext.Queryable() @@ -258,7 +258,7 @@ public class AppointmentService : IAppointmentService .Where(x => (x.IsEnterDoorArea && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived) //|| (x.IsEnterWorkplace && x.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Arrived) ) - .Where(x => SqlFunc.Subqueryable().Where(p => p.Factory == factory).Any()) + .Where(x => SqlFunc.Subqueryable().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any()) .CountAsync(); var notIn = await _dbContext.Queryable() @@ -268,7 +268,7 @@ public class AppointmentService : IAppointmentService .Where(x => (x.IsEnterDoorArea && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Wait) //|| (x.IsEnterWorkplace && x.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Wait) ) - .Where(x => SqlFunc.Subqueryable().Where(p => p.Factory == factory).Any()) + .Where(x => SqlFunc.Subqueryable().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any()) .CountAsync(); var leave = await _dbContext.Queryable() @@ -278,7 +278,7 @@ public class AppointmentService : IAppointmentService .Where(x => (x.IsEnterDoorArea && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Leave) //|| (x.IsEnterWorkplace && x.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Leave) ) - .Where(x => SqlFunc.Subqueryable().Where(p => p.Factory == factory).Any()) + .Where(x => SqlFunc.Subqueryable().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any()) .CountAsync(); var notLeave = await _dbContext.Queryable() @@ -288,7 +288,7 @@ public class AppointmentService : IAppointmentService .Where(x => (x.IsEnterDoorArea && x.DoorStatus != VisitorAppointmentDetailStatusEnumType.Leave) // || (x.IsEnterWorkplace && x.WorkplaceStatus != VisitorAppointmentDetailStatusEnumType.Leave) ) - .Where(x => SqlFunc.Subqueryable().Where(p => p.Factory == factory).Any()) + .Where(x => SqlFunc.Subqueryable().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any()) .CountAsync(); return new AppointmentSummaryResponse