2026-01-14 16:50:40 +08:00
|
|
|
|
using Infrastructure;
|
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using OpenAuth.App.ServiceApp.FireManagement;
|
|
|
|
|
|
using OpenAuth.App.ServiceApp.FireManagement.Request;
|
|
|
|
|
|
using OpenAuth.App.ServiceApp.FmPreventionPlanManage;
|
|
|
|
|
|
using OpenAuth.App.ServiceApp.FmPreventionPlanManage.Request;
|
|
|
|
|
|
using OpenAuth.Repository.Domain;
|
|
|
|
|
|
using OpenAuth.Repository.Domain.FireManagement;
|
|
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 防火应急预案模块
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Route("api/[controller]/[action]")]
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
|
public class FmPreventionPlanController : ControllerBase
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly FmPreventionPlanApp _app;
|
|
|
|
|
|
|
|
|
|
|
|
public FmPreventionPlanController(FmPreventionPlanApp app)
|
|
|
|
|
|
{
|
|
|
|
|
|
_app = app;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页查询防火应急预案列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<PageInfo<List<FmPreventionplan>>>> GetPreventionplanPageList([FromQuery] FmPreventionplanReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FmPreventionplan>>> response = new Response<PageInfo<List<FmPreventionplan>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetPreventionplanPageList(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询应急预案详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<FmPreventionplan>> LoadClueInfoById(string id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<FmPreventionplan> response = new Response<FmPreventionplan>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadClueInfoById(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-15 11:38:11 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加预案
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
2026-01-29 11:13:58 +08:00
|
|
|
|
public async Task<Response<bool>> AddPreventionplan(PrePlanAddReq info)
|
2026-01-15 11:38:11 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddPreventionplan(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除预案
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> DeletePreventionplan(string id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.DeletePreventionplan(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-02 16:54:57 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据坐标点查询坐标范围内的预案
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="lng">经度</param>
|
|
|
|
|
|
/// <param name="lat">维度</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<dynamic>> LoadClueInfoByLngLat(string lng, string lat)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<dynamic> response = new Response<dynamic>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadClueInfoByLngLat(lng,lat);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2026-01-14 16:50:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|