123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.Json.Serialization;
- using System.Threading.Tasks;
- namespace NEIntelligentControl2.Models.Alarm
- {
- /// <summary>
- /// 故障信息
- /// </summary>
- public class FaultInfo
- {
- /// <summary>
- /// 故障信息ID
- /// </summary>
- public long Id { get; set; }
- /// <summary>
- /// 报警时间
- /// </summary>
- public DateTime? FaultTime { get; set; }
- /// <summary>
- /// 对象类型
- /// </summary>
- public int MessageType { get; set; }
- /// <summary>
- /// 发送缺陷单使用 这个表的FaultSnap.id
- /// </summary>
- public long SnapID { get; set; }
- /// <summary>
- /// 确认类型
- /// </summary>
- public int ConfirmType { get; set; }
- /// <summary>
- /// 确认时间
- /// </summary>
- public DateTime? ConfirmTime { get; set; }
- /// <summary>
- /// 确认人
- /// </summary>
- public string ConfirmPerson { get; set; }
- /// <summary>
- /// 场站ID
- /// </summary>
- public string StationId { get; set; }
- /// <summary>
- /// ProjectID
- /// </summary>
- public string ProjectId { get; set; }
- /// <summary>
- /// LineID
- /// </summary>
- public string LineId { get; set; }
- /// <summary>
- /// 风机ID
- /// </summary>
- public string WindturbineId { get; set; }
- /// <summary>
- /// 报警对应故障编码
- /// </summary>
- public long AlertValue { get; set; }
- /// <summary>
- /// 报警级别
- /// </summary>
- public string Rank { get; set; }
- /// <summary>
- /// 类型1
- /// </summary>
- public string Category1 { get; set; }
- /// <summary>
- /// 类型2
- /// </summary>
- public string Category2 { get; set; }
- /// <summary>
- /// 类型3
- /// </summary>
- public string Category3 { get; set; }
- /// <summary>
- /// 是否活跃
- /// </summary>
- [JsonPropertyName("opened")]
- public bool IsOpened { get; set; }
- /// <summary>
- /// 最新更新时间
- /// </summary>
- public DateTime? LastUpdateTime { get; set; }
- /// <summary>
- /// 最新更新人
- /// </summary>
- public string LastUpdatePerson { get; set; }
- /// <summary>
- /// 场站名称
- /// </summary>
- public string StationName { get; set; }
- /// <summary>
- /// ProjectName
- /// </summary>
- public string ProjectName { get; set; }
- /// <summary>
- /// LineName
- /// </summary>
- public string LineName { get; set; }
- /// <summary>
- /// 风机名称
- /// </summary>
- public string WindturbineName { get; set; }
- /// <summary>
- /// 报警信息
- /// </summary>
- public string AlertText { get; set; }
- /// <summary>
- /// 风机类型ID
- /// </summary>
- public string ModelId { get; set; }
- /// <summary>
- /// 报警设备名称
- /// </summary>
- public string ObjectName { get; set; }
- /// <summary>
- /// 报警设备id
- /// </summary>
- public string ObjectId { get; set; }
- /// <summary>
- /// 报警设备类型名称
- /// </summary>
- public string CategoryName { get; set; }
- /// <summary>
- /// 解除触发
- /// </summary>
- public string MessageTypeString { get; set; }
- /// <summary>
- /// 是否可以复位
- /// </summary>
- public bool IsAllowReset { get; set; }
- public string LatestUpdateTimeString
- {
- get
- {
- if (FaultTime != null)
- {
- return FaultTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- return LastUpdateTime?.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- private string objectName;
- public string ObjectNameString
- {
- set => objectName = value;
- get
- {
- if (objectName != null) return objectName;
- if (Category1 == "SYZ" || Category1 == "STATION" || Category1 == "GF")
- {
- return StationName;
- }
- return WindturbineName;
- }
- }
- }
- }
|