From 4040e078575d5ca4f130d9450384e1c73169cc26 Mon Sep 17 00:00:00 2001 From: CZ Date: Thu, 11 Jul 2024 13:07:02 +0800 Subject: [PATCH] =?UTF-8?q?controller=E8=8E=B7=E5=8F=96=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/FireControl/Client/FireControlMgr.cs | 16 ++-- .../Controllers/FireControlController.cs | 80 +++++++++++++++++++ 2 files changed, 88 insertions(+), 8 deletions(-) diff --git a/Service/FireControl/Client/FireControlMgr.cs b/Service/FireControl/Client/FireControlMgr.cs index 1734d1e..d9255e5 100644 --- a/Service/FireControl/Client/FireControlMgr.cs +++ b/Service/FireControl/Client/FireControlMgr.cs @@ -7,14 +7,14 @@ namespace Service.FireControl.Client; public class FireControlMgr { - public static Subzone2 Subzone2 { get; set; } - public static Subzone3 Subzone3 { get; set; } - public static Subzone4 Subzone4 { get; set; } - public static Subzone5 Subzone5 { get; set; } - public static Subzone6 Subzone6 { get; set; } - public static Subzone7 Subzone7 { get; set; } - public static Subzone8 Subzone8 { get; set; } - public static Subzone9 Subzone9 { get; set; } + public static Subzone2 Subzone2 = new Subzone2(); + public static Subzone3 Subzone3 = new Subzone3(); + public static Subzone4 Subzone4 = new Subzone4(); + public static Subzone5 Subzone5 = new Subzone5(); + public static Subzone6 Subzone6 = new Subzone6(); + public static Subzone7 Subzone7 = new Subzone7(); + public static Subzone8 Subzone8 = new Subzone8(); + public static Subzone9 Subzone9 = new Subzone9(); public static FireControlClient? FireControlClient { get; set; } diff --git a/WebStarter/Controllers/FireControlController.cs b/WebStarter/Controllers/FireControlController.cs index e8b858d..1ea9adc 100644 --- a/WebStarter/Controllers/FireControlController.cs +++ b/WebStarter/Controllers/FireControlController.cs @@ -1,6 +1,7 @@ using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Service.FireControl.Client; +using Service.FireControl.Msg; namespace WebStarter.Controllers; @@ -178,5 +179,84 @@ public class FireControlController { 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("GetSubzone2")] + public Result GetSubzone6() + { + return Result.Success(FireControlMgr.Subzone6); + } + + /// + /// 获取读取到的信息 + /// + /// + [HttpGet("GetSubzone7")] + public Result GetSubzone7() + { + return Result.Success(FireControlMgr.Subzone7); + } + + /// + /// 获取读取到的信息 + /// + /// + [HttpGet("GetSubzone2")] + public Result GetSubzone8() + { + return Result.Success(FireControlMgr.Subzone8); + } + + /// + /// 获取读取到的信息 + /// + /// + [HttpGet("GetSubzone9")] + public Result GetSubzone9() + { + return Result.Success(FireControlMgr.Subzone9); + } } \ No newline at end of file