Added backend API project to segregate responsibilites - Data is now handled in API project and business is all handled in UI project.

This commit is contained in:
Daniel Wathen
2023-01-04 14:19:59 -07:00
parent 80696e5fe6
commit 1adb303d99
33 changed files with 762 additions and 95 deletions

View File

@ -0,0 +1,37 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ReportingServices.Shared.Models.ProductionReport;
using ReportingServices.Shared.Repositories;
namespace ReportingServices.API.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class FabTimeController : ControllerBase
{
private readonly IFabTimeReportingRepository _fabTimeReportingRepository;
public FabTimeController(IFabTimeReportingRepository fabTimeReportingRepository)
{
_fabTimeReportingRepository = fabTimeReportingRepository;
}
[HttpGet("ReactorOuts")]
public async Task<List<ReactorOutsByRDS>> GetReactorOuts(string startDate, string endDate)
{
return await _fabTimeReportingRepository.GetMovesTrendData(startDate, endDate);
}
[HttpGet("ToolStateTrend")]
public async Task<List<EquipmentStateByDay>> GetToolStateTrendData(string toolType)
{
return await _fabTimeReportingRepository.GetToolStateTrendData(toolType);
}
[HttpGet("ToolState")]
public async Task<List<ToolStateCurrent>> GetToolStateData(string toolType)
{
return await _fabTimeReportingRepository.GetToolStateData(toolType);
}
}
}