diff --git a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs index f4552638..10cab989 100644 --- a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs +++ b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs @@ -113,14 +113,17 @@ public class AppointmentReceiveItemDto : IValidatableObject yield return new ValidationResult($"{Name}车间来访时间有误", new[] { nameof(WorkplaceStart) }); } - if (WorkplaceStart < DoorStart || WorkplaceStart > DoorEnd) + if (IsEnterDoorArea) { - yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) }); - } + if (WorkplaceStart < DoorStart || WorkplaceStart > DoorEnd) + { + yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) }); + } - if (WorkplaceEnd < DoorStart || WorkplaceEnd > DoorEnd) - { - yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) }); + if (WorkplaceEnd < DoorStart || WorkplaceEnd > DoorEnd) + { + yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) }); + } } } }