fix 移除brand查询

This commit is contained in:
2025-04-02 17:23:36 +08:00
parent a4139f0c2f
commit f227665aed
4 changed files with 8 additions and 46 deletions

View File

@@ -1,17 +1,10 @@
using System.ComponentModel.DataAnnotations;
using Dlhis.Entity.Device.Enums;
using Dlhis.Entity.Device.Enums;
using Kurisu.AspNetCore.DataAccess.Dto;
using Kurisu.AspNetCore.Utils.Extensions;
namespace Dlhis.ScheduledTask.TaskAssignment.Request;
public class DeviceTaskGetRequest : PageDto, IValidatableObject
public class DeviceTaskGetRequest : PageDto
{
/// <summary>
/// 品牌
/// </summary>
public string Brand { get; set; }
/// <summary>
/// 设备号
/// </summary>
@@ -26,17 +19,4 @@ public class DeviceTaskGetRequest : PageDto, IValidatableObject
/// 获取处理中的任务
/// </summary>
public bool IsProcess { get; set; } = false;
/// <summary>
/// 厂区
/// </summary>
public string Factory { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (Brand.IsEmpty() && DeviceUniqueNo.IsEmpty() && Factory.IsEmpty())
{
yield return new ValidationResult("设备品牌,设备号和厂区不能都为空", new[] { nameof(Brand), nameof(DeviceUniqueNo), nameof(Factory) });
}
}
}