using Infrastructure;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App.ServiceApp.DroneSsnydManage;
using OpenAuth.App.ServiceApp.DroneSsnydManage.Export;
using OpenAuth.App.ServiceApp.DroneSsnydManage.Request;
using OpenAuth.Repository.Domain;
namespace OpenAuth.WebApi.Controllers.ServiceControllers
{
///
/// 批后监管--数据统计
///
[Route("api/[controller]/[action]")]
[ApiController]
public class DroneSsnyStatisticsController : ControllerBase
{
DroneSsnyStatisticsApp _app;
public DroneSsnyStatisticsController(DroneSsnyStatisticsApp app)
{
_app = app;
}
#region 统计
///
/// 统计分析
///
/// 项目名称
///
[HttpGet]
public Response> CaseOffenceForSsny(string xiangmu_yt)
{
Response> response = new Response>();
try
{
response = _app.CaseOffence(xiangmu_yt);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 获取穿透案件信息
///
///
///
[HttpGet]
[AllowAnonymous]
public async Task>>> GetCaseInfo([FromQuery] QuerySsnyListReq req)
{
return await _app.GetCaseInfo(req);
}
#endregion
}
}