You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.2 KiB
C#
81 lines
2.2 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.SecurityModule.Dtos;
|
|
using DS.WMS.Core.SecurityModule.Interface;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.WebApi.Controllers;
|
|
/// <summary>
|
|
/// 火灾报警服务
|
|
/// </summary>
|
|
public class FireAlarmController : ApiController
|
|
{
|
|
private readonly IFireAlarmService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public FireAlarmController(IFireAlarmService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetFireAlarmList")]
|
|
public DataResult<List<FireAlarmViewModel>> GetFireAlarmList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetFireAlarmListByPage(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetFireAlarmInfo")]
|
|
public DataResult<FireAlarmViewModel> GetFireAlarmInfo([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.GetFireAlarmInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("SendFireAlarmMessage")]
|
|
public async Task<DataResult> SendFireAlarmMessage([FromBody]AlarmMessageInput model)
|
|
{
|
|
return await _invokeService.SendFireAlarmMessage(model);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取未处理火灾报警数
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetFireAlarmWarningCount")]
|
|
public DataResult<int> GetFireAlarmWarningCount()
|
|
{
|
|
var res = _invokeService.GetFireAlarmWarningCount();
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 忽略火灾报警
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("IgnoreFireAlarmWarning")]
|
|
public DataResult IgnoreFireAlarmWarning([FromQuery]string id)
|
|
{
|
|
var res = _invokeService.IgnoreFireAlarmWarning(id);
|
|
return res;
|
|
}
|
|
} |