平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

144 lines
3.8 KiB

  1. using Newtonsoft.Json.Linq;
  2. namespace SafeCampus.Application.Services.Business.Warn.Dto;
  3. public class WarnInfoDto
  4. {
  5. public long? ID { get; set; }
  6. /// <summary>
  7. /// 租户id
  8. /// </summary>
  9. public string TenantCode { get; set; }
  10. /// <summary>
  11. /// 门店id
  12. /// </summary>
  13. public string PoiId { get; set; }
  14. /// <summary>
  15. /// 预警id
  16. /// </summary>
  17. public string AlarmId { get; set; }
  18. /// <summary>
  19. /// 预警类型
  20. /// </summary>
  21. public string AlarmType { get; set; }
  22. /// <summary>
  23. /// 预警类型名称
  24. /// </summary>
  25. public string AlarmTypeDesc { get; set; }
  26. /// <summary>
  27. /// 摄像头id
  28. /// </summary>
  29. public string CameraId { get; set; }
  30. /// <summary>
  31. /// 摄像头名称
  32. /// </summary>
  33. public string CameraName { get; set; }
  34. /// <summary>
  35. /// 事件发生时间
  36. /// </summary>
  37. public DateTime Tick { get; set; }
  38. /// <summary>
  39. /// 摄像头快照,原链接有效期为2小时,获取到数据后下载到本地
  40. /// </summary>
  41. public string SnapshotUrl { get; set; }
  42. /// <summary>
  43. /// 预警关联视频(有些报警有,有些没有)
  44. /// </summary>
  45. public string VideoUrl { get; set; }
  46. /// <summary>
  47. /// 目标在快照中的位置
  48. /// </summary>
  49. public string Rects { get; set; }
  50. /// <summary>
  51. /// 人员名称
  52. /// </summary>
  53. public string PersonName { get; set; }
  54. /// <summary>
  55. /// 性别
  56. /// </summary>
  57. public string Gender { get; set; }
  58. /// <summary>
  59. /// 班级id
  60. /// </summary>
  61. public string PersonSetId { get; set; }
  62. /// <summary>
  63. /// 班级名称
  64. /// </summary>
  65. public string PersonSetName { get; set; }
  66. /// <summary>
  67. /// 人员id
  68. /// </summary>
  69. public string PersonId { get; set; }
  70. /// <summary>
  71. /// 人脸相似度
  72. /// </summary>
  73. public float? FaceSimilarity { get; set; }
  74. /// <summary>
  75. /// 人员跟踪id,同一个id表示是同一个人
  76. /// </summary>
  77. public string TrackId { get; set; }
  78. /// <summary>
  79. /// 服装库id
  80. /// </summary>
  81. public string ClothsSetId { get; set; }
  82. /// <summary>
  83. /// 服装id
  84. /// </summary>
  85. public string ClothId { get; set; }
  86. /// <summary>
  87. /// 服装相似度
  88. /// </summary>
  89. public float? ClothSimilarity { get; set; }
  90. /// <summary>
  91. /// 奔跑速度
  92. /// </summary>
  93. public string SpeedLevel { get; set; }
  94. /// <summary>
  95. /// 奔跑时周围人数
  96. /// </summary>
  97. public int? MaxAroundTracks { get; set; }
  98. /// <summary>
  99. /// 人群数量
  100. /// </summary>
  101. public int? Count { get; set; }
  102. /// <summary>
  103. /// 持续时长
  104. /// </summary>
  105. public int? Duration { get; set; }
  106. /// <summary>
  107. /// 人员类型
  108. /// </summary>
  109. public string PersonType { get; set; }
  110. /// <summary>
  111. ///场景标签
  112. /// </summary>
  113. public string Tags { get; set; }
  114. /// <summary>
  115. /// 额外数据,每个预警类型不同
  116. /// </summary>
  117. public string Extend { get; set; }
  118. /// <summary>
  119. /// 预警处理状态
  120. /// </summary>
  121. public int WarnHand { get; set; }
  122. /// <summary>
  123. /// 处理意见
  124. /// </summary>
  125. public string Remark { get; set; }
  126. /// <summary>
  127. /// 处理时间
  128. /// </summary>
  129. public DateTime? HandTime { get; set; }
  130. }
  131. public class WarnInfoDtoMapper : IRegister
  132. {
  133. public void Register(TypeAdapterConfig config)
  134. {
  135. config.ForType<WarnInfo, WarnInfoDto>()
  136. //.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
  137. .Map(x => x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
  138. .Map(x => x.PersonName,x=>x.PersonInfoItem.Name)
  139. .Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName);
  140. }
  141. }