ControlRecord.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace NEIntelligentControl2.Models.Windturbine
  7. {
  8. public class ControlRecord
  9. {
  10. public string Id { set; get; }
  11. public string WindturbineId { set; get; }
  12. public string StationId { set; get; }
  13. public string ProjectId { set; get; }
  14. public string ModelId { set; get; }
  15. public OperateStyle ControlType { set; get; }
  16. public bool Recommend { set; get; }
  17. public string Guid { set; get; }
  18. public OperateStyle RecommendType { set; get; }
  19. public string UserName { set; get; }
  20. public int UserId { set; get; }
  21. public DateTime Time { set; get; }
  22. public string ErrorCode { set; get; }
  23. public string TimeString { get => Time.ToString("yyyy-MM-dd HH:mm:ss"); }
  24. /// <summary>
  25. /// 风场名称
  26. /// </summary>
  27. public string StationName { get; set; }
  28. public string ControlTypeString
  29. {
  30. get
  31. {
  32. return this.ControlType.GetStringValue();
  33. }
  34. }
  35. public string IsSuccess
  36. {
  37. get
  38. {
  39. if (this.ErrorCode != null && this.ErrorCode.Equals("0"))
  40. {
  41. return "是";
  42. }
  43. else
  44. {
  45. return "否";
  46. }
  47. }
  48. }
  49. }
  50. }