74 lines
2.5 KiB
C#
74 lines
2.5 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// 批后监管--项目信息
|
|
/// </summary>
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class DroneSsnyController : ControllerBase
|
|
{
|
|
DroneSsnyApp droneSsnyApp;
|
|
public DroneSsnyController(DroneSsnyApp droneSsnyApp)
|
|
{
|
|
this.droneSsnyApp = droneSsnyApp;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 超期预警
|
|
/// </summary>
|
|
/// <param name="xiangmumc">项目名称</param>
|
|
/// <param name="countyid">县</param>
|
|
/// <param name="streetid">镇</param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public Response<PageInfo<List<DroneSsnyd>>> TimeoutWarning(string xiangmumc, string countyid, string streetid, int page, int limit)
|
|
{
|
|
var response = new Response<PageInfo<List<DroneSsnyd>>>();
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 超期报警
|
|
/// </summary>
|
|
/// <param name="xiangmumc">项目名称</param>
|
|
/// <param name="countyid">县</param>
|
|
/// <param name="streetid">镇</param>
|
|
/// <param name="pageIndex"></param>
|
|
/// <param name="pageSize"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public Response<PageInfo<List<DroneSsnyd>>> TimeOutAlarmList(string xiangmumc, string countyid,string streetid,int page, int limit)
|
|
{
|
|
var response = new Response<PageInfo<List<DroneSsnyd>>>();
|
|
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;
|
|
}
|
|
}
|
|
}
|