Refactored code, restructured project organization, and added new unit tests.

This commit is contained in:
Daniel Wathen
2022-12-13 12:11:28 -07:00
parent 8f96e31121
commit b5def3da89
33 changed files with 670 additions and 418 deletions

View File

@ -1,56 +0,0 @@
using ReportingServices.HelperClasses;
using ReportingServices.ReportingObjects;
namespace ReportingServices.Models.ProductionReport
{
public class DailyReport
{
public DateTime StartDate { get; set; }
public YieldStatistics CurrentWeek { get; set; }
public YieldStatistics PreviousWeek { get; set; }
public Dictionary<string, List<EquipmentStateByDay>> ToolAvailibilityByType { get; set; }
public Dictionary<string, ToolStateByType> ToolStateByType { get; set; }
public Dictionary<string, List<string>> ToolStatesByOwner { get; set; }
public Dictionary<string, List<string>> DualLayerReactors { get; set; }
public List<ManualReportEntries> PreviousEntries { get; set; }
public List<ManualReportEntries> CurrentEntries { get; set; }
public int NumberOfToolsWaferSize6IN { get; set; }
public int NumberOfToolsWaferSize8IN { get; set; }
public int NumberOfToolsWaferSize6INScheduled { get; set; }
public int NumberOfToolsWaferSize8INScheduled { get; set; }
public QuarterlyTargets QuarterlyTargets { get; set; }
public DailyReport()
{
ToolAvailibilityByType = new();
ToolStateByType = new();
PreviousEntries = new();
CurrentEntries = new();
StartDate = DateTime.Parse(APIHelperFunctions.GetBeginningOfWeekAsAPIString());
CurrentWeek = new(StartDate, true);
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 ReverseLists()
{
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"]);
}
}
}

View File

@ -0,0 +1,8 @@
namespace ReportingServices.Models.ProductionReport
{
public class EquipmentStateByDay
{
public string StartTime { get; set; }
public string AvailablePct { get; set; }
}
}

View File

@ -0,0 +1,27 @@
namespace ReportingServices.Models.ProductionReport
{
public class ManualReportEntries
{
public DayOfWeek Day { get; set; }
public DateTime Date { get; set; }
public int OperatorHeadcountDays { get; set; }
public int OperatorHeadcountNights { get; set; }
public int OperatorCallOutsDays { get; set; }
public int OperatorCallOutsNights { get; set; }
public int EngineeringHeadcountDays { get; set; }
public int EngineeringHeadcountNights { get; set; }
public int EngineeringCallOutsDays { get; set; }
public int EngineeringCallOutsNights { get; set; }
public int MaintenanceHeadcountDays { get; set; }
public int MaintenanceHeadcountNights { get; set; }
public int MaintenanceCallOutsDays { get; set; }
public int MaintenanceCallOutsNights { get; set; }
public string BottleChanges { get; set; }
public string DailyPartChanges { get; set; }
public string WeeklyPartChanges { get; set; }
public int ASMSingleLoadLock { get; set; }
public int HTRSingleLoadLock { get; set; }
public int ASMUnloadTempsLessThan700 { get; set; }
public int HTRUnloadTempsLessThan700 { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace ReportingServices.Models.ProductionReport
{
public class QuarterlyTargets
{
public int Reactor_Outs { get; set; }
public int Yield_Outs { get; set; }
public int IFX_Scrap { get; set; }
public float Yield { get; set; }
}
}

View File

@ -0,0 +1,20 @@
namespace ReportingServices.Models.ProductionReport
{
public class RDS
{
public int Reactor { get; set; }
public string ReactorType { get; set; }
public DateTime DateOut { get; set; }
public int UnloadTemp { get; set; }
public string LayerType { get; set; }
public RDS(int reactor, string reactorType, DateTime dateOut, int unloadTemp, string layerType)
{
Reactor = reactor;
ReactorType = reactorType;
DateOut = dateOut;
UnloadTemp = unloadTemp;
LayerType = layerType;
}
}
}

View File

@ -0,0 +1,18 @@
namespace ReportingServices.Models.ProductionReport
{
public class Reactor
{
public int ReactorNumber { get; set; }
public string Type { get; set; }
public string PocketSize { get; set; }
public bool HasDisabledLoadlock { get; set; }
public Reactor(int reactorNumber, string type, string pocketSize, bool hasDisabledLoadlock)
{
ReactorNumber = reactorNumber;
Type = type;
PocketSize = pocketSize;
HasDisabledLoadlock = hasDisabledLoadlock;
}
}
}

View File

@ -0,0 +1,14 @@
namespace ReportingServices.Models.ProductionReport
{
public class ReactorOutsByDay
{
public string StartDate { get; set; }
public int TotalWafers { get; set; }
public ReactorOutsByDay(string startDate, int totalWafers)
{
StartDate = startDate;
TotalWafers = totalWafers;
}
}
}

View File

@ -0,0 +1,9 @@
namespace ReportingServices.Models.ProductionReport
{
public class ReactorOutsByRDS
{
public string RDS_NO { get; set; }
public string Units { get; set; }
public string EndProcessTime { get; set; }
}
}

View File

@ -0,0 +1,20 @@
namespace ReportingServices.Models.ProductionReport
{
public class ScrapByDay
{
public string StartDate { get; set; }
public int TW_PROD { get; set; }
public int TOT_REJ_CUST { get; set; }
public int TOT_REJ_MANU { get; set; }
public int TOT_REJ_WFRS { get; set; }
public ScrapByDay(string startDate, string tw_prod, string tot_rej_cust, string tot_rej_manu)
{
StartDate = startDate;
TW_PROD = int.Parse(tw_prod);
TOT_REJ_CUST = int.Parse(tot_rej_cust);
TOT_REJ_MANU = int.Parse(tot_rej_manu);
TOT_REJ_WFRS = TOT_REJ_CUST + TOT_REJ_MANU;
}
}
}

View File

@ -0,0 +1,15 @@
namespace ReportingServices.Models.ProductionReport
{
public class ToolStateCurrent
{
public string Tool { get; set; }
public string TranTime { get; set; }
public string GanttEndTime { get; set; }
public string GanttElapsedHours { get; set; }
public string BasicStateDescription { get; set; }
public string SubState { get; set; }
public string ReactorStatus { get; set; }
public string Comment { get; set; }
}
}

View File

@ -1,6 +1,4 @@
using ReportingServices.ReportingObjects;
namespace ReportingServices.Models.ProductionReport
namespace ReportingServices.Models.ProductionReport
{
public class YieldStatistics
{
@ -15,13 +13,9 @@ namespace ReportingServices.Models.ProductionReport
IsCurrentWeek = isCurrentWeek;
}
public void SetOutsByDay(List<ReactorOutsByRDS> outs)
public void SetYieldInformation(List<ReactorOutsByRDS> outs, List<ScrapByDay> scrap)
{
OutsByDay = GetReactorOutsByDay(outs);
}
public void SetScrapByDay(List<ScrapByDay> scrap)
{
ScrapByDay = scrap;
}