fix excel report with sum
This commit is contained in:
parent
bce2e9612a
commit
2edfb98b6a
@ -43,7 +43,7 @@ internal class TableReport
|
||||
{
|
||||
var data = _contractRepository
|
||||
.ReadContracts(customerId: customerId, dateFrom: startDate, dateTo: endDate)
|
||||
.GroupBy(x => x.ConclusionDate)
|
||||
.GroupBy(x => x.ExecutorFullName)
|
||||
.Select(x => new
|
||||
{
|
||||
x.First().ExecutorFullName,
|
||||
@ -54,7 +54,7 @@ internal class TableReport
|
||||
.Union(
|
||||
_contractRepository
|
||||
.ReadContracts(customerId: customerId, dateFrom: startDate, dateTo: endDate)
|
||||
.GroupBy(x => x.Deadline)
|
||||
.GroupBy(x => x.ExecutorFullName)
|
||||
.Select(x => new
|
||||
{
|
||||
x.First().ExecutorFullName,
|
||||
@ -69,12 +69,12 @@ internal class TableReport
|
||||
return new List<string[]>() { item }
|
||||
.Union(data.Select(x => new string[] {
|
||||
x.ExecutorFullName,
|
||||
x.Date.ToString(),
|
||||
x.CountIn?.ToString() ?? string.Empty,
|
||||
x.CountOut?.ToString() ?? string.Empty
|
||||
x.Date.ToString("dd.MM.yyyy"),
|
||||
x.CountIn?.ToString("N0") ?? string.Empty,
|
||||
x.CountOut?.ToString("N0") ?? string.Empty
|
||||
}))
|
||||
.Union(
|
||||
[["Всего", "", data.Sum(x => x.CountIn ?? 0).ToString(), data.Sum(x => x.CountOut ?? 0).ToString()]])
|
||||
[["Всего", "", data.Sum(x => x.CountIn ?? 0).ToString("N0"), data.Sum(x => x.CountOut ?? 0).ToString("N0")]])
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user