Fixed typo in Daily Report, added IDLE and ENGINEERING_DEVELOPMENT to IsInProduction list, and changed unscheduled reactors calculations.

This commit is contained in:
Daniel Wathen
2023-01-17 08:31:59 -07:00
parent 9525355b55
commit 7cde09d7b8
8 changed files with 26 additions and 76 deletions

View File

@ -24,37 +24,7 @@ public static class DailyReportHelper
else
report.SLLTools = tools;
if (currentDateTime.Date > manualEntries.Date)
{
string weeklyPtChng;
if (currentDateTime.DayOfWeek == DayOfWeek.Monday)
weeklyPtChng = null;
else
weeklyPtChng = manualEntries.WeeklyPartChanges;
report.ManualReportEntries = new ManualReportEntries()
{
Date = currentDateTime.Date,
OperatorHeadcountDays = 0,
OperatorHeadcountNights = 0,
OperatorCallOutsDays = 0,
OperatorCallOutsNights = 0,
MaintenanceHeadcountDays = 0,
MaintenanceHeadcountNights = 0,
MaintenanceCallOutsDays = 0,
MaintenanceCallOutsNights = 0,
EngineeringHeadcountDays = 0,
EngineeringHeadcountNights = 0,
EngineeringCallOutsDays = 0,
EngineeringCallOutsNights = 0,
BottleChanges = null,
DailyPartChanges = null,
WeeklyPartChanges = weeklyPtChng
};
}
else
report.ManualReportEntries = manualEntries;
report.ManualReportEntries = manualEntries;
}
catch (Exception ex)
@ -148,7 +118,6 @@ public static class DailyReportHelper
{
report.QuarterlyTargets = targets.Result;
report.SetRDSInfo(rds.Result);
report.SetReactorInfo(reactors, GetUnscheduledReactors(report));
foreach (Task<List<ReactorEvent>> task in toolEvents)
{
@ -161,6 +130,8 @@ public static class DailyReportHelper
report.ToolEvents.Add(toolEvent);
}
report.SetReactorInfo(reactors, GetUnscheduledReactors(report));
report.ToolEvents = report.ToolEvents
.Where(x => x.Reactor is not "47")
.OrderBy(x => x.Reactor)
@ -212,7 +183,7 @@ public static class DailyReportHelper
foreach (ToolEventView tool in report.ToolEvents)
{
if (!tool.IsInProduction)
if (tool.MostRecentEvent.REACT_MODE.ToUpper() == "IDLE")
{
reactors.Add(int.Parse(tool.Reactor));
}