ningshuxia
2022-12-12 e81ca048ef4e9345e904b74ffffd3e8413d18a7e
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static IStation.Model.Camera;
 
namespace IStation.Application
{
    /// <summary>
    /// 
    /// </summary>
    public class SzjtCameraDto 
    {
        /// <summary>
        /// 
        /// </summary>
        public SzjtCameraDto() { }
        /// <summary>
        /// 
        /// </summary>
        public SzjtCameraDto(Model.Product<Model.Camera> rhs)  
        {
            this.ID = rhs.ID;
            this.NO = rhs.NO;
            this.Name = rhs.Name;
            this.Code = rhs.Code;
            this.Specification = rhs.Specification;
            this.ProviderType = rhs.RatedParas.ProviderType;
            this.SeriesNO = rhs.RatedParas.SeriesNO;
            this.VerificationCode = rhs.RatedParas.VerificationCode;
            this.Pixel = rhs.RatedParas.Pixel;
            this.StorageCode = rhs.RatedParas.StorageCode;
            this.StorageMode = rhs.RatedParas.StorageMode;
            this.WaterproofGrade = rhs.RatedParas.WaterproofGrade;
            this.NightType = rhs.RatedParas.NightType;
            this.FocalDistance = rhs.RatedParas.FocalDistance;
            this.IsZoomble = rhs.RatedParas.IsZoomble;
            this.IsRotateAble = rhs.RatedParas.IsRotateAble;
 
            if (this.ProviderType == eProviderType.Hik)
            {
                var account = Model.CameraHikAccount.ToModel(rhs.RatedParas.Account);
                var channel = Model.CameraHikChannel.ToModel(rhs.RatedParas.Channel);
                var hikTokenInfo = new SzjtHikTokenInfoDto();
                hikTokenInfo.AppKey = account.AppKey;
                hikTokenInfo.AppSecret = account.AppSecret;
                hikTokenInfo.ChannelNo = channel.ChannelNo;
                hikTokenInfo.ChannelName = channel.ChannelName;
                hikTokenInfo.ViewToken = SzjtYs7Helper.GetAccessToken(account.AppKey, account.AppSecret);
                hikTokenInfo.LiveUrl = SzjtYs7Helper.GetLiveUrl(account.AppKey, account.AppSecret, this.VerificationCode, this.SeriesNO, channel.ChannelNo);
                this.TokenInfo = hikTokenInfo;
            }
        }
 
        /// <summary>
        /// 标识
        /// </summary>
        public long ID { get; set; }
 
        /// <summary>
        /// 编号
        /// </summary>
        public string NO { get; set; }
 
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
 
        /// <summary>
        /// 型号
        /// </summary>    
        public string Code { get; set; }
 
        /// <summary>
        /// 规格
        /// </summary>    
        public string Specification { get; set; }
 
        /// <summary>
        /// 提供者类型
        /// </summary>    
        public eProviderType ProviderType { get; set; }
 
        /// <summary>
        /// 设备序列号
        /// </summary>    
        public string SeriesNO { get; set; }
 
        /// <summary>
        /// 设备验证码
        /// </summary>    
        public string VerificationCode { get; set; }
 
        /// <summary>
        /// 像素
        /// </summary>    
        public string Pixel { get; set; }
 
        /// <summary>
        /// 存储编码
        /// </summary>    
        public string StorageCode { get; set; }
 
        /// <summary>
        /// 存储方式
        /// </summary>    
        public eStorageMode StorageMode { get; set; }
 
        /// <summary>
        /// 防水等级
        /// </summary>    
        public eWaterproofGrade WaterproofGrade { get; set; }
 
        /// <summary>
        /// 夜视类型
        /// </summary>    
        public eNightType NightType { get; set; }
 
        /// <summary>
        /// 焦距 mm
        /// </summary>    
        public int FocalDistance { get; set; }
 
        /// <summary>
        /// 可变焦
        /// </summary>    
        public bool IsZoomble { get; set; }
 
        /// <summary>
        /// 可旋转
        /// </summary>    
        public bool IsRotateAble { get; set; }
 
        /// <summary>
        /// Token信息
        /// </summary>
        public object TokenInfo { get; set; }
 
 
 
    }
}