diff --git a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs index 257e4058..84fec502 100644 --- a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs +++ b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs @@ -113,7 +113,7 @@ public class AppointmentReceiveItemDto : IValidatableObject 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) }); }