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

70 lines
2.2 KiB

  1. namespace SafeCampus.Application.Services.Business.ClassRoomCallTaskService;
  2. public class ClassRoomCallTaskDto
  3. {
  4. /// <summary>
  5. /// ID
  6. /// </summary>
  7. public long Id { get; set; }
  8. /// <summary>
  9. /// 摄像头id
  10. /// </summary>
  11. public string CameraId { get; set; }
  12. /// <summary>
  13. /// 摄像头名称
  14. /// </summary>
  15. public string CameraName { get; set; }
  16. /// <summary>
  17. /// 摄像头所属分组名称
  18. /// </summary>
  19. public string CameraGroup { get; set; }
  20. /// <summary>
  21. /// 点名任务id
  22. /// </summary>
  23. public string TaskId { get; set; }
  24. /// <summary>
  25. /// 点名持续时间,单位为分钟,取值[1, 100]
  26. /// </summary>
  27. public int ContinueTime { get; set; }
  28. /// <summary>
  29. /// 人员底库id
  30. /// </summary>
  31. public string PersonSetId { get; set; }
  32. /// <summary>
  33. /// 匹配相似度阈值(如果没传,系统默认用0.5)
  34. /// </summary>
  35. public float Similarity { get; set; }
  36. /// <summary>
  37. /// 创建时间
  38. /// </summary>
  39. public DateTime CreateTime { get; set; }
  40. /// <summary>
  41. /// 结束时间
  42. /// </summary>
  43. public DateTime EndTime { get; set; }
  44. /// <summary>
  45. /// 班级名称
  46. /// </summary>
  47. public string PersonSetName { get; set; }
  48. /// <summary>
  49. /// 院系名称
  50. /// </summary>
  51. public string DepName { get; set; }
  52. /// <summary>
  53. /// 专业名称
  54. /// </summary>
  55. public string MajorName { get; set; }
  56. }
  57. public class ClassRoomCallTaskDtoMapper : IRegister
  58. {
  59. public void Register(TypeAdapterConfig config)
  60. {
  61. config.ForType<ClassRoomCallTask, ClassRoomCallTaskDto>()
  62. //.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
  63. .Map(x=>x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
  64. .Map(x=>x.MajorName,x=>x.PersonSetInfoItem.MajorInfoItem.Name)
  65. .Map(x=>x.DepName,x=>x.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name)
  66. .Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
  67. .Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name);
  68. }
  69. }