|
|
|
@ -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; |
|
|
|
|