Zxd.Core/code/Zxd.Crm.Domain/Dto/GetWarnningTemplateDto.cs

207 lines
5.0 KiB
C#

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()
{
}
/// <summary>
/// id
/// </summary>
public int? Id { get; set; }
/// <summary>
/// 名称
/// </summary>
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; }
/// <summary>
/// 最大数量
/// </summary>
public int? MaxNum { get; set; }
/// <summary>
/// 用户
/// </summary>
public string Participant { get; set; }
public List<WarnUserInfo> WarnUserInfo { get; set; }
/// <summary>
/// 模板id
/// </summary>
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; }
/// <summary>
/// 最大数量
/// </summary>
public int MaxNum { get; set; }
/// <summary>
/// 模板id
/// </summary>
public int? templateId { get; set; }
/// <summary>
/// 参与人
/// </summary>
[JsonIgnore]
public string? Participant { get; set; }
/// <summary>
/// 参与人
/// </summary>
public List<string>? ParticipantIds { get; set; }
public List<TemplateSelectList> 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<int> ParticipantIds
{
get
{
return string.IsNullOrEmpty(Participant) ? new List<int>() : 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<int> ParticipantIds
{
get
{
return string.IsNullOrEmpty(Participant) ? new List<int>() : 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<int> ParticipantIds
{
get
{
return string.IsNullOrEmpty(Participant) ? new List<int>() : Participant.Split(',').Select(x => int.Parse(x)).ToList();
}
}
}
#endregion
}