PosRes.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace XdCxRhDW.Entity
  10. {
  11. /// <summary>
  12. /// 定位结果表
  13. /// </summary>
  14. [Table("PosRes")]
  15. public class PosRes : PosData
  16. {
  17. [Display(Name = "任务编号")]
  18. public int TaskInfoID { get; set; }
  19. [Display(Name = "上行频点")]
  20. public long FreqUpHz { get; set; }
  21. [Display(Name = "站点ID")]
  22. public long StationResID { get; set; }
  23. [Display(AutoGenerateField = false)]
  24. [JsonIgnore]
  25. public virtual StationRes StationRes { get; set; }
  26. [Display(Name = "测向编号")]
  27. public long? CxResID { get; set; }
  28. [Display(AutoGenerateField = false)]
  29. [JsonIgnore]
  30. public virtual CxRes CxRes { get; set; }
  31. [Display(Name = "参估编号")]
  32. public long CgResID { get; set; }
  33. [Display(AutoGenerateField = false)]
  34. [JsonIgnore]
  35. public virtual CgRes CgRes { get; set; }
  36. [Display(AutoGenerateField = false)]
  37. public int? TargetInfoID { get; set; }
  38. public TargetInfo TargetInfo;
  39. [Display(Name = "检测编号")]
  40. public long? CheckResID { get; set; }
  41. [Display(AutoGenerateField = false)]
  42. [JsonIgnore]
  43. public virtual CheckRes CheckRes { get; set; }
  44. [Display(Name = "定位点")]
  45. public string LonLat
  46. {
  47. get
  48. {
  49. if (PosLon == 0 && PosLat == 0)
  50. return "--";
  51. else if (PosLon > 180 || PosLon < -180)
  52. return "--";
  53. else
  54. return $"{PosLon:f4},{PosLat:f4}";
  55. }
  56. }
  57. [Display(Name = "镜像点")]
  58. public string MirrLonLat
  59. {
  60. get
  61. {
  62. if (MirrLon == 0 && MirrLat == 0)
  63. return "--";
  64. else if (MirrLon > 180 || MirrLon < -180)
  65. return "--";
  66. else
  67. return $"{MirrLon:f4},{MirrLat:f4}";
  68. }
  69. }
  70. [Display(Name = "定位类型")]
  71. [ToolTip]
  72. public EnumPosResType PosResType { get; set; }
  73. [Display(Name = "目标状态")]
  74. [ToolTip]
  75. public EnumTargetState TargetState { get; set; }
  76. }
  77. }