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

84 lines
2.3 KiB

  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 Gender { get; set; }
  57. /// <summary>
  58. /// 人员类型
  59. /// </summary>
  60. public string PersonType { get; set; }
  61. /// <summary>
  62. /// 预警处理状态
  63. /// </summary>
  64. public int WarnHand { get; set; }
  65. /// <summary>
  66. /// 处理时间
  67. /// </summary>
  68. public DateTime? HandTime { get; set; }
  69. }
  70. public class WarnInfoListMapper : IRegister
  71. {
  72. public void Register(TypeAdapterConfig config)
  73. {
  74. config.ForType<WarnInfo, WarnInfoList>()
  75. //.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
  76. .Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
  77. .Map(x=>x.PersonName,x=>x.PersonInfoItem.Name)
  78. .Map(x=>x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
  79. .Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name);
  80. }
  81. }