44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using Model;
|
||
using Model.Dto.Inspection;
|
||
using System.Collections.Generic;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace Service.Interface
|
||
{
|
||
/// <summary>
|
||
/// 告警规则 服务接口(规则实例:查看所有设备告警的规则列表)
|
||
/// </summary>
|
||
public interface IAlertRuleService
|
||
{
|
||
/// <summary>
|
||
/// 获取全局告警规则列表(OwnerType=0,不含产品/设备归属规则)
|
||
/// </summary>
|
||
Task<Result<List<AlertRuleDto>>> GetListAsync();
|
||
|
||
/// <summary>
|
||
/// 获取某归属对象下的规则列表(OwnerType=产品/设备,可选按点过滤)
|
||
/// </summary>
|
||
Task<Result<List<AlertRuleDto>>> GetOwnerRulesAsync(int ownerType, long ownerId, string? pointCode);
|
||
|
||
/// <summary>
|
||
/// 新增告警规则(前端传 DTO,Id 为 string)
|
||
/// </summary>
|
||
Task<Result> AddAsync(AlertRuleDto dto);
|
||
|
||
/// <summary>
|
||
/// 修改告警规则(前端传 DTO,Id 为 string)
|
||
/// </summary>
|
||
Task<Result> UpdateAsync(AlertRuleDto dto);
|
||
|
||
/// <summary>
|
||
/// 删除告警规则(软删除)
|
||
/// </summary>
|
||
Task<Result> DeleteAsync(long id);
|
||
|
||
/// <summary>
|
||
/// 启用/停用告警规则
|
||
/// </summary>
|
||
Task<Result> SetEnabledAsync(long id, bool enabled);
|
||
}
|
||
}
|