улр4
This commit is contained in:
parent
0cdb83845a
commit
d0ed969123
@ -33,7 +33,6 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<ReportReinforcedComponentViewModel> GetReinforcedComponent()
|
public List<ReportReinforcedComponentViewModel> GetReinforcedComponent()
|
||||||
{
|
{
|
||||||
var components = _componentStorage.GetFullList();
|
|
||||||
var reinforceds = _reinforcedStorage.GetFullList();
|
var reinforceds = _reinforcedStorage.GetFullList();
|
||||||
var list = new List<ReportReinforcedComponentViewModel>();
|
var list = new List<ReportReinforcedComponentViewModel>();
|
||||||
|
|
||||||
@ -45,17 +44,13 @@ namespace PrecastConcretePlantBusinessLogic.BusinessLogics
|
|||||||
Components = new List<(string, int)>(),
|
Components = new List<(string, int)>(),
|
||||||
TotalCount = 0
|
TotalCount = 0
|
||||||
};
|
};
|
||||||
foreach (var condition in components)
|
foreach (var component in reinforced.ReinforcedComponents)
|
||||||
{
|
{
|
||||||
if (reinforced.ReinforcedComponents.ContainsKey(condition.Id))
|
record.Components.Add(new(component.Value.Item1.ComponentName, component.Value.Item2));
|
||||||
{
|
record.TotalCount += component.Value.Item2;
|
||||||
record.Components.Add(new(condition.ComponentName, reinforced.ReinforcedComponents[condition.Id].Item2));
|
|
||||||
record.TotalCount += reinforced.ReinforcedComponents[condition.Id].Item2;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
list.Add(record);
|
list.Add(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user