fix 任务图片连接处理

This commit is contained in:
2024-06-28 14:03:40 +08:00
parent 0214309e64
commit 9446ba6ffa
20 changed files with 427 additions and 14 deletions

View 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) });
}
}
}