51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using ReportingServices.Shared.Models.PlanningReport;
|
|
using ReportingServices.Shared.Models.ProductionReport;
|
|
using ReportingServices.Shared.Repositories;
|
|
|
|
namespace ReportingServices.API.Controllers
|
|
{
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class ScrapeDBController : ControllerBase
|
|
{
|
|
private readonly IScrapeDatabaseRepository _scrapeDBRepository;
|
|
|
|
public ScrapeDBController(IScrapeDatabaseRepository scrapeDBRepository)
|
|
{
|
|
_scrapeDBRepository = scrapeDBRepository;
|
|
}
|
|
|
|
[HttpGet("PSNWO")]
|
|
public List<ReactorPSNWORuns> GetReactorPSNWORuns(string startDate, string endDate)
|
|
{
|
|
return _scrapeDBRepository.GetReactorPSNWORuns(startDate, endDate);
|
|
}
|
|
|
|
[HttpGet("PartChanges")]
|
|
public int GetNumberOfPartChanges(string startDate, string endDate)
|
|
{
|
|
return _scrapeDBRepository.GetNumberOfPartChanges(startDate, endDate);
|
|
}
|
|
|
|
[HttpGet("Targets")]
|
|
public QuarterlyTargets GetQuarterlyTargets()
|
|
{
|
|
return _scrapeDBRepository.GetQuarterlyTargets();
|
|
}
|
|
|
|
[HttpGet("Reactors")]
|
|
public List<Reactor> GetReactors()
|
|
{
|
|
return _scrapeDBRepository.GetReactors();
|
|
}
|
|
|
|
[HttpGet("RDS")]
|
|
public List<RDS> GetRDSForLastDay(string date)
|
|
{
|
|
return _scrapeDBRepository.GetRDSForLastDay(date);
|
|
}
|
|
}
|
|
}
|