From 35dfd6a23c2c014a9bcb9c983cd126ce560fd0da Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Mon, 23 Jan 2023 14:08:50 -0700 Subject: [PATCH] Removed EPP TW "Prod" scrap from Reactor Yielded Outs calculation and removed Customer scrap from Yield calculation --- .../Implementations/ScrapeDatabaseRepository.cs | 4 ++-- .../Views/Shared/_DailyReportPartial.cshtml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs index 300b7cb..3b9abb1 100644 --- a/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs +++ b/ReportingServices.Shared/Repositories/Implementations/ScrapeDatabaseRepository.cs @@ -81,7 +81,7 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository " DATE_OUT," + " SUM(CUST_TOT_REJ) AS TOT_REJ_CUST," + " SUM(LSL_TOT_REJ) AS TOT_REJ_MANU," + - " SUM(TW_PROD) AS TW_PROD " + + " SUM(CASE WHEN REACTOR_TYPE <> 'EPP' THEN TW_PROD ELSE 0 END) AS TW_PROD " + "FROM RDS " + "WHERE SEQ IN (" + rdsNumbers + ") " + "GROUP BY DATE_OUT " + @@ -533,7 +533,7 @@ public class ScrapeDatabaseRepository : IScrapeDatabaseRepository string query = "SELECT SUM(WFRS_OUT) AS OUTS, " + " SUM(CUST_TOT_REJ) AS CUST, " + " SUM(LSL_TOT_REJ) AS MANU, " + - " SUM(TW_PROD) AS PROD " + + " SUM(CASE WHEN REACTOR_TYPE <> 'EPP' THEN TW_PROD ELSE 0 END) AS PROD " + " FROM RDS " + " WHERE DATE_OUT >= @startDate " + " AND DATE_OUT < @endDate"; diff --git a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml index 76cb08f..124692b 100644 --- a/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml +++ b/ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml @@ -183,7 +183,7 @@ { if (i < numberOfDaysInWeek) { - float yield = ((float)Model.OutsByDay[i].TotalWafers - (float)Model.ScrapByDay[i].TOT_REJ_WFRS) / (float)Model.OutsByDay[i].TotalWafers; + float yield = ((float)Model.OutsByDay[i].TotalWafers - (float)Model.ScrapByDay[i].TOT_REJ_MANU) / (float)Model.OutsByDay[i].TotalWafers; @(string.Format("{0:P2}", yield)) @@ -194,8 +194,8 @@ } } - @(string.Format("{0:P2}", (float)(totalWafersOut - totalCustomerScrap - totalManufacturingScrap) / (float)totalWafersOut)) - @string.Format("{0:P2}", (float)(Model.QTDOutsAndScrap.Outs - Model.QTDOutsAndScrap.ManufacturingScrap - Model.QTDOutsAndScrap.CustomerScrap) / (float)Model.QTDOutsAndScrap.Outs) + @(string.Format("{0:P2}", (float)(totalWafersOut - totalManufacturingScrap) / (float)totalWafersOut)) + @string.Format("{0:P2}", (float)(Model.QTDOutsAndScrap.Outs - Model.QTDOutsAndScrap.ManufacturingScrap) / (float)Model.QTDOutsAndScrap.Outs) After Scrap