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; }
|
|
|
|
}
|
}
|