feat 设备任务领取

This commit is contained in:
2024-01-13 20:53:04 +08:00
parent 24b026aa04
commit 79bc32c959
24 changed files with 477 additions and 25 deletions

View File

@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.Core.DataAccess.Dto;
namespace Dlhis.ScheduledTask.TaskAssignment.Request;
public class DeviceTaskGetRequest : PageDto, IValidatableObject
{
/// <summary>
/// 品牌
/// </summary>
public string Brand { get; set; }
/// <summary>
/// 设备号
/// </summary>
public string DeviceUniqueNo { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (Brand.IsEmpty() && DeviceUniqueNo.IsEmpty())
{
yield return new ValidationResult("设备品牌和设备唯一号不能都为空", new[] { nameof(Brand), nameof(DeviceUniqueNo) });
}
}
}