using Dlhis.Entity.Basic.Enums; using Kurisu.AspNetCore.Utils.Extensions; using Kurisu.Core.DataAccess.Dto; using System.ComponentModel.DataAnnotations; namespace Dlhis.Basic.Organization.Request; public class GainfoPageRequest : PageDto, IValidatableObject { /// /// 档案类型 /// [EnumDataType(typeof(GainfoStatusEnumType))] public GainfoStatusEnumType? Status { get; set; } = GainfoStatusEnumType.Working; /// /// 部门选择 /// public List DepartmentSelections { get; set; } = new List(); public IEnumerable Validate(ValidationContext validationContext) { DepartmentSelections.ForEach(d => { //存在 if (d.DepartmentNos.IsPresent()) { d.DepartmentNos.Remove(d.Tenant); } }); yield break; } }