Compare commits
No commits in common. "415e4c2d6f3cd28c6279a889d4f6929c59b40b1c" and "d2653e90156684e255e8de8a0b8a932de4023a4c" have entirely different histories.
415e4c2d6f
...
d2653e9015
@ -35,6 +35,7 @@ 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)
|
||||
@ -45,11 +46,13 @@ namespace LawFirmBusinessLogic.BusinessLogics
|
||||
Blanks = new List<(string Blank, int Count)>(),
|
||||
TotalCount = 0
|
||||
};
|
||||
foreach (var blank in doc.DocumentBlanks.Values)
|
||||
foreach (var blank in blanks)
|
||||
{
|
||||
record.Blanks.Add((blank.Item1.BlankName, blank.Item2));
|
||||
record.TotalCount += blank.Item2;
|
||||
|
||||
if (doc.DocumentBlanks.ContainsKey(blank.Id))
|
||||
{
|
||||
record.Blanks.Add(new (blank.BlankName, doc.DocumentBlanks[blank.Id].Item2));
|
||||
record.TotalCount += doc.DocumentBlanks[blank.Id].Item2;
|
||||
}
|
||||
}
|
||||
list.Add(record);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user