diff --git a/ReportingServices/Controllers/ProductionReportController.cs b/ReportingServices/Controllers/ProductionReportController.cs index bdae75a..35e7f91 100644 --- a/ReportingServices/Controllers/ProductionReportController.cs +++ b/ReportingServices/Controllers/ProductionReportController.cs @@ -115,14 +115,24 @@ namespace ReportingServices.Controllers report.AddToolStateByType("HTR", task7.Result); report.ReverseLists(); + int[] toolsByWaferSize = _scrapeDatabaseRepository.GetNumberOfToolsByWaferSize(); + + report.NumberOfToolsWaferSize6IN = toolsByWaferSize[0]; + report.NumberOfToolsWaferSize8IN = toolsByWaferSize[1]; + List entries = _jsonFileHandler.LoadJSONFile>(_dailyRptFileName); report.Entries = entries; int[] singleLoadLocks = _scrapeDatabaseRepository.GetNumberOfSingleLoadLocks(); - report.Entries[_reportIndex].Entries.SingleLoadLockASM = singleLoadLocks[0]; - report.Entries[_reportIndex].Entries.SingleLoadLockHTR = singleLoadLocks[1]; + report.Entries[_reportIndex].Entries.ASMSingleLoadLock = singleLoadLocks[0]; + report.Entries[_reportIndex].Entries.HTRSingleLoadLock = singleLoadLocks[1]; + + int[] unloadTempsLessThan700 = _scrapeDatabaseRepository.GetNumberOfToolUnloadTempsLessThan700(); + + report.Entries[_reportIndex].Entries.ASMUnloadTempsLessThan700 = unloadTempsLessThan700[0]; + report.Entries[_reportIndex].Entries.HTRUnloadTempsLessThan700 = unloadTempsLessThan700[1]; return report; } diff --git a/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs b/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs index 26eda05..c4463a8 100644 --- a/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs +++ b/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs @@ -2,6 +2,7 @@ using ReportingServices.Models.PlanningReport; using ReportingServices.ReportingObjects; using System.Data; +using System.Text.RegularExpressions; namespace ReportingServices.Dependency_Injections { @@ -125,6 +126,43 @@ namespace ReportingServices.Dependency_Injections return weeklyPartChanges; } + public int[] GetNumberOfToolsByWaferSize() + { + int[] singleLoadLocks = new int[2]; + + OpenConnection(); + + SqlCommand cmd = _connection.CreateCommand(); + + string query = "SELECT " + + " SUSC_POCKET_SIZE, " + + " COUNT(SUSC_POCKET_SIZE) " + + " FROM REACTOR " + + " WHERE REACT_ASSIGNMENT IS NOT NULL " + + " AND REACT_ASSIGNMENT <> 'Out of Service' " + + " AND REACT_ASSIGNMENT <> '' " + + "GROUP BY SUSC_POCKET_SIZE"; + + cmd.CommandText = query; + + using (SqlDataReader reader = cmd.ExecuteReader()) + { + reader.Read(); + + singleLoadLocks[0] = int.Parse(reader[1].ToString()); + + reader.Read(); + + singleLoadLocks[1] = int.Parse(reader[1].ToString()); + } + + cmd.Dispose(); + + CloseConnection(); + + return singleLoadLocks; + } + public int[] GetNumberOfSingleLoadLocks() { int[] singleLoadLocks = new int[2]; @@ -160,5 +198,39 @@ namespace ReportingServices.Dependency_Injections return singleLoadLocks; } + + public int[] GetNumberOfToolUnloadTempsLessThan700() + { + int[] unloadTempTools = new int[2]; + + OpenConnection(); + + SqlCommand cmd = _connection.CreateCommand(); + + string query = "SELECT REACTOR_TYPE, COUNT(DISTINCT(REACTOR)) AS ULT FROM RDS " + + "INNER JOIN RDS_LAYER lay ON lay.RDS_NO = SEQ " + + "WHERE DATE_OUT > DATEADD(DAY, -1, SYSDATETIME()) " + + " AND UL_TEMP< 700 " + + "GROUP BY REACTOR_TYPE"; + + cmd.CommandText = query; + + using (SqlDataReader reader = cmd.ExecuteReader()) + { + reader.Read(); + + unloadTempTools[0] = int.Parse(reader[1].ToString()); + + reader.Read(); + + unloadTempTools[1] = int.Parse(reader[1].ToString()); + } + + cmd.Dispose(); + + CloseConnection(); + + return unloadTempTools; + } } } diff --git a/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs b/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs index be3ae81..f290f02 100644 --- a/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs +++ b/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs @@ -10,6 +10,8 @@ namespace ReportingServices.Dependency_Injections public List GetScrapByDay(List outs); public List GetReactorPSNWORuns(string startDate, string endDate); public int GetNumberOfPartChanges(string startDate, string endDate); + public int[] GetNumberOfToolsByWaferSize(); public int[] GetNumberOfSingleLoadLocks(); + public int[] GetNumberOfToolUnloadTempsLessThan700(); } } diff --git a/ReportingServices/Models/ProductionReport/DailyReport.cs b/ReportingServices/Models/ProductionReport/DailyReport.cs index 16e93a9..95a3161 100644 --- a/ReportingServices/Models/ProductionReport/DailyReport.cs +++ b/ReportingServices/Models/ProductionReport/DailyReport.cs @@ -10,6 +10,8 @@ namespace ReportingServices.Models.ProductionReport public Dictionary> ToolAvailibilityByType { get; set; } public Dictionary ToolStateByType { get; set; } public List Entries { get; set; } + public int NumberOfToolsWaferSize6IN { get; set; } + public int NumberOfToolsWaferSize8IN { get; set; } public DailyReport() { diff --git a/ReportingServices/ReportingObjects/ManualReportEntries.cs b/ReportingServices/ReportingObjects/ManualReportEntries.cs index 1baed4f..4549da0 100644 --- a/ReportingServices/ReportingObjects/ManualReportEntries.cs +++ b/ReportingServices/ReportingObjects/ManualReportEntries.cs @@ -17,7 +17,9 @@ public string BottleChanges { get; set; } public string DailyPartChanges { get; set; } public string WeeklyPartChanges { get; set; } - public int SingleLoadLockASM { get; set; } - public int SingleLoadLockHTR { get; set; } + public int ASMSingleLoadLock { get; set; } + public int HTRSingleLoadLock { get; set; } + public int ASMUnloadTempsLessThan700 { get; set; } + public int HTRUnloadTempsLessThan700 { get; set; } } } diff --git a/ReportingServices/Views/ProductionReport/DailyReport.cshtml b/ReportingServices/Views/ProductionReport/DailyReport.cshtml index 48a534f..bd75a83 100644 --- a/ReportingServices/Views/ProductionReport/DailyReport.cshtml +++ b/ReportingServices/Views/ProductionReport/DailyReport.cshtml @@ -19,6 +19,9 @@ int ASMSLL = 0; int HTRSLL = 0; + int ASMUnloadTemps = 0; + int HTRUnloadTemps = 0; + int reportIndex = (int)DateTime.Now.DayOfWeek; ManualReportEntries rpt = Model.Entries[reportIndex].Entries; @@ -135,7 +138,12 @@ Before Scrap - Actual Yielded Wafers Out     + + Actual Yielded Wafers Out     + + @for (int i = 0; i < 7; i++) { if (i < Model.OutsByDay.Count) @@ -407,13 +415,19 @@
  • Application ENG (0):
  • -
  • Reactors (Capacity )
  • +
  • Reactors (Capacity @(Model.NumberOfToolsWaferSize6IN + Model.NumberOfToolsWaferSize8IN)) +
      +
    • 150mm - @Model.NumberOfToolsWaferSize6IN
    • +
    • 200mm - @Model.NumberOfToolsWaferSize8IN
    • +
    +
  • Scheduled Reactors:
  • Dual Layer Reactors
  • -
  • Engineering Focus Tools (Down > 12 hours)
  • -
      -
    • @string.Join(",", toolsDownGreaterThan12Hours)
    • -
    +
  • Engineering Focus Tools (Down > 12 hours) +
      +
    • @string.Join(",", toolsDownGreaterThan12Hours)
    • +
    +
  • Metrology Down ():
  • Cleans ():
@@ -527,9 +541,9 @@ { int index = i == 6 ? 0 : i + 1; - @Model.Entries[index].Entries.SingleLoadLockASM + @Model.Entries[index].Entries.ASMSingleLoadLock - ASMSLL += @Model.Entries[index].Entries.SingleLoadLockASM; + ASMSLL += @Model.Entries[index].Entries.ASMSingleLoadLock; } else { @@ -547,9 +561,9 @@ { int index = i == 6 ? 0 : i + 1; - @Model.Entries[index].Entries.SingleLoadLockHTR + @Model.Entries[index].Entries.HTRSingleLoadLock - HTRSLL += @Model.Entries[index].Entries.SingleLoadLockHTR; + HTRSLL += @Model.Entries[index].Entries.HTRSingleLoadLock; } else { @@ -559,6 +573,46 @@ @(HTRSLL / count) 0 + + ASMs <700C (Unload Temps) + @for (int i = 0; i < 7; i++) + { + if (i < Model.Entries.Count) + { + int index = i == 6 ? 0 : i + 1; + + @Model.Entries[index].Entries.ASMUnloadTempsLessThan700 + + ASMUnloadTemps += @Model.Entries[index].Entries.ASMUnloadTempsLessThan700; + } + else + { + + } + } + @(ASMUnloadTemps / count) + 0 + + + HTRs <700C (Unload Temps) + @for (int i = 0; i < 7; i++) + { + if (i < Model.Entries.Count) + { + int index = i == 6 ? 0 : i + 1; + + @Model.Entries[index].Entries.HTRUnloadTempsLessThan700 + + HTRUnloadTemps += @Model.Entries[index].Entries.HTRUnloadTempsLessThan700; + } + else + { + + } + } + @(HTRUnloadTemps / count) + 0 + \ No newline at end of file diff --git a/ReportingServices/wwwroot/js/site.js b/ReportingServices/wwwroot/js/site.js index d3c59dc..0a969d8 100644 --- a/ReportingServices/wwwroot/js/site.js +++ b/ReportingServices/wwwroot/js/site.js @@ -144,6 +144,8 @@ function expandYield() { yieldDivs[i].classList.toggle("hidden"); } + var source = document.getElementById("yieldImage").src; + if (source.substring(source.indexOf("Images/") + 7) == "plusIcon.png") document.getElementById("yieldImage").src = "../Images/minusIcon.png"; else