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