done <3
This commit is contained in:
parent
450f1dc73c
commit
77878a457c
@ -34,19 +34,16 @@ internal class ChartReport
|
||||
|
||||
private List<(string Caption, double Value)> GetData(DateTime dateTime)
|
||||
{
|
||||
// Количество выдач книг за день
|
||||
var issueCount = _issueRepository
|
||||
.ReadIssue()
|
||||
.Where(x => x.IssueDate.Date == dateTime.Date)
|
||||
.SelectMany(x => x.BookIssue)
|
||||
.Count();
|
||||
|
||||
// Количество реставраций книг за день
|
||||
var restorationCount = _bookRestorationRepository
|
||||
.ReadBookRestorations()
|
||||
.Count(x => x.RestorationDate.Date == dateTime.Date);
|
||||
|
||||
// Формируем данные для диаграммы
|
||||
return new List<(string Caption, double Value)>
|
||||
{
|
||||
("Выдачи", issueCount),
|
||||
|
@ -76,7 +76,7 @@ internal class TableReport
|
||||
.Select(group => new
|
||||
{
|
||||
Librarian = librarian.Name,
|
||||
Count = group.Count(), // Суммируем количество реставраций за день
|
||||
Count = group.Count(),
|
||||
Description = "Реставрации",
|
||||
Date = group.Key.RestorationDate.ToString("dd.MM.yyyy")
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user