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;