fix 时间范围
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Kurisu.Core.CustomClass;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.ScheduledTask.TaskAssignment.Request;
|
||||
|
||||
public class DeviceTaskAssignmentRequest : PageDto
|
||||
public class DeviceTaskAssignmentRequest : PageDto, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备类型 DeviceTypeEnumType
|
||||
@@ -23,4 +24,19 @@ public class DeviceTaskAssignmentRequest : PageDto
|
||||
public List<DeviceTaskStatusEnumType> Status { get; set; }
|
||||
|
||||
public string UserNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 搜索范围
|
||||
/// </summary>
|
||||
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (SearchDateTimePeriod != null && SearchDateTimePeriod.End.HasValue)
|
||||
{
|
||||
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user