This commit is contained in:
asakky 2024-12-20 00:41:32 +04:00
parent 450f1dc73c
commit 77878a457c
2 changed files with 1 additions and 4 deletions

View File

@ -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),

View File

@ -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")
});