150 lines
4.4 KiB
C#
150 lines
4.4 KiB
C#
using LiveCharts;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace InSituLaboratory.Entities.Sensor
|
|
{
|
|
/// <summary>
|
|
/// MEMS质谱仪
|
|
/// </summary>
|
|
public class MEMSZpModel
|
|
{
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 采样时间
|
|
/// </summary>
|
|
public DateTime SamplingTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 记录时间
|
|
/// </summary>
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 故障代码--设备温度 (未开启/未监控 正常 警报 故障)
|
|
/// </summary>
|
|
public string? Tem { get; set; }
|
|
|
|
/// <summary>
|
|
/// 故障代码--设备湿度 (未开启/未监控 正常 警报 故障)
|
|
/// </summary>
|
|
public string? Hum { get; set; }
|
|
|
|
/// <summary>
|
|
/// 故障代码--压力 (未开启/未监控 正常 警报 故障)
|
|
/// </summary>
|
|
public string? Pressure { get; set; }
|
|
|
|
/// <summary>
|
|
/// 故障代码--绝缘 (未开启/未监控 正常 警报 故障)
|
|
/// </summary>
|
|
public string? Insulation { get; set; }
|
|
|
|
/// <summary>
|
|
/// CH4浓度
|
|
/// </summary>
|
|
public float? CH4 { get; set; }
|
|
|
|
/// <summary>
|
|
/// H2O浓度
|
|
/// </summary>
|
|
public float? H2O { get; set; }
|
|
|
|
/// <summary>
|
|
/// N2浓度
|
|
/// </summary>
|
|
public float? N2 { get; set; }
|
|
|
|
/// <summary>
|
|
/// O2浓度
|
|
/// </summary>
|
|
public float? O2 { get; set; }
|
|
|
|
/// <summary>
|
|
/// Ar浓度
|
|
/// </summary>
|
|
public float? Ar { get; set; }
|
|
|
|
/// <summary>
|
|
/// CO2浓度
|
|
/// </summary>
|
|
public float? CO2 { get; set; }
|
|
|
|
|
|
[NotMapped]
|
|
public int DataIdNum { get; set; }
|
|
|
|
public ChartsModel MeMSZPChartsCH4 { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "CH4浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪CH4浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪CH4浓度Max"))
|
|
|
|
};
|
|
|
|
public ChartsModel MeMSZPChartsH2O { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "H2O浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪H2O浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪H2O浓度Max"))
|
|
|
|
};
|
|
|
|
public ChartsModel MeMSZPChartsN2 { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "N2浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪N2浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪N2浓度Max"))
|
|
|
|
};
|
|
|
|
public ChartsModel MeMSZPChartsO2 { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "O2浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪O2浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪O2浓度Max"))
|
|
|
|
};
|
|
|
|
public ChartsModel MeMSZPChartsAr { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "Ar浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪Ar浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪Ar浓度Max"))
|
|
|
|
};
|
|
|
|
public ChartsModel MeMSZPChartsCO2 { get; set; } = new ChartsModel()
|
|
{
|
|
Values = new ChartValues<float>(),
|
|
Value_Name = "CO2浓度",
|
|
X_Time = new List<string>(),
|
|
Y_MinValue = Convert.ToInt32(tools.GetAppSetting("质谱仪CO2浓度Min")),
|
|
Y_MaxValue = Convert.ToInt32(tools.GetAppSetting("质谱仪CO2浓度Max"))
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|