报警历史更改,预览版

This commit is contained in:
dell
2023-04-06 21:32:04 +08:00
parent da106d4e00
commit ce941ab243
4 changed files with 899 additions and 157 deletions

View File

@ -4,6 +4,7 @@ using HT.Cloud.Domain.ReportManage;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -40,7 +41,7 @@ namespace HT.Cloud.Service.ReportManage
new SubAllTagReturn()
{
TagID = (short)subsystem.TagID,
Description = subsystem.Description + $"({subsystem.Units})",
Description = subsystem.Description,
Units = subsystem.Units
}
);
@ -102,7 +103,35 @@ namespace HT.Cloud.Service.ReportManage
//return resultlist.ToJson();
}
private class AlarmValue
public async Task<string> GetAlarmRecordQuick(string HATYPE, string startdt, string enddt)
{
SugarParameter[] sqlParameters =
{
new SugarParameter("@HATYPE",HATYPE),
new SugarParameter("@Hstartdt",startdt),
new SugarParameter("@Henddt",enddt)
};
var dt = _context.Ado.UseStoredProcedure().GetDataTable("Query_Tag_Alarm_Count", sqlParameters);
var valuelist = DataTableConvertModel<AlarmValueCount>.ConvertDataTableToList(dt);
return valuelist.ToJson();
}
public async Task<string> GetAlarmSubSystem(string alarmName)
{
var subSystem = repository.IQueryable().Where(x => x.Description == alarmName).First().Subsystem;
return subSystem.ToJson();
}
private class AlarmValueCount
{
public string Alarmtype { get; set; }
public string Description { get; set; }
public int hcount { get; set; }
public int hztime { get; set; }
}
private class AlarmValue
{
public string Description { get; set; }
public string startdt { get; set; }