using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NEIntelligentControl2.Models.WinForms { public class AlarmSnap { // "id": 697232623436562436, // "stationId": "MHS_FDC", // "lineId": "MHS04_XL", // "windturbineId": "MG01_43", // "alertValue": 6116, // "category1": "custom", // "category2": "1", // "category3": "CDL", // "rank": "4", // "isOpened": 0, // "lastUpdateTime": "2020-09-14 11:06:55", // "stationName": "麻黄山风电场", // "windturbineName": "麻黄山43号风机", // "alertText": "主轴温升速度大于1.5", // "modelId": "UP105-2000-S" public long id { get; set; } public DateTime lastUpdateTime { get; set; } public string stationId { get; set; } public string lineId { get; set; } public string windturbineId { get; set; } public int alertValue { get; set; } public string category1 { get; set; } public string category2 { get; set; } public string rank { get; set; } public int isOpened { get; set; } public string stationName { get; set; } public string windturbineName { get; set; } public string alertText { get; set; } public string modelId { get; set; } public override bool Equals(object obj) { var tmp = obj as AlarmSnap; if (tmp != null && tmp.id == this.id) return true; return false; } public string categoryName { get { if (category1.Equals("windturbine")) { switch (category2) { case "bj": return "变桨系统"; case "clx": return "齿轮箱"; case "ph": return "偏航系统"; case "kz": return "控制系统"; case "zz": return "主轴"; case "fdj": return "发电机"; case "yy": return "液压系统"; case "bpq": return "变频器"; case "jc": return "机舱"; } return "其它"; } return ""; } } public string RankName { get { switch (rank) { case "1": return "低"; case "2": return "中低"; case "3": return "中"; case "4": return "中高"; case "5": return "高"; default: return "低"; } } } } }