2025-03-31 16:40:54 +08:00
|
|
|
|
using Infrastructure;
|
2025-03-21 16:42:48 +08:00
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2026-01-06 15:05:17 +08:00
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
using Newtonsoft.Json;
|
2025-04-01 16:35:23 +08:00
|
|
|
|
using OpenAuth.App.BaseApp.Base;
|
2026-01-06 15:05:17 +08:00
|
|
|
|
using OpenAuth.App.Const;
|
2025-11-07 11:41:12 +08:00
|
|
|
|
using OpenAuth.App.Response;
|
2025-03-21 16:42:48 +08:00
|
|
|
|
using OpenAuth.App.ServiceApp.FireManagement;
|
2025-03-28 16:41:12 +08:00
|
|
|
|
using OpenAuth.App.ServiceApp.FireManagement.Request;
|
2025-03-21 16:42:48 +08:00
|
|
|
|
using OpenAuth.App.ServiceApp.FireManagement.Response;
|
|
|
|
|
|
using OpenAuth.Repository.Domain.FireManagement;
|
2026-01-06 15:05:17 +08:00
|
|
|
|
using DocumentFormat.OpenXml.EMMA;
|
2026-01-12 10:03:51 +08:00
|
|
|
|
using OpenAuth.Repository.Domain;
|
2026-01-30 11:11:39 +08:00
|
|
|
|
using Hopetry.App.SugarModel.CommonModel;
|
|
|
|
|
|
using Yitter.IdGenerator;
|
2026-01-30 15:13:00 +08:00
|
|
|
|
using OpenAuth.App.ServiceApp.FmPreventionPlanManage.Request;
|
2025-03-21 16:42:48 +08:00
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 防火管理模块
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Route("api/[controller]/[action]")]
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
|
public class FireManagementController : ControllerBase
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly FireManagementApp _app;
|
|
|
|
|
|
|
|
|
|
|
|
public FireManagementController(FireManagementApp app)
|
|
|
|
|
|
{
|
|
|
|
|
|
_app = app;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-07 11:30:37 +08:00
|
|
|
|
#region 任务
|
2025-03-21 16:42:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 下发防火线索任务
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info">防火任信息</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> IssuedFireClueTask(FmFireclueTask info)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.IssuedFireClueTask(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-03-21 16:44:51 +08:00
|
|
|
|
/// 查询接收人员
|
2025-03-21 16:42:48 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="username"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2025-03-22 08:42:21 +08:00
|
|
|
|
public async Task<Response<List<SysUserResp>>> LoadFireClueUser(string username, string unitname)
|
2025-03-21 16:42:48 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response<List<SysUserResp>> response = new Response<List<SysUserResp>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2025-03-22 08:42:21 +08:00
|
|
|
|
return await _app.LoadFireClueUser(username, unitname);
|
2025-03-21 16:42:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-21 17:02:41 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询任务列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="username"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<List<FmFireclueTask>>> GetTaskList()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FmFireclueTask>> response = new Response<List<FmFireclueTask>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetTaskList();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-11-08 15:03:55 +08:00
|
|
|
|
/// 任务详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<FireClueTaskResp>> LoadFireTaskInfoById(long id, string userid)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<FireClueTaskResp> response = new Response<FireClueTaskResp>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadFireTaskInfoById(id, userid);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-04-14 10:16:21 +08:00
|
|
|
|
/// 删除任务
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> DeleteTask(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.DeleteTask(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-11-09 14:18:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新任务状态
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="taskid">任务id</param>
|
|
|
|
|
|
/// <param name="state">状态1-待接收,2-已接收,3-已完成</param>
|
|
|
|
|
|
/// <param name="recipient">接收人Id</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> ReceiveFireClueTask(long taskid, int state, string recipient)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.ReceiveFireClueTask(taskid, state, recipient);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-07 11:30:37 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询任务列表--后台使用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="username"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<PageInfo<List<FmFireclueTask>>>> GetTaskPageList([FromQuery] FireClueTaskReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FmFireclueTask>>> response = new Response<PageInfo<List<FmFireclueTask>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetTaskPageList(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 人员单位管理
|
2025-04-14 10:16:21 +08:00
|
|
|
|
/// <summary>
|
2025-03-21 17:02:41 +08:00
|
|
|
|
/// 查询人员单位信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2025-03-22 08:42:21 +08:00
|
|
|
|
[HttpGet]
|
2025-03-21 17:02:41 +08:00
|
|
|
|
public async Task<Response<List<FmUserUnit>>> GetUserUnit()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FmUserUnit>> response = new Response<List<FmUserUnit>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetUserUnit();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-27 14:52:07 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加人员单位
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> AddUserUnit(FmUserUnit info)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddUserUnit(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>> EditUserUnit(FmUserUnit info)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.EditUserUnit(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除人员单位
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> DeleteUserUnit(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.DeleteUserUnit(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取单条人员单位
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2025-03-29 16:42:55 +08:00
|
|
|
|
|
2025-03-27 14:52:07 +08:00
|
|
|
|
public async Task<Response<FmUserUnit>> LoadUserUnitById(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<FmUserUnit> response = new Response<FmUserUnit>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadUserUnitById(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-29 16:42:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 人员单位信息导入
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="formFiles"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public Response<bool> FireUserUnitUpload(IFormFileCollection formFiles)
|
|
|
|
|
|
{
|
2025-11-09 14:18:47 +08:00
|
|
|
|
Response<bool> response = new();
|
2025-03-29 16:42:55 +08:00
|
|
|
|
try
|
|
|
|
|
|
{
|
2025-04-02 11:33:42 +08:00
|
|
|
|
return _app.FireUserUnitUpload(formFiles);
|
2025-03-29 16:42:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-27 14:52:07 +08:00
|
|
|
|
#endregion
|
2026-01-07 15:57:17 +08:00
|
|
|
|
|
2025-03-24 15:08:45 +08:00
|
|
|
|
#region 火情线索
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加火情线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> AddFireClueInfo(FmFireclueInfo info)
|
|
|
|
|
|
{
|
2025-11-09 14:18:47 +08:00
|
|
|
|
Response<bool> response = new();
|
2025-03-24 15:08:45 +08:00
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddFireClueInfo(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2026-01-16 10:00:21 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// H5 添加火情线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> AddFireClueInfoGZFK(FmFireclueInfo info)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddFireClueInfoGZFK(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-24 15:08:45 +08:00
|
|
|
|
/// <summary>
|
2025-11-09 10:58:29 +08:00
|
|
|
|
/// 添加火情线索日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> AddFireClueLogInfo(FmFireclueinfoLog info)
|
|
|
|
|
|
{
|
2025-11-09 14:18:47 +08:00
|
|
|
|
Response<bool> response = new();
|
2025-11-09 10:58:29 +08:00
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddFireClueLogInfo(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-03-24 15:08:45 +08:00
|
|
|
|
/// 查询火情线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<FmFireclueInfo>> LoadClueInfoById(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<FmFireclueInfo> response = new Response<FmFireclueInfo>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadClueInfoById(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
2025-04-01 14:32:29 +08:00
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-04-14 10:16:21 +08:00
|
|
|
|
/// 查询火情日志
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2025-04-14 11:13:20 +08:00
|
|
|
|
[AllowAnonymous]
|
2025-04-14 10:16:21 +08:00
|
|
|
|
public async Task<Response<List<FmFireclueinfoLog>>> GetFireClueLog(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FmFireclueinfoLog>> response = new Response<List<FmFireclueinfoLog>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetFireClueLog(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-04-01 14:32:29 +08:00
|
|
|
|
/// 获取火情信息和摄像机信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<dynamic>> LoadClueWithInfoById(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<dynamic> response = new Response<dynamic>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadClueWithInfoById(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
2025-03-24 15:08:45 +08:00
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询火情线索列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<List<FmFireclueInfo>>> GetFireClueList()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FmFireclueInfo>> response = new Response<List<FmFireclueInfo>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetFireClueList();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
2026-01-07 15:57:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询火情线索列表--后台用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<PageInfo<List<FmFireclueInfo>>>> GetFireCluePageList([FromQuery]FireClueInfoReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FmFireclueInfo>>> response = new Response<PageInfo<List<FmFireclueInfo>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetFireCluePageList(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
2025-03-24 15:08:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-04-15 14:18:37 +08:00
|
|
|
|
/// 修改火情线索状态
|
2025-04-02 11:33:42 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
|
/// <param name="state"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
2025-04-15 14:18:37 +08:00
|
|
|
|
[AllowAnonymous]
|
2025-04-02 11:33:42 +08:00
|
|
|
|
public async Task<Response<bool>> UpdatFireStateById(long id, int state)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.UpdatFireState(id, state);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
2025-03-24 15:08:45 +08:00
|
|
|
|
/// 按日期统计火情线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="type">1-月,2-年</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<List<FireInfoForChart>>> GetFireClueStatistics(int type)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FireInfoForChart>> response = new Response<List<FireInfoForChart>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetFireClueStatistics(type);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-25 10:13:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 按状态统计火情线索
|
|
|
|
|
|
/// </summary>
|
2025-03-27 14:19:20 +08:00
|
|
|
|
/// <param name="type">1-日,2-月,3-年</param>
|
2026-01-21 14:51:51 +08:00
|
|
|
|
/// <param name="sourcetype">来源类型APP = 1 高空瞭望 = 2无人机 = 3人工合并 = 4,公众反馈=5 卫星遥感=6,摄像头=7</param>
|
2025-03-25 10:13:47 +08:00
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2026-01-21 14:51:51 +08:00
|
|
|
|
public async Task<Response<List<FireInfoStateForChart>>> GetFireClueStatisticsByState(int type,List<int> sourcetype)
|
2025-03-25 10:13:47 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response<List<FireInfoStateForChart>> response = new Response<List<FireInfoStateForChart>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2026-01-21 14:51:51 +08:00
|
|
|
|
return await _app.GetFireClueStatisticsByState(type,sourcetype);
|
2025-03-25 10:13:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 按等级统计火情线索
|
|
|
|
|
|
/// </summary>
|
2025-03-27 14:19:20 +08:00
|
|
|
|
/// <param name="type">1-日,2-月,3-年</param>
|
2025-03-25 10:13:47 +08:00
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<List<FireInfoDegreeForChart>>> GetFireClueStatisticsByDegreeType(int type)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<FireInfoDegreeForChart>> response = new Response<List<FireInfoDegreeForChart>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetFireClueStatisticsByDegreeType(type);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-03-24 15:08:45 +08:00
|
|
|
|
#endregion
|
2025-03-28 16:41:12 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 在线情况
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageReq"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2025-03-29 09:25:52 +08:00
|
|
|
|
[HttpPost]
|
2025-03-28 16:41:12 +08:00
|
|
|
|
public async Task<Response<PageInfo<dynamic>>> GetPointUserOnLine(UserOnLineReq pageReq)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<dynamic>> response = new Response<PageInfo<dynamic>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetPointUserOnLine(pageReq);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2025-04-02 11:33:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-03-31 16:40:54 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加人员坐标点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info">坐标点</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> AddPoint(FmUserPoint info)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddPointAsync(info);
|
|
|
|
|
|
}
|
2025-04-14 11:13:20 +08:00
|
|
|
|
|
2025-04-01 16:35:23 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 地图标绘保存
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> SaveMapPlotting(MapPlottingReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (string.IsNullOrEmpty(req.Title))
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Response<bool>() { Code = 500, Message = "标题不能为空" };
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(req.Description))
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Response<bool>() { Code = 500, Message = "描述不能为空" };
|
|
|
|
|
|
}
|
|
|
|
|
|
return await _app.SaveMapPlotting(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 地图村绘列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<PageInfo<dynamic>>> GetMapPlotting([FromQuery] PageReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetMapPlotting(req);
|
|
|
|
|
|
}
|
2025-11-06 14:14:46 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询人员上报的线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageIndex"></param>
|
|
|
|
|
|
/// <param name="state"></param>
|
|
|
|
|
|
/// <param name="pageSize"></param>
|
|
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<PageInfo<List<FireClueInfoResp>>>> LoadFireClueInfoByUserId(int pageIndex, int state, int pageSize, string userid)
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadFireClueInfoByUserId(pageIndex, state, pageSize, userid);
|
|
|
|
|
|
}
|
2025-11-06 16:46:40 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取视频流
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="deviceCode"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
2025-11-08 13:53:33 +08:00
|
|
|
|
public string GetPreviewURLs(string deviceCode, string protocol)
|
2025-11-06 16:46:40 +08:00
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return _app.GetPreviewURLs(deviceCode, protocol);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ex.Message.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2025-11-06 16:42:59 +08:00
|
|
|
|
|
2026-01-05 11:16:42 +08:00
|
|
|
|
|
2026-01-17 16:26:04 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取单个设备的视频流--通用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="cameraIndexCode">设备唯一标识吗</param>
|
|
|
|
|
|
/// <param name="url">设备地址(例:192.168.10.163)</param>
|
|
|
|
|
|
/// <param name="appkey"></param>
|
|
|
|
|
|
/// <param name="appsecret"></param>
|
|
|
|
|
|
/// <param name="port">设备端口(例1443)</param>
|
|
|
|
|
|
/// <param name="protocol"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public string GetPreviewURL(string cameraIndexCode, string url, string appkey, string appsecret, int port, string protocol)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return _app.GetPreviewURL(cameraIndexCode, url,appkey,appsecret,port,protocol);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ex.Message.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-05 11:16:42 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取视频流---海康平台2
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="deviceCode"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public string GetPreviewURLs2(string deviceCode, string protocol)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return _app.GetPreviewURLs2(deviceCode, protocol);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ex.Message.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-06 16:42:59 +08:00
|
|
|
|
#region 人员类型统计查询
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<UserTypeStatisticsRes>> GetUserTypeStatistics()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<UserTypeStatisticsRes> response = new Response<UserTypeStatisticsRes>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetUserTypeStatistics();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2025-11-07 11:41:12 +08:00
|
|
|
|
|
|
|
|
|
|
#region 获取物资相关接口
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询全部营房信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public Response<List<dynamic>> GetAllYingFang()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<dynamic>> response = new Response<List<dynamic>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Result = _app.GetAllYingFang();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 物资储备点
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="wuzi">物资名称</param>
|
|
|
|
|
|
/// <param name="areaname"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public TableData Loadwuzichubei(string wuzi, string areaname)
|
|
|
|
|
|
{
|
|
|
|
|
|
return _app.Loadwuzichubei(wuzi, areaname);
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2025-11-08 13:53:33 +08:00
|
|
|
|
|
|
|
|
|
|
#region app任务
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询火情任务列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
|
|
/// <param name="pageIndex"></param>
|
|
|
|
|
|
/// <param name="pageSize"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2025-11-08 14:55:46 +08:00
|
|
|
|
public async Task<Response<PageInfo<List<FireClueTaskResp>>>> LoadFireClueTaskByUserId(string userid, int pageIndex = 1, int pageSize = 10)
|
2025-11-08 13:53:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FireClueTaskResp>>> response = new Response<PageInfo<List<FireClueTaskResp>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadFireClueTaskByUserId(userid, pageIndex, pageSize);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询所有任务
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="pageIndex"></param>
|
|
|
|
|
|
/// <param name="pageSize"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
2025-11-08 14:55:46 +08:00
|
|
|
|
public async Task<Response<PageInfo<List<FireClueTaskResp>>>> LoadAllTask(int pageIndex = 1, int pageSize = 10)
|
2025-11-08 13:53:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FireClueTaskResp>>> response = new Response<PageInfo<List<FireClueTaskResp>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadAllTask(pageIndex, pageSize);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询线索
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="areaname"></param>
|
|
|
|
|
|
/// <param name="pageIndex"></param>
|
|
|
|
|
|
/// <param name="pageSize"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2025-11-08 14:10:28 +08:00
|
|
|
|
[HttpPost]
|
2025-11-08 13:53:33 +08:00
|
|
|
|
public async Task<Response<PageInfo<List<FireClueInfoResp>>>> LoadFireClueInfoByAreaName(string areaname, int pageIndex = 1, int pageSize = 10)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FireClueInfoResp>>> response = new Response<PageInfo<List<FireClueInfoResp>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadFireClueInfoByAreaName(areaname, pageIndex = 1, pageSize = 10);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询在线人员
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<List<RYResApp>>> GetPointByAPP()
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<List<RYResApp>> response = new Response<List<RYResApp>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetPointByAPPAsync();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2026-01-06 11:28:21 +08:00
|
|
|
|
|
|
|
|
|
|
#region 感知中心--摄像头类型
|
2026-01-06 15:05:17 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 感知中心--摄像头类型统计
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2026-01-06 11:28:21 +08:00
|
|
|
|
[HttpGet]
|
2026-01-06 15:05:17 +08:00
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<List<CameraCountRes>>> GetCameraCountByType()
|
2026-01-06 11:28:21 +08:00
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetCameraCountByType();
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
2026-01-06 15:05:17 +08:00
|
|
|
|
return new Response<List<CameraCountRes>>
|
2026-01-06 11:28:21 +08:00
|
|
|
|
{
|
|
|
|
|
|
Result = null,
|
|
|
|
|
|
Message = ex.Message.ToString()
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2026-01-06 15:05:17 +08:00
|
|
|
|
|
|
|
|
|
|
#region 海康火情订阅
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 海康 报警事件订阅回调方法 火点检测 192515,烟火检测 192514 ,烟雾检测 192513
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="str"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> AddCameraFireInfo(dynamic str)
|
|
|
|
|
|
{
|
|
|
|
|
|
var param = JsonConvert.DeserializeObject<JObject>(str.ToString());
|
|
|
|
|
|
FmFireclueInfo ewInfo = new FmFireclueInfo();
|
|
|
|
|
|
ewInfo.Address = param["params"]["events"][0]["data"]["fireDetection"][0]["targetAttrs"]["cameraAddress"];
|
|
|
|
|
|
ewInfo.EventId = param["params"]["events"][0]["eventId"];
|
|
|
|
|
|
|
|
|
|
|
|
ewInfo.ReportTime = param["params"]["events"][0]["happenTime"];
|
|
|
|
|
|
ewInfo.Image = param["params"]["events"][0]["data"]["fielddetection"][0]["imageUrl"];
|
|
|
|
|
|
//ewInfo.EWAddress = param["params"]["events"][0]["data"]["fielddetection"][0]["targetAttrs"]["cameraAddress"];
|
|
|
|
|
|
ewInfo.CreateId = param["params"]["events"][0]["data"]["fielddetection"][0]["targetAttrs"]["cameraIndexCode"];
|
|
|
|
|
|
ewInfo.Lat = param["params"]["events"][0]["data"]["fielddetection"][0]["targetAttrs"]["latitude"];
|
|
|
|
|
|
ewInfo.Lng = param["params"]["events"][0]["data"]["fielddetection"][0]["targetAttrs"]["longitude"];
|
|
|
|
|
|
ewInfo.SourceType = (int)SourceType.摄像头;
|
|
|
|
|
|
ewInfo.State = (int)State.上报;
|
|
|
|
|
|
ewInfo.AreaName = "feixian";
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddFireClueInfo(ewInfo);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
|
|
|
|
|
|
response.Result=false;
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
2026-01-12 10:03:51 +08:00
|
|
|
|
|
|
|
|
|
|
#region 摄像头信息处理
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 大华摄像头添加
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="county">所属县区</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> AddCameraInfoYingJi(string county)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddCameraInfoYingJi(county);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取海康平台摄像头列表信息,添加到数据库
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="ip">海康平台ip</param>
|
|
|
|
|
|
/// <param name="port">海康平台端口</param>
|
|
|
|
|
|
/// <param name="pathid">组织架构路径id</param>
|
|
|
|
|
|
/// <param name="appkey">appkey</param>
|
|
|
|
|
|
/// <param name="appsecret">appsecret</param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<bool>> AddHaiKangCameraInfo(string ip, int port, string pathid, string appkey, string appsecret)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new Response<bool>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddHaiKangCameraInfo(ip,port,pathid,appkey,appsecret);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询摄像头列表--后台使用
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
|
public async Task<Response<PageInfo<List<FmCamera>>>> GetCameraInfoPageList([FromQuery]FmCameraReq req)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<PageInfo<List<FmCamera>>> response = new Response<PageInfo<List<FmCamera>>>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetCameraInfoPageList(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2026-01-30 11:11:39 +08:00
|
|
|
|
|
2026-01-12 10:03:51 +08:00
|
|
|
|
#endregion
|
2026-01-30 11:11:39 +08:00
|
|
|
|
#region 在线人员获取
|
2026-01-30 11:14:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 在线人员获取
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="unitname"></param>
|
|
|
|
|
|
/// <param name="type"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2026-01-30 11:11:39 +08:00
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<TableData> GetPointByUserTypeAsync(string unitname, int type)
|
|
|
|
|
|
{
|
|
|
|
|
|
TableData response = new TableData();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.GetPointByUserTypeAsync(unitname,type);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.code = 500;
|
|
|
|
|
|
response.msg = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2026-01-30 15:13:00 +08:00
|
|
|
|
|
|
|
|
|
|
#region 护林员打卡时间添加/更新
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 护林员打卡时间添加/更新
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
public async Task<Response<bool>> AddOrUpdateTimeSolt(FmUserTimeSlot info)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<bool> response = new();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.AddOrUpdateTimeSolt(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2026-01-30 15:58:10 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询护林员打卡时间
|
|
|
|
|
|
/// </summary>
|
2026-01-30 15:59:39 +08:00
|
|
|
|
/// <param name="id">护林员id(userid)</param>
|
2026-01-30 15:58:10 +08:00
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Response<FmUserTimeSlot>> LoadTimeSoltByUserId(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response<FmUserTimeSlot> response = new Response<FmUserTimeSlot>();
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return await _app.LoadTimeSoltByUserId(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
{
|
|
|
|
|
|
response.Code = 500;
|
|
|
|
|
|
response.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response;
|
|
|
|
|
|
}
|
2026-01-30 15:13:00 +08:00
|
|
|
|
#endregion
|
2025-03-21 16:42:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|