平安校园
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.

WarnInfoList.cs 2.7 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 months ago
4 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
4 months ago
4 months ago
1 month ago
4 months ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. namespace SafeCampus.Application.Services.Business.Warn.Dto;
  2. public class WarnInfoList
  3. {
  4. public long ID { get; set; }
  5. /// <summary>
  6. /// 预警id
  7. /// </summary>
  8. public string AlarmId { get; set; }
  9. /// <summary>
  10. /// 预警类型
  11. /// </summary>
  12. public string AlarmType { get; set; }
  13. /// <summary>
  14. /// 预警类型名称
  15. /// </summary>
  16. public string AlarmTypeDesc { get; set; }
  17. /// <summary>
  18. /// 摄像头id
  19. /// </summary>
  20. public string CameraId { get; set; }
  21. /// <summary>
  22. /// 摄像头名称
  23. /// </summary>
  24. public string CameraName { get; set; }
  25. /// <summary>
  26. /// 摄像头所属分组
  27. /// </summary>
  28. public string CameraGroup { get; set; }
  29. /// <summary>
  30. /// 事件发生时间
  31. /// </summary>
  32. public DateTime Tick { get; set; }
  33. /// <summary>
  34. /// 摄像头快照,原链接有效期为2小时,获取到数据后下载到本地
  35. /// </summary>
  36. public string SnapshotUrl { get; set; }
  37. /// <summary>
  38. /// 人员id
  39. /// </summary>
  40. public string PersonId { get; set; }
  41. /// <summary>
  42. /// 人员名称
  43. /// </summary>
  44. public string PersonName { get; set; }
  45. /// <summary>
  46. /// 班级id
  47. /// </summary>
  48. public string PersonSetId { get; set; }
  49. /// <summary>
  50. /// 班级名称
  51. /// </summary>
  52. public string PersonSetName { get; set; }
  53. /// <summary>
  54. /// 专业名称
  55. /// </summary>
  56. public string MajorName { get; set; }
  57. /// <summary>
  58. /// 院系名称
  59. /// </summary>
  60. public string DepName { get; set; }
  61. /// <summary>
  62. /// 性别
  63. /// </summary>
  64. public string Gender { get; set; }
  65. /// <summary>
  66. /// 人员类型
  67. /// </summary>
  68. public string PersonType { get; set; }
  69. /// <summary>
  70. /// 预警处理状态
  71. /// </summary>
  72. public int WarnHand { get; set; }
  73. /// <summary>
  74. /// 处理时间
  75. /// </summary>
  76. public DateTime? HandTime { get; set; }
  77. }
  78. public class WarnInfoListMapper : IRegister
  79. {
  80. public void Register(TypeAdapterConfig config)
  81. {
  82. config.ForType<WarnInfo, WarnInfoList>()
  83. //.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
  84. .Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
  85. .Map(x => x.PersonName, x => x.PersonInfoItem.Name)
  86. .Map(x => x.PersonSetName, x => x.PersonSetInfoItem.PersonSetName)
  87. .Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name)
  88. .Map(x=>x.MajorName,x=>x.PersonSetInfoItem.MajorInfoItem.Name)
  89. .Map(x=>x.DepName,x=>x.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name);
  90. //;
  91. }
  92. }