diff --git a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs index a0d0d8c5..72364110 100644 --- a/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.External/Appointment/Services/Implements/AppointmentService.cs @@ -107,7 +107,6 @@ public class AppointmentService : IAppointmentService else { (invalids.Contains(gainfo.Type) && item.IsEnterDoorArea).ThrowIfTrue("内部人员无法发起门岗预约"); - if (gainfo.Type == GainfoUserTypeEnumType.External) { gainfo.Source = request.Source; @@ -116,6 +115,10 @@ public class AppointmentService : IAppointmentService await _dbContext.UpdateAsync(gainfo); } + else + { + throw new UserFriendlyException("访客类型有误!"); + } } var detail = new VisitorAppointmentDetailEntity