lixiaojun
2024-01-03 16dd4aa8fa061fc008d6b2886e3353f13a957221
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
namespace IStation.Application.SZJT
{
    /// <summary>
    /// 
    /// </summary>
    public class StationMonitorListItemMobileDto
    {
 
        /// <summary>
        /// 
        /// </summary>
        public StationMonitorListItemMobileDto(Yw.Model.MonitorPoint monitor, Yw.Model.Signal_SignalType signal, Yw.Model.MonitorRealRecord record)
        {
            this.Name = monitor.Name;
            this.Code = signal.SignalType.Code;
            this.SignalID = signal.ID;
            this.FormatType = signal.SignalType.FormatType;
            this.DataValue = signal.GetDisplayValue(record?.DataValue);
            this.UnitName = signal.GetDisplayUnitName();
            this.DataStatus = Yw.Monitor.eDataStatus.Normal;
            if (record != null)
            {
                if (!Yw.Monitor.DataStatus.IsNormal(record.DataStatus))
                {
                    this.DataStatus = Yw.Monitor.eDataStatus.Error;
                }
            }
            this.SortCode = monitor.SortCode;
            this.Description = monitor.Description;
        }
 
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
 
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }
 
        /// <summary>
        /// 信号id
        /// </summary>
        public long SignalID { get; set; }
 
        /// <summary>
        /// 格式类型
        /// </summary>
        public Yw.Monitor.eFormatType FormatType { get; set; }
 
        /// <summary>
        /// 数据值
        /// </summary>
        public string DataValue { get; set; }
 
        /// <summary>
        /// 单位名称
        /// </summary>
        public string UnitName { get; set; }
 
        /// <summary>
        /// 数据状态
        /// </summary>
        public Yw.Monitor.eDataStatus DataStatus { get; set; }
 
        /// <summary>
        /// 排序码
        /// </summary>
        public int SortCode { get; set; }
 
        /// <summary>
        /// 说明
        /// </summary>
        public string Description { get; set; }
    }
}