Removed all references to FabTime
This commit is contained in:
@ -9,8 +9,6 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
public YieldStatistics CurrentWeek { get; set; }
|
||||
public YieldStatistics PreviousWeek { get; set; }
|
||||
public List<ToolEventView> ToolEvents { get; set; }
|
||||
public Dictionary<string, List<EquipmentStateByDay>> ToolAvailibilityByType { get; set; }
|
||||
public Dictionary<string, ToolStateByType> ToolStateByType { get; set; }
|
||||
public List<ToolEvent> CleanEvents { get; set; }
|
||||
public List<ToolEvent> MetrologyEvents { get; set; }
|
||||
public Dictionary<string, List<string>> ToolStatesByOwner { get; set; }
|
||||
@ -26,8 +24,6 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
|
||||
public DailyReport()
|
||||
{
|
||||
ToolAvailibilityByType = new();
|
||||
ToolStateByType = new();
|
||||
CleanEvents = new();
|
||||
MetrologyEvents = new();
|
||||
DualLayerReactors = new();
|
||||
@ -38,18 +34,6 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
PreviousWeek = new(StartDate.AddDays(-7), false);
|
||||
}
|
||||
|
||||
public void AddToolAvailibilityByType(string key, List<EquipmentStateByDay> states)
|
||||
{
|
||||
ToolAvailibilityByType.Add(key, states);
|
||||
}
|
||||
|
||||
public void AddToolStateByType(string key, List<ToolStateCurrent> states)
|
||||
{
|
||||
ToolStateByType state = new(states);
|
||||
|
||||
ToolStateByType.Add(key, state);
|
||||
}
|
||||
|
||||
public void SetReactorInfo(List<Reactor> reactors, List<int> unscheduledReactors)
|
||||
{
|
||||
SetToolsByPocketSize(reactors, unscheduledReactors);
|
||||
@ -141,10 +125,6 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
{
|
||||
CurrentWeek.ScrapByDay = APIHelperFunctions.ReverseList(CurrentWeek.ScrapByDay);
|
||||
PreviousWeek.ScrapByDay = APIHelperFunctions.ReverseList(PreviousWeek.ScrapByDay);
|
||||
|
||||
ToolAvailibilityByType["ASM"] = APIHelperFunctions.ReverseList(ToolAvailibilityByType["ASM"]);
|
||||
ToolAvailibilityByType["EPP"] = APIHelperFunctions.ReverseList(ToolAvailibilityByType["EPP"]);
|
||||
ToolAvailibilityByType["HTR"] = APIHelperFunctions.ReverseList(ToolAvailibilityByType["HTR"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,71 +0,0 @@
|
||||
using ReportingServices.Shared.Models.ProductionReport;
|
||||
|
||||
namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
{
|
||||
public class ToolStateByType
|
||||
{
|
||||
public int DownTools { get; set; }
|
||||
public int UpTools { get; set; }
|
||||
public List<ToolStateCurrent> ToolStateCurrents { get; set; }
|
||||
public List<string> ToolsDownGreaterThan12Hours { get; set; }
|
||||
|
||||
public ToolStateByType(List<ToolStateCurrent> toolStateCurrents)
|
||||
{
|
||||
ToolStateCurrents = toolStateCurrents;
|
||||
ToolsDownGreaterThan12Hours = new List<string>();
|
||||
UpTools = 0;
|
||||
DownTools = 0;
|
||||
|
||||
GetToolsDownGreaterThan12Hours();
|
||||
GetMostRecentTransactions();
|
||||
DetermineUpAndDownTools();
|
||||
}
|
||||
|
||||
public void GetMostRecentTransactions()
|
||||
{
|
||||
for (int i = ToolStateCurrents.Count - 2; i >= 0; i--)
|
||||
{
|
||||
if (ToolStateCurrents[i].Tool == ToolStateCurrents[i + 1].Tool)
|
||||
ToolStateCurrents.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
public void GetToolsDownGreaterThan12Hours()
|
||||
{
|
||||
float elapsedTime = 0f;
|
||||
|
||||
if (ToolStateCurrents[^1].BasicStateDescription.ToUpper() is not "PRODUCTIVE" and not "OUT OF SERVICE")
|
||||
float.Parse(ToolStateCurrents[^1].GanttElapsedHours);
|
||||
|
||||
for (int i = ToolStateCurrents.Count - 2; i >= 0; i--)
|
||||
{
|
||||
if (ToolStateCurrents[i].Tool == ToolStateCurrents[i + 1].Tool)
|
||||
{
|
||||
if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE" && ToolStateCurrents[^1].BasicStateDescription.ToUpper() != "OUT OF SERVICE")
|
||||
elapsedTime += float.Parse(ToolStateCurrents[i].GanttElapsedHours);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (elapsedTime >= 12)
|
||||
ToolsDownGreaterThan12Hours.Add(ToolStateCurrents[i + 1].Tool);
|
||||
|
||||
if (ToolStateCurrents[i].BasicStateDescription.ToUpper() != "PRODUCTIVE" && ToolStateCurrents[^1].BasicStateDescription.ToUpper() != "OUT OF SERVICE")
|
||||
elapsedTime = float.Parse(ToolStateCurrents[i].GanttElapsedHours);
|
||||
else
|
||||
elapsedTime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DetermineUpAndDownTools()
|
||||
{
|
||||
foreach (ToolStateCurrent tools in ToolStateCurrents)
|
||||
{
|
||||
if (tools.BasicStateDescription == "Productive")
|
||||
UpTools++;
|
||||
else if (tools.ReactorStatus != "Out of Service")
|
||||
DownTools++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user