
- 新增通知系统完整架构,包含通知设置、历史记录、任务管理等核心功能 - 实现工作任务分配服务,支持人员和设备的智能分配 - 添加人员分组管理功能,支持灵活的通知目标配置 - 完善相关枚举定义和数据传输对象 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
114 lines
2.6 KiB
C#
114 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
|
|
|
|
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Output;
|
|
|
|
/// <summary>
|
|
/// 发送通知输出
|
|
/// </summary>
|
|
public class SendNotificationOutput
|
|
{
|
|
#region 总体结果
|
|
|
|
/// <summary>
|
|
/// 是否全部发送成功
|
|
/// </summary>
|
|
public bool IsAllSuccess { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 总共发送数量
|
|
/// </summary>
|
|
public int TotalCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 成功发送数量
|
|
/// </summary>
|
|
public int SuccessCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 失败发送数量
|
|
/// </summary>
|
|
public int FailedCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 总体错误信息
|
|
/// </summary>
|
|
public string OverallErrorMessage { get; set; } = "";
|
|
|
|
#endregion
|
|
|
|
#region 详细结果
|
|
|
|
/// <summary>
|
|
/// 每个接收人的发送结果详情
|
|
/// </summary>
|
|
public List<NotificationSendResult> SendResults { get; set; } = new List<NotificationSendResult>();
|
|
|
|
#endregion
|
|
|
|
#region 批量任务信息
|
|
|
|
/// <summary>
|
|
/// 创建的通知历史记录ID列表
|
|
/// </summary>
|
|
public List<long> NotificationHistoryIds { get; set; } = new List<long>();
|
|
|
|
/// <summary>
|
|
/// 发送时间
|
|
/// </summary>
|
|
public DateTime SendTime { get; set; } = DateTime.Now;
|
|
|
|
#endregion
|
|
}
|
|
|
|
/// <summary>
|
|
/// 单个通知发送结果
|
|
/// </summary>
|
|
public class NotificationSendResult
|
|
{
|
|
/// <summary>
|
|
/// 接收人员ID
|
|
/// </summary>
|
|
public long RecipientPersonnelId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 接收人员姓名
|
|
/// </summary>
|
|
public string RecipientPersonnelName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 接收人员邮箱
|
|
/// </summary>
|
|
public string RecipientEmail { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 通知方式
|
|
/// </summary>
|
|
public NotificationTypeEnum NotificationType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 发送状态
|
|
/// </summary>
|
|
public NotificationStatusEnum SendStatus { get; set; } = NotificationStatusEnum.Pending;
|
|
|
|
/// <summary>
|
|
/// 发送结果信息
|
|
/// </summary>
|
|
public string SendResult { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 错误信息
|
|
/// </summary>
|
|
public string ErrorMessage { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 通知历史记录ID
|
|
/// </summary>
|
|
public long NotificationHistoryId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 发送时间
|
|
/// </summary>
|
|
public DateTime? SendTime { get; set; }
|
|
} |