Merge branch 'LabWork04_Base' into LabWork04_Hard
This commit is contained in:
commit
415e4c2d6f
@ -35,7 +35,6 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
/// Получение списка компонент с указанием, в каких изделиях используются
|
||||
public List<ReportDocumentBlankViewModel> GetDocumentBlanks()
|
||||
{
|
||||
var blanks = _blankStorage.GetFullList();
|
||||
var documents = _documentStorage.GetFullList();
|
||||
var list = new List<ReportDocumentBlankViewModel>();
|
||||
foreach (var doc in documents)
|
||||
@ -46,13 +45,11 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
Blanks = new List<(string Blank, int Count)>(),
|
||||
TotalCount = 0
|
||||
};
|
||||
foreach (var blank in blanks)
|
||||
foreach (var blank in doc.DocumentBlanks.Values)
|
||||
{
|
||||
if (doc.DocumentBlanks.ContainsKey(blank.Id))
|
||||
{
|
||||
record.Blanks.Add(new (blank.BlankName, doc.DocumentBlanks[blank.Id].Item2));
|
||||
record.TotalCount += doc.DocumentBlanks[blank.Id].Item2;
|
||||
}
|
||||
record.Blanks.Add((blank.Item1.BlankName, blank.Item2));
|
||||
record.TotalCount += blank.Item2;
|
||||
|
||||
}
|
||||
list.Add(record);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user