4 лаба готова
This commit is contained in:
parent
ba28f317fa
commit
02bb47bdb3
@ -46,7 +46,7 @@ public class TableReport
|
|||||||
.ReadShifts(dateFrom: startDate, dateTo: endDate, employeeId: employeeId, busId: busId)
|
.ReadShifts(dateFrom: startDate, dateTo: endDate, employeeId: employeeId, busId: busId)
|
||||||
.Where(x => x.Date >= startDate && x.Date <= endDate && x.Starting_shift_employees.Any(y => y.Employee_id == employeeId))
|
.Where(x => x.Date >= startDate && x.Date <= endDate && x.Starting_shift_employees.Any(y => y.Employee_id == employeeId))
|
||||||
.Select(x => new {
|
.Select(x => new {
|
||||||
EmployeeId = (int?)employeeId,
|
EmployeeId = x.Starting_shift_employees.FirstOrDefault(y => y.Employee_id == employeeId)?.Employee_name,
|
||||||
BusId = (string?)null,
|
BusId = (string?)null,
|
||||||
x.Date,
|
x.Date,
|
||||||
WorkHours = x.Starting_shift_employees.FirstOrDefault(y => y.Employee_id == employeeId)?.Work_time,
|
WorkHours = x.Starting_shift_employees.FirstOrDefault(y => y.Employee_id == employeeId)?.Work_time,
|
||||||
@ -56,7 +56,7 @@ public class TableReport
|
|||||||
.ReadServices()
|
.ReadServices()
|
||||||
.Where(x => x.Date >= startDate && x.Date <= endDate && x.Bus_id == busId)
|
.Where(x => x.Date >= startDate && x.Date <= endDate && x.Bus_id == busId)
|
||||||
.Select(x => new {
|
.Select(x => new {
|
||||||
EmployeeId = (int?)null,
|
EmployeeId = (string?)null,
|
||||||
BusId = (string?)x.Bus_name,
|
BusId = (string?)x.Bus_name,
|
||||||
x.Date,
|
x.Date,
|
||||||
WorkHours = (int?)null,
|
WorkHours = (int?)null,
|
||||||
@ -67,7 +67,7 @@ public class TableReport
|
|||||||
return new List<string[]>() { item }
|
return new List<string[]>() { item }
|
||||||
.Union(data
|
.Union(data
|
||||||
.Select(x => new string[] {
|
.Select(x => new string[] {
|
||||||
x.EmployeeId.ToString() ?? string.Empty,
|
x.EmployeeId ?? string.Empty,
|
||||||
x.BusId ?? string.Empty,
|
x.BusId ?? string.Empty,
|
||||||
x.Date.ToString("dd.MM.yyyy"),
|
x.Date.ToString("dd.MM.yyyy"),
|
||||||
x.WorkHours?.ToString("N0") ?? string.Empty,
|
x.WorkHours?.ToString("N0") ?? string.Empty,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user