ningshuxia
2022-11-22 e0738c0754dd80a3b8d972f03d84b0611fd8254c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Application
{
    /// <summary>
    /// 
    /// </summary>
    public class MonitorAlarmPageRecordMobileDto
    {
        /// <summary>
        /// 
        /// </summary>
        public MonitorAlarmPageRecordMobileDto() { }
 
        /// <summary>
        /// 
        /// </summary>
        public MonitorAlarmPageRecordMobileDto(Model.MonitorPoint monitor,Model.Signal_SignalType signal,Model.MonitorAlarmRecord rhs)
        {
            this.ID = rhs.ID;
            this.MonitorPointName = monitor.Name;
            this.SignalName = signal?.Name;
            this.AlarmType = rhs.AlarmType;
            this.AlarmLevel = rhs.AlarmLevel;
            this.ThresholdValue = rhs.ThresholdValue;
            this.AlarmTime= rhs.AlarmTime;
            this.AlarmContent = rhs.AlarmContent;
            this.DataTime = rhs.DataTime;
            this.DataValue=rhs.DataValue;
            this.HandleStatus = rhs.HandleStatus;
 
            if (signal != null)
            {
                if (signal.TryConvert(rhs.DataValue, out double dataValue))
                {
                    this.DataValue = dataValue.ToString()+" "+signal.GetEnUnitName();
                }
            }
        }
 
        /// <summary>
        /// 标识
        /// </summary>    
        public long ID { get; set; }
 
        /// <summary>
        /// 测点名称
        /// </summary>
        public string MonitorPointName { get; set; }
 
        /// <summary>
        /// 信号名称
        /// </summary>
        public string SignalName { get; set; }
 
        /// <summary>
        /// 报警类型
        /// </summary>    
        public string AlarmType { get; set; }
 
        /// <summary>
        /// 报警等级
        /// </summary>    
        public int AlarmLevel { get; set; }
 
        /// <summary>
        /// 阀值
        /// </summary>    
        public string ThresholdValue { get; set; }
 
        /// <summary>
        /// 报警时间
        /// </summary>    
        public DateTime AlarmTime { get; set; }
 
        /// <summary>
        /// 报警内容
        /// </summary>    
        public string AlarmContent { get; set; }
 
        /// <summary>
        /// 数据时间
        /// </summary>    
        public DateTime? DataTime { get; set; }
 
        /// <summary>
        /// 数据值
        /// </summary>    
        public string DataValue { get; set; }
 
        /// <summary>
        /// 处理状态
        /// </summary>    
        public Model.Alarm.eHandleStatus HandleStatus { get; set; }
    }
}