Se modifica el proceso de creacion del zip del cliente para que incluya las notas de cargo

feature/Reporte_Relacion_Facturas_Alen
Felix Morales 11 months ago
parent e91f28420f
commit 11613fc70e
  1. 4
      Controllers/FileManagerController.cs

@ -323,7 +323,7 @@ namespace CORRESPONSALBackend.Controllers
var tempFilesPath = RootPathCorresponsales + tempFilesRelativePath.Path;// Path: C:data\Corresponsales\Zips\Facturacion\Entregas\ var tempFilesPath = RootPathCorresponsales + tempFilesRelativePath.Path;// Path: C:data\Corresponsales\Zips\Facturacion\Entregas\
var zipFilePath = tempFilesPath + trafico.FolioGemco + ".zip"; var zipFilePath = tempFilesPath + trafico.FolioGemco + ".zip";
if(!System.IO.File.Exists(zipFilePath)){//Se valida si no existe el archivo if(!System.IO.File.Exists(zipFilePath)){//Se valida si no existe el archivo
var procesos = new int[]{2,37,38,39};//Se crea un array con los procesos de los cuales se van a necesitar los archivos var procesos = new int[]{2,37,38,39,41};//Se crea un array con los procesos de los cuales se van a necesitar los archivos
string folderName = string.Concat(trafico.FolioGemco, "\\"); // "23-000xxxC" -> "23-000xxxC\" string folderName = string.Concat(trafico.FolioGemco, "\\"); // "23-000xxxC" -> "23-000xxxC\"
if(!System.IO.Directory.Exists(tempFilesPath + folderName)) if(!System.IO.Directory.Exists(tempFilesPath + folderName))
System.IO.Directory.CreateDirectory(tempFilesPath + folderName);// Path: C:data\Corresponsales\Zips\Facturacion\Entregas\23-000xxxC\ System.IO.Directory.CreateDirectory(tempFilesPath + folderName);// Path: C:data\Corresponsales\Zips\Facturacion\Entregas\23-000xxxC\
@ -332,7 +332,7 @@ namespace CORRESPONSALBackend.Controllers
var fileLog = await _Repo.getFileByProcess(id, proceso);//Se busca el registro del archivo en la BD var fileLog = await _Repo.getFileByProcess(id, proceso);//Se busca el registro del archivo en la BD
if(fileLog.Tags == "" && proceso != 39)//Se valida que exista el registro de la BD de los archivos obligatorios if(fileLog.Tags == "" && proceso != 39)//Se valida que exista el registro de la BD de los archivos obligatorios
throw new Exception("No se han encontrado uno o más de los archivos obligatorios"); throw new Exception("No se han encontrado uno o más de los archivos obligatorios");
if(fileLog.Tags == "" && proceso == 39) break; //Si es un archivo opcional se salta la ejecucion del resto del foreach if(fileLog.Tags == "" && (proceso == 39 || proceso == 41)) continue; //Si es un archivo opcional se salta la ejecucion del resto del foreach
//Se obtienen las rutas relativas donde se alojan los archivos. //Se obtienen las rutas relativas donde se alojan los archivos.
FilePaths4Process fileRelativePath = await _RepoRelativePath.getPaths4ProcessById(proceso); FilePaths4Process fileRelativePath = await _RepoRelativePath.getPaths4ProcessById(proceso);
var filePath = RootPathCorresponsales + fileRelativePath.Path + fileLog!.NombreArchivo; var filePath = RootPathCorresponsales + fileRelativePath.Path + fileLog!.NombreArchivo;

Loading…
Cancel
Save