From 4592b035b6ba1ec6942ab32435d1282c151091ba Mon Sep 17 00:00:00 2001 From: Daniel Wathen Date: Wed, 7 Dec 2022 10:44:11 -0700 Subject: [PATCH] Added data pull for previous week and capability for production passdown to view previous week data, added tool state mapping json file and production passdown report shows owners, removed unnecessary jQuery package. --- .../Controllers/ProductionReportController.cs | 107 +++-- .../ScrapeDatabaseRepository.cs | 53 ++- .../Interfaces/IScrapeDatabaseRepository.cs | 3 +- .../HelperClasses/APIHelperFunctions.cs | 12 +- .../Models/ProductionReport/DailyReport.cs | 67 +-- .../ProductionReport/YieldStatistics.cs | 63 +++ .../ReportingObjects/ManualReportEntries.cs | 2 + .../ManualReportEntriesByDay.cs | 14 - .../ReportingObjects/QuarterlyTargets.cs | 10 + .../ReportingObjects/ToolStateByType.cs | 8 +- ReportingServices/ReportingServices.csproj | 1 - .../Views/ProductionReport/DailyReport.cshtml | 424 +++++------------- .../Views/Shared/_DailyReportPartial.cshtml | 254 +++++++++++ .../wwwroot/Assets/DailyReportInfo.json | 157 +------ .../wwwroot/Assets/ToolStates.json | 44 ++ ReportingServices/wwwroot/js/site.js | 8 + 16 files changed, 651 insertions(+), 576 deletions(-) create mode 100644 ReportingServices/Models/ProductionReport/YieldStatistics.cs delete mode 100644 ReportingServices/ReportingObjects/ManualReportEntriesByDay.cs create mode 100644 ReportingServices/ReportingObjects/QuarterlyTargets.cs create mode 100644 ReportingServices/Views/Shared/_DailyReportPartial.cshtml create mode 100644 ReportingServices/wwwroot/Assets/ToolStates.json diff --git a/ReportingServices/Controllers/ProductionReportController.cs b/ReportingServices/Controllers/ProductionReportController.cs index 35e7f91..765a48d 100644 --- a/ReportingServices/Controllers/ProductionReportController.cs +++ b/ReportingServices/Controllers/ProductionReportController.cs @@ -3,8 +3,6 @@ using ReportingServices.Dependency_Injections; using ReportingServices.HelperClasses; using ReportingServices.Models.ProductionReport; using ReportingServices.ReportingObjects; -using System.Text.Json; -using System.Text.Json.Nodes; using System.Web; namespace ReportingServices.Controllers @@ -15,7 +13,8 @@ namespace ReportingServices.Controllers private readonly IScrapeDatabaseRepository _scrapeDatabaseRepository; private readonly IFabTimeReportingRepository _fabTimeReportingRepository; private readonly int _reportIndex = (int)DateTime.Now.DayOfWeek; - private readonly string _dailyRptFileName = "wwwroot/Assets/DailyReportInfo.json"; + private readonly string _dailyRptFilePath = "wwwroot/Assets/DailyReportInfo.json"; + private readonly string _toolStateOwnerFilePath = "wwwroot/Assets/ToolStates.json"; private readonly string _toolFilter = "~R76%2C%20~R78%2C%20~R25%2C%20~R67%2C%20~R69%2C%20~R71%2C%20~R47%2C%20~R51%2C%20~R28"; public ProductionReportController(IJsonFileHandler jsonFileHandler, IScrapeDatabaseRepository scrapeDatabaseRepository, IFabTimeReportingRepository fabTimeReportingRepository) @@ -34,15 +33,18 @@ namespace ReportingServices.Controllers public IActionResult DailyReport() { DailyReport dailyReport = SetUpDailyReport(); + Dictionary> toolStateOwners = _jsonFileHandler.LoadJSONFile>>(_toolStateOwnerFilePath); + + dailyReport.ToolStatesByOwner = toolStateOwners; return View(dailyReport); } public IActionResult EditDailyReport() { - JsonNode node = _jsonFileHandler.LoadJSONFile(_dailyRptFileName); + Dictionary> entries = _jsonFileHandler.LoadJSONFile>>(_dailyRptFilePath); - ManualReportEntries rpt = JsonSerializer.Deserialize(node[(int)DateTime.Now.DayOfWeek]["Entries"]); + ManualReportEntries rpt = entries["Current Week"][_reportIndex]; return View(rpt); } @@ -50,18 +52,21 @@ namespace ReportingServices.Controllers [HttpPost] public IActionResult EditDailyReport(ManualReportEntries rpt) { - List report = _jsonFileHandler.LoadJSONFile>(_dailyRptFileName); + Dictionary> report = _jsonFileHandler.LoadJSONFile>>(_dailyRptFilePath); - report[_reportIndex].Entries = rpt; + rpt.Date = DateTime.Parse(DateTime.Now.ToShortDateString()); + rpt.Day = DateTime.Now.DayOfWeek; - _jsonFileHandler.SaveJSONFile(report, _dailyRptFileName); + report["Current Week"][_reportIndex] = rpt; + + _jsonFileHandler.SaveJSONFile(report, _dailyRptFilePath); return RedirectToAction("DailyReport"); } - public async Task> MovesTrendCaller() + public async Task> MovesTrendCaller(string startDate = "", string endDate = "") { - string url = APIHelperFunctions.GenerateURLWithParameters(chart: "MOVESLOTLIST", areasLike: "CLEANROOM", operationsLike: "1UNLOAD"); + string url = APIHelperFunctions.GenerateURLWithParameters(startDate: startDate, endDate: endDate, chart: "MOVESLOTLIST", areasLike: "CLEANROOM", operationsLike: "1UNLOAD"); List outsByRDS = await _fabTimeReportingRepository.GetMovesTrendData(url); @@ -80,7 +85,7 @@ namespace ReportingServices.Controllers public async Task> ToolStatesCaller(string toolType) { string capacityFilter = toolType == "ASM" ? toolType + "%2CASM%2B" : toolType; - string startDate = HttpUtility.UrlEncode(APIHelperFunctions.GetDateWithOffsetAsAPIString(DateTime.Now.ToString(), 12.5f)); + string startDate = HttpUtility.UrlEncode(APIHelperFunctions.GetDateWithOffsetAsAPIString(DateTime.Now.ToString(), -12.5f)); string url = APIHelperFunctions.GenerateURLWithParameters(chart: "ToolStateGantt", periodLen: "24", capacityTypesLike: capacityFilter, toolsLike: _toolFilter, startDate: startDate); @@ -95,44 +100,82 @@ namespace ReportingServices.Controllers DailyReport report = new(); Task> task1 = MovesTrendCaller(); - Task> task2 = ToolStateTrendCaller("ASM"); - Task> task3 = ToolStateTrendCaller("EPP"); - Task> task4 = ToolStateTrendCaller("HTR"); - Task> task5 = ToolStatesCaller("ASM"); - Task> task6 = ToolStatesCaller("EPP"); - Task> task7 = ToolStatesCaller("HTR"); + Task> task2 = MovesTrendCaller(startDate: report.StartDate.AddDays(-7).ToString(), endDate: report.StartDate.ToString()); + Task> task3 = ToolStateTrendCaller("ASM"); + Task> task4 = ToolStateTrendCaller("EPP"); + Task> task5 = ToolStateTrendCaller("HTR"); + Task> task6 = ToolStatesCaller("ASM"); + Task> task7 = ToolStatesCaller("EPP"); + Task> task8 = ToolStatesCaller("HTR"); + Task> task9 = ToolStatesCaller("Metrology"); + Task> task10 = ToolStatesCaller("Cleans"); - report.SetOutsByDay(task1.Result); + report.CurrentWeek.SetOutsByDay(task1.Result); + report.PreviousWeek.SetOutsByDay(task2.Result); List scrap = _scrapeDatabaseRepository.GetScrapByDay(task1.Result); + List previousScrap = _scrapeDatabaseRepository.GetScrapByDay(task2.Result); - report.SetScrapByDay(scrap); - report.AddToolAvailibilityByType("ASM", task2.Result); - report.AddToolAvailibilityByType("EPP", task3.Result); - report.AddToolAvailibilityByType("HTR", task4.Result); - report.AddToolStateByType("ASM", task5.Result); - report.AddToolStateByType("EPP", task6.Result); - report.AddToolStateByType("HTR", task7.Result); + report.CurrentWeek.SetScrapByDay(scrap); + report.PreviousWeek.SetScrapByDay(previousScrap); + report.AddToolAvailibilityByType("ASM", task3.Result); + report.AddToolAvailibilityByType("EPP", task4.Result); + report.AddToolAvailibilityByType("HTR", task5.Result); + report.AddToolStateByType("ASM", task6.Result); + report.AddToolStateByType("EPP", task7.Result); + report.AddToolStateByType("HTR", task8.Result); + report.AddToolStateByType("Metrology", task9.Result); + report.AddToolStateByType("Cleans", task10.Result); report.ReverseLists(); - int[] toolsByWaferSize = _scrapeDatabaseRepository.GetNumberOfToolsByWaferSize(); + report.QuarterlyTargets = _scrapeDatabaseRepository.GetQuarterlyTargets(); + + int[] toolsByWaferSize = _scrapeDatabaseRepository.GetNumberOfToolsByWaferSize("''"); report.NumberOfToolsWaferSize6IN = toolsByWaferSize[0]; report.NumberOfToolsWaferSize8IN = toolsByWaferSize[1]; - List entries = _jsonFileHandler.LoadJSONFile>(_dailyRptFileName); + string reactors = ""; - report.Entries = entries; + foreach (KeyValuePair keyValuePairs in report.ToolStateByType) + { + if (keyValuePairs.Key != "Metrology" && keyValuePairs.Key != "Cleans") + { + foreach (ToolStateCurrent tool in keyValuePairs.Value.ToolStateCurrents) + { + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") + { + reactors = reactors + "'" + tool.Tool.Substring(1) + "', "; + } + } + } + } + reactors = reactors.Substring(0, reactors.Length - 2); + + int[] toolsByWaferSizeScheduled = _scrapeDatabaseRepository.GetNumberOfToolsByWaferSize(reactors); + + report.NumberOfToolsWaferSize6INScheduled = toolsByWaferSizeScheduled[0]; + report.NumberOfToolsWaferSize8INScheduled = toolsByWaferSizeScheduled[1]; + + Dictionary> entries = _jsonFileHandler.LoadJSONFile>>(_dailyRptFilePath); + + report.CurrentEntries = entries["Current Week"]; + report.PreviousEntries = entries["Previous Week"]; + int[] singleLoadLocks = _scrapeDatabaseRepository.GetNumberOfSingleLoadLocks(); - report.Entries[_reportIndex].Entries.ASMSingleLoadLock = singleLoadLocks[0]; - report.Entries[_reportIndex].Entries.HTRSingleLoadLock = singleLoadLocks[1]; + report.CurrentEntries[_reportIndex].ASMSingleLoadLock = singleLoadLocks[0]; + report.CurrentEntries[_reportIndex].HTRSingleLoadLock = singleLoadLocks[1]; int[] unloadTempsLessThan700 = _scrapeDatabaseRepository.GetNumberOfToolUnloadTempsLessThan700(); - report.Entries[_reportIndex].Entries.ASMUnloadTempsLessThan700 = unloadTempsLessThan700[0]; - report.Entries[_reportIndex].Entries.HTRUnloadTempsLessThan700 = unloadTempsLessThan700[1]; + report.CurrentEntries[_reportIndex].ASMUnloadTempsLessThan700 = unloadTempsLessThan700[0]; + report.CurrentEntries[_reportIndex].HTRUnloadTempsLessThan700 = unloadTempsLessThan700[1]; + + entries["Current Week"] = report.CurrentEntries; + + _jsonFileHandler.SaveJSONFile(entries, _dailyRptFilePath); return report; } diff --git a/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs b/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs index c4463a8..9bbf945 100644 --- a/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs +++ b/ReportingServices/Dependency Injections/Implementations/ScrapeDatabaseRepository.cs @@ -2,7 +2,6 @@ using ReportingServices.Models.PlanningReport; using ReportingServices.ReportingObjects; using System.Data; -using System.Text.RegularExpressions; namespace ReportingServices.Dependency_Injections { @@ -126,7 +125,7 @@ namespace ReportingServices.Dependency_Injections return weeklyPartChanges; } - public int[] GetNumberOfToolsByWaferSize() + public int[] GetNumberOfToolsByWaferSize(string reactors) { int[] singleLoadLocks = new int[2]; @@ -141,6 +140,7 @@ namespace ReportingServices.Dependency_Injections " WHERE REACT_ASSIGNMENT IS NOT NULL " + " AND REACT_ASSIGNMENT <> 'Out of Service' " + " AND REACT_ASSIGNMENT <> '' " + + " AND REACT_NO NOT IN (" + reactors + ") " + "GROUP BY SUSC_POCKET_SIZE"; cmd.CommandText = query; @@ -171,7 +171,7 @@ namespace ReportingServices.Dependency_Injections SqlCommand cmd = _connection.CreateCommand(); - string query = "SELECT REACT_TYPE, COUNT(ACTIVE_LL_DISABLED) AS SLL" + + string query = "SELECT REACT_TYPE, SUM(CASE WHEN ACTIVE_LL_DISABLED <> '' AND ACTIVE_LL_DISABLED IS NOT NULL THEN 1 ELSE 0 END) AS SLL" + " FROM REACTOR " + " WHERE REACT_ASSIGNMENT IS NOT NULL " + " AND REACT_ASSIGNMENT <> 'Out of Service' " + @@ -232,5 +232,52 @@ namespace ReportingServices.Dependency_Injections return unloadTempTools; } + + public QuarterlyTargets GetQuarterlyTargets() + { + Dictionary targets = new(); + + OpenConnection(); + + SqlCommand cmd = _connection.CreateCommand(); + + string query = "SELECT THRU_TARGET, THRU_QTY, THRU_PCNT FROM FISCAL_QTR_TARGETS " + + " WHERE THRU_GROUP = 'TOT' " + + " AND FISCAL_YR = " + + " (SELECT FISCAL_YR FROM FISCAL_QTR " + + " WHERE START_DT < SYSDATETIME() " + + " AND END_DT > SYSDATETIME()) " + + " AND FISCAL_QTR = " + + " (SELECT FISCAL_QTR FROM FISCAL_QTR " + + " WHERE START_DT < SYSDATETIME() " + + " AND END_DT > SYSDATETIME()) "; + + cmd.CommandText = query; + + using (SqlDataReader reader = cmd.ExecuteReader()) + { + while(reader.Read()) + { + if (reader[0].ToString().ToUpper() == "YIELD") + targets.Add(reader[0].ToString(), float.Parse(reader[2].ToString())); + else if (!string.IsNullOrEmpty(reader[1].ToString())) + targets.Add(reader[0].ToString(), int.Parse(reader[1].ToString())); + } + } + + cmd.Dispose(); + + CloseConnection(); + + QuarterlyTargets quarterlyTargets = new() + { + Reactor_Outs = (int)targets["Reactor_Outs"], + Yield_Outs = (int)targets["Yield_Outs"], + IFX_Scrap = (int)targets["IFX_Scrap"], + Yield = targets["Yield"] + }; + + return quarterlyTargets; + } } } diff --git a/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs b/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs index f290f02..15100b5 100644 --- a/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs +++ b/ReportingServices/Dependency Injections/Interfaces/IScrapeDatabaseRepository.cs @@ -10,8 +10,9 @@ 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[] GetNumberOfToolsByWaferSize(string reactors); public int[] GetNumberOfSingleLoadLocks(); public int[] GetNumberOfToolUnloadTempsLessThan700(); + public QuarterlyTargets GetQuarterlyTargets(); } } diff --git a/ReportingServices/HelperClasses/APIHelperFunctions.cs b/ReportingServices/HelperClasses/APIHelperFunctions.cs index b1e588e..a30c839 100644 --- a/ReportingServices/HelperClasses/APIHelperFunctions.cs +++ b/ReportingServices/HelperClasses/APIHelperFunctions.cs @@ -1,6 +1,4 @@ -using ReportingServices.Dependency_Injections; -using ReportingServices.ReportingObjects; -using System.Web; +using System.Web; namespace ReportingServices.HelperClasses { @@ -45,13 +43,13 @@ namespace ReportingServices.HelperClasses return dateString; } - public static Dictionary SetParameters(string startDate = "", string chart = "", string periodLen = "", + public static Dictionary SetParameters(string startDate = "", string endDate = "", string chart = "", string periodLen = "", string areasLike = "", string toolsLike = "", string operationsLike = "", string capacityTypesLike = "") { Dictionary parameters = new(); startDate = startDate == "" ? HttpUtility.UrlEncode(GetBeginningOfWeekAsAPIString()) : startDate; - string endDate = HttpUtility.UrlEncode(GetDateTimeAsAPIString(DateTime.Now.ToString(), true)); + endDate = endDate == "" ? HttpUtility.UrlEncode(GetDateTimeAsAPIString(DateTime.Now.ToString(), true)) : endDate; parameters.Add("chart", chart); parameters.Add("starttime", startDate); @@ -87,10 +85,10 @@ namespace ReportingServices.HelperClasses return url; } - public static string GenerateURLWithParameters(string startDate = "", string chart = "", string periodLen = "", + public static string GenerateURLWithParameters(string startDate = "", string endDate = "", string chart = "", string periodLen = "", string areasLike = "", string toolsLike = "", string operationsLike = "", string capacityTypesLike = "") { - Dictionary parameters = SetParameters(startDate, chart, + Dictionary parameters = SetParameters(startDate, endDate, chart, periodLen, areasLike, toolsLike, operationsLike, capacityTypesLike); return GenerateURL(parameters); diff --git a/ReportingServices/Models/ProductionReport/DailyReport.cs b/ReportingServices/Models/ProductionReport/DailyReport.cs index 95a3161..62b93ea 100644 --- a/ReportingServices/Models/ProductionReport/DailyReport.cs +++ b/ReportingServices/Models/ProductionReport/DailyReport.cs @@ -5,28 +5,29 @@ namespace ReportingServices.Models.ProductionReport { public class DailyReport { - public List OutsByDay { get; set; } - public List ScrapByDay { get; set; } + public DateTime StartDate { get; set; } + public YieldStatistics CurrentWeek { get; set; } + public YieldStatistics PreviousWeek { get; set; } public Dictionary> ToolAvailibilityByType { get; set; } public Dictionary ToolStateByType { get; set; } - public List Entries { get; set; } + public Dictionary> ToolStatesByOwner { get; set; } + public List PreviousEntries { get; set; } + public List CurrentEntries { get; set; } public int NumberOfToolsWaferSize6IN { get; set; } public int NumberOfToolsWaferSize8IN { get; set; } + public int NumberOfToolsWaferSize6INScheduled { get; set; } + public int NumberOfToolsWaferSize8INScheduled { get; set; } + public QuarterlyTargets QuarterlyTargets { get; set; } public DailyReport() { ToolAvailibilityByType = new(); ToolStateByType = new(); - } - - public void SetOutsByDay(List outs) - { - OutsByDay = GetReactorOutsByDay(outs); - } - - public void SetScrapByDay(List scrap) - { - ScrapByDay = scrap; + PreviousEntries = new(); + CurrentEntries = new(); + StartDate = DateTime.Parse(APIHelperFunctions.GetBeginningOfWeekAsAPIString()); + CurrentWeek = new(StartDate, true); + PreviousWeek = new(StartDate.AddDays(-7), false); } public void AddToolAvailibilityByType(string key, List states) @@ -36,49 +37,15 @@ namespace ReportingServices.Models.ProductionReport public void AddToolStateByType(string key, List states) { - ToolStateByType state = new ToolStateByType(states); + ToolStateByType state = new(states); ToolStateByType.Add(key, state); } - public static List GetDistinctDatesFromReactorOuts(List outs) - { - List dates = new(); - - foreach (ReactorOutsByRDS rout in outs) - { - if (!dates.Contains(DateTime.Parse(rout.EndProcessTime).Date.ToString())) - dates.Add(DateTime.Parse(rout.EndProcessTime).Date.ToString()); - } - - return dates; - } - - public static List GetReactorOutsByDay(List outs) - { - List outsByDay = new(); - - List dates = GetDistinctDatesFromReactorOuts(outs); - - foreach (string date in dates) - { - int waferCount = 0; - - foreach (ReactorOutsByRDS rout in outs) - { - if (DateTime.Parse(rout.EndProcessTime).Date.ToString() == date) - waferCount += (int)float.Parse(rout.Units); - } - - outsByDay.Add(new ReactorOutsByDay(date, waferCount)); - } - - return outsByDay; - } - public void ReverseLists() { - ScrapByDay = APIHelperFunctions.ReverseList(ScrapByDay); + CurrentWeek.ScrapByDay = APIHelperFunctions.ReverseList(CurrentWeek.ScrapByDay); + PreviousWeek.ScrapByDay = APIHelperFunctions.ReverseList(PreviousWeek.ScrapByDay); ToolAvailibilityByType["ASM"] = APIHelperFunctions.ReverseList(ToolAvailibilityByType["ASM"]); ToolAvailibilityByType["EPP"] = APIHelperFunctions.ReverseList(ToolAvailibilityByType["EPP"]); diff --git a/ReportingServices/Models/ProductionReport/YieldStatistics.cs b/ReportingServices/Models/ProductionReport/YieldStatistics.cs new file mode 100644 index 0000000..797edee --- /dev/null +++ b/ReportingServices/Models/ProductionReport/YieldStatistics.cs @@ -0,0 +1,63 @@ +using ReportingServices.ReportingObjects; + +namespace ReportingServices.Models.ProductionReport +{ + public class YieldStatistics + { + public DateTime StartDate { get; set; } + public List OutsByDay { get; set; } + public List ScrapByDay { get; set; } + public bool IsCurrentWeek { get; set; } + + public YieldStatistics(DateTime startDate, bool isCurrentWeek) + { + StartDate = startDate; + IsCurrentWeek = isCurrentWeek; + } + + public void SetOutsByDay(List outs) + { + OutsByDay = GetReactorOutsByDay(outs); + } + + public void SetScrapByDay(List scrap) + { + ScrapByDay = scrap; + } + + public static List GetDistinctDatesFromReactorOuts(List outs) + { + List dates = new(); + + foreach (ReactorOutsByRDS rout in outs) + { + if (!dates.Contains(DateTime.Parse(rout.EndProcessTime).Date.ToString())) + dates.Add(DateTime.Parse(rout.EndProcessTime).Date.ToString()); + } + + return dates; + } + + public static List GetReactorOutsByDay(List outs) + { + List outsByDay = new(); + + List dates = GetDistinctDatesFromReactorOuts(outs); + + foreach (string date in dates) + { + int waferCount = 0; + + foreach (ReactorOutsByRDS rout in outs) + { + if (DateTime.Parse(rout.EndProcessTime).Date.ToString() == date) + waferCount += (int)float.Parse(rout.Units); + } + + outsByDay.Add(new ReactorOutsByDay(date, waferCount)); + } + + return outsByDay; + } + } +} diff --git a/ReportingServices/ReportingObjects/ManualReportEntries.cs b/ReportingServices/ReportingObjects/ManualReportEntries.cs index 4549da0..9d2e9ce 100644 --- a/ReportingServices/ReportingObjects/ManualReportEntries.cs +++ b/ReportingServices/ReportingObjects/ManualReportEntries.cs @@ -2,6 +2,8 @@ { public class ManualReportEntries { + public DayOfWeek Day { get; set; } + public DateTime Date { get; set; } public int OperatorHeadcountDays { get; set; } public int OperatorHeadcountNights { get; set; } public int OperatorCallOutsDays { get; set; } diff --git a/ReportingServices/ReportingObjects/ManualReportEntriesByDay.cs b/ReportingServices/ReportingObjects/ManualReportEntriesByDay.cs deleted file mode 100644 index 44b24cf..0000000 --- a/ReportingServices/ReportingObjects/ManualReportEntriesByDay.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace ReportingServices.ReportingObjects -{ - public class ManualReportEntriesByDay - { - public DayOfWeek Day { get; set; } - public ManualReportEntries Entries { get; set; } - - public ManualReportEntriesByDay(DayOfWeek day, ManualReportEntries entries) - { - Day = day; - Entries = entries; - } - } -} diff --git a/ReportingServices/ReportingObjects/QuarterlyTargets.cs b/ReportingServices/ReportingObjects/QuarterlyTargets.cs new file mode 100644 index 0000000..38c86cf --- /dev/null +++ b/ReportingServices/ReportingObjects/QuarterlyTargets.cs @@ -0,0 +1,10 @@ +namespace ReportingServices.ReportingObjects +{ + public class QuarterlyTargets + { + public int Reactor_Outs { get; set; } + public int Yield_Outs { get; set; } + public int IFX_Scrap { get; set; } + public float Yield { get; set; } + } +} diff --git a/ReportingServices/ReportingObjects/ToolStateByType.cs b/ReportingServices/ReportingObjects/ToolStateByType.cs index fee6c5f..eb40f42 100644 --- a/ReportingServices/ReportingObjects/ToolStateByType.cs +++ b/ReportingServices/ReportingObjects/ToolStateByType.cs @@ -32,14 +32,14 @@ { float elapsedTime = 0f; - if (ToolStateCurrents[ToolStateCurrents.Count - 1].BasicStateDescription.ToUpper() != "PRODUCTIVE") + if (ToolStateCurrents[ToolStateCurrents.Count - 1].BasicStateDescription.ToUpper() != "PRODUCTIVE" && ToolStateCurrents[ToolStateCurrents.Count - 1].BasicStateDescription.ToUpper() != "OUT OF SERVICE") float.Parse(ToolStateCurrents[ToolStateCurrents.Count - 1].GanttElapsedHours); for (int i = ToolStateCurrents.Count - 2; i >= 0; i--) { if (ToolStateCurrents[i].Tool == ToolStateCurrents[i + 1].Tool) { - if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE") + if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE" && ToolStateCurrents[ToolStateCurrents.Count - 1].BasicStateDescription.ToUpper() != "OUT OF SERVICE") elapsedTime += float.Parse(ToolStateCurrents[i].GanttElapsedHours); } else @@ -47,7 +47,7 @@ if (elapsedTime >= 12) ToolsDownGreaterThan12Hours.Add(ToolStateCurrents[i + 1].Tool); - if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE") + if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE" && ToolStateCurrents[ToolStateCurrents.Count - 1].BasicStateDescription.ToUpper() != "OUT OF SERVICE") elapsedTime = float.Parse(ToolStateCurrents[i].GanttElapsedHours); else elapsedTime = 0; @@ -61,7 +61,7 @@ { if (tools.BasicStateDescription == "Productive") UpTools++; - else + else if (tools.ReactorStatus != "Out of Service") DownTools++; } } diff --git a/ReportingServices/ReportingServices.csproj b/ReportingServices/ReportingServices.csproj index 9ac7a57..d6c00d7 100644 --- a/ReportingServices/ReportingServices.csproj +++ b/ReportingServices/ReportingServices.csproj @@ -6,7 +6,6 @@ - diff --git a/ReportingServices/Views/ProductionReport/DailyReport.cshtml b/ReportingServices/Views/ProductionReport/DailyReport.cshtml index bd75a83..99512d8 100644 --- a/ReportingServices/Views/ProductionReport/DailyReport.cshtml +++ b/ReportingServices/Views/ProductionReport/DailyReport.cshtml @@ -1,16 +1,7 @@ @using ReportingServices.ReportingObjects @model ReportingServices.Models.ProductionReport.DailyReport @{ - DateTime startDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); - int dayOfWeek = (int)DateTime.Now.DayOfWeek; - int totalWafersOut = 0; - int totalCustomerScrap = 0; - int totalManufacturingScrap = 0; - int totalProdScrap = 0; - int totalYieldedWafersOut = 0; - int deltaToCommit = 0; - int deltaToPlan = 0; - float totalYield = 0f; + int ASMAvailablePct = 0; int EPPAvailablePct = 0; @@ -24,44 +15,20 @@ int reportIndex = (int)DateTime.Now.DayOfWeek; - ManualReportEntries rpt = Model.Entries[reportIndex].Entries; + int numberOfDaysInWeek = Model.CurrentWeek.OutsByDay.Count; + + ManualReportEntries rpt = Model.CurrentEntries[reportIndex]; string myClass; List toolsDownGreaterThan12Hours = new(); foreach (KeyValuePair state in Model.ToolStateByType) { - toolsDownGreaterThan12Hours.AddRange(state.Value.ToolsDownGreaterThan12Hours); + if (state.Key != "Metrology" && state.Key != "Cleans") + toolsDownGreaterThan12Hours.AddRange(state.Value.ToolsDownGreaterThan12Hours); } toolsDownGreaterThan12Hours.Sort(); - - switch (dayOfWeek) - { - case 0: - startDate = startDate.AddDays(-6); - break; - case 1: - startDate = startDate.AddDays(-7); - break; - case 2: - startDate = startDate.AddDays(-1); - break; - case 3: - startDate = startDate.AddDays(-2); - break; - case 4: - startDate = startDate.AddDays(-3); - break; - case 5: - startDate = startDate.AddDays(-4); - break; - case 6: - startDate = startDate.AddDays(-5); - break; - default: - break; - } } @{ @@ -81,237 +48,19 @@

Daily Report



-
- - - - - @for (int i = 0; i < 7; i++) - { - - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @for (int i = 0; i < 7; i++) - { - - if (i < Model.OutsByDay.Count) - { - int reactorMoves = Model.OutsByDay[i].TotalWafers; - + + +

- totalWafersOut += reactorMoves; - } - else - { - - } - } - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int yieldedOuts = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - Model.ScrapByDay[i].TW_PROD; - - - - totalYieldedWafersOut += yieldedOuts; - } - else - { - - } - } - - - - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int custScrap = Model.ScrapByDay[i].TOT_REJ_CUST; - - - - totalCustomerScrap += custScrap; - } - else - { - - } - } - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int manuScrap = Model.ScrapByDay[i].TOT_REJ_MANU; - - - - totalManufacturingScrap += manuScrap; - } - else - { - - } - } - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int prodScrap = Model.ScrapByDay[i].TW_PROD; - - - - totalProdScrap += prodScrap; - } - else - { - - } - } - - - - - - @{ int count = 0; } - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - float yield = ((float)Model.OutsByDay[i].TotalWafers - (float)Model.ScrapByDay[i].TOT_REJ_WFRS) / (float)Model.OutsByDay[i].TotalWafers; - count++; - - - - totalYield += yield; - } - else - { - - } - } - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500; - - if (dayDelta < 0) - myClass = "table-danger text-danger"; - else - myClass = ""; - - - - deltaToCommit += dayDelta; - } - else - { - - } - } - - - - - - @for (int i = 0; i < 7; i++) - { - if (i < Model.OutsByDay.Count) - { - int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500; - - if (dayDelta < 0) - myClass = "table-danger text-danger"; - else - myClass = ""; - - - - deltaToPlan += dayDelta; - } - else - { - - } - } - - - - - - - - - - - - - - - - -
SI Operations@startDate.AddDays(i).ToString("MM/dd/yyyy")Weekly TotalComment
MondayTuesdayWednesdayThursdayFridaySaturdaySunday
Commited Target to meet Shipment Requirements4,5004,5004,5004,5004,5004,5004,50031,500Number updated quarterly
Actual Reactor Out@reactorMoves@totalWafersOutBefore Scrap
- Actual Yielded Wafers Out     - - @yieldedOuts@totalYieldedWafersOutAfter Scrap
Delta to commit@dayDelta@deltaToCommitDifference to commitment
Delta to the Plan@dayDelta@deltaToPlanDifference to target
Wafers Needed to make QTR3,6403,6403,6403,6403,6403,6403,64025,480Number updated weekly
+
+
+ + +
Daily Target Summary
    @@ -346,11 +95,20 @@ @foreach (ToolStateCurrent tool in Model.ToolStateByType["ASM"].ToolStateCurrents) { - if (tool.BasicStateDescription != "Productive") + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") { + string owner = ""; + + if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.ReactorStatus)) + owner = "Maint"; + else if (Model.ToolStatesByOwner["Engineering"].Contains(tool.ReactorStatus)) + owner = "Eng"; + else + owner = "Prod"; + @tool.Tool - + @owner @tool.Comment } @@ -373,11 +131,20 @@ @foreach (ToolStateCurrent tool in Model.ToolStateByType["EPP"].ToolStateCurrents) { - if (tool.BasicStateDescription != "Productive") + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") { + string owner = ""; + + if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.ReactorStatus)) + owner = "Maint"; + else if (Model.ToolStatesByOwner["Engineering"].Contains(tool.ReactorStatus)) + owner = "Eng"; + else + owner = "Prod"; + @tool.Tool - + @owner @tool.Comment } @@ -400,11 +167,20 @@ @foreach (ToolStateCurrent tool in Model.ToolStateByType["HTR"].ToolStateCurrents) { - if (tool.BasicStateDescription != "Productive") + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") { + string owner = ""; + + if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.ReactorStatus)) + owner = "Maint"; + else if (Model.ToolStatesByOwner["Engineering"].Contains(tool.ReactorStatus)) + owner = "Eng"; + else + owner = "Prod"; + @tool.Tool - + @owner @tool.Comment } @@ -421,15 +197,47 @@
  • 200mm - @Model.NumberOfToolsWaferSize8IN
-
  • Scheduled Reactors:
  • +
  • Scheduled Reactors (@(Model.NumberOfToolsWaferSize6INScheduled + Model.NumberOfToolsWaferSize8INScheduled)): +
      +
    • 150mm - @Model.NumberOfToolsWaferSize6INScheduled
    • +
    • 200mm - @Model.NumberOfToolsWaferSize8INScheduled
    • +
    +
  • Dual Layer Reactors
  • Engineering Focus Tools (Down > 12 hours)
    • @string.Join(",", toolsDownGreaterThan12Hours)
  • -
  • Metrology Down ():
  • -
  • Cleans ():
  • +
  • Metrology Down (@Model.ToolStateByType["Metrology"].DownTools): + @if (Model.ToolStateByType["Metrology"].DownTools > 0) + { +
      + @foreach (ToolStateCurrent tool in Model.ToolStateByType["Metrology"].ToolStateCurrents) + { + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") + { +
    • @tool.Tool
    • + } + } +
    + } +
  • +
  • + Cleans (@Model.ToolStateByType["Cleans"].DownTools): + @if (Model.ToolStateByType["Cleans"].DownTools > 0) + { +
      + @foreach (ToolStateCurrent tool in Model.ToolStateByType["Cleans"].ToolStateCurrents) + { + if (tool.BasicStateDescription != "Productive" && tool.ReactorStatus != "Out of Service") + { +
    • @tool.Tool
    • + } + } +
    + } +


  • @@ -451,7 +259,7 @@ @for (int i = 0; i < 7; i++) { - @startDate.AddDays(i).ToString("MM/dd/yyyy") + @Model.StartDate.AddDays(i).ToString("MM/dd/yyyy") } Actual Target @@ -480,7 +288,7 @@ } } - @(ASMAvailablePct / count + "%") + @(ASMAvailablePct / numberOfDaysInWeek + "%") 82% @@ -505,7 +313,7 @@ } } - @(EPPAvailablePct / count + "%") + @(EPPAvailablePct / numberOfDaysInWeek + "%") 60% @@ -530,87 +338,87 @@ } } - @(HTRAvailablePct / count + "%") + @(HTRAvailablePct / numberOfDaysInWeek + "%") 78% ASMs SLL Tool Count @for (int i = 0; i < 7; i++) { - if (i < Model.Entries.Count) + int index = i == 6 ? 0 : i + 1; + + if (@Model.CurrentEntries[index].ASMSingleLoadLock != 0) { - int index = i == 6 ? 0 : i + 1; - - @Model.Entries[index].Entries.ASMSingleLoadLock - - ASMSLL += @Model.Entries[index].Entries.ASMSingleLoadLock; + @Model.CurrentEntries[index].ASMSingleLoadLock } else { } + + ASMSLL += @Model.CurrentEntries[index].ASMSingleLoadLock; } - @(ASMSLL / count) + @(ASMSLL / numberOfDaysInWeek) 0 HTRs SLL Tool Count @for (int i = 0; i < 7; i++) { - if (i < Model.Entries.Count) + int index = i == 6 ? 0 : i + 1; + + if (@Model.CurrentEntries[index].HTRSingleLoadLock != 0) { - int index = i == 6 ? 0 : i + 1; - - @Model.Entries[index].Entries.HTRSingleLoadLock - - HTRSLL += @Model.Entries[index].Entries.HTRSingleLoadLock; + @Model.CurrentEntries[index].HTRSingleLoadLock } else { } + + HTRSLL += @Model.CurrentEntries[index].HTRSingleLoadLock; } - @(HTRSLL / count) + @(HTRSLL / numberOfDaysInWeek) 0 ASMs <700C (Unload Temps) @for (int i = 0; i < 7; i++) { - if (i < Model.Entries.Count) + int index = i == 6 ? 0 : i + 1; + + if (@Model.CurrentEntries[index].ASMUnloadTempsLessThan700 != 0) { - int index = i == 6 ? 0 : i + 1; - - @Model.Entries[index].Entries.ASMUnloadTempsLessThan700 - - ASMUnloadTemps += @Model.Entries[index].Entries.ASMUnloadTempsLessThan700; + @Model.CurrentEntries[index].ASMUnloadTempsLessThan700 } else { } + + ASMUnloadTemps += @Model.CurrentEntries[index].ASMUnloadTempsLessThan700; } - @(ASMUnloadTemps / count) + @(ASMUnloadTemps / numberOfDaysInWeek) 0 HTRs <700C (Unload Temps) @for (int i = 0; i < 7; i++) { - if (i < Model.Entries.Count) + int index = i == 6 ? 0 : i + 1; + + if (@Model.CurrentEntries[index].HTRUnloadTempsLessThan700 != 0) { - int index = i == 6 ? 0 : i + 1; - - @Model.Entries[index].Entries.HTRUnloadTempsLessThan700 - - HTRUnloadTemps += @Model.Entries[index].Entries.HTRUnloadTempsLessThan700; + @Model.CurrentEntries[index].HTRUnloadTempsLessThan700 } else { } + + HTRUnloadTemps += @Model.CurrentEntries[index].HTRUnloadTempsLessThan700; } - @(HTRUnloadTemps / count) + @(HTRUnloadTemps / numberOfDaysInWeek) 0 diff --git a/ReportingServices/Views/Shared/_DailyReportPartial.cshtml b/ReportingServices/Views/Shared/_DailyReportPartial.cshtml new file mode 100644 index 0000000..4dbb7ad --- /dev/null +++ b/ReportingServices/Views/Shared/_DailyReportPartial.cshtml @@ -0,0 +1,254 @@ +@model ReportingServices.Models.ProductionReport.YieldStatistics + +@{ + int totalWafersOut = 0; + int totalCustomerScrap = 0; + int totalManufacturingScrap = 0; + int totalProdScrap = 0; + int totalYieldedWafersOut = 0; + int deltaToCommit = 0; + int deltaToPlan = 0; + float totalYield = 0f; + + string myClass; + + int numberOfDaysInWeek = Model.OutsByDay.Count; + int yieldOutDays = Model.IsCurrentWeek ? Model.OutsByDay.Count - 1 : Model.OutsByDay.Count; +} + + + + + + + @for (int i = 0; i < 7; i++) + { + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @for (int i = 0; i < 7; i++) + { + + if (i < numberOfDaysInWeek) + { + int reactorMoves = Model.OutsByDay[i].TotalWafers; + + + + totalWafersOut += reactorMoves; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int yieldedOuts = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - Model.ScrapByDay[i].TW_PROD; + + + + totalYieldedWafersOut += yieldedOuts; + } + else + { + + } + } + + + + + @{ + int index = numberOfDaysInWeek - 1; + int modifiedYieldedOuts = 0; + if (Model.IsCurrentWeek) + modifiedYieldedOuts = totalYieldedWafersOut - (Model.OutsByDay[index].TotalWafers - Model.ScrapByDay[index].TOT_REJ_WFRS - Model.ScrapByDay[index].TW_PROD); + else + modifiedYieldedOuts = totalYieldedWafersOut; + } + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int custScrap = Model.ScrapByDay[i].TOT_REJ_CUST; + + + + totalCustomerScrap += custScrap; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int manuScrap = Model.ScrapByDay[i].TOT_REJ_MANU; + + + + totalManufacturingScrap += manuScrap; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int prodScrap = Model.ScrapByDay[i].TW_PROD; + + + + totalProdScrap += prodScrap; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + float yield = ((float)Model.OutsByDay[i].TotalWafers - (float)Model.ScrapByDay[i].TOT_REJ_WFRS) / (float)Model.OutsByDay[i].TotalWafers; + + + + totalYield += yield; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500; + + if (dayDelta < 0) + myClass = "table-danger text-danger"; + else + myClass = ""; + + + + deltaToCommit += dayDelta; + } + else + { + + } + } + + + + + + @for (int i = 0; i < 7; i++) + { + if (i < numberOfDaysInWeek) + { + int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500; + + if (dayDelta < 0) + myClass = "table-danger text-danger"; + else + myClass = ""; + + + + deltaToPlan += dayDelta; + } + else + { + + } + } + + + + + + + + + + + + + + + + +
    SI Operations@Model.StartDate.AddDays(i).ToString("MM/dd/yyyy")Weekly TotalComment
    MondayTuesdayWednesdayThursdayFridaySaturdaySunday
    Commited Target to meet Shipment Requirements4,5004,5004,5004,5004,5004,5004,50031,500Number updated quarterly
    Actual Reactor Out@reactorMoves@totalWafersOutBefore Scrap
    + Actual Yielded Wafers Out     + + @yieldedOuts@totalYieldedWafersOutAfter Scrap
    Delta to commit@dayDelta@deltaToCommitDifference to commitment
    Delta to the Plan@dayDelta@deltaToPlanDifference to target
    Wafers Needed to make QTR3,6403,6403,6403,6403,6403,6403,64025,480Number updated weekly
    diff --git a/ReportingServices/wwwroot/Assets/DailyReportInfo.json b/ReportingServices/wwwroot/Assets/DailyReportInfo.json index ac8d1bc..c8eba53 100644 --- a/ReportingServices/wwwroot/Assets/DailyReportInfo.json +++ b/ReportingServices/wwwroot/Assets/DailyReportInfo.json @@ -1,156 +1 @@ -[ - { - "Day": 0, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 1, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 2, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 3, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 4, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 5, - "Entries": { - "OperatorHeadcountDays": 0, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - }, - { - "Day": 6, - "Entries": { - "OperatorHeadcountDays": 6, - "OperatorHeadcountNights": 15, - "OperatorCallOutsDays": 2, - "OperatorCallOutsNights": 0, - "EngineeringHeadcountDays": 2, - "EngineeringHeadcountNights": 2, - "EngineeringCallOutsDays": 0, - "EngineeringCallOutsNights": 0, - "MaintenanceHeadcountDays": 4, - "MaintenanceHeadcountNights": 5, - "MaintenanceCallOutsDays": 0, - "MaintenanceCallOutsNights": 2, - "BottleChanges": "R22", - "DailyPartChanges": "R22,R23,R25", - "WeeklyPartChanges": "R21,R23,R29,R30", - "SingleLoadLockASM": 0, - "SingleLoadLockHTR": 0 - } - } -] \ No newline at end of file +{"Previous Week":[{"Day":0,"Date":"2022-11-27T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-11-28T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":10,"HTRSingleLoadLock":16,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":2,"Date":"2022-11-29T00:00:00","OperatorHeadcountDays":14,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":3,"HTRSingleLoadLock":12,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":1},{"Day":3,"Date":"2022-11-30T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":4,"Date":"2022-12-01T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":5,"Date":"2022-12-02T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":6,"Date":"2022-12-03T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}],"Current Week":[{"Day":0,"Date":"2022-12-04T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":1,"Date":"2022-12-05T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":10,"HTRSingleLoadLock":16,"ASMUnloadTempsLessThan700":2,"HTRUnloadTempsLessThan700":1},{"Day":2,"Date":"2022-12-06T00:00:00","OperatorHeadcountDays":14,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":3,"HTRSingleLoadLock":12,"ASMUnloadTempsLessThan700":3,"HTRUnloadTempsLessThan700":1},{"Day":3,"Date":"2022-12-07T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":3,"HTRSingleLoadLock":12,"ASMUnloadTempsLessThan700":1,"HTRUnloadTempsLessThan700":1},{"Day":4,"Date":"2022-12-08T00:00:00","OperatorHeadcountDays":6,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":5,"Date":"2022-12-09T00:00:00","OperatorHeadcountDays":0,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0},{"Day":6,"Date":"2022-12-10T00:00:00","OperatorHeadcountDays":13,"OperatorHeadcountNights":15,"OperatorCallOutsDays":2,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":2,"EngineeringHeadcountNights":2,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":4,"MaintenanceHeadcountNights":5,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":2,"BottleChanges":"R22","DailyPartChanges":"R22,R23,R25","WeeklyPartChanges":"R21,R23,R29,R30","ASMSingleLoadLock":0,"HTRSingleLoadLock":0,"ASMUnloadTempsLessThan700":0,"HTRUnloadTempsLessThan700":0}]} \ No newline at end of file diff --git a/ReportingServices/wwwroot/Assets/ToolStates.json b/ReportingServices/wwwroot/Assets/ToolStates.json new file mode 100644 index 0000000..503357e --- /dev/null +++ b/ReportingServices/wwwroot/Assets/ToolStates.json @@ -0,0 +1,44 @@ +{ + "Maintenance": [ + "RESPONSE_TIME_MAINTENANCE_UNSCHEDULED", + "RESPONSE_TIME_MAINTENANCE_SCHEDULED", + "MAINTENANCE_UNSCHEDULED", + "MAINTENANCE_SCHEDULED", + "MAINTENANCE_WAITING_FOR_PARTS", + "WAITING_FOR_MAINTENANCE_SCHEDULED", + "WAITING_FOR_MAINTENANCE_UNSCHEDULED", + "TEST_SCHEDULED", + "TEST_UNSCHEDULED", + "TEST_PM", + "CHANGEOVER_SCHEDULED", + "CHANGEOVER_UNSCHEDULED" + ], + "Engineering": [ + "RESPONSE_TIME_ENGINEER_UNSCHEDULED", + "RESPONSE_TIME_ENGTECH_UNSCHEDULED", + "RESPONSE_TIME_ENGINEER_SCHEDULED", + "RESPONSE_TIME_ENGTECH_SCHEDULED", + "ENGINEERING_DEVELOPMENT", + "ENGINEERING_INVESTIGATION", + "TROUBLESHOOT_ENGTECH", + "WAITING_FOR_ENGINEER_SCHEDULED", + "WAITING_FOR_ENGINEER_UNSCHEDULED", + "WAITING_FOR_ENGTECH_SCHEDULED", + "WAITING_FOR_ENGTECH_UNSCHEDULED" + ], + "Facilities": [ + "FACILITIES_UNSCHEDULED", + "FACILITIES_SHEDULED", + "FACILITIES_WAITING_FOR_PARTS" + ], + "Production": [ + "UP_WITH_RESTRICTIONS", + "UP", + "UP_WITH_INCREASED_SAMPLING", + "UP_NOT_RUNNING", + "TROUBLESHOOT_OPERATOR", + "IDLE", + "WAITING_FOR_OPERATOR", + "CLEANUP" + ] +} diff --git a/ReportingServices/wwwroot/js/site.js b/ReportingServices/wwwroot/js/site.js index 0a969d8..7aad066 100644 --- a/ReportingServices/wwwroot/js/site.js +++ b/ReportingServices/wwwroot/js/site.js @@ -150,4 +150,12 @@ function expandYield() { document.getElementById("yieldImage").src = "../Images/minusIcon.png"; else document.getElementById("yieldImage").src = "../Images/plusIcon.png"; +} + +function toggleWeek() { + var rptTableDiv = document.getElementsByClassName("dailyReportTable"); + + for (let i = 0; i < rptTableDiv.length; i++) { + rptTableDiv[i].classList.toggle("hidden"); + } } \ No newline at end of file