diff --git a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs index 13bee65..c8e3b3d 100644 --- a/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs +++ b/ReportingServices.Shared/HelperClasses/DailyReportHelper.cs @@ -52,8 +52,8 @@ namespace ReportingServices.Shared.HelperClasses report.SetRDSInfo(rds.Result); report.SetReactorInfo(reactors.Result, GetUnscheduledReactors(report)); - report.CurrentWeek.SetYieldInformation(task1.Result); - report.PreviousWeek.SetYieldInformation(task2.Result); + report.CurrentWeek.SetYieldInformation(task1.Result, report.QuarterlyTargets); + report.PreviousWeek.SetYieldInformation(task2.Result, report.QuarterlyTargets); report.ReverseLists(); diff --git a/ReportingServices.Shared/Models/ProductionReport/QuarterlyTargets.cs b/ReportingServices.Shared/Models/ProductionReport/QuarterlyTargets.cs index f278aa2..b694c6e 100644 --- a/ReportingServices.Shared/Models/ProductionReport/QuarterlyTargets.cs +++ b/ReportingServices.Shared/Models/ProductionReport/QuarterlyTargets.cs @@ -12,5 +12,7 @@ namespace ReportingServices.Shared.Models.ProductionReport public int IFX_Scrap { get; set; } [JsonPropertyName("Yield")] public float Yield { get; set; } + [JsonPropertyName("PlanWorkingDays")] + public int PlanWorkingDays { get; set; } } } diff --git a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs index 91012bf..35d2766 100644 --- a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs +++ b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs @@ -160,7 +160,13 @@ namespace ReportingServices.Shared.Repositories " AND FISCAL_QTR = " + " (SELECT FISCAL_QTR FROM FISCAL_QTR " + " WHERE START_DT < SYSDATETIME() " + - " AND END_DT > SYSDATETIME()) "; + " AND END_DT > SYSDATETIME()) " + + "UNION " + + "SELECT 'PlanWorkingDays' As THRU_TARGET," + + " PLAN_WORKING_DAYS AS THRU_QTY," + + " NULL AS THRU_PCNT" + + " FROM FISCAL_QTR " + + " WHERE SYSDATETIME() BETWEEN START_DT AND END_DT"; cmd.CommandText = query; @@ -184,7 +190,8 @@ namespace ReportingServices.Shared.Repositories Reactor_Outs = (int)targets["Reactor_Outs"], Yield_Outs = (int)targets["Yield_Outs"], IFX_Scrap = (int)targets["IFX_Scrap"], - Yield = targets["Yield"] + Yield = targets["Yield"], + PlanWorkingDays = (int)targets["PlanWorkingDays"] }; return quarterlyTargets; diff --git a/ReportingServices.Shared/ViewModels/ProductionReport/YieldStatistics.cs b/ReportingServices.Shared/ViewModels/ProductionReport/YieldStatistics.cs index 6041e8c..59cd88d 100644 --- a/ReportingServices.Shared/ViewModels/ProductionReport/YieldStatistics.cs +++ b/ReportingServices.Shared/ViewModels/ProductionReport/YieldStatistics.cs @@ -7,6 +7,7 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport public DateTime StartDate { get; set; } public List OutsByDay { get; set; } public List ScrapByDay { get; set; } + public int DailyPlanWafers { get; set; } public bool IsCurrentWeek { get; set; } public YieldStatistics(DateTime startDate, bool isCurrentWeek) @@ -15,10 +16,11 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport IsCurrentWeek = isCurrentWeek; } - public void SetYieldInformation(YieldInformation yieldInformation) + public void SetYieldInformation(YieldInformation yieldInformation, QuarterlyTargets targets) { OutsByDay = GetReactorOutsByDay(yieldInformation.Outs); ScrapByDay = yieldInformation.Scrap; + DailyPlanWafers = targets.Yield_Outs / targets.PlanWorkingDays; } public static List GetDistinctDatesFromReactorOuts(List outs) diff --git a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml index adea310..9f86fa8 100644 --- a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml +++ b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml @@ -41,14 +41,14 @@ Commited Target to meet Shipment Requirements - 4,500 - 4,500 - 4,500 - 4,500 - 4,500 - 4,500 - 4,500 - 31,500 + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:#,###}", Model.DailyPlanWafers) + @string.Format("{0:##,###}", Model.DailyPlanWafers * 7) Number updated quarterly