ningshuxia
2022-12-01 ad494f13d2ddf31f142cf7fb908b3a6e90395a1a
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace IStation.Application
{
    /// <summary>
    /// 监测实时记录内容
    /// </summary>
    public class MonitorRealRecordContentDto
    {
        /// <summary>
        /// 
        /// </summary>
        public MonitorRealRecordContentDto() { }
 
        /// <summary>
        /// 
        /// </summary>
        public MonitorRealRecordContentDto(Model.MonitorRealRecordContent rhs)
        {
            this.SrcTime = rhs.SrcTime;
            this.SrcValue = rhs.SrcValue;
            this.DataTime = rhs.DataTime;
            this.DataValue = rhs.DataValue;
            this.DataStatus = rhs.DataStatus;
        }
 
        /// <summary>
        /// 
        /// </summary>
        public MonitorRealRecordContentDto(Model.MonitorRealRecordContent rhs, Model.Signal_SignalType signal):this(rhs)
        {
            if (signal != null)
            {
                if (signal.TryConvert(rhs.DataValue, out double dataValue))
                {
                    this.DataValue = dataValue.ToString();
                }
            }
        }
 
        /// <summary>
        /// 原始时间
        /// </summary>
        public DateTime? SrcTime { get; set; }
 
        /// <summary>
        /// 原始值
        /// </summary>
        public string SrcValue { get; set; }
 
        /// <summary>
        /// 数据时间
        /// </summary>
        public DateTime DataTime { get; set; }
 
        /// <summary>
        /// 数据值
        /// </summary>
        public string DataValue { get; set; }
 
        /// <summary>
        /// 数据状态
        /// </summary>
        public List<string> DataStatus { get; set; }
    }
}