EQPDataDto.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Core.Dtos
  5. {
  6. public class EQPDataDto
  7. {
  8. public string Topic { get; set; }
  9. public DateTime Date { get; set; }
  10. public List<OutPutPerHourDto> OutPuts { get; set; } = new List<OutPutPerHourDto>();
  11. public List<PSRateInfoDto> PSRates { get; set; } = new List<PSRateInfoDto>();
  12. public List<ECRateDto> ECRates { get; set; } = new List<ECRateDto>();
  13. public List<BTRateInfoDto> BTRates { get; set; } = new List<BTRateInfoDto>();
  14. public List<FOGRateDto> FOGRates { get; set; } = new List<FOGRateDto>();
  15. public List<FPLRateDto> FPLRates { get; set; } = new List<FPLRateDto>();
  16. public List<RTVRateDto> RTVRates { get; set; } = new List<RTVRateDto>();
  17. public List<AGRateDto> AGRates { get; set; } = new List<AGRateDto>();
  18. public List<TPRateDto> TPRates { get; set; } = new List<TPRateDto>();
  19. public List<FPCRateDto> FPCRates { get; set; } = new List<FPCRateDto>();
  20. public List<FLRateDto> FLRates { get; set; } = new List<FLRateDto>();
  21. public List<OTPRateDto> OTPRates { get; set; } = new List<OTPRateDto>();
  22. }
  23. public class OTPRateDto
  24. {
  25. public string Date { get; set; }
  26. public string Shift { get; set; }
  27. public PowerConsumptns PowerConsumptn { get; set; }
  28. }
  29. public class TPRateDto : TPRate
  30. {
  31. public string Date { get; set; }
  32. }
  33. public class FPCRateDto: FPCRate
  34. {
  35. public string Date { get; set; }
  36. }
  37. public class FLRateDto : FLRate
  38. {
  39. public string Date { get; set; }
  40. }
  41. public class AGRateDto : AGRate
  42. {
  43. public string Date { get; set; }
  44. }
  45. public class RTVRateDto : RTVRate
  46. {
  47. public string Date { get; set; }
  48. }
  49. public class OutPutPerHourDto : OutPutPerHour
  50. {
  51. public string Date { get; set; }
  52. public DateTime? DateTime
  53. {
  54. get
  55. {
  56. if (string.IsNullOrEmpty(Date) || string.IsNullOrEmpty(Period))
  57. {
  58. return null;
  59. }
  60. string time = Period[..Period.IndexOf('~')];
  61. return Convert.ToDateTime($"{Date} {time}:00");
  62. }
  63. }
  64. public string ModuleTypeString
  65. {
  66. get
  67. {
  68. if (string.IsNullOrEmpty(ModuleType))
  69. {
  70. return "";
  71. }
  72. if (ModuleType.Length < 8)
  73. {
  74. return ModuleType;
  75. }
  76. return ModuleType[..8];
  77. }
  78. }
  79. }
  80. #region PS
  81. public class PSRateInfoDto
  82. {
  83. public string Date { get; set; }
  84. public string Shift { get; set; }
  85. public List<PSRateInfoOfEPD> PSRatesOfEPD { get; set; } = new List<PSRateInfoOfEPD>();
  86. public List<PSRateInfoOfPS> PSRatesOfPS { get; set; } = new List<PSRateInfoOfPS>();
  87. public PowerConsumptns PowerConsumptn { get; set; }
  88. }
  89. #endregion
  90. #region EC
  91. public class ECRateDto
  92. {
  93. public string Date { get; set; }
  94. public string Shift { get; set; }
  95. public PowerConsumptns PowerConsumptn { get; set; }
  96. }
  97. #endregion
  98. #region BT
  99. public class BTRateInfoDto
  100. {
  101. public string Date { get; set; }
  102. public string Shift { get; set; }
  103. public List<BtRatesOfAOI> BTRatesOfAOI { get; set; } = new List<BtRatesOfAOI>();
  104. public PowerConsumptns PowerConsumptn { get; set; }
  105. }
  106. #endregion
  107. #region FOG
  108. public class FOGRateDto : FOGRate
  109. {
  110. public string Date { get; set; }
  111. }
  112. #endregion
  113. public class FPLRateDto : FPLRate
  114. {
  115. public string Date { get; set; }
  116. }
  117. }