using AccountsDAL.CustomCode.AccountReports.AccountBudgetVsComparison; using AccountsDAL.DTO.AccountsReports; using GB5Shared.DTO.Framework.Login; using GB5Shared.Telemetry; namespace AccountsBLL.AccountReports.AccountBudgetVsComparison { public class AccountBudgetVsComparisonReportBLL : IAccountBudgetVsComparisonReportBLL { private readonly IAccountBudgetVsComparisonReportDAL _dal; public AccountBudgetVsComparisonReportBLL(IAccountBudgetVsComparisonReportDAL dal) { _dal = dal; } public async Task> GetBudgetVsComparisonReport( int budgetId, byte type, byte viewLevel, byte ouAxis, byte accountNature, List? ouIds, int ouGroupId, LoginDTO loginDTO, CancellationToken ct) { if (budgetId == 0) throw new ArgumentException("BudgetId is required."); try { GB5Trace.Step("get-budget-vs-comparison", new { budgetId, type, viewLevel, ouAxis, accountNature, ouIds, ouGroupId }); return await _dal.GetBudgetVsComparisonReport(budgetId, type, viewLevel, ouAxis, accountNature, ouIds, ouGroupId, loginDTO, ct).ConfigureAwait(false); } catch (Exception ex) { GB5Trace.MarkFailed("get-budget-vs-comparison-failed", ex); throw; } } } }