From 8535d7deda16e4c2ae8d061ed0cf626568962b95 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 11 Sep 2024 14:28:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=AE=9E=E4=BD=93=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Appointment/Dto/AppointmentReceiveItemDto.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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) }); + } } } }