Cambiar el tipo de dato de la propiedad Aduana para ser almacenado como una cadena en lugar de como numero

feature/Cambiar_Tipo_Dato_Aduana_20240313
Felix Morales 6 months ago
parent 647193c3db
commit b3bfc19d0f
  1. 4
      Contracts/Corresponsalias/ICorresponsaliasTraficosRepository.cs
  2. 4
      Controllers/Corresponsalias/TraficosController.cs
  3. 2
      DTO/Corresponsales/DTOCorresponsalTrafico.cs
  4. 4
      DTO/Corresponsales/DTORectificacionHistorico.cs
  5. 2
      DTO/Reportes/Alen/DTOReporteFacturasTraficosConsolidados.cs
  6. 2
      DTO/Reportes/DTOFiltrosTraficosClientes.cs
  7. 2
      DTO/Reportes/DTOReporteCorresponsales.cs
  8. 2
      DTO/Reportes/GC50/DTOReporteGC50.cs
  9. 2
      Models/Catalogos/CatCorresponsales.cs
  10. 2
      Models/Corresponsales/CorresponsalPedimentosConsolidados.cs
  11. 2
      Models/Corresponsales/ITrafico.cs
  12. 2
      Repository/Corresponsalias/CorresponsaliasTraficoRectificacionHistorico.cs
  13. 4
      Repository/Corresponsalias/CorresponsaliasTraficosRepository.cs
  14. 2
      Services/C1896/SrvUploadTemplete.cs
  15. 2
      Services/Reportes/Newell/Semanal/ReporteSemanalService.cs

@ -9,7 +9,7 @@ namespace CORRESPONSALBackend.Contracts.Corresponsalias
public interface ICorresponsaliasTraficosRepository
{
public Task<ITrafico> Get(int id);
public Task<DTOReporteSemanalNewell> GetByPedimento(int pedimento, int aduana, int patente);
public Task<DTOReporteSemanalNewell> GetByPedimento(int pedimento, string aduana, int patente);
public Task<ITrafico> GetByReferencia(string referencia);
public Task<DashboardTotal> GetAll(int Mode);
public Task<IEnumerable<ICorRectificaciones>> GetRectificaciones(int id);
@ -20,6 +20,6 @@ namespace CORRESPONSALBackend.Contracts.Corresponsalias
public Task<CorresponsaliasTraficoRectificacionHistorico> RectificacionHistoricoAppend(DTORectificacionHistorico data);
public Task<IEnumerable<CorresponsaliasTraficoRectificacionHistorico>> RectificacionHistoricoGet(int IdTrafico);
public Task<string> ValidaTraficoDuplicado(int aduana, int patente, int pedimento, int idTrafico);
public Task<string> ValidaTraficoDuplicado(string aduana, int patente, int pedimento, int idTrafico);
}
}

@ -69,7 +69,7 @@ namespace CORRESPONSALBackend.Controllers.Corresponsalias
[HttpGet]
[Route("GetByPedimento")]
public async Task<DTOReporteSemanalNewell> GetByPedimento([FromQuery] int pedimento, int aduana, int patente)
public async Task<DTOReporteSemanalNewell> GetByPedimento([FromQuery] int pedimento, string aduana, int patente)
{
var entrada = await _Repo.GetByPedimento(pedimento, aduana, patente);
return entrada;
@ -165,7 +165,7 @@ namespace CORRESPONSALBackend.Controllers.Corresponsalias
[HttpGet]
[Route("Duplicado")]
public async Task<string> ValidaTraficoDuplicado(int aduana, int patente, int pedimento, int idTrafico)
public async Task<string> ValidaTraficoDuplicado(string aduana, int patente, int pedimento, int idTrafico)
{
var referencia = await _Repo.ValidaTraficoDuplicado(aduana, patente, pedimento, idTrafico);
return referencia;

@ -22,7 +22,7 @@ namespace CORRESPONSALBackend.DTO.Corresponsales
public int? Estatus { get; set; } = 0;
public string sEstatus { get; set; } = null!;
public string? Trafico { get; set; } = null!;
public int? Aduana { get; set; } = 0;
public string? Aduana { get; set; } = "0";
public int? Patente { get; set; } = 0;
public int? Pedimento { get; set; } = 0;
public string? Clave { get; set; } = null!;

@ -6,12 +6,12 @@ namespace CORRESPONSALBackend.DTO.Corresponsales
public int IdTrafico { get; set; } = 0;
public int IdUsuario { get; set; } = 0;
public int IdPedimento { get; set; } = 0;
public int Aduana { get; set; } = 0;
public string Aduana { get; set; } = "0";
public int Patente { get; set; } = 0;
public int Pedimento { get; set; } = 0;
public string Clave { get; set; } = "";
public string FechaPago { get; set; } = "";
public int AduanaH { get; set; } = 0;
public string AduanaH { get; set; } = "0";
public int PatenteH { get; set; } = 0;
public int PedimentoH { get; set; } = 0;
public string ClaveH { get; set; } = "";

@ -4,7 +4,7 @@ public class DTOReporteFacturasTraficosConsolidados{
public string Cliente { get; set; }
public string Proveedor { get; set; }
public string Corresponsal { get; set; }
public int Aduana { get; set; }
public string Aduana { get; set; }
public int Patente { get; set; }
public string Pedimento { get; set; }
public int PedimentoMaster { get; set; }

@ -9,7 +9,7 @@ namespace CORRESPONSALBackend.DTO.Reportes
public int IdCorresponsal { get; set; } = 0;
public int Pedimento {get;set;} = 0;
public int Patente {get;set;} = 0;
public int Aduana {get;set;} = 0;
public string Aduana {get;set;} = "0";
public string? Referencia { get; set; } = null!;
public int IdUsuario {get;set;} = 0;
}

@ -16,7 +16,7 @@ namespace CORRESPONSALBackend.DTO.Reportes
public int Modo { get; set; } = 0;
public int Pedimento {get;set;} = 0;
public int Patente {get;set;} = 0;
public int Aduana {get;set;} = 0;
public string Aduana {get;set;} = "0";
public string? Referencia { get; set; } = null!;
}
}

@ -2,7 +2,7 @@ namespace CORRESPONSALBackend.DTO.Reportes.GC50{
public class DTOReporteGC50{
public string Trafico { get; set; }
public string Corresponsal { get; set; }
public int Aduana { get; set; }
public string Aduana { get; set; }
public int Patente { get; set; }
public string PedimentoCorresponsal { get; set; }
public string PedimentoCorresponsalR1 { get; set; }

@ -5,7 +5,7 @@ namespace CORRESPONSALBackend.Models.Catalogos
public int id { set; get; } = 0;
public string Nombre { set; get; } = null!;
public int Patente { set; get; } = 0;
public int Aduana { set; get; } = 0;
public string Aduana { set; get; } = "0";
public string Correos { set; get; } = null!;
}
}

@ -2,7 +2,7 @@ namespace CORRESPONSALBackend.Models.Corresponsales{
public class CorresponsalPedimentosConsolidados{
public int Id { get; set; }
public int IdTrafico { get; set; }
public int Aduana { get; set; }
public string Aduana { get; set; }
public int Patente { get; set; }
public int Pedimento { get; set; }
public string Clave { get; set; }

@ -16,7 +16,7 @@
public double? Kilos { get; set; } = 0;
public int? Estatus { get; set; } = 0;
public string? Trafico { get; set; } = null!;
public int? Aduana { get; set; } = 0;
public string? Aduana { get; set; } = "0";
public int? Patente { get; set; } = 0;
public int? Pedimento { get; set; } = 0;
public string? Clave { get; set; } = null!;

@ -5,7 +5,7 @@ namespace CORRESPONSALBackend.Repository.Corresponsalias
public int Id { get; set; } = 0;
public int Usuario { get; set; } = 0;
public int IdTrafico { get; set; } = 0;
public int Aduana { get; set; } = 0;
public string Aduana { get; set; } = "0";
public int Patente { get; set; } = 0;
public int Pedimento { get; set; } = 0;
public string Clave { get; set; } = null!;

@ -39,7 +39,7 @@ namespace CORRESPONSALBackend.Repository.Corresponsalias
return entrada.FirstOrDefault(new ITrafico { });
}
public async Task<DTOReporteSemanalNewell> GetByPedimento(int pedimento, int aduana, int patente)
public async Task<DTOReporteSemanalNewell> GetByPedimento(int pedimento, string aduana, int patente)
{
var query = "[Corresponsales.Trafico.GetByPedimento]";
using var connection = _context.CreateConnection();
@ -199,7 +199,7 @@ namespace CORRESPONSALBackend.Repository.Corresponsalias
return entrada;
}
public async Task<string> ValidaTraficoDuplicado(int aduana, int patente, int pedimento, int idTrafico)
public async Task<string> ValidaTraficoDuplicado(string aduana, int patente, int pedimento, int idTrafico)
{
var query = "[Corresponsales.Trafico.ValidateDuplicity]";
using var connection = _context.CreateConnection();

@ -95,7 +95,7 @@ namespace CORRESPONSALBackend.Services.C1896
{
Registro.Trafico = row.Referencia;
Registro.Patente = Int32.Parse(row.Patente);
Registro.Aduana = Int32.Parse(row.Aduana);
Registro.Aduana = row.Aduana;
Registro.Pedimento = Int32.Parse(row.Pedimento);
Registro.FechaPago = row.FechaPago;
Registro.TipoCambio = row.TC;

@ -49,7 +49,7 @@ namespace CORRESPONSALBackend.Services.Reportes.Newell.Semanal{
var aduana = worksheet.Cells[$"A{currentRow}"].Value.ToString();
var patente = worksheet.Cells[$"B{currentRow}"].Value.ToString();
var pedimento = worksheet.Cells[$"C{currentRow}"].Value.ToString();
var dto = await _traficosRepository.GetByPedimento(int.Parse(pedimento), int.Parse(aduana), int.Parse(patente));
var dto = await _traficosRepository.GetByPedimento(int.Parse(pedimento), aduana, int.Parse(patente));
worksheet.Cells[$"S{currentRow}"].Value = dto.GC;
worksheet.Cells[$"T{currentRow}"].Value = dto.Contenedor;
worksheet.Cells[$"U{currentRow}"].Value = dto.CuentaDeGastos;

Loading…
Cancel
Save