Removed console logging for hold date and added display of daily and weekly part changes (completed and projected).

This commit is contained in:
Daniel Wathen
2023-01-23 13:47:17 -07:00
parent 649805bde6
commit a67cc55abe
13 changed files with 232 additions and 95 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging;
using ReportingServices.Shared.Models.PlanningReport;
using ReportingServices.Shared.Models.ProductionReport;
using ReportingServices.Shared.ViewModels.ProductionReport;
@ -75,6 +76,10 @@ public static class DailyReportHelper
Task<OutsAndScrapTotal> task5 = null;
Task<OutsAndScrapTotal> task6 = null;
Task<List<string>> task7 = null;
Task<List<ReactorPSNWORuns>> task8 = null;
Task<List<ReactorPSNWORuns>> task9 = null;
Task<List<ReactorPSNWORuns>> task10 = null;
Task<List<ReactorPSNWORuns>> task11 = null;
try
{
@ -109,6 +114,10 @@ public static class DailyReportHelper
task5 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.ToString());
task6 = ApiCaller.GetApi<OutsAndScrapTotal>(baseUrlScrapeDb + "GetOutsAndScrapTotals?startDate=" + task3.Result + "&endDate=" + report.StartDate.AddDays(-7).ToString());
task7 = ApiCaller.GetApi<List<string>>(baseUrlScrapeDb + "GetCurrentHotWORunning");
task8 = ApiCaller.GetApi<List<ReactorPSNWORuns>>(baseUrlScrapeDb + "GetReactorPartChanges?startDate=" + currentDateTime.Date.ToString() + "&endDate=" + currentDateTime.ToString());
task9 = ApiCaller.GetApi<List<ReactorPSNWORuns>>(baseUrlScrapeDb + "GetProjectedPartChanges?startDate=" + currentDateTime.ToString() + "&endDate=" + currentDateTime.Date.AddDays(1).ToString());
task10 = ApiCaller.GetApi<List<ReactorPSNWORuns>>(baseUrlScrapeDb + "GetReactorPartChanges?startDate=" + report.StartDate.ToString() + "&endDate=" + currentDateTime.ToString());
task11 = ApiCaller.GetApi<List<ReactorPSNWORuns>>(baseUrlScrapeDb + "GetProjectedPartChanges?startDate=" + currentDateTime.ToString() + "&endDate=" + report.StartDate.AddDays(7).ToString());
}
catch (Exception ex)
{
@ -166,6 +175,13 @@ public static class DailyReportHelper
report.CurrentHotWORunning.Add("R50");
report.CurrentHotWORunning.Sort();
report.CompletedDailyPartChanges = task8.Result;
report.ProjectedDailyPartChanges = task9.Result;
report.CompletedWeeklyPartChanges = task10.Result;
report.ProjectedWeeklyPartChanges = task11.Result;
}
catch (Exception ex)
{