using DG.Core; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; namespace Zxd.Crm.Domain.Dto { public class GetWarnningTemplateDto : SearchPageBase { public GetWarnningTemplateDto() { } /// /// id /// public int? Id { get; set; } /// /// 名称 /// public string? Name { get; set; } public string? DeptId { get; set; } } public class WarnningTemplateCreateDto { public int Id { get; set; } public int DeptId { get; set; } public string? TemplateName { get; set; } public DateTime PeriodFrom { get; set; } public DateTime PeriodTo { get; set; } public string? PrewarningValue { get; set; } public int? Count { get; set; } public int Maxnum { get; set; } } public class TemplateSettingDetail { public string? guid { get; set; } public int? type { get; set; } public int? value { get; set; } } public class WarnningTemplateReturnModel : WarnningTemplateCreateDto { } #region 配置 public class CreateOrEditSettingDto { public CreateOrEditSettingDto() { } public int DeptId { get; set; } /// /// 最大数量 /// public int? MaxNum { get; set; } /// /// 用户 /// public string Participant { get; set; } public List WarnUserInfo { get; set; } /// /// 模板id /// public int? templateId { get; set; } public string Eid { get; set; } } public class WarnUserInfo { public decimal Eid { get; set; } public string Name { get; set; } } public class WarnningSetting { public int? DeptId { get; set; } /// /// 最大数量 /// public int MaxNum { get; set; } /// /// 模板id /// public int? templateId { get; set; } /// /// 参与人 /// [JsonIgnore] public string? Participant { get; set; } /// /// 参与人 /// public List? ParticipantIds { get; set; } public List Template { get; set; } } public class TemplateSelectList { public int Id { get; set; } public string? TemplateName { get; set; } public bool selected { get; set; } = false; } public class ReportListModel { public decimal? Eid { get; set; } public int? MaxNum { get; set; } public string Name { get; set; } } #endregion 配置 #region 预警人员配置 public class GetWarnningUserTotalDto : SearchPageBase { public GetWarnningUserTotalDto() { } public string? DeptId { get; set; } } public class GetWarnningSettingDto { public int? DeptId { get; set; } public string? EidList { get; set; } } public class WarnUserList { public string? Code { get; set; } public int? DeptId { get; set; } public int? Count { get; set; } public List ParticipantIds { get { return string.IsNullOrEmpty(Participant) ? new List() : Participant.Split(',').Select(x => int.Parse(x)).ToList(); } } public string Participant { get; set; } } public class EarlyWarningUserModel { public int? Deptid { get; set; } public string? WxWorkId { get; set; } public List ParticipantIds { get { return string.IsNullOrEmpty(Participant) ? new List() : Participant.Split(',').Select(x => int.Parse(x)).ToList(); } } public string? Participant { get; set; } public string? Code { get; set; } } public class EarlyWarningUserCreateDto { public string? Code { get; set; } public int? DeptId { get; set; } public string WxWorkId { get; set; } public int Type { get; set; } //1 为 新增 2 为 编辑 public string? AppId { get; set; } public string? Cropid { get; set; } public string? CropName { get; set; } public string Participant { get; set; } public List ParticipantIds { get { return string.IsNullOrEmpty(Participant) ? new List() : Participant.Split(',').Select(x => int.Parse(x)).ToList(); } } } #endregion 预警人员配置 }