搭建消息告警模块以及跨网推送服务,支持企微,飞书,钉钉通知
This commit is contained in:
@@ -1,10 +1,79 @@
|
||||
using Model;
|
||||
using Model.Dto.Inspection;
|
||||
using Model.Entity.Inspection;
|
||||
using Model.Mapper;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Service.Interface
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息告警 服务接口
|
||||
/// 消息告警 服务接口(告警列表/闭环操作/统计分析)
|
||||
/// </summary>
|
||||
public interface IAlertMessageService
|
||||
{
|
||||
// TODO: 定义 消息告警 相关方法
|
||||
/// <summary>
|
||||
/// 分页查询告警(支持级别/状态/类型/来源/设备/关键字/时间范围筛选)
|
||||
/// </summary>
|
||||
Task<Result<List<AlertMessageDto>>> GetPagedAsync(int pageIndex, int pageSize, RefAsync<int> total,
|
||||
AlertLevelEnum? level, AlertStatusEnum? status, AlertTypeEnum? type, AlertSourceEnum? source,
|
||||
string? deviceCode, string? keyword, DateTime? startDate, DateTime? endDate);
|
||||
|
||||
/// <summary>
|
||||
/// 告警详情
|
||||
/// </summary>
|
||||
Task<Result<AlertMessageDto>> GetByIdAsync(long id);
|
||||
|
||||
/// <summary>
|
||||
/// 确认告警
|
||||
/// </summary>
|
||||
Task<Result<bool>> AcknowledgeAsync(long id, AlertOperateDto dto);
|
||||
|
||||
/// <summary>
|
||||
/// 处理告警
|
||||
/// </summary>
|
||||
Task<Result<bool>> HandleAsync(long id, AlertOperateDto dto);
|
||||
|
||||
/// <summary>
|
||||
/// 关闭告警
|
||||
/// </summary>
|
||||
Task<Result<bool>> CloseAsync(long id, AlertOperateDto dto);
|
||||
|
||||
/// <summary>
|
||||
/// 忽略告警
|
||||
/// </summary>
|
||||
Task<Result<bool>> IgnoreAsync(long id, AlertOperateDto dto);
|
||||
|
||||
/// <summary>
|
||||
/// 转工单(一期仅变更状态并记录 WorkOrderId,工单模块二期对接)
|
||||
/// </summary>
|
||||
Task<Result<bool>> ToWorkOrderAsync(long id, AlertOperateDto dto);
|
||||
|
||||
/// <summary>
|
||||
/// 告警概览(列表页顶部卡片)
|
||||
/// </summary>
|
||||
Task<Result<AlertOverviewDto>> GetOverviewAsync();
|
||||
|
||||
/// <summary>
|
||||
/// 趋势统计(granularity:day/week/month)
|
||||
/// </summary>
|
||||
Task<Result<List<AlertTrendItemDto>>> GetTrendAsync(string granularity, DateTime? startDate, DateTime? endDate);
|
||||
|
||||
/// <summary>
|
||||
/// 分布统计(dimension:device/type/level/source)
|
||||
/// </summary>
|
||||
Task<Result<List<AlertDistributionItemDto>>> GetDistributionAsync(string dimension, DateTime? startDate, DateTime? endDate);
|
||||
|
||||
/// <summary>
|
||||
/// 高频告警 TOP 排名
|
||||
/// </summary>
|
||||
Task<Result<List<AlertTopItemDto>>> GetTopAsync(int topN, DateTime? startDate, DateTime? endDate);
|
||||
|
||||
/// <summary>
|
||||
/// 处理及时率统计
|
||||
/// </summary>
|
||||
Task<Result<AlertTimelinessDto>> GetTimelinessAsync(DateTime? startDate, DateTime? endDate);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user