Moved API and DB methods to interfaces in order to leverage Dependency Injection, disolved APICaller class, including functionality in several other functions, included Single Load Lock information into Production Passdown report, changed persistant data file to json instead of xml, and adjusted persistant data file to include a week's worth of data instead of a single day.

This commit is contained in:
Daniel Wathen
2022-12-02 14:41:19 -07:00
parent e9c071c8f7
commit 740896adf0
31 changed files with 857 additions and 549 deletions

View File

@ -27,11 +27,11 @@
<div class="modal-body" style="padding-top: 15px; padding-bottom: 10px">
<div class="row">
<div class="col-6">Start Date:</div>
<div class="col-6"><input type="text" name="StartDate" id="StartDate" /></div>
<div class="col-6"><input type="text" name="startDate" id="StartDate" /></div>
</div>
<div class="row" style="padding-top: 10px; padding-bottom: 10px">
<div class="col-6">End Date:</div>
<div class="col-6"><input type="text" name="EndDate" id="EndDate" /></div>
<div class="col-6"><input type="text" name="endDate" id="EndDate" /></div>
</div>
<div class="row" style="padding-top: 10px; padding-bottom: 10px">
<div class="col text-center">

View File

@ -1,6 +1,6 @@
@using ReportingServices.Models.PlanningReport
@using ReportingServices.HelperClasses
@model List<ReportingServices.Models.PlanningReport.WeeklyPartChanges>
@model ReportingServices.Models.PlanningReport.WeeklyPartChanges
@{
ViewData["Title"] = "Weekly Part Changes | Mesa Reporting Services";
@ -20,10 +20,10 @@
<div>
<div class="row">
<div class="col-6">
<p>Number of Part Changes: @ViewBag.NumberOfPartChanges</p>
<p>Number of Part Changes: @Model.TotalPartChanges</p>
</div>
<div class="col-6">
<p class="text-end">@ViewBag.StartDate - @ViewBag.EndDate</p>
<p class="text-end">@Model.StartDate - @Model.EndDate</p>
</div>
</div>
<div>
@ -36,19 +36,19 @@
</tr>
</thead>
<tbody>
@for (int i = 0; i < Model.Count; i++)
@for (int i = 0; i < Model.ReactorPSNWORuns.Count; i++)
{
int count = 1;
bool doesMatch = false;
if (i + count < Model.Count)
doesMatch = Model[i].REACTOR == Model[i + count].REACTOR;
if (i + count < Model.ReactorPSNWORuns.Count)
doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR;
while (doesMatch)
{
count++;
if (i + count < Model.Count)
doesMatch = Model[i].REACTOR == Model[i + count].REACTOR;
if (i + count < Model.ReactorPSNWORuns.Count)
doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR;
else
doesMatch = false;
}
@ -63,14 +63,14 @@
<tr class="align-middle @tableColor">
@if (j == 0)
{
<td rowspan="@(count)">@Model[i].REACTOR</td>
<td>@Model[i].PSN</td>
<td>@Model[i].WO_COUNT</td>
<td rowspan="@(count)">@Model.ReactorPSNWORuns[i].REACTOR</td>
<td>@Model.ReactorPSNWORuns[i].PSN</td>
<td>@Model.ReactorPSNWORuns[i].WO_COUNT</td>
}
else
{
<td>@Model[i + j].PSN</td>
<td>@Model[i + j].WO_COUNT</td>
<td>@Model.ReactorPSNWORuns[i + j].PSN</td>
<td>@Model.ReactorPSNWORuns[i + j].WO_COUNT</td>
}
</tr>
}

View File

@ -16,6 +16,13 @@
int EPPAvailablePct = 0;
int HTRAvailablePct = 0;
int ASMSLL = 0;
int HTRSLL = 0;
int reportIndex = (int)DateTime.Now.DayOfWeek;
ManualReportEntries rpt = Model.Entries[reportIndex].Entries;
string myClass;
List<string> toolsDownGreaterThan12Hours = new();
@ -26,10 +33,6 @@
toolsDownGreaterThan12Hours.Sort();
ReportingServices.HelperClasses.XMLReader xmlReader = new ReportingServices.HelperClasses.XMLReader();
DailyReportingSummary rpt = xmlReader.LoadJSONFile();
switch (dayOfWeek)
{
case 0:
@ -132,7 +135,7 @@
<td>Before Scrap</td>
</tr>
<tr>
<td scope="row" id="expandYield">Actual Yielded Wafers Out</td>
<td scope="row" id="expandYield">Actual Yielded Wafers Out &nbsp;&nbsp;&nbsp; <img src="~/Images/plusIcon.png" width="20" style="padding-bottom: 3px" onclick="expandYield()" id="yieldImage" /></td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.OutsByDay.Count)
@ -445,10 +448,9 @@
<td scope="row">ASMs Uptime</td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.ToolAvailibilityByType["ASM"].EquipmentStates.Count)
if (i < Model.ToolAvailibilityByType["ASM"].Count)
{
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["ASM"].EquipmentStates[i].AvailablePct));
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["ASM"][i].AvailablePct));
if (availiblePct < 82)
myClass = "table-danger text-danger";
@ -471,10 +473,9 @@
<td scope="row">EPPs Uptime</td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.ToolAvailibilityByType["EPP"].EquipmentStates.Count)
if (i < Model.ToolAvailibilityByType["EPP"].Count)
{
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["EPP"].EquipmentStates[i].AvailablePct));
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["EPP"][i].AvailablePct));
if (availiblePct < 60)
myClass = "table-danger text-danger";
@ -497,10 +498,9 @@
<td scope="row">HTRs Uptime</td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.ToolAvailibilityByType["HTR"].EquipmentStates.Count)
if (i < Model.ToolAvailibilityByType["HTR"].Count)
{
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["HTR"].EquipmentStates[i].AvailablePct));
int availiblePct = (int)Math.Round(float.Parse(Model.ToolAvailibilityByType["HTR"][i].AvailablePct));
if (availiblePct < 78)
myClass = "table-danger text-danger";
@ -519,6 +519,46 @@
<td>@(HTRAvailablePct / count + "%")</td>
<td>78%</td>
</tr>
<tr>
<td scope="row">ASMs SLL Tool Count</td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.Entries.Count)
{
int index = i == 6 ? 0 : i + 1;
<td>@Model.Entries[index].Entries.SingleLoadLockASM</td>
ASMSLL += @Model.Entries[index].Entries.SingleLoadLockASM;
}
else
{
<td></td>
}
}
<td>@(ASMSLL / count)</td>
<td>0</td>
</tr>
<tr>
<td scope="row">HTRs SLL Tool Count</td>
@for (int i = 0; i < 7; i++)
{
if (i < Model.Entries.Count)
{
int index = i == 6 ? 0 : i + 1;
<td>@Model.Entries[index].Entries.SingleLoadLockHTR</td>
HTRSLL += @Model.Entries[index].Entries.SingleLoadLockHTR;
}
else
{
<td></td>
}
}
<td>@(HTRSLL / count)</td>
<td>0</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,4 +1,4 @@
@model ReportingServices.ReportingObjects.DailyReportingSummary
@model ReportingServices.ReportingObjects.ManualReportEntries
@{
ViewData["Title"] = "Edit Daily Passdown | Mesa Reporting Services";

View File

@ -11,9 +11,8 @@
<br />
<div class="row">
<div class="col-3 d-grid btn btn-outline-secondary">
<img src="~/Images/ReportFile.png" class="buttonImage float-start" />
<a class="text-start text-wrap" asp-area="" asp-controller="ProductionReport" asp-action="DailyReport" onclick="displayBusyIndicator()">Production Passdown Report</a>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" asp-area="" asp-controller="ProductionReport" asp-action="DailyReport" onclick="displayBusyIndicator()"><img src="~/Images/ReportFile.png" class="buttonImage float-start" />Production Passdown Report</a>
</div>
</div>

View File

@ -51,7 +51,7 @@
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2022 - ReportingServices - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2022 - Mesa Reporting Services
</div>
</footer>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>