finalizacion del reporte gc50

feature/Reporte_Relacion_Facturas_Alen
Felix Morales 11 months ago
parent 9cb04c5594
commit 607bcb750d
  1. 3
      Contracts/Reportes/GC50/IReporteGC50Repository.cs
  2. 5
      Controllers/Reportes/ReporteGC50Controller.cs
  3. 27
      DTO/Reportes/GC50/DTOReporteGC50.cs
  4. 0
      DTO/Reportes/GC50/ReporteGC50.cs
  5. 5
      Repository/Reportes/GC50/ReporteGC50Repository.cs

@ -1,8 +1,9 @@
using CORRESPONSALBackend.DTO.Corresponsales;
using CORRESPONSALBackend.DTO.Reportes;
using CORRESPONSALBackend.DTO.Reportes.GC50;
namespace CORRESPONSALBackend.Contracts.Reportes.GC50{
public interface IReporteGC50Repository{
public Task<IEnumerable<DTOCorresponsalTrafico>> GetAllCorresponsalesTraficos(DTOReporteCorresponsales data);
public Task<IEnumerable<DTOReporteGC50>> GetAllCorresponsalesTraficos(DTOReporteCorresponsales data);
}
}

@ -1,6 +1,7 @@
using CORRESPONSALBackend.Contracts.Reportes.GC50;
using CORRESPONSALBackend.DTO.Corresponsales;
using CORRESPONSALBackend.DTO.Reportes;
using CORRESPONSALBackend.DTO.Reportes.GC50;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OfficeOpenXml;
@ -19,7 +20,7 @@ namespace CORRESPONSALBackend.Controllers.Reportes{
}
[HttpGet]
public async Task<IEnumerable<DTOCorresponsalTrafico>> GetAllCorresponsalesTraficos([FromQuery] DTOReporteCorresponsales data)
public async Task<IEnumerable<DTOReporteGC50>> GetAllCorresponsalesTraficos([FromQuery] DTOReporteCorresponsales data)
{
var entrada = await _reportesRepo.GetAllCorresponsalesTraficos(data);
return entrada;
@ -35,7 +36,7 @@ namespace CORRESPONSALBackend.Controllers.Reportes{
var worksheet = excelPackage.Workbook.Worksheets.Add("sheet1");
worksheet.Cells["A1"].LoadFromCollection(traficos, true);
//Se crea la tabla en el rango de celdas donde se mostrara la inforamcion.
ExcelRange range = worksheet.Cells[1, 1,traficos.Count() + 1, 46];
ExcelRange range = worksheet.Cells[1, 1,traficos.Count() + 1, 23];
ExcelTable tab = worksheet.Tables.Add(range, "Table1");
tab.TableStyle = TableStyles.Light1;
worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns();

@ -0,0 +1,27 @@
namespace CORRESPONSALBackend.DTO.Reportes.GC50{
public class DTOReporteGC50{
public string Trafico { get; set; }
public string Corresponsal { get; set; }
public int Aduana { get; set; }
public int Patente { get; set; }
public string PedimentoCorresponsal { get; set; }
public string PedimentoCorresponsalR1 { get; set; }
public string? FechaPago { get; set; }
public string? FechaAnticipo { get; set; }
public double SumaAnticipoCorresponsalFinanciado { get; set; }
public string? FechaAlta { get; set; }
public string UsuarioAlta { get; set; }
public int Cliente { get; set; }
public string NombreCliente { get; set; }
public string Cuenta { get; set; }
public string TipoOperacion { get; set; }
public string Terminado { get; set; }
public string? FechaTerminado { get; set; }
public string? FechaRegistroContabilizar { get; set; }
public string? FechaContabilizado { get; set; }
public string? FechaFacturaCorresponsal { get; set; }
public string MotivoCuentaRechazada { get; set; }
public string EstatusOperacion { get; set; }
public string CargoShipper { get; set; }
}
}

@ -3,6 +3,7 @@ using CORRESPONSALBackend.Context;
using CORRESPONSALBackend.Contracts.Reportes.GC50;
using CORRESPONSALBackend.DTO.Corresponsales;
using CORRESPONSALBackend.DTO.Reportes;
using CORRESPONSALBackend.DTO.Reportes.GC50;
using Dapper;
namespace CORRESPONSALBackend.Repository.Reportes.GC50{
@ -10,11 +11,11 @@ namespace CORRESPONSALBackend.Repository.Reportes.GC50{
{
private readonly DapperContext _context;
public ReporteGC50Repository(DapperContext context) { _context = context; }
public async Task<IEnumerable<DTOCorresponsalTrafico>> GetAllCorresponsalesTraficos(DTOReporteCorresponsales data)
public async Task<IEnumerable<DTOReporteGC50>> GetAllCorresponsalesTraficos(DTOReporteCorresponsales data)
{
var query = "[Reportes.GC50.GetTraficos]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<DTOCorresponsalTrafico>(query, new
var entrada = await connection.QueryAsync<DTOReporteGC50>(query, new
{
@Inicio = data.Inicio,
@Fin = data.Fin,

Loading…
Cancel
Save