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; }
///
/// 建议操作
///
[DataMember]
[Column("ADVICEOPERATION")]
public OperateStyle AdviseOperation { set; get; }
///
/// 推荐来源 1=实时状态,2=报警,3=风功率预测,4=健康管理,5=性能等级评估
///
[DataMember]
[Column("ADVICETYPE")]
public CalculationOriginType AdviceType { set; get; }
///
/// 上一次更新时间
///
[DataMember]
[Column("LASTUPDATETIME")]
public DateTime LastUpdateTime { set; get; }
///
/// 建议执行时间
///
[DataMember]
[Column("ADVICEEXECUTETIME")]
public DateTime AdviceExecuteTime { set; get; }
///
/// 实际执行时间
///
[DataMember]
[Column("EXECUTETIME")]
public DateTime? ExecuteTime { set; get; }
///
/// 实际执行的动作
///
[DataMember]
[Column("EXECUTEOPERATION")]
public OperateStyle? ExecuteOperation { set; get; }
///
/// 操作员Id
///
[DataMember]
[Column("OPERATER")]
public string Operater { set; get; }
///
/// 操作员姓名
///
[DataMember]
[Column("OPERATERNAME")]
public string OperaterName { set; get; }
///
/// 计算结果当前状态,1=未执行,2=用户执行,3=用户取消,4=系统取消
///
[DataMember]
[Column("STATUS")]
public int Status { set; get; }
///
/// 备注
///
[DataMember]
[Column("NOTES")]
public string Notes { set; get; }
///
/// 风机名称
///
public string WindturbineShortId
{
get
{
string name = this.WindturbineId.Replace("01_", "");
return name;
}
}
///
/// 风场名称
///
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;
}
}
///
/// 建议操作名称
///
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;
}
}
///
/// 计算来源名称
///
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;
}
}
///
/// 实际执行的动作名称
///
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;
}
}
}
}