47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using SJZY.Track.Application.Contract.Dtos.Warning;
|
|
|
|
namespace SJZY.Track.Application.Services.Warning;
|
|
|
|
/// <summary>
|
|
/// 预警规则主体
|
|
/// </summary>
|
|
[ApiExplorerSettings(GroupName = "预警服务")]
|
|
[Route("Warning")]
|
|
public class WarningService : ApplicationService
|
|
{
|
|
/// <summary>
|
|
/// 新增/修改预警规则主体
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("UpsertWarningRule")]
|
|
public async Task<UnifyResultDto<IdBaseDto>> UpsertWarningRule(UpsertWarningRuleInput input)
|
|
{
|
|
// var id = await _warningRuleRepository.UpsertReturnIdAsync(new WarningRuleEntity(
|
|
// input.Id,
|
|
// input.Name,
|
|
// input.SubSystemId,
|
|
// input.CustomId,
|
|
// input.IsEnabled,
|
|
// input.WarningType)
|
|
// );
|
|
|
|
return new UnifyResultDto<IdBaseDto>(true, new IdBaseDto
|
|
{
|
|
Id = input.Id
|
|
});
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取预警规则列表
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("GetWarningRule")]
|
|
public Task<UnifyResultDto<List<WarningRuleDto>>> GetWarningRule(GetWarningRuleInput input)
|
|
{
|
|
//var result = await _warningRuleRepository.GetWarningRuleListAsync(input.SubSystemId, input.KeyWord, input.IsEnabled, input.WarningType);
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|