fix 实体检验调整

This commit is contained in:
2024-09-11 14:28:33 +08:00
parent 1b9591936e
commit 8535d7deda

View File

@@ -113,14 +113,17 @@ public class AppointmentReceiveItemDto : IValidatableObject
yield return new ValidationResult($"{Name}车间来访时间有误", new[] { nameof(WorkplaceStart) }); 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) if (WorkplaceEnd < DoorStart || WorkplaceEnd > DoorEnd)
{ {
yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) }); yield return new ValidationResult($"{Name}车间来访时间需在门禁时间范围内", new[] { nameof(WorkplaceStart) });
}
} }
} }
} }