MTTRModel.cs
1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace HHECS.Application
{
/// <summary>
/// 特定时间区间内,每次故障的平均时间。
/// </summary>
public class MTTRModel
{
public string EquipmentCode { get; set; }
public DateTime Begin { get; set; }
public DateTime End { get; set; }
public double TotalAlarmSec { get; set; }
public int TotalAlarms { get; set; }
public double MTTR
{
get
{
if (TotalAlarmSec == 0 || TotalAlarms == 0)
{
return 0;
}
else
{
return TotalAlarmSec / TotalAlarms;
}
}
}
/// <summary>
/// 对应统计故障的id
/// </summary>
[JsonIgnore]
public List<long> AlarmIds { get; set; } = new List<long>();
}
}