using Infrastructure;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App;
using OpenAuth.App.ServiceApp.DroneSsnydManage;
using OpenAuth.Repository.Domain;
namespace OpenAuth.WebApi.Controllers.ServiceControllers
{
///
/// 批后监管--项目信息
///
[Route("api/[controller]/[action]")]
[ApiController]
public class DroneSsnyController : ControllerBase
{
DroneSsnyApp droneSsnyApp;
public DroneSsnyController(DroneSsnyApp droneSsnyApp)
{
this.droneSsnyApp = droneSsnyApp;
}
///
/// 到期预警
///
///
///
///
[HttpGet]
public Response>> TimeoutWarning(int page, int limit)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.TimeoutWarning(page, limit);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 超期报警
///
///
///
///
[HttpGet]
public Response>> TimeOutAlarmList(int page, int limit)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.TimeOutAlarmList(page, limit);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
}
}