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

@ -17,16 +17,14 @@ namespace ReportingServices.Shared.Repositories
return await GetJsonData<List<ReactorOutsByRDS>>(url);
}
public async Task GetToolStateTrendData(DailyReport rpt, string toolType)
public async Task<List<EquipmentStateByDay>> GetToolStateTrendData(string toolType)
{
string url = APIHelperFunctions.GenerateURLWithParameters(chart: "TOOLSTATE", periodLen: "24", capacityTypesLike: toolType, toolsLike: _toolFilter);
rpt.AddToolAvailibilityByType(toolType, await GetJsonData<List<EquipmentStateByDay>>(url));
return;
return await GetJsonData<List<EquipmentStateByDay>>(url);
}
public async Task GetToolStateData(DailyReport rpt, string toolType)
public async Task<List<ToolStateCurrent>> GetToolStateData(string toolType)
{
string capacityFilter = toolType == "ASM" ? toolType + "%2CASM%2B" : toolType;
string startDate = HttpUtility.UrlEncode(APIHelperFunctions.GetDateWithOffsetAsAPIString(DateTime.Now.ToString(), -12.5f));
@ -34,9 +32,7 @@ namespace ReportingServices.Shared.Repositories
string url = APIHelperFunctions.GenerateURLWithParameters(chart: "ToolStateGantt", periodLen: "24",
capacityTypesLike: capacityFilter, toolsLike: _toolFilter, startDate: startDate);
rpt.AddToolStateByType(toolType, await GetJsonData<List<ToolStateCurrent>>(url));
return;
return await GetJsonData<List<ToolStateCurrent>>(url);
}
public async Task<T> GetJsonData<T>(string url)

View File

@ -6,8 +6,8 @@ namespace ReportingServices.Shared.Repositories
public interface IFabTimeReportingRepository
{
public Task<List<ReactorOutsByRDS>> GetMovesTrendData(string startDate = "", string endDate = "");
public Task GetToolStateTrendData(DailyReport rpt, string toolType);
public Task GetToolStateData(DailyReport rpt, string toolType);
public Task<List<EquipmentStateByDay>> GetToolStateTrendData(string toolType);
public Task<List<ToolStateCurrent>> GetToolStateData(string toolType);
public Task<T> GetJsonData<T>(string url);
}
}