fix 补充时间校验

This commit is contained in:
2024-10-18 18:00:07 +08:00
parent f508aa0df5
commit 9218fc5aff

View File

@@ -113,7 +113,7 @@ public class AppointmentReceiveItemDto : IValidatableObject
yield return new ValidationResult($"{Name}车间区域不可为空", new[] { nameof(ApplyWorkplaceAreas) }); yield return new ValidationResult($"{Name}车间区域不可为空", new[] { nameof(ApplyWorkplaceAreas) });
} }
if (WorkplaceStart >= WorkplaceEnd) if (!WorkplaceStart.HasValue || !WorkplaceEnd.HasValue || WorkplaceStart >= WorkplaceEnd)
{ {
yield return new ValidationResult($"{Name}车间来访时间有误", new[] { nameof(WorkplaceStart) }); yield return new ValidationResult($"{Name}车间来访时间有误", new[] { nameof(WorkplaceStart) });
} }