123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.Text;
- using System.Threading.Tasks;
- namespace GDNXFD.Data.Model
- {
- [DataContract]
- [Table("WISDOM_CALC_HISTORY")]
- public class AdviceHistoryModel
- {
- [DataMember]
- [Column("ID")]
- public string Id { set; get; }
- [DataMember]
- [Column("WINDTURBINEID")]
- public string WindturbineId { set; get; }
- [DataMember]
- [Column("STATIONID")]
- public string StationId { set; get; }
- [DataMember]
- [Column("MODELID")]
- public string ModelId { set; get; }
- /// <summary>
- /// 建议操作
- /// </summary>
- [DataMember]
- [Column("ADVICEOPERATION")]
- public OperateStyle AdviseOperation { set; get; }
- /// <summary>
- /// 推荐来源 1=实时状态,2=报警,3=风功率预测,4=健康管理,5=性能等级评估
- /// </summary>
- [DataMember]
- [Column("ADVICETYPE")]
- public CalculationOriginType AdviceType { set; get; }
- /// <summary>
- /// 上一次更新时间
- /// </summary>
- [DataMember]
- [Column("LASTUPDATETIME")]
- public DateTime LastUpdateTime { set; get; }
- /// <summary>
- /// 建议执行时间
- /// </summary>
- [DataMember]
- [Column("ADVICEEXECUTETIME")]
- public DateTime AdviceExecuteTime { set; get; }
- /// <summary>
- /// 实际执行时间
- /// </summary>
- [DataMember]
- [Column("EXECUTETIME")]
- public DateTime? ExecuteTime { set; get; }
- /// <summary>
- /// 实际执行的动作
- /// </summary>
- [DataMember]
- [Column("EXECUTEOPERATION")]
- public OperateStyle? ExecuteOperation { set; get; }
- /// <summary>
- /// 操作员Id
- /// </summary>
- [DataMember]
- [Column("OPERATER")]
- public string Operater { set; get; }
- /// <summary>
- /// 操作员姓名
- /// </summary>
- [DataMember]
- [Column("OPERATERNAME")]
- public string OperaterName { set; get; }
- /// <summary>
- /// 计算结果当前状态,1=未执行,2=用户执行,3=用户取消,4=系统取消
- /// </summary>
- [DataMember]
- [Column("STATUS")]
- public int Status { set; get; }
- /// <summary>
- /// 备注
- /// </summary>
- [DataMember]
- [Column("NOTES")]
- public string Notes { set; get; }
- /// <summary>
- /// 风机名称
- /// </summary>
- public string WindturbineShortId
- {
- get
- {
- string name = this.WindturbineId.Replace("01_", "");
- return name;
- }
- }
- /// <summary>
- /// 风场名称
- /// </summary>
- public string StationName
- {
- get
- {
- string stationName = "";
- switch (this.StationId)
- {
- case "SBQ_FDC":
- stationName = "石板泉风电场";
- break;
- case "MHS_FDC":
- stationName = "麻黄山风电场";
- break;
- case "NSS_FDC":
- stationName = "牛首山风电场";
- break;
- case "XS_FDC":
- stationName = "香山风电场";
- break;
- case "QS_FDC":
- stationName = "青山风电场";
- break;
- default: break;
- }
- return stationName;
- }
- }
- /// <summary>
- /// 建议操作名称
- /// </summary>
- public string AdviseOperationName
- {
- get
- {
- string name = "";
- switch (this.AdviseOperation)
- {
- case OperateStyle.Start:
- name = "启动";
- break;
- case OperateStyle.Stop:
- name = "停机";
- break;
- case OperateStyle.Reset:
- name = "复位";
- break;
- case OperateStyle.Maintain:
- name = "维护";
- break;
- case OperateStyle.UnMaintain:
- name = "取消维护";
- break;
- default:
- break;
- }
- return name;
- }
- }
- /// <summary>
- /// 计算来源名称
- /// </summary>
- public string AdviceTypeName
- {
- get
- {
- string name = "";
- switch (this.AdviceType)
- {
- case CalculationOriginType.RealTimeStatus:
- name = "实时状态计算";
- break;
- case CalculationOriginType.Alarm:
- name = "报警";
- break;
- case CalculationOriginType.PowerForecast:
- name = "风功率预测";
- break;
- case CalculationOriginType.HealthyManage:
- name = "健康管理";
- break;
- default:
- break;
- }
- return name;
- }
- }
- /// <summary>
- /// 实际执行的动作名称
- /// </summary>
- public string ExecuteOperationName
- {
- get
- {
- string name = "";
- if (this.ExecuteOperation.HasValue)
- {
- switch (this.ExecuteOperation)
- {
- case OperateStyle.Start:
- name = "启动";
- break;
- case OperateStyle.Stop:
- name = "停机";
- break;
- case OperateStyle.Reset:
- name = "复位";
- break;
- case OperateStyle.Maintain :
- name = "维护";
- break;
- case OperateStyle.UnMaintain:
- name = "取消维护";
- break;
- default:
- break;
- }
- }
- return name;
- }
- }
- public string StatusString
- {
- get
- {
- string str = "";
- switch (this.Status)
- {
- case 1:
- str = "未执行";
- break;
- case 2:
- str = "用户执行";
- break;
- case 3:
- str = "用户取消";
- break;
- case 4:
- str = "系统取消";
- break;
- }
- return str;
- }
- }
- }
- }
|