using Infrastructure;
using Microsoft.AspNetCore.Mvc;
using OpenAuth.App.ServiceApp.DroneSsnydManage;
using OpenAuth.App.ServiceApp.DroneSsnydManage.Request;
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(string xiangmumc, string countyid, string streetid, int page, int limit)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.TimeoutWarning(xiangmumc, countyid, streetid,page, limit);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 超期报警
///
/// 项目名称
/// 县
/// 镇
///
///
///
[HttpGet]
public Response>> TimeOutAlarmList(string xiangmumc, string countyid,string streetid,int page, int limit)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.TimeOutAlarmList(xiangmumc, countyid, streetid, page, limit);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 历史项目
///
///
///
[HttpGet]
public Response>> HistoryProject(DroneSnnyAppPageReq req)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.HistoryProject(req);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
///
/// 项目变更列表
///
///
///
[HttpGet]
public Response>> ProjectChange(DroneSnnyAppPageReq req)
{
var response = new Response>>();
try
{
response.Result = droneSsnyApp.ProjectChange(req);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
}
}