diff --git a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs index 7969f73..d60474b 100644 --- a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs +++ b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs @@ -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> 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)); } diff --git a/ReportingServices.Shared/Models/ProductionReport/ManualReportEntries.cs b/ReportingServices.Shared/Models/ProductionReport/ManualReportEntries.cs index 75094d2..a6eaa89 100644 --- a/ReportingServices.Shared/Models/ProductionReport/ManualReportEntries.cs +++ b/ReportingServices.Shared/Models/ProductionReport/ManualReportEntries.cs @@ -2,7 +2,6 @@ public class ManualReportEntries { - public DateTime Date { get; set; } public int OperatorHeadcountDays { get; set; } public int OperatorHeadcountNights { get; set; } public int OperatorCallOutsDays { get; set; } diff --git a/ReportingServices.Shared/ViewModels/ProductionReport/ToolEventView.cs b/ReportingServices.Shared/ViewModels/ProductionReport/ToolEventView.cs index a8ac6df..17f0034 100644 --- a/ReportingServices.Shared/ViewModels/ProductionReport/ToolEventView.cs +++ b/ReportingServices.Shared/ViewModels/ProductionReport/ToolEventView.cs @@ -165,6 +165,12 @@ public class ToolEventView if (evnt.ToUpper() == "UP_WITH_INCREASED_SAMPLING") return true; + if (evnt.ToUpper() == "IDLE") + return true; + + if (evnt.ToUpper() == "ENGINEERING_DEVELOPMENT") + return true; + return false; } diff --git a/ReportingServices.UI/Controllers/ProductionReportController.cs b/ReportingServices.UI/Controllers/ProductionReportController.cs index d4046b2..e11ec9c 100644 --- a/ReportingServices.UI/Controllers/ProductionReportController.cs +++ b/ReportingServices.UI/Controllers/ProductionReportController.cs @@ -50,8 +50,6 @@ public class ProductionReportController : Controller [HttpPost] public IActionResult EditDailyReport(ManualReportEntries rpt) { - rpt.Date = DateTime.Now.Date; - JsonFileHandler.SaveJSONFile(rpt, _dailyRptFilePath); return RedirectToAction("DailyReport"); diff --git a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml index 3ba6165..aef273a 100644 --- a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml @@ -236,7 +236,19 @@