From 3e08b63cbf99f8ec1fb10c684d809684ddd2c5ed Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 12 Dec 2024 15:54:40 +0800 Subject: [PATCH] fix internal --- .../Appointment/Services/Implements/AppointmentService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs index 334aa43a..1860921a 100644 --- a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs @@ -43,6 +43,7 @@ public class AppointmentService : IAppointmentService await _dbContext.InsertAsync(mst); + var invalids = new[] { GainfoUserTypeEnumType.Normal, GainfoUserTypeEnumType.SecurityWhite }; foreach (var item in request.Items) { if (item.IsEnterDoorArea && areas.Where(x => x.Type == AppointmentAreaEnumType.Door) @@ -82,7 +83,7 @@ public class AppointmentService : IAppointmentService } else { - (gainfo.Type != GainfoUserTypeEnumType.External && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约"); + (invalids.Contains(gainfo.Type) && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约"); if (gainfo.Type == GainfoUserTypeEnumType.External) {