diff --git a/Complex.Application/Services/DashboardService.cs b/Complex.Application/Services/DashboardService.cs index 488dd81..0174a76 100644 --- a/Complex.Application/Services/DashboardService.cs +++ b/Complex.Application/Services/DashboardService.cs @@ -1,4 +1,5 @@ using Complex.Application; +using Complex.Application.Common; using Complex.Common.Dto; using Complex.Domain.Entities; using Microsoft.EntityFrameworkCore; @@ -7,7 +8,7 @@ namespace Complex.Application.Services.Dashboard { public interface IDashboardService { - ResultDto GetManagerSummary(Guid complexId); + ResultDto GetManagerSummary(Guid complexId, CommonRequestDto? commonRequest = null); } public class DashboardService : IDashboardService @@ -19,7 +20,7 @@ namespace Complex.Application.Services.Dashboard _complexDBContext = complexDBContext; } - public ResultDto GetManagerSummary(Guid complexId) + public ResultDto GetManagerSummary(Guid complexId, CommonRequestDto? commonRequest = null) { var units = _complexDBContext.Units.Where(u => u.ComplexId == complexId); diff --git a/Complex.EndPoint/Controllers/DashboardController.cs b/Complex.EndPoint/Controllers/DashboardController.cs index 1a5639a..6ebf8bd 100644 --- a/Complex.EndPoint/Controllers/DashboardController.cs +++ b/Complex.EndPoint/Controllers/DashboardController.cs @@ -1,3 +1,4 @@ +using Complex.Application.Common; using Complex.Application.Services.Dashboard; using Complex.Common.Dto; using Complex.EndPoint.Utility; @@ -20,9 +21,11 @@ namespace Complex.EndPoint.Controllers } [HttpGet] - public ResultDto ManagerSummary(Guid complexId) + public ResultDto ManagerSummary( + Guid complexId, + [FromQuery] CommonRequestDto? commonRequest) { - return _dashboardService.GetManagerSummary(complexId); + return _dashboardService.GetManagerSummary(complexId, commonRequest); } } }