diff --git a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs index 92a38f8..9e3f3b1 100644 --- a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs +++ b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs @@ -45,7 +45,7 @@ namespace ReportingServices.Shared.HelperClasses report.AddToolStateByType("Metrology", tasksState[3].Result); report.AddToolStateByType("Cleans", tasksState[4].Result); - report.SetRDSInfo(await ApiCaller.GetApi>(_baseUrlScrapeDb + "RDS")); + report.SetRDSInfo(await ApiCaller.GetApi>(_baseUrlScrapeDb + "RDS?date=" + report.StartDate.ToString())); report.SetReactorInfo(await ApiCaller.GetApi>(_baseUrlScrapeDb + "Reactors"), GetUnscheduledReactors(report)); report.CurrentWeek.SetYieldInformation(task1.Result); diff --git a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs index cc3de91..91012bf 100644 --- a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs +++ b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs @@ -226,7 +226,7 @@ namespace ReportingServices.Shared.Repositories return reactors; } - public List GetRDSForLastDay() + public List GetRDSForLastDay(string date) { List rdsList = new(); @@ -238,9 +238,10 @@ namespace ReportingServices.Shared.Repositories "CASE WHEN lay.UL_TEMP IS NULL THEN '1000' ELSE lay.UL_TEMP END, psn.LAYER_TYPE FROM RDS " + "INNER JOIN RDS_LAYER lay ON lay.RDS_NO = SEQ " + "INNER JOIN PROD_SPEC psn ON rds.PROD_SPEC_ID = psn.SEQ " + - "WHERE DATE_OUT > DATEADD(DAY, -1, SYSDATETIME())"; + "WHERE DATE_OUT >= @date"; cmd.CommandText = query; + cmd.Parameters.AddWithValue("@date", date); using (SqlDataReader reader = cmd.ExecuteReader()) { diff --git a/ReportingServices.Shared/Repositories/Interfaces/IScrapeDatabaseRepository.cs b/ReportingServices.Shared/Repositories/Interfaces/IScrapeDatabaseRepository.cs index 0319225..4b2d746 100644 --- a/ReportingServices.Shared/Repositories/Interfaces/IScrapeDatabaseRepository.cs +++ b/ReportingServices.Shared/Repositories/Interfaces/IScrapeDatabaseRepository.cs @@ -12,6 +12,6 @@ namespace ReportingServices.Shared.Repositories public int GetNumberOfPartChanges(string startDate, string endDate); public QuarterlyTargets GetQuarterlyTargets(); public List GetReactors(); - public List GetRDSForLastDay(); + public List GetRDSForLastDay(string date); } } diff --git a/ReportingServices.Shared/ViewModels/ProductionReport/DailyReport.cs b/ReportingServices.Shared/ViewModels/ProductionReport/DailyReport.cs index 3e4ef35..68d3733 100644 --- a/ReportingServices.Shared/ViewModels/ProductionReport/DailyReport.cs +++ b/ReportingServices.Shared/ViewModels/ProductionReport/DailyReport.cs @@ -15,6 +15,7 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport public Dictionary> DualLayerReactors { get; set; } public List PreviousEntries { get; set; } public List CurrentEntries { get; set; } + public List UnloadTempsByDay { get; set; } public int NumberOfToolsWaferSize6IN { get; set; } public int NumberOfToolsWaferSize8IN { get; set; } public int NumberOfToolsWaferSize6INScheduled { get; set; } @@ -28,6 +29,7 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport PreviousEntries = new(); CurrentEntries = new(); DualLayerReactors = new(); + UnloadTempsByDay = new(); StartDate = DateTime.Parse(APIHelperFunctions.GetBeginningOfWeekAsAPIString()); CurrentWeek = new(StartDate, true); PreviousWeek = new(StartDate.AddDays(-7), false); @@ -83,7 +85,8 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport private void SetDualLayerReactors(List rdsList) { - List rdsWithDualLayerPSN = rdsList.Where(rds => rds.LayerType.Contains("2 Layer")).ToList(); + DateTime compareDate = DateTime.Now.Date; + List rdsWithDualLayerPSN = rdsList.Where(rds => rds.LayerType.Contains("2 Layer") && rds.DateOut == compareDate).ToList(); DualLayerReactors.Add("ASM", rdsWithDualLayerPSN. Where(rds => rds.ReactorType.Contains("ASM")). @@ -104,20 +107,17 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport private void SetUnloadTempsLessThan700(List rdsList) { - List rdsWithTempsLessThan700 = rdsList.Where(rds => rds.UnloadTemp < 700).ToList(); + var rdsWithTempsLessThan700 = rdsList.Where(rds => rds.UnloadTemp < 700).GroupBy(rds => rds.DateOut); - CurrentEntries[(int)DateTime.Now.DayOfWeek].ASMUnloadTempsLessThan700 = - rdsWithTempsLessThan700. - Where(rds => rds.ReactorType. - Contains("ASM")). - Select(rds => rds.Reactor). - Distinct().Count(); - CurrentEntries[(int)DateTime.Now.DayOfWeek].HTRUnloadTempsLessThan700 = - rdsWithTempsLessThan700. - Where(rds => rds.ReactorType. - Contains("HTR")). - Select(rds => rds.Reactor). - Distinct().Count(); + foreach (var group in rdsWithTempsLessThan700) + { + UnloadTempsByDay.Add(new UnloadTempsByDay + { + Date = group.Key, + ASMUnloadsBelow700 = group.Where(rds => rds.ReactorType.Contains("ASM")).Select(rds => rds.Reactor).Distinct().Count(), + HTRUnloadsBelow700 = group.Where(rds => rds.ReactorType.Contains("HTR")).Select(rds => rds.Reactor).Distinct().Count() + }); + } } public void ReverseLists() diff --git a/ReportingServices.Shared/ViewModels/ProductionReport/UnloadTempsByDay.cs b/ReportingServices.Shared/ViewModels/ProductionReport/UnloadTempsByDay.cs new file mode 100644 index 0000000..0bb91ac --- /dev/null +++ b/ReportingServices.Shared/ViewModels/ProductionReport/UnloadTempsByDay.cs @@ -0,0 +1,9 @@ +namespace ReportingServices.Shared.ViewModels.ProductionReport +{ + public class UnloadTempsByDay + { + public DateTime Date { get; set; } + public int ASMUnloadsBelow700 { get; set; } + public int HTRUnloadsBelow700 { get; set; } + } +} diff --git a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml index f5c1f15..a0b160c 100644 --- a/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml +++ b/ReportingServices.UI/Views/ProductionReport/DailyReport.cshtml @@ -388,18 +388,16 @@ ASMs <700C (Unload Temps) @for (int i = 0; i < 7; i++) { - int index = i == 6 ? 0 : i + 1; - - if (@Model.CurrentEntries[index].ASMUnloadTempsLessThan700 != 0) + if (i < Model.UnloadTempsByDay.Count()) { - @Model.CurrentEntries[index].ASMUnloadTempsLessThan700 + @Model.UnloadTempsByDay[i].ASMUnloadsBelow700 + + ASMUnloadTemps += @Model.UnloadTempsByDay[i].ASMUnloadsBelow700; } else { } - - ASMUnloadTemps += @Model.CurrentEntries[index].ASMUnloadTempsLessThan700; } @(ASMUnloadTemps / numberOfDaysInWeek) 0 @@ -408,18 +406,16 @@ HTRs <700C (Unload Temps) @for (int i = 0; i < 7; i++) { - int index = i == 6 ? 0 : i + 1; - - if (@Model.CurrentEntries[index].HTRUnloadTempsLessThan700 != 0) + if (i < Model.UnloadTempsByDay.Count()) { - @Model.CurrentEntries[index].HTRUnloadTempsLessThan700 + @Model.UnloadTempsByDay[i].HTRUnloadsBelow700 + + HTRUnloadTemps += @Model.UnloadTempsByDay[i].HTRUnloadsBelow700; } else { } - - HTRUnloadTemps += @Model.CurrentEntries[index].HTRUnloadTempsLessThan700; } @(HTRUnloadTemps / numberOfDaysInWeek) 0 diff --git a/ReportingServices.UI/wwwroot/Assets/DailyReportInfo.json b/ReportingServices.UI/wwwroot/Assets/DailyReportInfo.json index 9c64b88..15c3134 100644 --- a/ReportingServices.UI/wwwroot/Assets/DailyReportInfo.json +++ b/ReportingServices.UI/wwwroot/Assets/DailyReportInfo.json @@ -1 +1 @@ -{"Previous Week":[{"Day":0,"Date":"2022-11-27T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-11-28T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":10,"HTRSingleLoadLock":16,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":2,"Date":"2022-11-29T00:00:00","OperatorHeadcountDays":14,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":3,"HTRSingleLoadLock":12,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":1},{"Day":3,"Date":"2022-11-30T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":4,"Date":"2022-12-01T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":5,"Date":"2022-12-02T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":6,"Date":"2022-12-03T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}],"Current Week":[{"Day":0,"Date":"2022-12-04T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-12-05T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":5,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":3},{"Day":2,"Date":"2022-12-13T00:00:00","OperatorHeadcountDays":11,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":3,"Date":"2022-12-07T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":7,"HTRSingleLoadLock":15,"ASMUnloadTempsLessThan700":4,"HTRUnloadTempsLessThan700":3},{"Day":4,"Date":"2022-12-22T00:00:00","OperatorHeadcountDays":15,"OperatorHeadcountNights":12,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R23,R24,R26,R28","DailyPartChanges":"R21","WeeklyPartChanges":"R21,R23,R25","ASMSingleLoadLock":7,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":4,"HTRUnloadTempsLessThan700":3},{"Day":5,"Date":"2022-12-09T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":2,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":6,"Date":"2022-12-10T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}]} \ No newline at end of file +{"Previous Week":[{"Day":0,"Date":"2022-11-27T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-11-28T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":10,"HTRSingleLoadLock":16,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":2,"Date":"2022-11-29T00:00:00","OperatorHeadcountDays":14,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":3,"HTRSingleLoadLock":12,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":1},{"Day":3,"Date":"2022-11-30T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":4,"Date":"2022-12-01T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":5,"Date":"2022-12-02T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":6,"Date":"2022-12-03T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}],"Current Week":[{"Day":0,"Date":"2022-12-04T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-12-05T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":5,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":3},{"Day":2,"Date":"2022-12-13T00:00:00","OperatorHeadcountDays":11,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":3,"Date":"2022-12-07T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":7,"HTRSingleLoadLock":15,"ASMUnloadTempsLessThan700":6,"HTRUnloadTempsLessThan700":3},{"Day":4,"Date":"2022-12-22T00:00:00","OperatorHeadcountDays":15,"OperatorHeadcountNights":12,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R23,R24,R26,R28","DailyPartChanges":"R21","WeeklyPartChanges":"R21,R23,R25","ASMSingleLoadLock":7,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":4,"HTRUnloadTempsLessThan700":3},{"Day":5,"Date":"2022-12-09T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":2,"HTRSingleLoadLock":14,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":6,"Date":"2022-12-10T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}]} \ No newline at end of file diff --git a/ReportingServicesAPIs/Controllers/ScrapeDBController.cs b/ReportingServicesAPIs/Controllers/ScrapeDBController.cs index c127e31..e748e23 100644 --- a/ReportingServicesAPIs/Controllers/ScrapeDBController.cs +++ b/ReportingServicesAPIs/Controllers/ScrapeDBController.cs @@ -42,9 +42,9 @@ namespace ReportingServices.API.Controllers } [HttpGet("RDS")] - public List GetRDSForLastDay() + public List GetRDSForLastDay(string date) { - return _scrapeDBRepository.GetRDSForLastDay(); + return _scrapeDBRepository.GetRDSForLastDay(date); } } }