PosRes.cs 2.5 KB

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