You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
276 lines
7.4 KiB
276 lines
7.4 KiB
using Entity.Api.Resp;
|
|
using HybirdFrameworkCore.Entity;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Service.FireControl;
|
|
using Service.FireControl.Client;
|
|
using Service.FireControl.Msg;
|
|
|
|
namespace WebStarter.Controllers;
|
|
|
|
/// <summary>
|
|
/// 消防控制
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class FireControlController
|
|
{
|
|
/// <summary>
|
|
/// 分区灭火器开
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("WriteExtinguisherOn/{id}")]
|
|
public Result<bool> WriteExtinguisherOn(int id)
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.WriteExtinguisherOn(id));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分区灭火器关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("WriteExtinguisherOff/{id}")]
|
|
public Result<bool> WriteExtinguisherOff(int id)
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.WriteExtinguisherOff(id));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 复位开
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("ResettingOn")]
|
|
public Result<bool> ResettingOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.ResettingOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 复位关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("ResettingOff")]
|
|
public Result<bool> ResettingOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.ResettingOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 报警消音开
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("MuteAlarmToneOn")]
|
|
public Result<bool> MuteAlarmToneOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.MuteAlarmToneOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 报警消音关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("MuteAlarmToneOff")]
|
|
public Result<bool> MuteAlarmToneOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.MuteAlarmToneOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 自检关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("SelfInspectionOn")]
|
|
public Result<bool> SelfInspectionOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.SelfInspectionOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 自检关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("SelfInspectionOff")]
|
|
public Result<bool> SelfInspectionOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.SelfInspectionOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 声光报警开
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("AudibleVisualAlarmOn")]
|
|
public Result<bool> AudibleVisualAlarmOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.AudibleVisualAlarmOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 声光报警关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("AudibleVisualAlarmOff")]
|
|
public Result<bool> AudibleVisualAlarmOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.AudibleVisualAlarmOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 手动模式开
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("ManualModeOn")]
|
|
public Result<bool> ManualModeOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.ManualModeOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 手动模式关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("ManualModeOff")]
|
|
public Result<bool> ManualModeOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.ManualModeOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 自动模式关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("AutomaticModeOn")]
|
|
public Result<bool> AutomaticModeOn()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.AutomaticModeOn());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 自动模式关
|
|
/// </summary>
|
|
/// <param name="removeBinNo"></param>
|
|
/// <param name="putBinNo"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("AutomaticModeOff")]
|
|
public Result<bool> AutomaticModeOff()
|
|
{
|
|
return Result<bool>.Success(FireControlMgr.AutomaticModeOff());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone2")]
|
|
public Result<Service.FireControl.Msg.Subzone2> GetSubzone2()
|
|
{
|
|
return Result<Service.FireControl.Msg.Subzone2>.Success(FireControlMgr.Subzone2);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone3")]
|
|
public Result<Subzone3> GetSubzone3()
|
|
{
|
|
return Result<Subzone3>.Success(FireControlMgr.Subzone3);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone4")]
|
|
public Result<Subzone4> GetSubzone4()
|
|
{
|
|
return Result<Subzone4>.Success(FireControlMgr.Subzone4);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone5")]
|
|
public Result<Service.FireControl.Msg.Subzone5> GetSubzone5()
|
|
{
|
|
return Result<Service.FireControl.Msg.Subzone5>.Success(FireControlMgr.Subzone5);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone6")]
|
|
public Result<Subzone6> GetSubzone6()
|
|
{
|
|
return Result<Subzone6>.Success(FireControlMgr.Subzone6);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone7")]
|
|
public Result<Service.FireControl.Msg.Subzone7> GetSubzone7()
|
|
{
|
|
return Result<Service.FireControl.Msg.Subzone7>.Success(FireControlMgr.Subzone7);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone8")]
|
|
public Result<Subzone8> GetSubzone8()
|
|
{
|
|
return Result<Subzone8>.Success(FireControlMgr.Subzone8);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取读取到的信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("GetSubzone9")]
|
|
public Result<Subzone9> GetSubzone9()
|
|
{
|
|
return Result<Subzone9>.Success(FireControlMgr.Subzone9);
|
|
}
|
|
|
|
|
|
[HttpGet("FireResp")]
|
|
public Result<FireResp> FireResp()
|
|
{
|
|
FireResp FireResp = new FireResp();
|
|
FireResp.Subzone2 = FireAutoMapper.Subzone2(FireControlMgr.Subzone2);
|
|
FireResp.Subzone5 = FireAutoMapper.Subzone5(FireControlMgr.Subzone5);
|
|
FireResp.Subzone7 = FireAutoMapper.Subzone7(FireControlMgr.Subzone7);
|
|
|
|
return Result<FireResp>.Success(FireResp);
|
|
}
|
|
} |