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; /// /// 消防控制 /// [ApiController] [Route("api/[controller]")] public class FireControlController { /// /// 分区灭火器开 /// /// /// /// [HttpGet("WriteExtinguisherOn/{id}")] public Result WriteExtinguisherOn(int id) { return Result.Success(FireControlMgr.WriteExtinguisherOn(id)); } /// /// 分区灭火器关 /// /// /// /// [HttpGet("WriteExtinguisherOff/{id}")] public Result WriteExtinguisherOff(int id) { return Result.Success(FireControlMgr.WriteExtinguisherOff(id)); } /// /// 复位开 /// /// /// /// [HttpGet("ResettingOn")] public Result ResettingOn() { return Result.Success(FireControlMgr.ResettingOn()); } /// /// 复位关 /// /// /// /// [HttpGet("ResettingOff")] public Result ResettingOff() { return Result.Success(FireControlMgr.ResettingOff()); } /// /// 报警消音开 /// /// /// /// [HttpGet("MuteAlarmToneOn")] public Result MuteAlarmToneOn() { return Result.Success(FireControlMgr.MuteAlarmToneOn()); } /// /// 报警消音关 /// /// /// /// [HttpGet("MuteAlarmToneOff")] public Result MuteAlarmToneOff() { return Result.Success(FireControlMgr.MuteAlarmToneOff()); } /// /// 自检关 /// /// /// /// [HttpGet("SelfInspectionOn")] public Result SelfInspectionOn() { return Result.Success(FireControlMgr.SelfInspectionOn()); } /// /// 自检关 /// /// /// /// [HttpGet("SelfInspectionOff")] public Result SelfInspectionOff() { return Result.Success(FireControlMgr.SelfInspectionOff()); } /// /// 声光报警开 /// /// /// /// [HttpGet("AudibleVisualAlarmOn")] public Result AudibleVisualAlarmOn() { return Result.Success(FireControlMgr.AudibleVisualAlarmOn()); } /// /// 声光报警关 /// /// /// /// [HttpGet("AudibleVisualAlarmOff")] public Result AudibleVisualAlarmOff() { return Result.Success(FireControlMgr.AudibleVisualAlarmOff()); } /// /// 手动模式开 /// /// /// /// [HttpGet("ManualModeOn")] public Result ManualModeOn() { return Result.Success(FireControlMgr.ManualModeOn()); } /// /// 手动模式关 /// /// /// /// [HttpGet("ManualModeOff")] public Result ManualModeOff() { return Result.Success(FireControlMgr.ManualModeOff()); } /// /// 自动模式关 /// /// /// /// [HttpGet("AutomaticModeOn")] public Result AutomaticModeOn() { return Result.Success(FireControlMgr.AutomaticModeOn()); } /// /// 自动模式关 /// /// /// /// [HttpGet("AutomaticModeOff")] public Result AutomaticModeOff() { return Result.Success(FireControlMgr.AutomaticModeOff()); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone2")] public Result GetSubzone2() { return Result.Success(FireControlMgr.Subzone2); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone3")] public Result GetSubzone3() { return Result.Success(FireControlMgr.Subzone3); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone4")] public Result GetSubzone4() { return Result.Success(FireControlMgr.Subzone4); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone5")] public Result GetSubzone5() { return Result.Success(FireControlMgr.Subzone5); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone6")] public Result GetSubzone6() { return Result.Success(FireControlMgr.Subzone6); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone7")] public Result GetSubzone7() { return Result.Success(FireControlMgr.Subzone7); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone8")] public Result GetSubzone8() { return Result.Success(FireControlMgr.Subzone8); } /// /// 获取读取到的信息 /// /// [HttpGet("GetSubzone9")] public Result GetSubzone9() { return Result.Success(FireControlMgr.Subzone9); } [HttpGet("FireResp")] public Result FireResp() { FireResp FireResp = new FireResp(); FireResp.Subzone2Resp = FireAutoMapper.Subzone2(FireControlMgr.Subzone2); FireResp.Subzone5Resp = FireAutoMapper.Subzone5(FireControlMgr.Subzone5); FireResp.Subzone7Resp = FireAutoMapper.Subzone7(FireControlMgr.Subzone7); return Result.Success(FireResp); } }