fix 任务图片连接处理
This commit is contained in:
42
Src/Dlhis.Middle/Request/DeviceTaskGetRequest.cs
Normal file
42
Src/Dlhis.Middle/Request/DeviceTaskGetRequest.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
|
||||
namespace Dlhis.Middle.Request;
|
||||
|
||||
public class DeviceTaskGetRequest : PageDto, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备号
|
||||
/// </summary>
|
||||
public string DeviceUniqueNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public List<DeviceTaskEnumType> Types { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取处理中的任务
|
||||
/// </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) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user