ModelPosRes.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace XdCxRhDW.Repostory.Model
  9. {
  10. /// <summary>
  11. /// 定位结果UI绑定对象
  12. /// </summary>
  13. public class ModelPosRes : PosData
  14. {
  15. [Display(Name = "任务编号")]
  16. public int TaskInfoID { get; set; }
  17. [Display(Name = "站点ID")]
  18. public long StationResID { get; set; }
  19. [Display(Name = "测向编号")]
  20. public long? CxResID { get; set; }
  21. [Display(Name = "参估编号")]
  22. public long CgResID { get; set; }
  23. [Display(AutoGenerateField = false)]
  24. public int? TargetID { get; set; }
  25. [Display(Name = "目标名称")]
  26. public string TarName { get; set; } = "未识别";
  27. [Display(Name = "时隙标识")]
  28. public string TsName { get; set; } = "未知";
  29. [Display(Name = "定位点")]
  30. public string LonLat
  31. {
  32. get
  33. {
  34. if (PosLon == 0 && PosLat == 0)
  35. return "无";
  36. else if (PosLon > 180 || PosLon < -180)
  37. return "无";
  38. else
  39. return $"{PosLon:f4},{PosLat:f4}";
  40. }
  41. }
  42. [Display(Name = "镜像点")]
  43. public string MirrLonLat
  44. {
  45. get
  46. {
  47. if (MirrLon == 0 && MirrLat == 0)
  48. return "无";
  49. else if (MirrLon > 180 || MirrLon < -180)
  50. return "无";
  51. else
  52. return $"{MirrLon:f4},{MirrLat:f4}";
  53. }
  54. }
  55. [Display(Name = "定位类型")]
  56. public EnumPosResType PosResType { get; set; }
  57. [Display(Name = "目标状态")]
  58. public EnumTargetState TargetState { get; set; }
  59. }
  60. }