PosRes.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. [NotMapped]
  32. [Display(AutoGenerateField = false)]
  33. public string BaseCheckType { get; set; }
  34. [Display(Name = "参估编号")]
  35. public long CgResID { get; set; }
  36. [Display(AutoGenerateField = false)]
  37. [JsonIgnore]
  38. public virtual CgRes CgRes { get; set; }
  39. [Display(AutoGenerateField = false)]
  40. public int? TargetInfoID { get; set; }
  41. public TargetInfo TargetInfo;
  42. [NotMapped]
  43. [Display(AutoGenerateField = false)]
  44. public string BaseTargetName { get; set; }
  45. [Display(Name = "检测编号")]
  46. public long? CheckResID { get; set; }
  47. [Display(AutoGenerateField = false)]
  48. [JsonIgnore]
  49. public virtual CheckRes CheckRes { get; set; }
  50. [Display(Name = "定位点")]
  51. public string LonLat
  52. {
  53. get
  54. {
  55. if (PosLon == 0 && PosLat == 0)
  56. return "--";
  57. else if (PosLon > 180 || PosLon < -180)
  58. return "--";
  59. else
  60. return $"{PosLon:f4},{PosLat:f4}";
  61. }
  62. }
  63. [Display(Name = "镜像点")]
  64. public string MirrLonLat
  65. {
  66. get
  67. {
  68. if (MirrLon == 0 && MirrLat == 0)
  69. return "--";
  70. else if (MirrLon > 180 || MirrLon < -180)
  71. return "--";
  72. else
  73. return $"{MirrLon:f4},{MirrLat:f4}";
  74. }
  75. }
  76. [Display(Name = "定位类型")]
  77. [ToolTip]
  78. public EnumPosResType PosResType { get; set; }
  79. [Display(Name = "目标状态")]
  80. [ToolTip]
  81. public EnumTargetState TargetState { get; set; }
  82. }
  83. }