Se agrega la propiedad IdCorresponsal a los tabuladores para hacer la distincion cuando es un tabulador de cliente y cuando es de corresponsal

feature/Creacion_Catalogo_Tabuladores_Corresponsales_20240408
Felix Morales 6 months ago
parent 53257ec2d6
commit 6712176496
  1. 2
      Contracts/Catalogos/ITabuladorRepository.cs
  2. 6
      Controllers/Catalogos/TabuladorController.cs
  3. 2
      DTO/Reportes/CuentasCerradas/DTOReporteCuentasCerradas.cs
  4. 1
      Models/Catalogos/Tabulador.cs
  5. 6
      Repository/Catalogos/TabuladorRepository.cs

@ -3,7 +3,7 @@ namespace CORRESPONSALBackend.Contracts.Catalogos
{
public interface ITabuladorRepository
{
public Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente);
public Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente, int? idCorresponsal);
public Task<Tabulador> Append(Tabulador data);
public Task Delete(int id);
}

@ -22,16 +22,16 @@ namespace CORRESPONSALBackend.Controllers.Catalogos
[HttpGet]
[Route("getAll")]
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente)
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente, int? idCorresponsal)
{
return await _Repo.GetAll(id, IdCliente);
return await _Repo.GetAll(id, IdCliente, idCorresponsal);
}
[HttpGet]
[Route("getByCustomer")]
public async Task<IEnumerable<Tabulador>> GetByCustomer(int IdCliente)
{
return await _Repo.GetAll(0, IdCliente);
return await _Repo.GetAll(0, IdCliente, 0);
}

@ -19,5 +19,7 @@ namespace CORRESPONSALBackend.DTO.Reportes.CuentasCerradas{
public string ValorComercial { get; set; }
public string Fracciones { get; set; }
public string Caja { get; set; }
public string FechaCruce {get;set;}
public string Semaforo {get;set;}
}
}

@ -6,5 +6,6 @@
public string Nombre { set; get; } = null!;
public int IdCliente { set; get; } = 0;
public Boolean Activo { set; get; } = true;
public int? IdCorresponsal {get;set;} = null;
}
}

@ -12,14 +12,15 @@ namespace CORRESPONSALBackend.Repository.Catalogos
private readonly DapperContext _context;
public TabuladorRepository(DapperContext context) { _context = context; }
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente)
public async Task<IEnumerable<Tabulador>> GetAll(int id, int IdCliente, int? idCorresponsal)
{
var query = "[Catalogo.Tabulador.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<Tabulador>(query, new
{
@id = id,
@IdCliente = IdCliente
@IdCliente = IdCliente,
@IdCorresponsal = idCorresponsal
},
commandType: CommandType.StoredProcedure);
return entrada;
@ -35,6 +36,7 @@ namespace CORRESPONSALBackend.Repository.Catalogos
data.id,
data.Nombre,
data.IdCliente,
data.IdCorresponsal
},
commandType: CommandType.StoredProcedure);
return entrada.First();

Loading…
Cancel
Save