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:
@ -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>
|
||||
}
|
||||
|
Reference in New Issue
Block a user