Updated UnloadTemps repo to get data for whole week instead of just the last day.
This commit is contained in:
@ -15,6 +15,7 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
public Dictionary<string, List<int>> DualLayerReactors { get; set; }
|
||||
public List<ManualReportEntries> PreviousEntries { get; set; }
|
||||
public List<ManualReportEntries> CurrentEntries { get; set; }
|
||||
public List<UnloadTempsByDay> UnloadTempsByDay { get; set; }
|
||||
public int NumberOfToolsWaferSize6IN { get; set; }
|
||||
public int NumberOfToolsWaferSize8IN { get; set; }
|
||||
public int NumberOfToolsWaferSize6INScheduled { get; set; }
|
||||
@ -28,6 +29,7 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
PreviousEntries = new();
|
||||
CurrentEntries = new();
|
||||
DualLayerReactors = new();
|
||||
UnloadTempsByDay = new();
|
||||
StartDate = DateTime.Parse(APIHelperFunctions.GetBeginningOfWeekAsAPIString());
|
||||
CurrentWeek = new(StartDate, true);
|
||||
PreviousWeek = new(StartDate.AddDays(-7), false);
|
||||
@ -83,7 +85,8 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
|
||||
private void SetDualLayerReactors(List<RDS> rdsList)
|
||||
{
|
||||
List<RDS> rdsWithDualLayerPSN = rdsList.Where(rds => rds.LayerType.Contains("2 Layer")).ToList();
|
||||
DateTime compareDate = DateTime.Now.Date;
|
||||
List<RDS> rdsWithDualLayerPSN = rdsList.Where(rds => rds.LayerType.Contains("2 Layer") && rds.DateOut == compareDate).ToList();
|
||||
|
||||
DualLayerReactors.Add("ASM", rdsWithDualLayerPSN.
|
||||
Where(rds => rds.ReactorType.Contains("ASM")).
|
||||
@ -104,20 +107,17 @@ namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
|
||||
private void SetUnloadTempsLessThan700(List<RDS> rdsList)
|
||||
{
|
||||
List<RDS> rdsWithTempsLessThan700 = rdsList.Where(rds => rds.UnloadTemp < 700).ToList();
|
||||
var rdsWithTempsLessThan700 = rdsList.Where(rds => rds.UnloadTemp < 700).GroupBy(rds => rds.DateOut);
|
||||
|
||||
CurrentEntries[(int)DateTime.Now.DayOfWeek].ASMUnloadTempsLessThan700 =
|
||||
rdsWithTempsLessThan700.
|
||||
Where(rds => rds.ReactorType.
|
||||
Contains("ASM")).
|
||||
Select(rds => rds.Reactor).
|
||||
Distinct().Count();
|
||||
CurrentEntries[(int)DateTime.Now.DayOfWeek].HTRUnloadTempsLessThan700 =
|
||||
rdsWithTempsLessThan700.
|
||||
Where(rds => rds.ReactorType.
|
||||
Contains("HTR")).
|
||||
Select(rds => rds.Reactor).
|
||||
Distinct().Count();
|
||||
foreach (var group in rdsWithTempsLessThan700)
|
||||
{
|
||||
UnloadTempsByDay.Add(new UnloadTempsByDay
|
||||
{
|
||||
Date = group.Key,
|
||||
ASMUnloadsBelow700 = group.Where(rds => rds.ReactorType.Contains("ASM")).Select(rds => rds.Reactor).Distinct().Count(),
|
||||
HTRUnloadsBelow700 = group.Where(rds => rds.ReactorType.Contains("HTR")).Select(rds => rds.Reactor).Distinct().Count()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void ReverseLists()
|
||||
|
@ -0,0 +1,9 @@
|
||||
namespace ReportingServices.Shared.ViewModels.ProductionReport
|
||||
{
|
||||
public class UnloadTempsByDay
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public int ASMUnloadsBelow700 { get; set; }
|
||||
public int HTRUnloadsBelow700 { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user