Files
IOT_API/Service/Interface/Inspection/IAlertMessageService.cs
T

80 lines
2.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
{
/// <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>
/// 趋势统计(granularityday/week/month
/// </summary>
Task<Result<List<AlertTrendItemDto>>> GetTrendAsync(string granularity, DateTime? startDate, DateTime? endDate);
/// <summary>
/// 分布统计(dimensiondevice/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);
}
}