Fixed HTR downed tools header, added quarter to date information, and put extended downtime into tool downed tables.
This commit is contained in:
@ -7,9 +7,9 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
{
|
||||
public string Reactor { get; set; }
|
||||
public string Type { get; set; }
|
||||
public bool DownMoreThanTwelveHours { get; set; }
|
||||
public string StartDate { get; set; }
|
||||
public string EndDate { get; set; }
|
||||
public double Downtime { get; set; }
|
||||
public bool IsInProduction { get; set; }
|
||||
public List<ReactorEvent> Events { get; set; }
|
||||
public ReactorEvent MostRecentEvent { get; set; }
|
||||
@ -24,29 +24,15 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
Type = type;
|
||||
MostRecentEvent = events[events.Count - 1];
|
||||
IsInProduction = EventIsProduction(MostRecentEvent.REACT_MODE);
|
||||
DownMoreThanTwelveHours = DetermineIfExtendedDowntime();
|
||||
Uptime = DetermineToolUptimeData();
|
||||
}
|
||||
|
||||
private bool DetermineIfExtendedDowntime()
|
||||
public void SetDowntime(int timeSinceLastUpTransaction)
|
||||
{
|
||||
double numberOfHours = 0;
|
||||
|
||||
for (int i = Events.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (EventIsProduction(Events[i].REACT_MODE))
|
||||
return false;
|
||||
|
||||
if (i == Events.Count - 1)
|
||||
numberOfHours = (DateTime.Now - DateTime.Parse(Events[i].EVENT_DTM)).TotalHours;
|
||||
else
|
||||
numberOfHours += (DateTime.Parse(Events[i + 1].EVENT_DTM) - DateTime.Parse(Events[i].EVENT_DTM)).TotalHours;
|
||||
|
||||
if (numberOfHours > 12)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (IsInProduction)
|
||||
Downtime = 0;
|
||||
else
|
||||
Downtime = (double)timeSinceLastUpTransaction / 60;
|
||||
}
|
||||
|
||||
public List<ToolUptimeData> DetermineToolUptimeData()
|
||||
|
Reference in New Issue
Block a user