diff --git a/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs new file mode 100644 index 0000000..a543360 --- /dev/null +++ b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs @@ -0,0 +1,46 @@ +using System; +using System.ComponentModel.DataAnnotations; +using SqlSugar; + +namespace HT.Cloud.Domain.SystemSecurity +{ + /// + /// 创 建:cdl + /// 日 期:2024-01-04 10:56 + /// 描 述:IO模块实体类 + /// + [SugarTable("HT_REALTIME_IOGROUP")] + public class RealTimeIOGroupEntity + { + /// + /// + /// + [SugarColumn(ColumnName="ID", ColumnDescription = "",ColumnDataType = "int(10)",IsPrimaryKey = true)] + public int ID { get; set; } + /// + /// ioid + /// + [SugarColumn(ColumnName="IOID", ColumnDescription = "ioid",ColumnDataType = "int(10)", IsNullable = true)] + public int? IOID { get; set; } + /// + /// IO序号 + /// + [SugarColumn(ColumnName="IOIndex", ColumnDescription = "IO序号",ColumnDataType = "int(10)", IsNullable = true)] + public int? IOIndex { get; set; } + /// + /// IOSLOT + /// + [SugarColumn(ColumnName="IOSlot", ColumnDescription = "IOSLOT",ColumnDataType = "int(10)", IsNullable = true)] + public int? IOSlot { get; set; } + /// + /// IO型号 + /// + [SugarColumn(ColumnName="IOModel", ColumnDescription = "IO型号",ColumnDataType = "varchar(255)", IsNullable = true)] + public string IOModel { get; set; } + /// + /// IO位数 + /// + [SugarColumn(ColumnName="IOBit", ColumnDescription = "IO位数",ColumnDataType = "varchar(255)", IsNullable = true)] + public string IOBit { get; set; } + } +} diff --git a/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOInfoEntity.cs b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOInfoEntity.cs new file mode 100644 index 0000000..822ab68 --- /dev/null +++ b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOInfoEntity.cs @@ -0,0 +1,36 @@ +using System; +using System.ComponentModel.DataAnnotations; +using SqlSugar; + +namespace HT.Cloud.Domain.SystemSecurity +{ + /// + /// 创 建:cdl + /// 日 期:2024-01-04 10:53 + /// 描 述:IO信息实体类 + /// + [SugarTable("HT_REALTIME_IOINFO")] + public class RealTimeIOInfoEntity + { + /// + /// + /// + [SugarColumn(ColumnName="ID", ColumnDescription = "",ColumnDataType = "int(10)")] + public int ID { get; set; } + /// + /// ioid + /// + [SugarColumn(ColumnName="IOID", ColumnDescription = "ioid",ColumnDataType = "int(10)", IsNullable = true)] + public int? IOID { get; set; } + /// + /// IO符号名称 + /// + [SugarColumn(ColumnName="IONAME", ColumnDescription = "IO符号名称",ColumnDataType = "varchar(128)", IsNullable = true)] + public string IONAME { get; set; } + /// + /// IO功能名称 + /// + [SugarColumn(ColumnName="IODESCRIPTION", ColumnDescription = "IO功能名称",ColumnDataType = "varchar(128)", IsNullable = true)] + public string IODESCRIPTION { get; set; } + } +} diff --git a/HT.Cloud.Service/SystemSecurity/RealTimeIOState.cs b/HT.Cloud.Service/SystemSecurity/RealTimeIOStateService.cs similarity index 70% rename from HT.Cloud.Service/SystemSecurity/RealTimeIOState.cs rename to HT.Cloud.Service/SystemSecurity/RealTimeIOStateService.cs index dd4af3a..67e7603 100644 --- a/HT.Cloud.Service/SystemSecurity/RealTimeIOState.cs +++ b/HT.Cloud.Service/SystemSecurity/RealTimeIOStateService.cs @@ -17,21 +17,41 @@ using HT.Cloud.Domain.DevicesManage; using Quartz; using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using HT.Cloud.Domain.SystemSecurity; namespace HT.Cloud.Service.SystemSecurity { - public class RealTimeIOState : BaseService, IDenpendency + public class RealTimeIOStateService : BaseService, IDenpendency { /// /// 绑定数据仓库的数据库ID /// private string dataDBNumber = GlobalContext.SystemConfig.DataDBNumber; - public RealTimeIOState(ISqlSugarClient context) : base(context) + public RealTimeIOStateService(ISqlSugarClient context) : base(context) { } - public async Task GetRtData() + public async Task> GetIOGroup(string systemName) + { + var groupName = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().GroupName; + var driverId = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().DriverID; + var driverName = _context.AsTenant().QueryableWithAttr().Where(x => x.DriverID == driverId).First().DriverName; + var list = _context.AsTenant().GetConnection(dataDBNumber).Ado.SqlQuery($"SELECT * FROM HT_{driverName}_{groupName}_IOGROUP"); + return list; + + } + + public async Task> GetIOInfo(string systemName) + { + var groupName = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().GroupName; + var driverId = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().DriverID; + var driverName = _context.AsTenant().QueryableWithAttr().Where(x => x.DriverID == driverId).First().DriverName; + var list = _context.AsTenant().GetConnection(dataDBNumber).Ado.SqlQuery($"SELECT * FROM HT_{driverName}_{groupName}_IOINFO"); + return list; + } + + public async Task GetRtData() { //var groupName = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().GroupName; //var driverId = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().DriverID; diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs index 6fe2132..d9291d5 100644 --- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs @@ -10,6 +10,7 @@ using System.Linq; using System.Threading.Tasks; using HT.Cloud.Code; using HT.Cloud.Service.SystemSecurity; +using Quartz; namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers { @@ -19,7 +20,8 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers public class PenMeiJMReportController : BaseController { public ServerStateService _serverStateService { get; set; } - public RealTimeIOState _realTimeIOState { get; set; } + + public RealTimeIOStateService _realTimeIOState { get; set; } [HttpGet] @@ -63,10 +65,26 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers var data = (await _serverStateService.GetList(2)).OrderBy(a => a.F_Date).ToList(); return Content(data.ToJson()); } + [HttpGet] + public async Task GetRealIOGroup() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + + return Content(listgroup.ToJson()); + } + [HttpGet] + public async Task GetRealIOInfo() + { + + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + return Content(listinfo.ToJson()); + } [HttpGet] public async Task GetRealIOState() { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); var data = _realTimeIOState.GetRtData(); return Content(data.Result); } diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit16bitt8bit初版完成.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit16bitt8bit初版完成.cshtml new file mode 100644 index 0000000..e3783b8 --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit16bitt8bit初版完成.cshtml @@ -0,0 +1,1053 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + + + + + + + + + + diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit完成.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit完成.cshtml new file mode 100644 index 0000000..d1d8a73 --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit完成.cshtml @@ -0,0 +1,538 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + + + + + + + + + + diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 副本.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 副本.cshtml new file mode 100644 index 0000000..d1a1b4f --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 副本.cshtml @@ -0,0 +1,854 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + + + + + + + + + + diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 样式完成待改函数.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 样式完成待改函数.cshtml new file mode 100644 index 0000000..f6773bd --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 样式完成待改函数.cshtml @@ -0,0 +1,1265 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + + + + + + + + + + diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml index 8e55f42..5a9624e 100644 --- a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml @@ -7,6 +7,7 @@ - + diff --git a/HT.Cloud.Web/wwwroot/images/S71500.png b/HT.Cloud.Web/wwwroot/images/S71500.png new file mode 100644 index 0000000..92dd73d Binary files /dev/null and b/HT.Cloud.Web/wwwroot/images/S71500.png differ