AdviceHistoryModel.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace GDNXFD.Data.Model
  9. {
  10. [DataContract]
  11. [Table("WISDOM_CALC_HISTORY")]
  12. public class AdviceHistoryModel
  13. {
  14. [DataMember]
  15. [Column("ID")]
  16. public string Id { set; get; }
  17. [DataMember]
  18. [Column("WINDTURBINEID")]
  19. public string WindturbineId { set; get; }
  20. [DataMember]
  21. [Column("STATIONID")]
  22. public string StationId { set; get; }
  23. [DataMember]
  24. [Column("MODELID")]
  25. public string ModelId { set; get; }
  26. /// <summary>
  27. /// 建议操作
  28. /// </summary>
  29. [DataMember]
  30. [Column("ADVICEOPERATION")]
  31. public OperateStyle AdviseOperation { set; get; }
  32. /// <summary>
  33. /// 推荐来源 1=实时状态,2=报警,3=风功率预测,4=健康管理,5=性能等级评估
  34. /// </summary>
  35. [DataMember]
  36. [Column("ADVICETYPE")]
  37. public CalculationOriginType AdviceType { set; get; }
  38. /// <summary>
  39. /// 上一次更新时间
  40. /// </summary>
  41. [DataMember]
  42. [Column("LASTUPDATETIME")]
  43. public DateTime LastUpdateTime { set; get; }
  44. /// <summary>
  45. /// 建议执行时间
  46. /// </summary>
  47. [DataMember]
  48. [Column("ADVICEEXECUTETIME")]
  49. public DateTime AdviceExecuteTime { set; get; }
  50. /// <summary>
  51. /// 实际执行时间
  52. /// </summary>
  53. [DataMember]
  54. [Column("EXECUTETIME")]
  55. public DateTime? ExecuteTime { set; get; }
  56. /// <summary>
  57. /// 实际执行的动作
  58. /// </summary>
  59. [DataMember]
  60. [Column("EXECUTEOPERATION")]
  61. public OperateStyle? ExecuteOperation { set; get; }
  62. /// <summary>
  63. /// 操作员Id
  64. /// </summary>
  65. [DataMember]
  66. [Column("OPERATER")]
  67. public string Operater { set; get; }
  68. /// <summary>
  69. /// 操作员姓名
  70. /// </summary>
  71. [DataMember]
  72. [Column("OPERATERNAME")]
  73. public string OperaterName { set; get; }
  74. /// <summary>
  75. /// 计算结果当前状态,1=未执行,2=用户执行,3=用户取消,4=系统取消
  76. /// </summary>
  77. [DataMember]
  78. [Column("STATUS")]
  79. public int Status { set; get; }
  80. /// <summary>
  81. /// 备注
  82. /// </summary>
  83. [DataMember]
  84. [Column("NOTES")]
  85. public string Notes { set; get; }
  86. /// <summary>
  87. /// 风机名称
  88. /// </summary>
  89. public string WindturbineShortId
  90. {
  91. get
  92. {
  93. string name = this.WindturbineId.Replace("01_", "");
  94. return name;
  95. }
  96. }
  97. /// <summary>
  98. /// 风场名称
  99. /// </summary>
  100. public string StationName
  101. {
  102. get
  103. {
  104. string stationName = "";
  105. switch (this.StationId)
  106. {
  107. case "SBQ_FDC":
  108. stationName = "石板泉风电场";
  109. break;
  110. case "MHS_FDC":
  111. stationName = "麻黄山风电场";
  112. break;
  113. case "NSS_FDC":
  114. stationName = "牛首山风电场";
  115. break;
  116. case "XS_FDC":
  117. stationName = "香山风电场";
  118. break;
  119. case "QS_FDC":
  120. stationName = "青山风电场";
  121. break;
  122. default: break;
  123. }
  124. return stationName;
  125. }
  126. }
  127. /// <summary>
  128. /// 建议操作名称
  129. /// </summary>
  130. public string AdviseOperationName
  131. {
  132. get
  133. {
  134. string name = "";
  135. switch (this.AdviseOperation)
  136. {
  137. case OperateStyle.Start:
  138. name = "启动";
  139. break;
  140. case OperateStyle.Stop:
  141. name = "停机";
  142. break;
  143. case OperateStyle.Reset:
  144. name = "复位";
  145. break;
  146. case OperateStyle.Maintain:
  147. name = "维护";
  148. break;
  149. case OperateStyle.UnMaintain:
  150. name = "取消维护";
  151. break;
  152. default:
  153. break;
  154. }
  155. return name;
  156. }
  157. }
  158. /// <summary>
  159. /// 计算来源名称
  160. /// </summary>
  161. public string AdviceTypeName
  162. {
  163. get
  164. {
  165. string name = "";
  166. switch (this.AdviceType)
  167. {
  168. case CalculationOriginType.RealTimeStatus:
  169. name = "实时状态计算";
  170. break;
  171. case CalculationOriginType.Alarm:
  172. name = "报警";
  173. break;
  174. case CalculationOriginType.PowerForecast:
  175. name = "风功率预测";
  176. break;
  177. case CalculationOriginType.HealthyManage:
  178. name = "健康管理";
  179. break;
  180. default:
  181. break;
  182. }
  183. return name;
  184. }
  185. }
  186. /// <summary>
  187. /// 实际执行的动作名称
  188. /// </summary>
  189. public string ExecuteOperationName
  190. {
  191. get
  192. {
  193. string name = "";
  194. if (this.ExecuteOperation.HasValue)
  195. {
  196. switch (this.ExecuteOperation)
  197. {
  198. case OperateStyle.Start:
  199. name = "启动";
  200. break;
  201. case OperateStyle.Stop:
  202. name = "停机";
  203. break;
  204. case OperateStyle.Reset:
  205. name = "复位";
  206. break;
  207. case OperateStyle.Maintain :
  208. name = "维护";
  209. break;
  210. case OperateStyle.UnMaintain:
  211. name = "取消维护";
  212. break;
  213. default:
  214. break;
  215. }
  216. }
  217. return name;
  218. }
  219. }
  220. public string StatusString
  221. {
  222. get
  223. {
  224. string str = "";
  225. switch (this.Status)
  226. {
  227. case 1:
  228. str = "未执行";
  229. break;
  230. case 2:
  231. str = "用户执行";
  232. break;
  233. case 3:
  234. str = "用户取消";
  235. break;
  236. case 4:
  237. str = "系统取消";
  238. break;
  239. }
  240. return str;
  241. }
  242. }
  243. }
  244. }