| | 1 | | using Microsoft.AspNetCore.Http; |
| | 2 | | using Microsoft.AspNetCore.Mvc; |
| | 3 | | using ReportingServices.Shared.Models.PlanningReport; |
| | 4 | | using ReportingServices.Shared.Models.ProductionReport; |
| | 5 | | using ReportingServices.Shared.Repositories; |
| | 6 | |
|
| | 7 | | namespace ReportingServices.API.Controllers |
| | 8 | | { |
| | 9 | | [Route("api/[controller]")] |
| | 10 | | [ApiController] |
| | 11 | | public class ScrapeDBController : ControllerBase |
| | 12 | | { |
| | 13 | | private readonly IScrapeDatabaseRepository _scrapeDBRepository; |
| | 14 | |
|
| 0 | 15 | | public ScrapeDBController(IScrapeDatabaseRepository scrapeDBRepository) |
| 0 | 16 | | { |
| 0 | 17 | | _scrapeDBRepository = scrapeDBRepository; |
| 0 | 18 | | } |
| | 19 | |
|
| | 20 | | [HttpGet("PSNWO")] |
| | 21 | | public List<ReactorPSNWORuns> GetReactorPSNWORuns(string startDate, string endDate) |
| 0 | 22 | | { |
| 0 | 23 | | return _scrapeDBRepository.GetReactorPSNWORuns(startDate, endDate); |
| 0 | 24 | | } |
| | 25 | |
|
| | 26 | | [HttpGet("PartChanges")] |
| | 27 | | public int GetNumberOfPartChanges(string startDate, string endDate) |
| 0 | 28 | | { |
| 0 | 29 | | return _scrapeDBRepository.GetNumberOfPartChanges(startDate, endDate); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | [HttpGet("Targets")] |
| | 33 | | public QuarterlyTargets GetQuarterlyTargets() |
| 0 | 34 | | { |
| 0 | 35 | | return _scrapeDBRepository.GetQuarterlyTargets(); |
| 0 | 36 | | } |
| | 37 | |
|
| | 38 | | [HttpGet("Reactors")] |
| | 39 | | public List<Reactor> GetReactors() |
| 0 | 40 | | { |
| 0 | 41 | | return _scrapeDBRepository.GetReactors(); |
| 0 | 42 | | } |
| | 43 | |
|
| | 44 | | [HttpGet("RDS")] |
| | 45 | | public List<RDS> GetRDSForLastDay(string date) |
| 0 | 46 | | { |
| 0 | 47 | | return _scrapeDBRepository.GetRDSForLastDay(date); |
| 0 | 48 | | } |
| | 49 | | } |
| | 50 | | } |