Compare commits
2 Commits
7d2e843605
...
a87b889ca4
Author | SHA1 | Date | |
---|---|---|---|
a87b889ca4 | |||
994595ddd5 |
@ -33,7 +33,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)
|
||||
@ -44,13 +43,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