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

99 lines
2.9 KiB

  1. namespace SafeCampus.Application.Services.Business.AttendanceService;
  2. public class AttendanceList
  3. {
  4. /// <summary>
  5. /// ID
  6. /// </summary>
  7. public long Id { get; set; }
  8. /// <summary>
  9. /// 租户id
  10. /// </summary>
  11. public string TenantCode { get; set; }
  12. /// <summary>
  13. /// 门店id
  14. /// </summary>
  15. public string PoiId { get; set; }
  16. /// <summary>
  17. /// 考勤事件id
  18. /// </summary>
  19. public string EventId { get; set; }
  20. /// <summary>
  21. /// 人员跟踪id
  22. /// </summary>
  23. public string TrackId { get; set; }
  24. /// <summary>
  25. /// 关联底库id 如果为空,表示该人员未匹配到底库
  26. /// </summary>
  27. public string PersonSetId { get; set; }
  28. /// <summary>
  29. /// 人员id
  30. /// </summary>
  31. public string PersonId { get; set; }
  32. /// <summary>
  33. /// 人员名称
  34. /// </summary>
  35. public string PersonName { get; set; }
  36. /// <summary>
  37. /// 寝室名称
  38. /// </summary>
  39. public string DormitName { get; set; }
  40. //人员性别
  41. public string Gender { get; set; }
  42. /// <summary>
  43. /// 班级名称
  44. /// </summary>
  45. public string PersonSetName { get; set; }
  46. /// <summary>
  47. /// 是否自动上报
  48. /// </summary>
  49. public bool IsAuto { get; set; }
  50. /// <summary>
  51. /// 相似度
  52. /// </summary>
  53. public float Similarity { get; set; }
  54. /// <summary>
  55. /// 摄像头id
  56. /// </summary>
  57. public string CameraId { get; set; }
  58. /// <summary>
  59. /// 人脸质量分,取值[0, 100]
  60. /// </summary>
  61. public float FaceScore { get; set; }
  62. /// <summary>
  63. /// 人脸照片url,链接有效期为2小时
  64. /// </summary>
  65. public string SnapshotUrl { get; set; }
  66. /// <summary>
  67. /// 人脸照片数据,base64编码(本地对接使用)
  68. /// </summary>
  69. public string SnapshotData { get; set; }
  70. /// <summary>
  71. /// 事件发生时间
  72. /// </summary>
  73. public DateTime Tick { get; set; }
  74. /// <summary>
  75. /// 目标在快照中的位置
  76. /// </summary>
  77. public string Rects { get; set; }
  78. /// <summary>
  79. /// 人员扩展信息
  80. /// </summary>
  81. public string Extend { get; set; }
  82. /// <summary>
  83. /// 创建时间
  84. /// </summary>
  85. public DateTime CreateTime { get; set; }
  86. }
  87. public class AttendanceListMapper : IRegister
  88. {
  89. public void Register(TypeAdapterConfig config)
  90. {
  91. config.ForType<Attendance, AttendanceList>()
  92. .Map(x => x.PersonName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Name : "")
  93. .Map(x => x.PersonSetName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.PersonSetInfoItem.PersonSetName : "")
  94. .Map(x => x.DormitName, x => !string.IsNullOrEmpty(x.PersonId) ? (x.PersonInfoItem.DormitoryId.HasValue? x.PersonInfoItem.DormitoryInfoItem.Name : "") : "")
  95. .Map(x => x.Gender, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Gender : "");
  96. }
  97. }