VRBoardNozzleTrxFlowData.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using AutoMapper;
  2. using AutoMapper.Configuration.Annotations;
  3. using Wayne_VaporRecoveryDataCollectorBoard.MessageEntity;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.Text;
  9. using VaporRecoveryOnlineWatchHubApp.UnversalApiModels;
  10. namespace Application.VaporRecoveryOnlineWatchHubApp.UnversalApiModels
  11. {
  12. /// <summary>
  13. /// once a fueling has done on a nozzle, the VR board will report the flow data of this trx.
  14. /// This data will persit to Database for history check.
  15. /// </summary>
  16. public class VRBoardNozzleTrxFlowData
  17. {
  18. //[SourceMember(nameof(GenericData.IntProperty0))]
  19. public DataCollectorBoardTypeEnum? DataCollectorType { get; set; }
  20. //[SourceMember(nameof(GenericData.IntProperty1))]
  21. public byte DataCollectorDeviceAddress { get; set; }
  22. //[SourceMember(nameof(GenericData.IntProperty2))]
  23. //public byte DataCollectorNozzleNumber { get; set; }
  24. //[SourceMember(nameof(GenericData.IntProperty3))]
  25. public int SiteLevelNozzleId { get; set; }
  26. //[SourceMember(nameof(GenericData.IntProperty4))]
  27. //public int DataCollectorDeviceId { get; set; }
  28. //[SourceMember(nameof(GenericData.IntProperty5))]
  29. //public int SiteLevelDispenserId { get; set; }
  30. //[SourceMember(nameof(GenericData.StrProperty0))]
  31. //public string SiteLevelDispenserDesc { get; set; }
  32. //[SourceMember(nameof(GenericData.StrProperty1))]
  33. public double LiquidVolumeWithDecimal { get; set; }
  34. //[SourceMember(nameof(GenericData.StrProperty2))]
  35. public double VaporVolumeWithDecimal { get; set; }
  36. public double VaporLiquidRatio { get; set; }
  37. /// <summary>
  38. /// 最大气流速, with decimal
  39. /// </summary>
  40. public double? MaxAirFlowRateWithDecimal { get; set; }
  41. /// <summary>
  42. /// 最大油流速, with decimal
  43. /// </summary>
  44. public double? MaxLiquidFlowRateWithDecimal { get; set; }
  45. /// <summary>
  46. /// 平均气流速, with decimal
  47. /// </summary>
  48. public double? AvgAirFlowRateWithDecimal { get; set; }
  49. /// <summary>
  50. /// 平均油流速, with decimal
  51. /// </summary>
  52. public double? AvgLiquidFlowRateWithDecimal { get; set; }
  53. /// <summary>
  54. /// when this record created in app side.
  55. /// </summary>
  56. public DateTime TimeStamp { get; set; }
  57. public DateTime? FuellingStartTime { get; set; }
  58. public DateTime? FuellingEndTime { get; set; }
  59. //public string SensorId { get; set; }
  60. public bool 气液比值是否正常 { get; set; }
  61. //public VRState VrState { get; set; }
  62. public double? TankPressure { get; set; }
  63. public double? LiquidPressure { get; set; }
  64. public double? GasConcentrations { get; set; }
  65. public override string ToString()
  66. {
  67. return GetType().GetProperties().Aggregate(string.Empty,
  68. (result, next) => result + $"{next.Name} : {(next.GetValue(this)?.ToString()) ?? string.Empty} ");
  69. }
  70. }
  71. }