using ComplianceDAL.DTO.GSTReturn; using ComplianceDAL.Query.GSTReturn; using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; namespace ComplianceDAL.CustomCode.GSTReturn; public class GSTReturnDAL(IQueryExecutor qe) : IGSTReturnDAL { public async Task GetCompliancePeriodAsync( string framework, string gstin, string returnType, int periodYear, int periodMonth, LoginDTO login, CancellationToken ct) => await qe.QuerySingleAsync(login, GSTReturnQB.GET_COMPLIANCE_PERIOD, new { Framework = framework, GSTIN = gstin, ReturnType = returnType, PeriodYear = periodYear, PeriodMonth = periodMonth, login.ClientId, login.DatabaseName }) .ConfigureAwait(false); public async Task> GetPeriodListAsync(ReturnStatusListFilterDTO filter, LoginDTO login, CancellationToken ct) => await qe.QueryAsync(login, GSTReturnQB.GET_PERIOD_LIST, new { filter.Framework, filter.GSTIN, filter.ReturnType, filter.PeriodYear, login.ClientId, login.DatabaseName }, cancellationToken: ct).ConfigureAwait(false); public async Task UpsertCompliancePeriodAsync(CompliancePeriodDTO dto, LoginDTO login, CancellationToken ct) => await qe.ExecuteIdentityAsync(login, GSTReturnQB.UPSERT_COMPLIANCE_PERIOD, new { dto.Framework, dto.GSTIN, dto.ReturnType, dto.PeriodYear, dto.PeriodMonth, dto.Status, dto.SubmittedOn, dto.AckNumber, dto.FiledOn, dto.ConfirmationNumber, dto.ClientId, dto.DatabaseName, dto.ModifiedById }).ConfigureAwait(false); public async Task UpdatePeriodStatusAsync( string framework, string gstin, string returnType, int periodYear, int periodMonth, string status, string ackNumber, string confirmationNumber, int modifiedById, LoginDTO login, CancellationToken ct) => await qe.ExecuteAsync(login, GSTReturnQB.UPDATE_PERIOD_STATUS, new { Framework = framework, GSTIN = gstin, ReturnType = returnType, PeriodYear = periodYear, PeriodMonth = periodMonth, Status = status, AckNumber = ackNumber, ConfirmationNumber = confirmationNumber, ModifiedById = modifiedById, login.ClientId, login.DatabaseName }, cancellationToken: ct).ConfigureAwait(false); public async Task GetGSTR3BOutwardSectionAsync(string gstin, string returnPeriod, LoginDTO login, CancellationToken ct) => await qe.QuerySingleAsync(login, GSTReturnQB.GET_GSTR3B_OUTWARD_SECTION, new { GSTIN = gstin, ReturnPeriod = returnPeriod, login.ClientId, login.DatabaseName }) .ConfigureAwait(false); }