Compare commits
No commits in common. "a87b889ca4496f155e434a6a765b334429b81c23" and "7d2e84360585c8dc66f494e88c5cffe2641389a2" have entirely different histories.
a87b889ca4
...
7d2e843605
@ -33,6 +33,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)
|
||||
@ -43,11 +44,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