Used queries to get data from scrape database instead of FabTime to use a single data source.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ReportingServices.Shared.Models.PlanningReport;
|
||||
using ReportingServices.Shared.Models.ProductionReport;
|
||||
using ReportingServices.Shared.Repositories;
|
||||
using ReportingServices.Shared.ViewModels.ProductionReport;
|
||||
|
||||
namespace ReportingServices.API.Controllers
|
||||
{
|
||||
@ -17,6 +17,19 @@ namespace ReportingServices.API.Controllers
|
||||
_scrapeDBRepository = scrapeDBRepository;
|
||||
}
|
||||
|
||||
[HttpGet("ReactorOuts")]
|
||||
public YieldInformation GetReactorOuts(string startDate, string endDate)
|
||||
{
|
||||
List<ReactorOutsByRDS> outs = _scrapeDBRepository.GetRDSRunBetweenDates(startDate, endDate);
|
||||
YieldInformation yieldInformation = new()
|
||||
{
|
||||
Outs = outs,
|
||||
Scrap = _scrapeDBRepository.GetScrapByDay(outs)
|
||||
};
|
||||
|
||||
return yieldInformation;
|
||||
}
|
||||
|
||||
[HttpGet("PSNWO")]
|
||||
public List<ReactorPSNWORuns> GetReactorPSNWORuns(string startDate, string endDate)
|
||||
{
|
||||
@ -46,5 +59,17 @@ namespace ReportingServices.API.Controllers
|
||||
{
|
||||
return _scrapeDBRepository.GetRDSForLastDay(date);
|
||||
}
|
||||
|
||||
[HttpGet("ReactorEvents")]
|
||||
public List<ReactorEvent> GetReactorEvents(string startDate, string endDate, string reactorNumber)
|
||||
{
|
||||
return _scrapeDBRepository.GetReactorEvents(startDate, endDate, reactorNumber);
|
||||
}
|
||||
|
||||
[HttpGet("ToolEvents")]
|
||||
public ToolEvent GetLatestToolEvent(string toolID)
|
||||
{
|
||||
return _scrapeDBRepository.GetLatestToolEvent(toolID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user