Agregar Columna del tipo de contenedor al reporte semanal de Newell

feature/Reporte_Semanal_Newell_Agregar_Columna_Tipo_Contenedor_20240321
Felix Morales 6 months ago
parent 619205387d
commit 482bb62ba2
  1. 1
      DTO/Reportes/DTOReporteSemanalNewel.cs
  2. 16
      Services/Reportes/Newell/Semanal/ReporteSemanalService.cs

@ -3,6 +3,7 @@ namespace CORRESPONSALBackend.DTO.Reportes
public class DTOReporteSemanalNewell{
public string GC {get;set;}
public string Contenedor { get; set; }
public string TipoContenedor {get;set;}
public string CuentaDeGastos { get; set; }
public string Razon { get; set; }
public float Maniobras { get; set; }

@ -40,9 +40,10 @@ namespace CORRESPONSALBackend.Services.Reportes.Newell.Semanal{
var patente = worksheet.Cells[$"B2"].Value.ToString(); */
worksheet.Cells[$"S1"].Value = "Referencia";
worksheet.Cells[$"T1"].Value = "Contenedor";
worksheet.Cells[$"U1"].Value = "Cuenta de Gastos";
worksheet.Cells[$"V1"].Value = "Estado";
worksheet.Cells[$"W1"].Value = "Maniobras";
worksheet.Cells[$"U1"].Value = "Tipo De Contenedor";
worksheet.Cells[$"V1"].Value = "Cuenta de Gastos";
worksheet.Cells[$"W1"].Value = "Estado";
worksheet.Cells[$"X1"].Value = "Maniobras";
for (int currentRow = initialRow; currentRow <= end.Row; currentRow++)// Recorrer renglon por renglon
{
if(!string.IsNullOrWhiteSpace(worksheet.Cells[$"C{currentRow}"].Value?.ToString()) && !string.IsNullOrEmpty(worksheet.Cells[$"C{currentRow}"].Value?.ToString())){
@ -52,15 +53,18 @@ namespace CORRESPONSALBackend.Services.Reportes.Newell.Semanal{
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;
worksheet.Cells[$"V{currentRow}"].Value = dto.Razon;
worksheet.Cells[$"W{currentRow}"].Value = dto.Maniobras;
worksheet.Cells[$"U{currentRow}"].Value = dto.TipoContenedor;
worksheet.Cells[$"V{currentRow}"].Value = dto.CuentaDeGastos;
worksheet.Cells[$"W{currentRow}"].Value = dto.Razon;
worksheet.Cells[$"X{currentRow}"].Value = dto.Maniobras;
}else{
continue;
}
}
//Devolver el MS del archivo.
worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns();
worksheet.Column(21).Width = 100;
worksheet.Column(21).Style.WrapText = true;
var stream = new MemoryStream();
package.SaveAs(stream);
stream.Position = 0;

Loading…
Cancel
Save