Added Hold Report to the production reports.

This commit is contained in:
Daniel Wathen
2023-01-16 12:28:48 -07:00
parent bbd396c25e
commit 9525355b55
8 changed files with 124 additions and 6 deletions

View File

@ -15,7 +15,7 @@ public class ProductionReportController : Controller
public ProductionReportController(ILogger<ProductionReportController> logger)
{
_logger = logger;
_baseDBUrl = "http://localhost:50201/api/";
_baseDBUrl = "http://localhost:50201/api/ScrapeDB/";
_logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl);
}
@ -24,11 +24,9 @@ public class ProductionReportController : Controller
public IActionResult DailyReport()
{
string baseScrapeDbUrl = _baseDBUrl + "ScrapeDB/";
try
{
DailyReport dailyReport = DailyReportHelper.SetUpDailyReport(_logger, baseScrapeDbUrl);
DailyReport dailyReport = DailyReportHelper.SetUpDailyReport(_logger, _baseDBUrl);
Dictionary<string, List<string>> toolStateOwners = JsonFileHandler.LoadJSONFile<Dictionary<string, List<string>>>(_toolStateOwnerFilePath);
dailyReport.ToolStatesByOwner = toolStateOwners;
@ -58,4 +56,11 @@ public class ProductionReportController : Controller
return RedirectToAction("DailyReport");
}
public IActionResult HoldLotReport()
{
List<HoldLot> holdLots = ApiCaller.GetApi<List<HoldLot>>(_baseDBUrl + "GetCurrentHoldLots").Result;
return View(holdLots);
}
}

View File

@ -0,0 +1,44 @@
@using ReportingServices.Shared.Models.ProductionReport;
@model List<HoldLot>
@{
ViewData["Title"] = "Hold Lot Report | Mesa Reporting Services";
}
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a asp-controller="Home" asp-action="Index">Home</a></li>
<li class="breadcrumb-item"><a asp-controller="ProductionReport" asp-action="Index">Production Reports</a></li>
<li class="breadcrumb-item active" aria-current="page">Hold Lot Report</li>
</ol>
</div>
<br />
<h1 class="text-center">Hold Lots</h1>
<br /><br />
<table class="table text-center">
<thead>
<tr>
<th scope="col">WO</th>
<th scope="col">RDS</th>
<th scope="col">Reactor</th>
<th scope="col">Hold Time</th>
<th scope="col">Hold User</th>
<th scope="col">Hold Reason</th>
</tr>
</thead>
<tbody>
@foreach (HoldLot lot in Model)
{
<tr>
<td>@lot.WO_NO</td>
<td>@lot.RDS_NO</td>
<td>@lot.REACTOR</td>
<td>@lot.HOLD_DATE</td>
<td>@lot.HOLD_USER</td>
<td>@lot.HOLD_REASON</td>
</tr>
}
</tbody>
</table>

View File

@ -12,7 +12,10 @@
<div class="row">
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" asp-area="" asp-controller="ProductionReport" asp-action="DailyReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Production Passdown Report</span></a>
<a class="btn btn-outline-secondary text-start" asp-controller="ProductionReport" asp-action="DailyReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Production Passdown Report</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" asp-controller="ProductionReport" asp-action="HoldLotReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Hold Lot Report</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" href="http://goto.infineon.com/mesassrreport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Mesa SSR Report</span></a>