From b6c61238a588c4db001d2cb6ef747feb20435d76 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 9 Jul 2026 14:55:29 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20endpoint=20de=20campos=20para=20G?= =?UTF-8?q?estiona=20y=20adaptar=20login=20GlobalLeaks=20a=20DPoP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Añade GET /api/denuncias/{id}/gestiona-fields para exponer los campos diarios requeridos por la integración con Gestiona. - Devuelve un DTO cerrado con fecha, canal, resumen, datos de hechos, protección, sexo y preferencias de notificación. - Adapta el login contra GlobalLeaks al nuevo flujo DPoP exigido desde la versión 5.0.94. - Genera proof DPoP con clave EC P-256 efímera y lo envía en la cabecera DPoP junto a X-Token. - Mejora el mensaje de error cuando GlobalLeaks rechaza el proof DPoP. --- .../ApiDenuncias/ApiDenuncias.csproj | 1 + .../Configuration/GestionaOptions.cs | 19 +- .../Controllers/ConfigurationController.cs | 1 + .../Controllers/DenunciasController.cs | 293 +- .../Controllers/GestionaController.cs | 54 +- .../Controllers/InboxController.cs | 128 +- .../Controllers/PurgeController.cs | 2 +- .../Controllers/TrackingController.cs | 13 + Antifraude.Net/ApiDenuncias/Program.cs | 22 +- ...uncias_gestiona_expediente_excepciones.sql | 12272 ++++++++++++++++ .../Scripts/gestiondenuncias_schema.sql | 20 + .../Services/AppConfigurationService.cs | 46 +- .../Services/DenunciaInboxService.cs | 385 +- .../Services/EncryptedDenunciaStore.cs | 67 + .../GestionaDocumentWorkflowService.cs | 272 +- .../GestionaExpedienteExceptionStore.cs | 135 + .../ApiDenuncias/Services/GestionaService.cs | 800 +- .../Services/GlobalLeaksClient.cs | 574 +- .../Services/GlobalLeaksSessionStore.cs | 2 +- .../Services/IFilteredDenunciaStore.cs | 4 + .../ApiDenuncias/Services/IGestionaService.cs | 47 +- .../Services/InboxTrackingService.cs | 100 + .../Services/MySqlDenunciaStore.cs | 208 +- Antifraude.Net/ApiDenuncias/appsettings.json | 18 +- .../Helpers/PdfHelper.cs | 66 +- .../Models/ApiDenunciasDtos.cs | 44 +- .../Models/DenunciasGestiona.cs | 14 + .../Models/ExpedienteTerceroDto.cs | 3 + .../Models/GestionaAuditInfo.cs | 7 + .../Models/GestionaUploadHistoryEntry.cs | 23 + .../Models/ReportDto.cs | 9 + .../Models/ThirdPartyIdentityData.cs | 6 + .../Services/IDenunciaStore.cs | 5 + .../Services/IInboxTrackingService.cs | 6 + .../Components/Layout/MainLayout.razor | 95 +- .../Components/Layout/NavMenu.razor | 41 +- .../Components/Pages/Actualizaciones.razor | 293 +- .../Components/Pages/Buscador.razor | 36 +- .../Components/Pages/Configuracion.razor | 78 + .../Pages/{GestionZip.razor => Entrada.razor} | 428 +- .../Components/Pages/Gestiona.razor | 329 +- .../Components/Pages/Login.razor | 2 +- .../Components/Pages/Pendientes.razor | 220 +- .../Services/ApiDenunciaStore.cs | 9 + .../Services/ApiDenunciasClient.cs | 71 +- .../Services/ApiInboxTrackingService.cs | 10 + .../GestionaDenunciasAN/wwwroot/app.css | 33 + 47 files changed, 16592 insertions(+), 719 deletions(-) create mode 100644 Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_gestiona_expediente_excepciones.sql create mode 100644 Antifraude.Net/ApiDenuncias/Services/GestionaExpedienteExceptionStore.cs create mode 100644 Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaAuditInfo.cs create mode 100644 Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaUploadHistoryEntry.cs rename Antifraude.Net/GestionaDenunciasAN/Components/Pages/{GestionZip.razor => Entrada.razor} (75%) diff --git a/Antifraude.Net/ApiDenuncias/ApiDenuncias.csproj b/Antifraude.Net/ApiDenuncias/ApiDenuncias.csproj index 6a31dc5..47e9f0c 100644 --- a/Antifraude.Net/ApiDenuncias/ApiDenuncias.csproj +++ b/Antifraude.Net/ApiDenuncias/ApiDenuncias.csproj @@ -23,6 +23,7 @@ + diff --git a/Antifraude.Net/ApiDenuncias/Configuration/GestionaOptions.cs b/Antifraude.Net/ApiDenuncias/Configuration/GestionaOptions.cs index 83a478c..5539954 100644 --- a/Antifraude.Net/ApiDenuncias/Configuration/GestionaOptions.cs +++ b/Antifraude.Net/ApiDenuncias/Configuration/GestionaOptions.cs @@ -4,14 +4,19 @@ namespace ApiDenuncias.Configuration { public string ApiBase { get; set; } = null!; public string AccessToken { get; set; } = null!; - public string UserLink { get; set; } = null!; - public string GroupLink { get; set; } = null!; - public string Location { get; set; } = null!; - public string? ExternalProcedureId { get; set; } - public string? CircuitTemplateId { get; set; } - public string? CircuitSignerStampHref { get; set; } + public string? ProcedureName { get; set; } + public string? ExternalProcedureName { get; set; } + public string? ExternalProcedureSiaCode { get; set; } + public string? ManagementUnitGroupCode { get; set; } + public string? CircuitTemplateName { get; set; } + public string? CircuitNewComplaintTemplateName { get; set; } + public string? CircuitUpdateTemplateName { get; set; } + public string? CircuitUpdateSajTemplateName { get; set; } + public string? CircuitUpdateSdiTemplateName { get; set; } public string? CircuitSignerStampTitle { get; set; } - public string? CircuitRecipientGroupHref { get; set; } public string? CircuitVersion { get; set; } + public string? DocumentMetadataLanguage { get; set; } + public string? DocumentMetadataType { get; set; } + public string? DocumentMetadataSubtype { get; set; } } } diff --git a/Antifraude.Net/ApiDenuncias/Controllers/ConfigurationController.cs b/Antifraude.Net/ApiDenuncias/Controllers/ConfigurationController.cs index cd91269..4f8f719 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/ConfigurationController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/ConfigurationController.cs @@ -25,6 +25,7 @@ public sealed class ConfigurationController : ControllerBase } [HttpPut("external-update-cutoff")] + [Authorize(Policy = "ConfigurationAdministrators")] public async Task> SetExternalUpdateCutoff( UpdateExternalUpdateCutoffRequest request, CancellationToken cancellationToken) diff --git a/Antifraude.Net/ApiDenuncias/Controllers/DenunciasController.cs b/Antifraude.Net/ApiDenuncias/Controllers/DenunciasController.cs index 6e2c475..c175e4f 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/DenunciasController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/DenunciasController.cs @@ -1,3 +1,5 @@ +using System.Globalization; +using System.Text; using ApiDenuncias.Services; using GestionaDenuncias.Shared.Models; using Microsoft.AspNetCore.Authorization; @@ -13,15 +15,21 @@ public sealed class DenunciasController : ControllerBase private readonly IDenunciaStore _denunciaStore; private readonly IFilteredDenunciaStore _filteredDenunciaStore; private readonly UserComplaintAccessService _accessService; + private readonly IInboxTrackingService _trackingService; + private readonly ILogger _logger; public DenunciasController( IDenunciaStore denunciaStore, IFilteredDenunciaStore filteredDenunciaStore, - UserComplaintAccessService accessService) + UserComplaintAccessService accessService, + IInboxTrackingService trackingService, + ILogger logger) { _denunciaStore = denunciaStore; _filteredDenunciaStore = filteredDenunciaStore; _accessService = accessService; + _trackingService = trackingService; + _logger = logger; } [HttpPost("schema/ensure")] @@ -56,6 +64,25 @@ public sealed class DenunciasController : ControllerBase return Ok(await _denunciaStore.GetDenunciaByIdAsync(denunciaId, cancellationToken)); } + [HttpGet("{denunciaId:int}/gestiona-fields")] + public async Task> GetGestionaFields( + int denunciaId, + CancellationToken cancellationToken) + { + if (denunciaId <= 0) + { + return BadRequest(new ApiError("Debes indicar un numero de denuncia valido.")); + } + + var denuncia = await _denunciaStore.GetDenunciaByIdAsync(denunciaId, cancellationToken); + if (denuncia is null) + { + return NotFound(new ApiError("No se ha encontrado la denuncia solicitada.")); + } + + return Ok(ToGestionaComplaintFields(denuncia)); + } + [HttpPost] public async Task Upsert(DenunciasGestiona denuncia, CancellationToken cancellationToken) { @@ -65,6 +92,7 @@ public sealed class DenunciasController : ControllerBase } await _denunciaStore.UpsertDenunciaAsync(denuncia, cancellationToken); + await TryRegisterGestionaHistoryFromComplaintAsync(denuncia, cancellationToken); return Ok(new { ok = true }); } @@ -91,6 +119,32 @@ public sealed class DenunciasController : ControllerBase return Ok(await _denunciaStore.GetFicherosByDenunciaAsync(denunciaId, cancellationToken)); } + [HttpGet("gestiona-history")] + public async Task>> GetGestionaHistory(CancellationToken cancellationToken) + { + await _denunciaStore.EnsureSchemaAsync(cancellationToken); + return Ok(await _denunciaStore.GetGestionaUploadHistoryAsync(cancellationToken)); + } + + [HttpPost("gestiona-history")] + public async Task AddGestionaHistory( + GestionaUploadHistoryCreateRequest request, + CancellationToken cancellationToken) + { + if (!await CanAccessAsync(request.DenunciaId, cancellationToken)) + { + return Forbid(); + } + + await _denunciaStore.AddGestionaUploadHistoryAsync(request, GetUsername(), cancellationToken); + await _trackingService.MarkReportHandledInGestionaAsync( + GetUsername(), + request.DenunciaId, + request.UploadedAtUtc, + cancellationToken); + return Ok(new { ok = true }); + } + [HttpGet("{denunciaId:int}/ficheros/content")] public async Task GetFicheroContent( int denunciaId, @@ -178,6 +232,243 @@ public sealed class DenunciasController : ControllerBase private string GetUsername() => User.Identity?.Name ?? throw new InvalidOperationException("No hay usuario autenticado."); + private static GestionaComplaintFieldsResponse ToGestionaComplaintFields(DenunciasGestiona denuncia) + { + var preferenciaNotificacion = ResolveReportField( + denuncia, + denuncia.Notificacion_Preferencia, + "preferencia de notificacion", + "seleccione su preferencia de notificacion y seguimiento de su denuncia", + "notificaciones"); + + var seguimiento = ResolveReportField( + denuncia, + denuncia.SeguimientoOnline, + "seguimiento online", + "seguimiento de su denuncia"); + + return new GestionaComplaintFieldsResponse( + FechaDenuncia: ToNullableDate(denuncia.Fecha), + NumeroDenunciaCanal: denuncia.Id_Denuncia, + AQuienDenuncia: ResolveReportField(denuncia, denuncia.A_Quien_Denuncia, "a quien denuncia"), + ResumenDenuncia: FirstNonEmpty( + ResolveReportField(denuncia, string.Empty, "resumen de la denuncia", "resumen denuncia"), + ResolveReportField(denuncia, denuncia.Descripcion_Denuncia, "describa su denuncia", "descripcion de la denuncia")), + FechaHechos: ResolveFechaHechos(denuncia), + LugarHechos: ResolveReportField( + denuncia, + denuncia.Lugar_Hechos, + "lugar en el que ocurrieron los hechos que denuncia", + "lugar en la que ocurrieron los hechos que denuncia", + "lugar de los hechos"), + AmbitoCompetencias: ResolveAmbitoCompetencias(denuncia), + SolicitaProteccion: ResolveReportField(denuncia, denuncia.SolicitaProteccion, "solicita medidas concretas de proteccion", "solicita proteccion"), + SexoDenunciante: ResolveReportField(denuncia, denuncia.Sexo, "sexo"), + AutorizaRemisionDenuncia: ResolveReportField(denuncia, denuncia.AutorizaRemision, "autorizacion para remitir su denuncia", "autoriza remision de la denuncia"), + AutorizaNotificacionesViaSms: ResolveReportField( + denuncia, + denuncia.Notificacion_Sms, + "autorizo recibir notificaciones via sms", + "autorizacion notificaciones via sms", + "autorizacion para recibir notificaciones via sms", + "autoriza notificaciones via sms", + "autorizo recibir notificaciones sms", + "notificaciones via sms", + "sms"), + PreferenciaNotificacionSeguimientoDenuncia: JoinDistinct(preferenciaNotificacion, seguimiento)); + } + + private async Task TryRegisterGestionaHistoryFromComplaintAsync( + DenunciasGestiona denuncia, + CancellationToken cancellationToken) + { + if (!denuncia.EnGestiona || denuncia.FechaSubidaAGestiona == DateTime.MinValue) + { + return; + } + + try + { + await _denunciaStore.AddGestionaUploadHistoryAsync( + new GestionaUploadHistoryCreateRequest( + denuncia.Id_Denuncia, + denuncia.Expediente_Gestiona ?? string.Empty, + denuncia.ExpedienteGestionaMostrable, + denuncia.UltimaSubidaGestionaTipoMostrable, + denuncia.UltimoGrupoAsignadoGestionaMostrable, + denuncia.FechaSubidaAGestiona, + denuncia.NombreDenuncia ?? string.Empty, + denuncia.ArchivoElegido ?? string.Empty), + GetUsername(), + cancellationToken); + await _trackingService.MarkReportHandledInGestionaAsync( + GetUsername(), + denuncia.Id_Denuncia, + denuncia.FechaSubidaAGestiona, + cancellationToken); + } + catch (Exception ex) + { + _logger.LogWarning( + ex, + "No se ha podido registrar el historico de subida a Gestiona para la denuncia {DenunciaId}.", + denuncia.Id_Denuncia); + } + } + + private static DateTime? ToNullableDate(DateTime value) + => value == DateTime.MinValue ? null : value; + + private static string ResolveFechaHechos(DenunciasGestiona denuncia) + { + var literalValue = ResolveReportField( + denuncia, + string.Empty, + "fecha de los hechos que denuncia", + "fecha de los hechos"); + + if (!string.IsNullOrWhiteSpace(literalValue)) + { + return literalValue; + } + + return denuncia.Fecha_Hechos == DateTime.MinValue + ? string.Empty + : denuncia.Fecha_Hechos.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); + } + + private static string ResolveAmbitoCompetencias(DenunciasGestiona denuncia) + { + var directValue = ResolveReportField( + denuncia, + denuncia.Modalidad_Informacion, + "ambito de competencias", + "ambito competencial", + "ambito", + "competencias", + "modalidad de informacion", + "modalidad informacion"); + + if (!string.IsNullOrWhiteSpace(directValue)) + { + return directValue; + } + + return FindReportFieldValue(denuncia, normalizedLabel => + normalizedLabel.Contains("ambito", StringComparison.Ordinal) && + normalizedLabel.Contains("compet", StringComparison.Ordinal)); + } + + private static string ResolveReportField( + DenunciasGestiona denuncia, + string? currentValue, + params string[] candidateLabels) + { + if (!string.IsNullOrWhiteSpace(currentValue)) + { + return currentValue.Trim(); + } + + var labels = candidateLabels + .Select(NormalizeLabel) + .Where(label => !string.IsNullOrWhiteSpace(label)) + .ToHashSet(StringComparer.Ordinal); + + if (labels.Count == 0) + { + return string.Empty; + } + + foreach (var field in denuncia.GetCamposFormulario()) + { + if (!string.IsNullOrWhiteSpace(field.Value) && + labels.Contains(NormalizeLabel(field.Label))) + { + return field.Value.Trim(); + } + } + + return string.Empty; + } + + private static string FindReportFieldValue( + DenunciasGestiona denuncia, + Func labelPredicate) + { + foreach (var field in denuncia.GetCamposFormulario()) + { + if (!string.IsNullOrWhiteSpace(field.Value) && + labelPredicate(NormalizeLabel(field.Label))) + { + return field.Value.Trim(); + } + } + + return string.Empty; + } + + private static string JoinDistinct(params string[] values) + { + var result = new List(); + var seen = new HashSet(StringComparer.OrdinalIgnoreCase); + foreach (var value in values) + { + var trimmed = value?.Trim(); + if (!string.IsNullOrWhiteSpace(trimmed) && seen.Add(trimmed)) + { + result.Add(trimmed); + } + } + + return string.Join("; ", result); + } + + private static string FirstNonEmpty(params string[] values) + { + foreach (var value in values) + { + if (!string.IsNullOrWhiteSpace(value)) + { + return value.Trim(); + } + } + + return string.Empty; + } + + private static string NormalizeLabel(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return string.Empty; + } + + var normalized = value.Normalize(NormalizationForm.FormD); + var builder = new StringBuilder(normalized.Length); + + foreach (var ch in normalized) + { + if (CharUnicodeInfo.GetUnicodeCategory(ch) == UnicodeCategory.NonSpacingMark) + { + continue; + } + + if (ch is '\u00BA' or '\u00AA') + { + continue; + } + + builder.Append(char.IsLetterOrDigit(ch) ? char.ToLowerInvariant(ch) : ' '); + } + + return string.Join( + ' ', + builder + .ToString() + .Normalize(NormalizationForm.FormC) + .Split(' ', StringSplitOptions.RemoveEmptyEntries)); + } + private static string GetAttachmentContentType(string? fileName) { return Path.GetExtension(fileName ?? string.Empty).ToLowerInvariant() switch diff --git a/Antifraude.Net/ApiDenuncias/Controllers/GestionaController.cs b/Antifraude.Net/ApiDenuncias/Controllers/GestionaController.cs index 0c3b9e9..182ee79 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/GestionaController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/GestionaController.cs @@ -29,7 +29,6 @@ public sealed class GestionaController : ControllerBase try { var file = await _gestiona.CreateFileAsync( - request.ProcedureId, request.Subject, request.DocumentSeries, request.SiaCode); @@ -52,11 +51,28 @@ public sealed class GestionaController : ControllerBase await _gestiona.OpenFileAsync( request.FileUrl, request.FileOpenUrl, - request.ManagementUnitGroupId, - request.AssignedGroupId, + request.AssignedGroupCode, request.Confidential, - request.FreeTitle, - request.SiaCode); + request.FreeTitle); + + return Ok(new { ok = true }); + } + catch (InvalidOperationException ex) + { + return BadRequest(new ApiError(ex.Message)); + } + } + + [HttpPost("files/assignees")] + public async Task AssignFile( + GestionaAssignFileRequest request, + CancellationToken cancellationToken) + { + try + { + await _gestiona.AssignFileAsync( + request.FileUrl, + request.AssignedGroupCode); return Ok(new { ok = true }); } @@ -86,6 +102,26 @@ public sealed class GestionaController : ControllerBase } } + [HttpGet("files/audit/latest")] + public async Task> GetLatestFileAudit( + [FromQuery] string fileUrl, + CancellationToken cancellationToken) + { + if (string.IsNullOrWhiteSpace(fileUrl)) + { + return BadRequest(new ApiError("Debes indicar la URL del expediente de Gestiona.")); + } + + try + { + return Ok(await _gestiona.ObtenerUltimaAuditoriaExpedienteAsync(fileUrl)); + } + catch (InvalidOperationException ex) + { + return BadRequest(new ApiError(ex.Message)); + } + } + [HttpPost("thirds/ensure-link")] public async Task EnsureThirdAndLink( GestionaEnsureThirdRequest request, @@ -98,8 +134,7 @@ public sealed class GestionaController : ControllerBase try { - await _gestiona.AsegurarTerceroYEnlazarAsync(request.FileUrl, request.ThirdParty); - return Ok(new { ok = true }); + return Ok(await _gestiona.AsegurarTerceroYEnlazarAsync(request.FileUrl, request.ThirdParty)); } catch (ArgumentException ex) { @@ -157,8 +192,9 @@ public sealed class GestionaController : ControllerBase { await _workflow.TramitarDocumentoAsync( request.DocumentUrl, - request.AssignedGroupHref, - request.ComplaintId); + request.AssignedGroupCode, + request.ComplaintId, + request.IsUpdate); return Ok(new { ok = true }); } diff --git a/Antifraude.Net/ApiDenuncias/Controllers/InboxController.cs b/Antifraude.Net/ApiDenuncias/Controllers/InboxController.cs index cb9c535..48591a5 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/InboxController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/InboxController.cs @@ -10,6 +10,13 @@ namespace ApiDenuncias.Controllers; [Route("api/inbox")] public sealed class InboxController : ControllerBase { + private static readonly TimeSpan[] ExportRetryDelays = + [ + TimeSpan.FromSeconds(2), + TimeSpan.FromSeconds(5), + TimeSpan.FromSeconds(10) + ]; + private readonly GlobalLeaksSessionStore _sessionStore; private readonly PendingGlobalLeaksLoginStore _pendingLoginStore; private readonly GlobalLeaksClient _globalLeaksClient; @@ -74,7 +81,7 @@ public sealed class InboxController : ControllerBase _logger.LogError(ex, "No se ha podido preparar la renovacion GlobalLeaks para {Username}.", username); return StatusCode( StatusCodes.Status500InternalServerError, - new ApiError($"No se ha podido preparar la renovacion: {ex.GetType().Name}: {ex.Message}")); + new ApiError("No se ha podido preparar la renovacion de GlobalLeaks. Intentalo de nuevo en unos segundos.")); } } @@ -141,7 +148,7 @@ public sealed class InboxController : ControllerBase _logger.LogError(ex, "No se ha podido cargar la bandeja GlobalLeaks para {Username}.", username); return StatusCode( StatusCodes.Status500InternalServerError, - new ApiError($"No se ha podido cargar la bandeja: {ex.GetType().Name}: {ex.Message}")); + new ApiError("No se ha podido renovar la sesion de GlobalLeaks. Intentalo de nuevo en unos segundos.")); } } @@ -164,12 +171,17 @@ public sealed class InboxController : ControllerBase try { + var state = await _trackingService.GetUserStateAsync(username, cancellationToken); var contexts = await _globalLeaksClient.GetContextsAsync(session.SessionId!, cancellationToken); var reports = await _globalLeaksClient.GetReportsAsync(session.SessionId!, "all", null, null, cancellationToken, contexts); var enrichedReports = await _trackingService.RegisterSnapshotAsync(username, reports, cancellationToken); - var state = await _trackingService.GetUserStateAsync(username, cancellationToken); + var activityReports = await _globalLeaksClient.EnrichReportsWithActivityAsync( + session.SessionId!, + enrichedReports, + state.LastDownloadedReportMomentUtc, + cancellationToken); - return Ok(new InboxSnapshotResponse(contexts, enrichedReports, state)); + return Ok(new InboxSnapshotResponse(contexts, activityReports, state)); } catch (GlobalLeaksSessionExpiredException) { @@ -178,14 +190,14 @@ public sealed class InboxController : ControllerBase } catch (GlobalLeaksValidationException ex) { - return StatusCode(ex.StatusCode, new ApiError(ex.Message)); + return ToGlobalLeaksApiError(ex, "cargar la bandeja de GlobalLeaks"); } catch (Exception ex) { _logger.LogError(ex, "No se ha podido cargar la bandeja GlobalLeaks para {Username}.", username); return StatusCode( StatusCodes.Status500InternalServerError, - new ApiError($"No se ha podido cargar la bandeja: {ex.GetType().Name}: {ex.Message}")); + new ApiError("No se ha podido cargar la bandeja de GlobalLeaks. Intentalo de nuevo en unos segundos.")); } } @@ -210,7 +222,25 @@ public sealed class InboxController : ControllerBase { await _trackingService.EnsureReportCanBeImportedByUserAsync(username, report, cancellationToken); - var zip = await _globalLeaksClient.DownloadReportZipAsync(session.SessionId!, report.Id, cancellationToken); + ReportDetailDto? reportDetail = null; + try + { + reportDetail = await _globalLeaksClient.GetReportDetailAsync( + session.SessionId!, + report.Id, + report.LastAccess, + cancellationToken); + } + catch (GlobalLeaksValidationException ex) when (ex.StatusCode == StatusCodes.Status422UnprocessableEntity || + ex.StatusCode is >= 500 and <= 504) + { + _logger.LogWarning( + ex, + "No se ha podido obtener el detalle de fechas de adjuntos para la denuncia {ReportId}. Se usara la fecha del paquete exportado.", + report.Id); + } + + var reportPackage = await DownloadReportPackageWithRetryAsync(session.SessionId!, report, cancellationToken); FileDownloadResult? json = null; try @@ -222,7 +252,7 @@ public sealed class InboxController : ControllerBase json = null; } - var result = await _inboxService.ImportFromGlobalLeaksAsync(zip, json, cancellationToken); + var result = await _inboxService.ImportFromGlobalLeaksAsync(reportPackage, json, reportDetail, cancellationToken); if (result.ImportedCount > 0) { await _trackingService.MarkReportImportedAsync( @@ -241,14 +271,14 @@ public sealed class InboxController : ControllerBase } catch (GlobalLeaksValidationException ex) { - return StatusCode(ex.StatusCode, new ApiError(ex.Message)); + return ToGlobalLeaksApiError(ex, "importar la denuncia"); } catch (Exception ex) { _logger.LogError(ex, "No se ha podido importar la denuncia {ReportId} para {Username}.", reportId, username); return StatusCode( StatusCodes.Status500InternalServerError, - new ApiError($"No se ha podido importar la denuncia: {ex.GetType().Name}: {ex.Message}")); + new ApiError("No se ha podido importar la denuncia. Intentalo de nuevo en unos segundos.")); } } @@ -276,37 +306,78 @@ public sealed class InboxController : ControllerBase } catch (GlobalLeaksValidationException ex) { - return StatusCode(ex.StatusCode, new ApiError(ex.Message)); + return ToGlobalLeaksApiError(ex, "leer el detalle de la denuncia"); } catch (Exception ex) { _logger.LogError(ex, "No se ha podido leer el detalle de la denuncia {ReportId} para {Username}.", reportId, username); return StatusCode( StatusCodes.Status500InternalServerError, - new ApiError($"No se ha podido leer el detalle de la denuncia: {ex.GetType().Name}: {ex.Message}")); + new ApiError("No se ha podido abrir el detalle de la denuncia. Intentalo de nuevo en unos segundos.")); } } - [HttpPost("local/ensure-storage")] - public async Task EnsureStorage(CancellationToken cancellationToken) + private async Task DownloadReportPackageWithRetryAsync( + string sessionId, + ReportDto report, + CancellationToken cancellationToken) { - await _inboxService.EnsureStorageReadyAsync(cancellationToken); - return Ok(new { ok = true }); + for (var attempt = 0; ; attempt++) + { + try + { + return await _globalLeaksClient.DownloadReportPackageAsync(sessionId, report.Id, cancellationToken); + } + catch (GlobalLeaksValidationException ex) when (IsExportNotReady(ex) && attempt < ExportRetryDelays.Length) + { + var delay = ExportRetryDelays[attempt]; + _logger.LogWarning( + ex, + "GlobalLeaks aun no ha preparado la exportacion de la denuncia {ReportId}. Reintento {Attempt}/{Total} en {DelaySeconds}s.", + report.Id, + attempt + 1, + ExportRetryDelays.Length, + delay.TotalSeconds); + + await Task.Delay(delay, cancellationToken); + } + catch (GlobalLeaksValidationException ex) when (IsExportNotReady(ex)) + { + throw new GlobalLeaksValidationException( + "GlobalLeaks todavia esta preparando la exportacion de esta denuncia. Espera unos segundos y vuelve a importarla.", + StatusCodes.Status503ServiceUnavailable); + } + } } - [HttpPost("local/process")] - public async Task> ProcessLocalZips(CancellationToken cancellationToken) - => Ok(await _inboxService.ProcessPendingFolderZipsAsync(cancellationToken)); + private static bool IsExportNotReady(GlobalLeaksValidationException ex) + => ex.StatusCode is >= 500 and <= 504; - [HttpGet("local/zips")] - public async Task>> GetLocalZips(CancellationToken cancellationToken) - => Ok(await _inboxService.GetExistingZipNamesAsync(cancellationToken)); - - [HttpDelete("local/zips/{zipName}")] - public async Task DeleteLocalZip(string zipName, CancellationToken cancellationToken) + private static ActionResult ToGlobalLeaksApiError(GlobalLeaksValidationException ex, string operation) { - await _inboxService.DeleteZipAsync(zipName, cancellationToken); - return Ok(new { ok = true }); + if (ex.StatusCode == StatusCodes.Status401Unauthorized || + ex.StatusCode == StatusCodes.Status403Forbidden) + { + return new ObjectResult(new ApiError( + "No tienes permiso en GlobalLeaks para acceder a esa denuncia. Puede ser una denuncia anterior a la creacion de tu usuario; consulta con el administrador del buzon.")) + { + StatusCode = StatusCodes.Status403Forbidden + }; + } + + if (ex.StatusCode is >= 500 and <= 504) + { + return new ObjectResult(new ApiError( + $"GlobalLeaks no ha podido {operation} en este momento. Intentalo de nuevo en unos segundos.")) + { + StatusCode = StatusCodes.Status503ServiceUnavailable + }; + } + + return new ObjectResult(new ApiError(ex.Message)) + { + StatusCode = ex.StatusCode + }; } private async Task RequireActiveSessionAsync(string username, CancellationToken cancellationToken) @@ -322,4 +393,7 @@ public sealed class InboxController : ControllerBase => session is null ? null : new ApiGlobalLeaksSessionDto(session.Username, session.Role, session.HasActiveSession, session.UpdatedAt); + + + } diff --git a/Antifraude.Net/ApiDenuncias/Controllers/PurgeController.cs b/Antifraude.Net/ApiDenuncias/Controllers/PurgeController.cs index 2ca1e79..b83f060 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/PurgeController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/PurgeController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace ApiDenuncias.Controllers; [ApiController] -[Authorize] +[Authorize(Policy = "ConfigurationAdministrators")] [Route("api/purge")] public sealed class PurgeController : ControllerBase { diff --git a/Antifraude.Net/ApiDenuncias/Controllers/TrackingController.cs b/Antifraude.Net/ApiDenuncias/Controllers/TrackingController.cs index 0810feb..7414655 100644 --- a/Antifraude.Net/ApiDenuncias/Controllers/TrackingController.cs +++ b/Antifraude.Net/ApiDenuncias/Controllers/TrackingController.cs @@ -34,6 +34,19 @@ public sealed class TrackingController : ControllerBase return Ok(new { ok = true }); } + [HttpPost("handled-in-gestiona")] + public async Task MarkHandledInGestiona( + MarkReportHandledInGestionaRequest request, + CancellationToken cancellationToken) + { + await _trackingService.MarkReportHandledInGestionaAsync( + GetUsername(), + request.DenunciaId, + request.UploadedAtUtc, + cancellationToken); + return Ok(new { ok = true }); + } + [HttpPost("import-permission")] public async Task EnsureImportPermission( TrackingImportPermissionRequest request, diff --git a/Antifraude.Net/ApiDenuncias/Program.cs b/Antifraude.Net/ApiDenuncias/Program.cs index d5717c3..18900a0 100644 --- a/Antifraude.Net/ApiDenuncias/Program.cs +++ b/Antifraude.Net/ApiDenuncias/Program.cs @@ -42,6 +42,7 @@ builder.Services.AddScoped(sp => sp.GetRequiredService(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddHttpClient(); builder.Services.AddScoped(); @@ -99,7 +100,26 @@ builder.Services }; }); -builder.Services.AddAuthorization(); +var configurationAdministrators = new HashSet(StringComparer.OrdinalIgnoreCase) +{ + "pcornejo", + "Rgarciaglbk", + "eaguilarGestor" +}; + +builder.Services.AddAuthorization(options => +{ + options.AddPolicy("ConfigurationAdministrators", policy => + { + policy.RequireAssertion(context => + { + var username = context.User.Identity?.Name?.Trim(); + return context.User.Identity?.IsAuthenticated == true && + !string.IsNullOrWhiteSpace(username) && + configurationAdministrators.Contains(username); + }); + }); +}); var app = builder.Build(); diff --git a/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_gestiona_expediente_excepciones.sql b/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_gestiona_expediente_excepciones.sql new file mode 100644 index 0000000..f4f23ee --- /dev/null +++ b/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_gestiona_expediente_excepciones.sql @@ -0,0 +1,12272 @@ +-- ============================================================ +-- Carga de excepciones expediente Gestiona +-- Fuente: CD-expdte Gestiona 20260414.xlsx +-- Generado para mapear denuncias historicas con asunto no normalizado +-- Si una referencia aparece varias veces, la app prioriza source_row mayor. +-- ============================================================ + +USE gestiona; + +CREATE TABLE IF NOT EXISTS gestiona_file_exceptions ( + id INT AUTO_INCREMENT PRIMARY KEY, + external_report_id INT NULL, + external_reference VARCHAR(100) NOT NULL, + gestiona_file_code VARCHAR(50) NOT NULL, + notes VARCHAR(255) NULL, + source_row INT NULL, + created_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + updated_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + UNIQUE KEY uq_gestiona_file_exceptions_ref_code (external_reference, gestiona_file_code), + KEY ix_gestiona_file_exceptions_report (external_report_id), + KEY ix_gestiona_file_exceptions_reference (external_reference), + KEY ix_gestiona_file_exceptions_code (gestiona_file_code) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1274, '1274', '151/2025', 'CD-expdte Gestiona 20260414.xlsx', 2) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1276, '1276', '153/2025', 'CD-expdte Gestiona 20260414.xlsx', 3) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-3', '006/2025', 'CD-expdte Gestiona 20260414.xlsx', 4) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-1', '003/2025', 'CD-expdte Gestiona 20260414.xlsx', 5) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-2', '004/2025', 'CD-expdte Gestiona 20260414.xlsx', 6) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1275, '1275', '152/2025', 'CD-expdte Gestiona 20260414.xlsx', 7) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-4', '007/2025', 'CD-expdte Gestiona 20260414.xlsx', 8) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1277, '1277', '154/2025', 'CD-expdte Gestiona 20260414.xlsx', 9) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1279, '1279', '155/2025', 'CD-expdte Gestiona 20260414.xlsx', 10) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1278, '1278', '211/2025', 'CD-expdte Gestiona 20260414.xlsx', 11) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1280, '1280', '156/2025', 'CD-expdte Gestiona 20260414.xlsx', 12) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-4', '008/2025', 'CD-expdte Gestiona 20260414.xlsx', 13) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1281, '1281', '295/2025', 'CD-expdte Gestiona 20260414.xlsx', 14) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1282, '1282', '157/2025', 'CD-expdte Gestiona 20260414.xlsx', 15) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1283, '1283', '158/2025', 'CD-expdte Gestiona 20260414.xlsx', 16) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1285, '1285', '160/2025', 'CD-expdte Gestiona 20260414.xlsx', 17) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1284, '1284', '159/2025', 'CD-expdte Gestiona 20260414.xlsx', 18) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1286, '1286', '213/2025', 'CD-expdte Gestiona 20260414.xlsx', 19) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1287, '1287', '161/2025', 'CD-expdte Gestiona 20260414.xlsx', 20) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-15', '019/2025', 'CD-expdte Gestiona 20260414.xlsx', 21) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1291, '1291', '164/2025', 'CD-expdte Gestiona 20260414.xlsx', 22) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1288, '1288', '162/2025', 'CD-expdte Gestiona 20260414.xlsx', 23) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1289, '1289', '163/2025', 'CD-expdte Gestiona 20260414.xlsx', 24) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1290, '1290', '214/2025', 'CD-expdte Gestiona 20260414.xlsx', 25) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1294, '1294', '167/2025', 'CD-expdte Gestiona 20260414.xlsx', 26) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1295, '1295', '168/2025', 'CD-expdte Gestiona 20260414.xlsx', 27) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1292, '1292', '166/2025', 'CD-expdte Gestiona 20260414.xlsx', 28) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1293, '1293', '215/2025', 'CD-expdte Gestiona 20260414.xlsx', 29) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-16', '026/2025', 'CD-expdte Gestiona 20260414.xlsx', 30) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1296, '1296', '217/2025', 'CD-expdte Gestiona 20260414.xlsx', 31) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1297, '1297', '216/2025', 'CD-expdte Gestiona 20260414.xlsx', 32) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1298, '1298', '218/2025', 'CD-expdte Gestiona 20260414.xlsx', 33) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1299, '1299', '219/2025', 'CD-expdte Gestiona 20260414.xlsx', 34) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1302, '1302', '056/2025', 'CD-expdte Gestiona 20260414.xlsx', 35) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1303, '1303', '057/2025', 'CD-expdte Gestiona 20260414.xlsx', 36) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1300, '1300', '169/2025', 'CD-expdte Gestiona 20260414.xlsx', 37) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1301, '1301', '170/2025', 'CD-expdte Gestiona 20260414.xlsx', 38) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1308, '1308', '175/2025', 'CD-expdte Gestiona 20260414.xlsx', 39) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1304, '1304', '171/2025', 'CD-expdte Gestiona 20260414.xlsx', 40) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1307, '1307', '174/2025', 'CD-expdte Gestiona 20260414.xlsx', 41) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1310, '1310', '177/2025', 'CD-expdte Gestiona 20260414.xlsx', 42) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1305, '1305', '172/2025', 'CD-expdte Gestiona 20260414.xlsx', 43) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1306, '1306', '173/2025', 'CD-expdte Gestiona 20260414.xlsx', 44) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1309, '1309', '176/2025', 'CD-expdte Gestiona 20260414.xlsx', 45) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1311, '1311', '178/2025', 'CD-expdte Gestiona 20260414.xlsx', 46) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1312, '1312', '179/2025', 'CD-expdte Gestiona 20260414.xlsx', 47) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1313, '1313', '180/2025', 'CD-expdte Gestiona 20260414.xlsx', 48) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, 'denuncia tlfno anónima', '076/2025', 'CD-expdte Gestiona 20260414.xlsx', 49) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1314, '1314', '181/2025', 'CD-expdte Gestiona 20260414.xlsx', 50) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1316, '1316', '183/2024', 'CD-expdte Gestiona 20260414.xlsx', 51) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1317, '1317', '189/2025', 'CD-expdte Gestiona 20260414.xlsx', 52) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1315, '1315', '182/2025', 'CD-expdte Gestiona 20260414.xlsx', 53) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1318, '1318', '190/2025', 'CD-expdte Gestiona 20260414.xlsx', 54) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1319, '1319', '184/2025', 'CD-expdte Gestiona 20260414.xlsx', 55) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1320, '1320', '191/2025', 'CD-expdte Gestiona 20260414.xlsx', 56) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1321, '1321', '186/2025', 'CD-expdte Gestiona 20260414.xlsx', 57) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1323, '1323', '195/2025', 'CD-expdte Gestiona 20260414.xlsx', 58) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1322, '1322', '193/2025', 'CD-expdte Gestiona 20260414.xlsx', 59) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1324, '1324', '196/2025', 'CD-expdte Gestiona 20260414.xlsx', 60) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1326, '1326', '199/2025', 'CD-expdte Gestiona 20260414.xlsx', 61) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1325, '1325', '198/2025', 'CD-expdte Gestiona 20260414.xlsx', 62) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1327, '1327', '200/2025', 'CD-expdte Gestiona 20260414.xlsx', 63) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1328, '1328', '187/2025', 'CD-expdte Gestiona 20260414.xlsx', 64) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1329, '1329', '201/2025', 'CD-expdte Gestiona 20260414.xlsx', 65) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1330, '1330', '203/2025', 'CD-expdte Gestiona 20260414.xlsx', 66) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1331, '1331', '204/2025', 'CD-expdte Gestiona 20260414.xlsx', 67) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1332, '1332', '205/2025', 'CD-expdte Gestiona 20260414.xlsx', 68) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1333, '1333', '206/2025', 'CD-expdte Gestiona 20260414.xlsx', 69) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1334, '1334', '207/2025', 'CD-expdte Gestiona 20260414.xlsx', 70) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1335, '1335', '208/2025', 'CD-expdte Gestiona 20260414.xlsx', 71) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-33', '192/2025', 'CD-expdte Gestiona 20260414.xlsx', 72) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-34', '194/2025', 'CD-expdte Gestiona 20260414.xlsx', 73) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-35', '197/2025', 'CD-expdte Gestiona 20260414.xlsx', 74) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-32', '188/2025', 'CD-expdte Gestiona 20260414.xlsx', 75) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-36', '202/2025', 'CD-expdte Gestiona 20260414.xlsx', 76) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-37', '212/2025', 'CD-expdte Gestiona 20260414.xlsx', 77) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1336, '1336', '209/2025', 'CD-expdte Gestiona 20260414.xlsx', 78) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-31', '185/2025', 'CD-expdte Gestiona 20260414.xlsx', 79) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1337, '1337', '222/2025', 'CD-expdte Gestiona 20260414.xlsx', 80) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1338, '1338', '223/2025', 'CD-expdte Gestiona 20260414.xlsx', 81) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1339, '1339', '224/2025', 'CD-expdte Gestiona 20260414.xlsx', 82) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1342, '1342', '231/2025', 'CD-expdte Gestiona 20260414.xlsx', 83) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1340, '1340', '225/2025', 'CD-expdte Gestiona 20260414.xlsx', 84) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1341, '1341', '230/2025', 'CD-expdte Gestiona 20260414.xlsx', 85) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-41', '232/2025', 'CD-expdte Gestiona 20260414.xlsx', 86) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-67', '226/2025', 'CD-expdte Gestiona 20260414.xlsx', 87) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1343, '1343', '235/2025', 'CD-expdte Gestiona 20260414.xlsx', 88) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1344, '1344', '236/2025', 'CD-expdte Gestiona 20260414.xlsx', 89) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1346, '1346', '237/2025', 'CD-expdte Gestiona 20260414.xlsx', 90) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1345, '1345', '234/2025', 'CD-expdte Gestiona 20260414.xlsx', 91) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1347, '1347', '238/2025', 'CD-expdte Gestiona 20260414.xlsx', 92) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1348, '1348', '239/2025', 'CD-expdte Gestiona 20260414.xlsx', 93) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1349, '1349', '243/2025', 'CD-expdte Gestiona 20260414.xlsx', 94) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1351, '1351', '245/2025', 'CD-expdte Gestiona 20260414.xlsx', 95) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1350, '1350', '244/2025', 'CD-expdte Gestiona 20260414.xlsx', 96) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1352, '1352', '246/2025', 'CD-expdte Gestiona 20260414.xlsx', 97) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1353, '1353', '247/2025', 'CD-expdte Gestiona 20260414.xlsx', 98) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-50', '261/2025', 'CD-expdte Gestiona 20260414.xlsx', 99) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-51', '262/2025', 'CD-expdte Gestiona 20260414.xlsx', 100) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-45', '249/2025', 'CD-expdte Gestiona 20260414.xlsx', 101) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-46', '250/2025', 'CD-expdte Gestiona 20260414.xlsx', 102) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-47', '253/2025', 'CD-expdte Gestiona 20260414.xlsx', 103) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1354, '1354', '248/2025', 'CD-expdte Gestiona 20260414.xlsx', 104) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-48', '255/2025', 'CD-expdte Gestiona 20260414.xlsx', 105) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1355, '1355', '258/2025', 'CD-expdte Gestiona 20260414.xlsx', 106) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-49', '259/2025', 'CD-expdte Gestiona 20260414.xlsx', 107) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1356, '1356', '263/2025', 'CD-expdte Gestiona 20260414.xlsx', 108) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1357, '1357', '264/2025', 'CD-expdte Gestiona 20260414.xlsx', 109) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1358, '1358', '265/2025', 'CD-expdte Gestiona 20260414.xlsx', 110) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1360, '1360', '267/2025', 'CD-expdte Gestiona 20260414.xlsx', 111) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1359, '1359', '266/2025', 'CD-expdte Gestiona 20260414.xlsx', 112) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1362, '1362', '273/2025', 'CD-expdte Gestiona 20260414.xlsx', 113) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1364, '1364', '275/2025', 'CD-expdte Gestiona 20260414.xlsx', 114) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1365, '1365', '276/2025', 'CD-expdte Gestiona 20260414.xlsx', 115) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1368, '1368', '281/2025', 'CD-expdte Gestiona 20260414.xlsx', 116) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1369, '1369', '283/2025', 'CD-expdte Gestiona 20260414.xlsx', 117) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1363, '1363', '274/2025', 'CD-expdte Gestiona 20260414.xlsx', 118) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1361, '1361', '272/2025', 'CD-expdte Gestiona 20260414.xlsx', 119) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1366, '1366', '279/2025', 'CD-expdte Gestiona 20260414.xlsx', 120) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1367, '1367', '280/2025', 'CD-expdte Gestiona 20260414.xlsx', 121) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1370, '1370', '284/2025', 'CD-expdte Gestiona 20260414.xlsx', 122) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1371, '1371', '285/2025', 'CD-expdte Gestiona 20260414.xlsx', 123) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-52', '277/2025', 'CD-expdte Gestiona 20260414.xlsx', 124) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1372, '1372', '286/2025', 'CD-expdte Gestiona 20260414.xlsx', 125) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1373, '1373', '289/2025', 'CD-expdte Gestiona 20260414.xlsx', 126) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1374, '1374', '290/2025', 'CD-expdte Gestiona 20260414.xlsx', 127) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1375, '1375', '291/2025', 'CD-expdte Gestiona 20260414.xlsx', 128) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1376, '1376', '292/2025', 'CD-expdte Gestiona 20260414.xlsx', 129) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1377, '1377', '293/2025', 'CD-expdte Gestiona 20260414.xlsx', 130) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-54', '287/2025', 'CD-expdte Gestiona 20260414.xlsx', 131) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1378, '1378', '294/2025', 'CD-expdte Gestiona 20260414.xlsx', 132) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1379, '1379', '301/2025', 'CD-expdte Gestiona 20260414.xlsx', 133) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1383, '1383', '305/2025', 'CD-expdte Gestiona 20260414.xlsx', 134) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1385, '1385', '307/2025', 'CD-expdte Gestiona 20260414.xlsx', 135) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1386, '1386', '309/2025', 'CD-expdte Gestiona 20260414.xlsx', 136) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1387, '1387', '310/2025', 'CD-expdte Gestiona 20260414.xlsx', 137) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1380, '1380', '302/2025', 'CD-expdte Gestiona 20260414.xlsx', 138) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1381, '1381', '303/2025', 'CD-expdte Gestiona 20260414.xlsx', 139) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1382, '1382', '304/2025', 'CD-expdte Gestiona 20260414.xlsx', 140) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1384, '1384', '306/2025', 'CD-expdte Gestiona 20260414.xlsx', 141) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1388, '1388', '313/2025', 'CD-expdte Gestiona 20260414.xlsx', 142) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1389, '1389', '314/2025', 'CD-expdte Gestiona 20260414.xlsx', 143) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1390, '1390', '315/2025', 'CD-expdte Gestiona 20260414.xlsx', 144) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1391, '1391', '316/2025', 'CD-expdte Gestiona 20260414.xlsx', 145) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1392, '1392', '317/2025', 'CD-expdte Gestiona 20260414.xlsx', 146) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1393, '1393', '320/2025', 'CD-expdte Gestiona 20260414.xlsx', 147) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1394, '1394', '318/2025', 'CD-expdte Gestiona 20260414.xlsx', 148) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1395, '1395', '319/2025', 'CD-expdte Gestiona 20260414.xlsx', 149) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1396, '1396', '322/2025', 'CD-expdte Gestiona 20260414.xlsx', 150) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-65', '332/2025', 'CD-expdte Gestiona 20260414.xlsx', 151) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-69', '334/2025', 'CD-expdte Gestiona 20260414.xlsx', 152) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-60', '326/2025', 'CD-expdte Gestiona 20260414.xlsx', 153) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-61', '327/2025', 'CD-expdte Gestiona 20260414.xlsx', 154) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-62', '329/2025', 'CD-expdte Gestiona 20260414.xlsx', 155) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-63', '330/2025', 'CD-expdte Gestiona 20260414.xlsx', 156) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-64', '331/2025', 'CD-expdte Gestiona 20260414.xlsx', 157) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-68', '333/2025', 'CD-expdte Gestiona 20260414.xlsx', 158) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1402, '1402', '340/2025', 'CD-expdte Gestiona 20260414.xlsx', 159) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1403, '1403', '341/2025', 'CD-expdte Gestiona 20260414.xlsx', 160) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1397, '1397', '323/2025', 'CD-expdte Gestiona 20260414.xlsx', 161) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1398, '1398', '324/2025', 'CD-expdte Gestiona 20260414.xlsx', 162) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-58', '325/2025', 'CD-expdte Gestiona 20260414.xlsx', 163) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1399, '1399', '337/2025', 'CD-expdte Gestiona 20260414.xlsx', 164) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1400, '1400', '338/2025', 'CD-expdte Gestiona 20260414.xlsx', 165) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1401, '1401', '339/2025', 'CD-expdte Gestiona 20260414.xlsx', 166) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1404, '1404', '342/2025', 'CD-expdte Gestiona 20260414.xlsx', 167) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1405, '1405', '343/2025', 'CD-expdte Gestiona 20260414.xlsx', 168) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1407, '1407', '345/2025', 'CD-expdte Gestiona 20260414.xlsx', 169) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1412, '1412', '371/2025', 'CD-expdte Gestiona 20260414.xlsx', 170) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-70', '364/2025', 'CD-expdte Gestiona 20260414.xlsx', 171) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1406, '1406', '344/2025', 'CD-expdte Gestiona 20260414.xlsx', 172) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1408, '1408', '349/2025', 'CD-expdte Gestiona 20260414.xlsx', 173) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1409, '1409', '350/2025', 'CD-expdte Gestiona 20260414.xlsx', 174) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1410, '1410', '351/2025', 'CD-expdte Gestiona 20260414.xlsx', 175) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1411, '1411', '352/2025', 'CD-expdte Gestiona 20260414.xlsx', 176) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-72', '367/2025', 'CD-expdte Gestiona 20260414.xlsx', 177) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1413, '1413', '372/2025', 'CD-expdte Gestiona 20260414.xlsx', 178) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1414, '1414', '373/2025', 'CD-expdte Gestiona 20260414.xlsx', 179) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1415, '1415', '374/2025', 'CD-expdte Gestiona 20260414.xlsx', 180) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1417, '1417', '380/2025', 'CD-expdte Gestiona 20260414.xlsx', 181) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1416, '1416', '379/2025', 'CD-expdte Gestiona 20260414.xlsx', 182) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1418, '1418', '381/2025', 'CD-expdte Gestiona 20260414.xlsx', 183) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1419, '1419', '382/2025', 'CD-expdte Gestiona 20260414.xlsx', 184) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1423, '1423', '386/2025', 'CD-expdte Gestiona 20260414.xlsx', 185) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1420, '1420', '383/2025', 'CD-expdte Gestiona 20260414.xlsx', 186) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1421, '1421', '384/2025', 'CD-expdte Gestiona 20260414.xlsx', 187) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1422, '1422', '385/2025', 'CD-expdte Gestiona 20260414.xlsx', 188) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1424, '1424', '387/2025', 'CD-expdte Gestiona 20260414.xlsx', 189) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1426, '1426', '390/2025', 'CD-expdte Gestiona 20260414.xlsx', 190) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1425, '1425', '388/2025', 'CD-expdte Gestiona 20260414.xlsx', 191) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1430, '1430', '396/2025', 'CD-expdte Gestiona 20260414.xlsx', 192) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1427, '1427', '393/2025', 'CD-expdte Gestiona 20260414.xlsx', 193) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1428, '1428', '394/2025', 'CD-expdte Gestiona 20260414.xlsx', 194) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1429, '1429', '395/2025', 'CD-expdte Gestiona 20260414.xlsx', 195) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1431, '1431', '397/2025', 'CD-expdte Gestiona 20260414.xlsx', 196) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1432, '1432', '398/2025', 'CD-expdte Gestiona 20260414.xlsx', 197) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1433, '1433', '407/2025', 'CD-expdte Gestiona 20260414.xlsx', 198) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1436, '1436', '410/2025', 'CD-expdte Gestiona 20260414.xlsx', 199) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-77', '401/2025', 'CD-expdte Gestiona 20260414.xlsx', 200) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1437, '1437', '404/2025', 'CD-expdte Gestiona 20260414.xlsx', 201) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1434, '1434', '408/2025', 'CD-expdte Gestiona 20260414.xlsx', 202) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1438, '1438', '405/2025', 'CD-expdte Gestiona 20260414.xlsx', 203) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1435, '1435', '409/2025', 'CD-expdte Gestiona 20260414.xlsx', 204) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-76', '400/2025', 'CD-expdte Gestiona 20260414.xlsx', 205) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1439, '1439', '411/2025', 'CD-expdte Gestiona 20260414.xlsx', 206) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1444, '1444', '417/2025', 'CD-expdte Gestiona 20260414.xlsx', 207) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1445, '1445', '418/2025', 'CD-expdte Gestiona 20260414.xlsx', 208) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1442, '1442', '415/2025', 'CD-expdte Gestiona 20260414.xlsx', 209) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1443, '1443', '416/2025', 'CD-expdte Gestiona 20260414.xlsx', 210) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1440, '1440', '413/2025', 'CD-expdte Gestiona 20260414.xlsx', 211) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1441, '1441', '414/2025', 'CD-expdte Gestiona 20260414.xlsx', 212) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1446, '1446', '419/2025', 'CD-expdte Gestiona 20260414.xlsx', 213) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1447, '1447', '421/2025', 'CD-expdte Gestiona 20260414.xlsx', 214) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1448, '1448', '424/2025', 'CD-expdte Gestiona 20260414.xlsx', 215) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1449, '1449', '425/2025', 'CD-expdte Gestiona 20260414.xlsx', 216) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1450, '1450', '426/2025', 'CD-expdte Gestiona 20260414.xlsx', 217) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1452, '1452', '431/2025', 'CD-expdte Gestiona 20260414.xlsx', 218) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1451, '1451', '428/2025', 'CD-expdte Gestiona 20260414.xlsx', 219) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-80', '434/2025', 'CD-expdte Gestiona 20260414.xlsx', 220) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-82', '436/2025', 'CD-expdte Gestiona 20260414.xlsx', 221) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1455, '1455', '441/2025', 'CD-expdte Gestiona 20260414.xlsx', 222) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1453, '1453', '433/2025', 'CD-expdte Gestiona 20260414.xlsx', 223) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1454, '1454', '440/2025', 'CD-expdte Gestiona 20260414.xlsx', 224) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1456, '1456', '443/2025', 'CD-expdte Gestiona 20260414.xlsx', 225) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-85', '445/2025', 'CD-expdte Gestiona 20260414.xlsx', 226) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1457, '1457', '447/2025', 'CD-expdte Gestiona 20260414.xlsx', 227) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1458, '1458', '448/2025', 'CD-expdte Gestiona 20260414.xlsx', 228) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1459, '1459', '449/2025', 'CD-expdte Gestiona 20260414.xlsx', 229) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1460, '1460', '450/2025', 'CD-expdte Gestiona 20260414.xlsx', 230) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1461, '1461', '451/2025', 'CD-expdte Gestiona 20260414.xlsx', 231) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1462, '1462', '452/2025', 'CD-expdte Gestiona 20260414.xlsx', 232) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1463, '1463', '453/2025', 'CD-expdte Gestiona 20260414.xlsx', 233) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1465, '1465', '455/2025', 'CD-expdte Gestiona 20260414.xlsx', 234) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1464, '1464', '454/2025', 'CD-expdte Gestiona 20260414.xlsx', 235) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1468, '1468', '576/2025', 'CD-expdte Gestiona 20260414.xlsx', 236) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1470, '1470', '465/2025', 'CD-expdte Gestiona 20260414.xlsx', 237) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1471, '1471', '466/2025', 'CD-expdte Gestiona 20260414.xlsx', 238) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-87', '468/2025', 'CD-expdte Gestiona 20260414.xlsx', 239) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1472, '1472', '470/2025', 'CD-expdte Gestiona 20260414.xlsx', 240) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1466, '1466', '462/2025', 'CD-expdte Gestiona 20260414.xlsx', 241) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1467, '1467', '463/2025', 'CD-expdte Gestiona 20260414.xlsx', 242) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1469, '1469', '464/2025', 'CD-expdte Gestiona 20260414.xlsx', 243) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-152', '469/2025', 'CD-expdte Gestiona 20260414.xlsx', 244) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1473, '1473', '471/2025', 'CD-expdte Gestiona 20260414.xlsx', 245) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1474, '1474', '473/2025', 'CD-expdte Gestiona 20260414.xlsx', 246) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1475, '1475', '474/2025', 'CD-expdte Gestiona 20260414.xlsx', 247) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1479, '1479', '478/2025', 'CD-expdte Gestiona 20260414.xlsx', 248) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1483, '1483', '484/2025', 'CD-expdte Gestiona 20260414.xlsx', 249) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1480, '1480', '479/2025', 'CD-expdte Gestiona 20260414.xlsx', 250) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-88', '481/2025', 'CD-expdte Gestiona 20260414.xlsx', 251) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1482, '1482', '483/2025', 'CD-expdte Gestiona 20260414.xlsx', 252) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1484, '1484', '485/2025', 'CD-expdte Gestiona 20260414.xlsx', 253) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1476, '1476', '475/2025', 'CD-expdte Gestiona 20260414.xlsx', 254) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1477, '1477', '476/2025', 'CD-expdte Gestiona 20260414.xlsx', 255) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1478, '1478', '477/2025', 'CD-expdte Gestiona 20260414.xlsx', 256) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1481, '1481', '480/2025', 'CD-expdte Gestiona 20260414.xlsx', 257) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1485, '1485', '486/2025', 'CD-expdte Gestiona 20260414.xlsx', 258) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-89', '482/2025', 'CD-expdte Gestiona 20260414.xlsx', 259) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1487, '1487', '491/2025', 'CD-expdte Gestiona 20260414.xlsx', 260) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1486, '1486', '490/2025', 'CD-expdte Gestiona 20260414.xlsx', 261) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1488, '1488', '492/2025', 'CD-expdte Gestiona 20260414.xlsx', 262) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1490, '1490', '494/2025', 'CD-expdte Gestiona 20260414.xlsx', 263) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1489, '1489', '493/2025', 'CD-expdte Gestiona 20260414.xlsx', 264) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-95', '500/2025', 'CD-expdte Gestiona 20260414.xlsx', 265) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-96', '501/2025', 'CD-expdte Gestiona 20260414.xlsx', 266) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1494, '1494', '507/2025', 'CD-expdte Gestiona 20260414.xlsx', 267) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1496, '1496', '509/2025', 'CD-expdte Gestiona 20260414.xlsx', 268) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1499, '1499', '514/2025', 'CD-expdte Gestiona 20260414.xlsx', 269) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1500, '1500', '515/2025', 'CD-expdte Gestiona 20260414.xlsx', 270) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1492, '1492', '496/2025', 'CD-expdte Gestiona 20260414.xlsx', 271) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-98 2025-E-RC-100', '503/2025', 'CD-expdte Gestiona 20260414.xlsx', 272) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-101', '505/2025', 'CD-expdte Gestiona 20260414.xlsx', 273) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1495, '1495', '508/2025', 'CD-expdte Gestiona 20260414.xlsx', 274) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1497, '1497', '510/2025', 'CD-expdte Gestiona 20260414.xlsx', 275) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1498, '1498', '513/2025', 'CD-expdte Gestiona 20260414.xlsx', 276) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1491, '1491', '495/2025', 'CD-expdte Gestiona 20260414.xlsx', 277) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1493, '1493', '497/2025', 'CD-expdte Gestiona 20260414.xlsx', 278) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-105', '511/2025', 'CD-expdte Gestiona 20260414.xlsx', 279) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1502, '1502', '519/2025', 'CD-expdte Gestiona 20260414.xlsx', 280) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1501, '1501', '517/2025', 'CD-expdte Gestiona 20260414.xlsx', 281) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1503, '1503', '520/2025', 'CD-expdte Gestiona 20260414.xlsx', 282) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1507, '1507', '527/2025', 'CD-expdte Gestiona 20260414.xlsx', 283) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1504, '1504', '524/2025', 'CD-expdte Gestiona 20260414.xlsx', 284) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1505, '1505', '525/2025', 'CD-expdte Gestiona 20260414.xlsx', 285) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1506, '1506', '526/2025', 'CD-expdte Gestiona 20260414.xlsx', 286) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1508, '1508', '528/2025', 'CD-expdte Gestiona 20260414.xlsx', 287) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1509, '1509', '529/2025', 'CD-expdte Gestiona 20260414.xlsx', 288) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1510, '1510', '533/2025', 'CD-expdte Gestiona 20260414.xlsx', 289) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1512, '1512', '535/2025', 'CD-expdte Gestiona 20260414.xlsx', 290) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1511, '1511', '534/2025', 'CD-expdte Gestiona 20260414.xlsx', 291) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1513, '1513', '537/2025', 'CD-expdte Gestiona 20260414.xlsx', 292) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1516, '1516', '550/2025', 'CD-expdte Gestiona 20260414.xlsx', 293) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1514, '1514', '541/2025', 'CD-expdte Gestiona 20260414.xlsx', 294) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1515, '1515', '542/2025', 'CD-expdte Gestiona 20260414.xlsx', 295) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1517, '1517', '551/2025', 'CD-expdte Gestiona 20260414.xlsx', 296) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-181', '547/2025', 'CD-expdte Gestiona 20260414.xlsx', 297) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1519, '1519', '559/2025', 'CD-expdte Gestiona 20260414.xlsx', 298) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1521, '1521', '561/2025', 'CD-expdte Gestiona 20260414.xlsx', 299) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1518, '1518', '552/2025', 'CD-expdte Gestiona 20260414.xlsx', 300) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1520, '1520', '560/2025', 'CD-expdte Gestiona 20260414.xlsx', 301) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1522, '1522', '563/2025', 'CD-expdte Gestiona 20260414.xlsx', 302) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-113', '566/2025', 'CD-expdte Gestiona 20260414.xlsx', 303) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1525, '1525', '568/2025', 'CD-expdte Gestiona 20260414.xlsx', 304) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1526, '1526', '569/2025', 'CD-expdte Gestiona 20260414.xlsx', 305) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1523, '1523', '564/2025', 'CD-expdte Gestiona 20260414.xlsx', 306) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1524, '1524', '567/2025', 'CD-expdte Gestiona 20260414.xlsx', 307) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1527, '1527', '570/2025', 'CD-expdte Gestiona 20260414.xlsx', 308) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1528, '1528', '578/2025', 'CD-expdte Gestiona 20260414.xlsx', 309) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1529, '1529', '579/2025', 'CD-expdte Gestiona 20260414.xlsx', 310) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1530, '1530', '580/2025', 'CD-expdte Gestiona 20260414.xlsx', 311) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-114', '571/2025', 'CD-expdte Gestiona 20260414.xlsx', 312) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1531, '1531', '582/2025', 'CD-expdte Gestiona 20260414.xlsx', 313) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-130', '590/2025', 'CD-expdte Gestiona 20260414.xlsx', 314) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1534, '1534', '593/2025', 'CD-expdte Gestiona 20260414.xlsx', 315) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-135', '604/2025', 'CD-expdte Gestiona 20260414.xlsx', 316) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1532, '1532', '589/2025', 'CD-expdte Gestiona 20260414.xlsx', 317) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1533, '1533', '592/2025', 'CD-expdte Gestiona 20260414.xlsx', 318) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1535, '1535', '594/2025', 'CD-expdte Gestiona 20260414.xlsx', 319) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1536, '1536', '595/2025', 'CD-expdte Gestiona 20260414.xlsx', 320) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1537, '1537', '598/2025', 'CD-expdte Gestiona 20260414.xlsx', 321) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1542, '1542', '609/2025', 'CD-expdte Gestiona 20260414.xlsx', 322) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-137', '619/2025', 'CD-expdte Gestiona 20260414.xlsx', 323) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1538, '1538', '599/2025', 'CD-expdte Gestiona 20260414.xlsx', 324) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1539, '1539', '602/2025', 'CD-expdte Gestiona 20260414.xlsx', 325) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1540, '1540', '607/2025', 'CD-expdte Gestiona 20260414.xlsx', 326) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1541, '1541', '608/2025', 'CD-expdte Gestiona 20260414.xlsx', 327) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1543, '1543', '610/2025', 'CD-expdte Gestiona 20260414.xlsx', 328) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1544, '1544', '611/2025', 'CD-expdte Gestiona 20260414.xlsx', 329) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1545, '1545', '614/2025', 'CD-expdte Gestiona 20260414.xlsx', 330) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1546, '1546', '615/2025', 'CD-expdte Gestiona 20260414.xlsx', 331) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1548, '1548', '622/2025', 'CD-expdte Gestiona 20260414.xlsx', 332) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1549, '1549', '623/2025', 'CD-expdte Gestiona 20260414.xlsx', 333) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1550, '1550', '624/2025', 'CD-expdte Gestiona 20260414.xlsx', 334) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1551, '1551', '625/2025', 'CD-expdte Gestiona 20260414.xlsx', 335) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1547, '1547', '616/2025', 'CD-expdte Gestiona 20260414.xlsx', 336) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1555, '1555', '630/2025', 'CD-expdte Gestiona 20260414.xlsx', 337) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1559, '1559', '638/2025', 'CD-expdte Gestiona 20260414.xlsx', 338) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1552, '1552', '626/2025', 'CD-expdte Gestiona 20260414.xlsx', 339) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1554, '1554', '629/2025', 'CD-expdte Gestiona 20260414.xlsx', 340) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-139', '631/2025', 'CD-expdte Gestiona 20260414.xlsx', 341) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-136', '618/2025', 'CD-expdte Gestiona 20260414.xlsx', 342) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1553, '1553', '628/2025', 'CD-expdte Gestiona 20260414.xlsx', 343) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1556, '1556', '634/2025', 'CD-expdte Gestiona 20260414.xlsx', 344) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1557, '1557', '635/2025', 'CD-expdte Gestiona 20260414.xlsx', 345) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1558, '1558', '636/2025', 'CD-expdte Gestiona 20260414.xlsx', 346) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-138', '627/2025', 'CD-expdte Gestiona 20260414.xlsx', 347) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1562, '1562', '640/2025', 'CD-expdte Gestiona 20260414.xlsx', 348) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1560, '1560', '637/2025', 'CD-expdte Gestiona 20260414.xlsx', 349) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1561, '1561', '639/2025', 'CD-expdte Gestiona 20260414.xlsx', 350) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1563, '1563', '641/2025', 'CD-expdte Gestiona 20260414.xlsx', 351) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1566, '1566', '648/2025', 'CD-expdte Gestiona 20260414.xlsx', 352) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1568, '1568', '649/2025', 'CD-expdte Gestiona 20260414.xlsx', 353) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1571, '1571', '655/2025', 'CD-expdte Gestiona 20260414.xlsx', 354) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1567, '1567', '650/2025', 'CD-expdte Gestiona 20260414.xlsx', 355) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1572, '1572', '656/2025', 'CD-expdte Gestiona 20260414.xlsx', 356) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1573, '1573', '657/2025', 'CD-expdte Gestiona 20260414.xlsx', 357) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1565, '1565', '647/2025', 'CD-expdte Gestiona 20260414.xlsx', 358) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1564, '1564', '646/2025', 'CD-expdte Gestiona 20260414.xlsx', 359) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1569, '1569', '653/2025', 'CD-expdte Gestiona 20260414.xlsx', 360) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1570, '1570', '654/2025', 'CD-expdte Gestiona 20260414.xlsx', 361) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-143', '651/2025', 'CD-expdte Gestiona 20260414.xlsx', 362) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1575, '1575', '661/2025', 'CD-expdte Gestiona 20260414.xlsx', 363) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1574, '1574', '658/2025', 'CD-expdte Gestiona 20260414.xlsx', 364) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1576, '1576', '662/2025', 'CD-expdte Gestiona 20260414.xlsx', 365) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1586, '1586', '686/2025', 'CD-expdte Gestiona 20260414.xlsx', 366) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1583, '1583', '679/2025', 'CD-expdte Gestiona 20260414.xlsx', 367) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1589, '1589', '705/2025', 'CD-expdte Gestiona 20260414.xlsx', 368) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1580, '1580', '669/2025', 'CD-expdte Gestiona 20260414.xlsx', 369) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-148', '675/2025', 'CD-expdte Gestiona 20260414.xlsx', 370) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1582, '1582', '678/2025', 'CD-expdte Gestiona 20260414.xlsx', 371) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1587, '1587', '687/2025', 'CD-expdte Gestiona 20260414.xlsx', 372) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1590, '1590', '706/2025', 'CD-expdte Gestiona 20260414.xlsx', 373) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1577, '1577', '663/2025', 'CD-expdte Gestiona 20260414.xlsx', 374) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1581, '1581', '670/2025', 'CD-expdte Gestiona 20260414.xlsx', 375) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-168', '672/2025', 'CD-expdte Gestiona 20260414.xlsx', 376) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1584, '1584', '680/2025', 'CD-expdte Gestiona 20260414.xlsx', 377) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1585, '1585', '683/2025', 'CD-expdte Gestiona 20260414.xlsx', 378) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1588, '1588', '704/2025', 'CD-expdte Gestiona 20260414.xlsx', 379) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1579, '1579', '668/2025', 'CD-expdte Gestiona 20260414.xlsx', 380) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1578, '1578', '664/2025', 'CD-expdte Gestiona 20260414.xlsx', 381) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-155', '685/2025', 'CD-expdte Gestiona 20260414.xlsx', 382) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1591, '1591', '707/2025', 'CD-expdte Gestiona 20260414.xlsx', 383) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1593, '1593', '709/2025', 'CD-expdte Gestiona 20260414.xlsx', 384) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1592, '1592', '708/2025', 'CD-expdte Gestiona 20260414.xlsx', 385) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1596, '1596', '714/2025', 'CD-expdte Gestiona 20260414.xlsx', 386) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1594, '1594', '710/2025', 'CD-expdte Gestiona 20260414.xlsx', 387) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1595, '1595', '711/2025', 'CD-expdte Gestiona 20260414.xlsx', 388) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1597, '1597', '712/2025', 'CD-expdte Gestiona 20260414.xlsx', 389) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1598, '1598', '715/2025', 'CD-expdte Gestiona 20260414.xlsx', 390) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1602, '1602', '719/2025', 'CD-expdte Gestiona 20260414.xlsx', 391) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1599, '1599', '716/2025', 'CD-expdte Gestiona 20260414.xlsx', 392) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1600, '1600', '717/2025', 'CD-expdte Gestiona 20260414.xlsx', 393) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1601, '1601', '718/2025', 'CD-expdte Gestiona 20260414.xlsx', 394) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-241', '702/2025', 'CD-expdte Gestiona 20260414.xlsx', 395) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1607, '1607', '727/2025', 'CD-expdte Gestiona 20260414.xlsx', 396) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1603, '1603', '723/2025', 'CD-expdte Gestiona 20260414.xlsx', 397) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1604, '1604', '724/2025', 'CD-expdte Gestiona 20260414.xlsx', 398) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1610, '1610', '734/2025', 'CD-expdte Gestiona 20260414.xlsx', 399) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1605, '1605', '725/2025', 'CD-expdte Gestiona 20260414.xlsx', 400) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1606, '1606', '726/2025', 'CD-expdte Gestiona 20260414.xlsx', 401) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1609, '1609', '733/2025', 'CD-expdte Gestiona 20260414.xlsx', 402) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1608, '1608', '732/2025', 'CD-expdte Gestiona 20260414.xlsx', 403) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-160', '721/2025', 'CD-expdte Gestiona 20260414.xlsx', 404) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1611, '1611', '735/2025', 'CD-expdte Gestiona 20260414.xlsx', 405) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1612, '1612', '736/2025', 'CD-expdte Gestiona 20260414.xlsx', 406) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1613, '1613', '737/2025', 'CD-expdte Gestiona 20260414.xlsx', 407) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1614, '1614', '738/2025', 'CD-expdte Gestiona 20260414.xlsx', 408) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-162', '728/2025', 'CD-expdte Gestiona 20260414.xlsx', 409) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-163', '729/2025', 'CD-expdte Gestiona 20260414.xlsx', 410) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1615, '1615', '739/2025', 'CD-expdte Gestiona 20260414.xlsx', 411) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1616, '1616', '740/2025', 'CD-expdte Gestiona 20260414.xlsx', 412) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1617, '1617', '741/2025', 'CD-expdte Gestiona 20260414.xlsx', 413) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1618, '1618', '749/2025', 'CD-expdte Gestiona 20260414.xlsx', 414) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1619, '1619', '750/2025', 'CD-expdte Gestiona 20260414.xlsx', 415) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1622, '1622', '753/2025', 'CD-expdte Gestiona 20260414.xlsx', 416) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1620, '1620', '751/2025', 'CD-expdte Gestiona 20260414.xlsx', 417) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1627, '1627', '758/2025', 'CD-expdte Gestiona 20260414.xlsx', 418) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1621, '1621', '752/2025', 'CD-expdte Gestiona 20260414.xlsx', 419) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1623, '1623', '754/2025', 'CD-expdte Gestiona 20260414.xlsx', 420) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1624, '1624', '755/2025', 'CD-expdte Gestiona 20260414.xlsx', 421) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1625, '1625', '756/2025', 'CD-expdte Gestiona 20260414.xlsx', 422) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1626, '1626', '757/2025', 'CD-expdte Gestiona 20260414.xlsx', 423) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1628, '1628', '759/2025', 'CD-expdte Gestiona 20260414.xlsx', 424) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-170', '747/2025', 'CD-expdte Gestiona 20260414.xlsx', 425) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1629, '1629', '760/2025', 'CD-expdte Gestiona 20260414.xlsx', 426) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1630, '1630', '761/2025', 'CD-expdte Gestiona 20260414.xlsx', 427) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1632, '1632', '763/2025', 'CD-expdte Gestiona 20260414.xlsx', 428) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1633, '1633', '764/2025', 'CD-expdte Gestiona 20260414.xlsx', 429) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1631, '1631', '762/2025', 'CD-expdte Gestiona 20260414.xlsx', 430) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1634, '1634', '765/2025', 'CD-expdte Gestiona 20260414.xlsx', 431) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1635, '1635', '766/2025', 'CD-expdte Gestiona 20260414.xlsx', 432) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1636, '1636', '768/2025', 'CD-expdte Gestiona 20260414.xlsx', 433) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1637, '1637', '778/2025', 'CD-expdte Gestiona 20260414.xlsx', 434) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1639, '1639', '782/2025', 'CD-expdte Gestiona 20260414.xlsx', 435) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1638, '1638', '780/2025', 'CD-expdte Gestiona 20260414.xlsx', 436) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1640, '1640', '783/2025', 'CD-expdte Gestiona 20260414.xlsx', 437) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1641, '1641', '784/2025', 'CD-expdte Gestiona 20260414.xlsx', 438) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1642, '1642', '785/2025', 'CD-expdte Gestiona 20260414.xlsx', 439) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1644, '1644', '791/2025', 'CD-expdte Gestiona 20260414.xlsx', 440) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1643, '1643', '786/2025', 'CD-expdte Gestiona 20260414.xlsx', 441) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1645, '1645', '792/2025', 'CD-expdte Gestiona 20260414.xlsx', 442) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1646, '1646', '793/2025', 'CD-expdte Gestiona 20260414.xlsx', 443) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1647, '1647', '794/2025', 'CD-expdte Gestiona 20260414.xlsx', 444) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1648, '1648', '795/2025', 'CD-expdte Gestiona 20260414.xlsx', 445) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1649, '1649', '796/2025', 'CD-expdte Gestiona 20260414.xlsx', 446) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1651, '1651', '799/2025', 'CD-expdte Gestiona 20260414.xlsx', 447) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1650, '1650', '798/2025', 'CD-expdte Gestiona 20260414.xlsx', 448) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1654, '1654', '805/2025', 'CD-expdte Gestiona 20260414.xlsx', 449) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1655, '1655', '806/2025', 'CD-expdte Gestiona 20260414.xlsx', 450) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1652, '1652', '803/2025', 'CD-expdte Gestiona 20260414.xlsx', 451) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1653, '1653', '804/2025', 'CD-expdte Gestiona 20260414.xlsx', 452) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1656, '1656', '810/2025', 'CD-expdte Gestiona 20260414.xlsx', 453) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1658, '1658', '817/2025', 'CD-expdte Gestiona 20260414.xlsx', 454) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1660, '1660', '819/2025', 'CD-expdte Gestiona 20260414.xlsx', 455) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1657, '1657', '811/2025', 'CD-expdte Gestiona 20260414.xlsx', 456) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1659, '1659', '818/2025', 'CD-expdte Gestiona 20260414.xlsx', 457) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1661, '1661', '820/2025', 'CD-expdte Gestiona 20260414.xlsx', 458) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-184', '813/2025', 'CD-expdte Gestiona 20260414.xlsx', 459) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-186', '815/2025', 'CD-expdte Gestiona 20260414.xlsx', 460) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1663, '1663', '822/2025', 'CD-expdte Gestiona 20260414.xlsx', 461) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-183', '812/2025', 'CD-expdte Gestiona 20260414.xlsx', 462) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1662, '1662', '821/2025', 'CD-expdte Gestiona 20260414.xlsx', 463) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-185', '814/2025', 'CD-expdte Gestiona 20260414.xlsx', 464) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-187', '823/2025', 'CD-expdte Gestiona 20260414.xlsx', 465) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1664, '1664', '824/2025', 'CD-expdte Gestiona 20260414.xlsx', 466) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1665, '1665', '825/2025', 'CD-expdte Gestiona 20260414.xlsx', 467) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1666, '1666', '826/2025', 'CD-expdte Gestiona 20260414.xlsx', 468) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1667, '1667', '829/2025', 'CD-expdte Gestiona 20260414.xlsx', 469) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1668, '1668', '830/2025', 'CD-expdte Gestiona 20260414.xlsx', 470) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1669, '1669', '833/2025', 'CD-expdte Gestiona 20260414.xlsx', 471) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-189', '834/2025', 'CD-expdte Gestiona 20260414.xlsx', 472) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1671, '1671', '837/2025', 'CD-expdte Gestiona 20260414.xlsx', 473) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1672, '1672', '838/2025', 'CD-expdte Gestiona 20260414.xlsx', 474) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1673, '1673', '839/2025', 'CD-expdte Gestiona 20260414.xlsx', 475) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1670, '1670', '836/2025', 'CD-expdte Gestiona 20260414.xlsx', 476) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1676, '1676', '846/2025', 'CD-expdte Gestiona 20260414.xlsx', 477) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1675, '1675', '845/2025', 'CD-expdte Gestiona 20260414.xlsx', 478) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1674, '1674', '844/2025', 'CD-expdte Gestiona 20260414.xlsx', 479) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1679, '1679', '852/2025', 'CD-expdte Gestiona 20260414.xlsx', 480) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1677, '1677', '850/2025', 'CD-expdte Gestiona 20260414.xlsx', 481) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1681, '1681', '860/2025', 'CD-expdte Gestiona 20260414.xlsx', 482) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1678, '1678', '851/2025', 'CD-expdte Gestiona 20260414.xlsx', 483) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1680, '1680', '859/2025', 'CD-expdte Gestiona 20260414.xlsx', 484) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1682, '1682', '861/2025', 'CD-expdte Gestiona 20260414.xlsx', 485) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1683, '1683', '862/2025', 'CD-expdte Gestiona 20260414.xlsx', 486) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1684, '1684', '865/2025', 'CD-expdte Gestiona 20260414.xlsx', 487) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1686, '1686', '873/2025', 'CD-expdte Gestiona 20260414.xlsx', 488) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1685, '1685', '871/2025', 'CD-expdte Gestiona 20260414.xlsx', 489) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1687, '1687', '874/2025', 'CD-expdte Gestiona 20260414.xlsx', 490) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1688, '1688', '875/2025', 'CD-expdte Gestiona 20260414.xlsx', 491) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1689, '1689', '878/2025', 'CD-expdte Gestiona 20260414.xlsx', 492) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1690, '1690', '879/205', 'CD-expdte Gestiona 20260414.xlsx', 493) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1691, '1691', '880/2025', 'CD-expdte Gestiona 20260414.xlsx', 494) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1692, '1692', '888/2025', 'CD-expdte Gestiona 20260414.xlsx', 495) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1693, '1693', '889/2025', 'CD-expdte Gestiona 20260414.xlsx', 496) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-381', '883/2025', 'CD-expdte Gestiona 20260414.xlsx', 497) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1694, '1694', '890/2025', 'CD-expdte Gestiona 20260414.xlsx', 498) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1695, '1695', '891/2025', 'CD-expdte Gestiona 20260414.xlsx', 499) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1696, '1696', '892/2025', 'CD-expdte Gestiona 20260414.xlsx', 500) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1697, '1697', '893/2025', 'CD-expdte Gestiona 20260414.xlsx', 501) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1698, '1698', '897/2025', 'CD-expdte Gestiona 20260414.xlsx', 502) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1699, '1699', '900/2025', 'CD-expdte Gestiona 20260414.xlsx', 503) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1700, '1700', '901/2025', 'CD-expdte Gestiona 20260414.xlsx', 504) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1701, '1701', '904/2025', 'CD-expdte Gestiona 20260414.xlsx', 505) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-213', '910/2025', 'CD-expdte Gestiona 20260414.xlsx', 506) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1704, '1704', '909/2025', 'CD-expdte Gestiona 20260414.xlsx', 507) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1702, '1702', '907/2025', 'CD-expdte Gestiona 20260414.xlsx', 508) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1703, '1703', '908/2025', 'CD-expdte Gestiona 20260414.xlsx', 509) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1705, '1705', '913/2025', 'CD-expdte Gestiona 20260414.xlsx', 510) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1706, '1706', '914/2025', 'CD-expdte Gestiona 20260414.xlsx', 511) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1707, '1707', '915/2025', 'CD-expdte Gestiona 20260414.xlsx', 512) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1708, '1708', '916/2025', 'CD-expdte Gestiona 20260414.xlsx', 513) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1710, '1710', '921/2025', 'CD-expdte Gestiona 20260414.xlsx', 514) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1711, '1711', '922/2025', 'CD-expdte Gestiona 20260414.xlsx', 515) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1709, '1709', '918/2025', 'CD-expdte Gestiona 20260414.xlsx', 516) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1712, '1712', '923/2025', 'CD-expdte Gestiona 20260414.xlsx', 517) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1713, '1713', '924/2025', 'CD-expdte Gestiona 20260414.xlsx', 518) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1715, '1715', '935/2025', 'CD-expdte Gestiona 20260414.xlsx', 519) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1716, '1716', '936/2025', 'CD-expdte Gestiona 20260414.xlsx', 520) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1714, '1714', '934/2025', 'CD-expdte Gestiona 20260414.xlsx', 521) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1717, '1717', '937/2025', 'CD-expdte Gestiona 20260414.xlsx', 522) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1718, '1718', '938/2025', 'CD-expdte Gestiona 20260414.xlsx', 523) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1719, '1719', '939/2025', 'CD-expdte Gestiona 20260414.xlsx', 524) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1720, '1720', '940/2025', 'CD-expdte Gestiona 20260414.xlsx', 525) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1730, '1730', '951/2025', 'CD-expdte Gestiona 20260414.xlsx', 526) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1721, '1721', '941/2025', 'CD-expdte Gestiona 20260414.xlsx', 527) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1723, '1723', '944/2025', 'CD-expdte Gestiona 20260414.xlsx', 528) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1724, '1724', '945/2025', 'CD-expdte Gestiona 20260414.xlsx', 529) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1727, '1727', '948/2025', 'CD-expdte Gestiona 20260414.xlsx', 530) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1722, '1722', '942/2025', 'CD-expdte Gestiona 20260414.xlsx', 531) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1725, '1725', '946/2025', 'CD-expdte Gestiona 20260414.xlsx', 532) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1726, '1726', '947/2025', 'CD-expdte Gestiona 20260414.xlsx', 533) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1728, '1728', '949/2025', 'CD-expdte Gestiona 20260414.xlsx', 534) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1729, '1729', '950/2025', 'CD-expdte Gestiona 20260414.xlsx', 535) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1731, '1731', '952/2025', 'CD-expdte Gestiona 20260414.xlsx', 536) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1732, '1732', '953/2025', 'CD-expdte Gestiona 20260414.xlsx', 537) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1734, '1734', '955/2025', 'CD-expdte Gestiona 20260414.xlsx', 538) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1736, '1736', '959/2025', 'CD-expdte Gestiona 20260414.xlsx', 539) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-226', '961/2025', 'CD-expdte Gestiona 20260414.xlsx', 540) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1735, '1735', '958/2025', 'CD-expdte Gestiona 20260414.xlsx', 541) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1733, '1733', '954/2025', 'CD-expdte Gestiona 20260414.xlsx', 542) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1737, '1737', '960/2025', 'CD-expdte Gestiona 20260414.xlsx', 543) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1738, '1738', '964/2025', 'CD-expdte Gestiona 20260414.xlsx', 544) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1739, '1739', '965/2025', 'CD-expdte Gestiona 20260414.xlsx', 545) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1740, '1740', '966/2025', 'CD-expdte Gestiona 20260414.xlsx', 546) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1741, '1741', '967/2025', 'CD-expdte Gestiona 20260414.xlsx', 547) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1742, '1742', '968/2025', 'CD-expdte Gestiona 20260414.xlsx', 548) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1743, '1743', '969/2025', 'CD-expdte Gestiona 20260414.xlsx', 549) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1744, '1744', '970/2025', 'CD-expdte Gestiona 20260414.xlsx', 550) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1745, '1745', '971/2025', 'CD-expdte Gestiona 20260414.xlsx', 551) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1748, '1748', '974/2025', 'CD-expdte Gestiona 20260414.xlsx', 552) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-229', '977/2025', 'CD-expdte Gestiona 20260414.xlsx', 553) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1746, '1746', '972/2025', 'CD-expdte Gestiona 20260414.xlsx', 554) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1747, '1747', '973/2025', 'CD-expdte Gestiona 20260414.xlsx', 555) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1750, '1750', '979/2025', 'CD-expdte Gestiona 20260414.xlsx', 556) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1752, '1752', '982/2025', 'CD-expdte Gestiona 20260414.xlsx', 557) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1749, '1749', '978/2025', 'CD-expdte Gestiona 20260414.xlsx', 558) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1751, '1751', '980/2025', 'CD-expdte Gestiona 20260414.xlsx', 559) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1753, '1753', '983/2025', 'CD-expdte Gestiona 20260414.xlsx', 560) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1754, '1754', '985/2025', 'CD-expdte Gestiona 20260414.xlsx', 561) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1756, '1756', '989/2025', 'CD-expdte Gestiona 20260414.xlsx', 562) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1755, '1755', '988/2025', 'CD-expdte Gestiona 20260414.xlsx', 563) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1757, '1757', '990/2025', 'CD-expdte Gestiona 20260414.xlsx', 564) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1758, '1758', '991/2025', 'CD-expdte Gestiona 20260414.xlsx', 565) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1760, '1760', '993/2025', 'CD-expdte Gestiona 20260414.xlsx', 566) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1762, '1762', '995/2025', 'CD-expdte Gestiona 20260414.xlsx', 567) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1765, '1765', '1003/2025', 'CD-expdte Gestiona 20260414.xlsx', 568) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1764, '1764', '998/2025', 'CD-expdte Gestiona 20260414.xlsx', 569) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1759, '1759', '992/2025', 'CD-expdte Gestiona 20260414.xlsx', 570) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1761, '1761', '994/2025', 'CD-expdte Gestiona 20260414.xlsx', 571) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1763, '1763', '996/2025', 'CD-expdte Gestiona 20260414.xlsx', 572) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1767, '1767', '1005/2025', 'CD-expdte Gestiona 20260414.xlsx', 573) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1771, '1771', '1010/2025', 'CD-expdte Gestiona 20260414.xlsx', 574) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1772, '1772', '1011/2025', 'CD-expdte Gestiona 20260414.xlsx', 575) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1773, '1773', '1013/2025', 'CD-expdte Gestiona 20260414.xlsx', 576) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1766, '1766', '1004/2025', 'CD-expdte Gestiona 20260414.xlsx', 577) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1768, '1768', '1007/2025', 'CD-expdte Gestiona 20260414.xlsx', 578) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1774, '1774', '1014/2025', 'CD-expdte Gestiona 20260414.xlsx', 579) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1769, '1769', '1008/2025', 'CD-expdte Gestiona 20260414.xlsx', 580) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1770, '1770', '1009/2025', 'CD-expdte Gestiona 20260414.xlsx', 581) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1775, '1775', '1015/2025', 'CD-expdte Gestiona 20260414.xlsx', 582) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1779, '1779', '1020/2025', 'CD-expdte Gestiona 20260414.xlsx', 583) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1780, '1780', '1021/2025', 'CD-expdte Gestiona 20260414.xlsx', 584) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1776, '1776', '1016/2025', 'CD-expdte Gestiona 20260414.xlsx', 585) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1777, '1777', '1018/2025', 'CD-expdte Gestiona 20260414.xlsx', 586) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1778, '1778', '1019/2025', 'CD-expdte Gestiona 20260414.xlsx', 587) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1781, '1781', '1022/2025', 'CD-expdte Gestiona 20260414.xlsx', 588) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1782, '1782', '1023/2025', 'CD-expdte Gestiona 20260414.xlsx', 589) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1783, '1783', '643/2025', 'CD-expdte Gestiona 20260414.xlsx', 590) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1784, '1784', '1027/2025', 'CD-expdte Gestiona 20260414.xlsx', 591) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1787, '1787', '1035/2025', 'CD-expdte Gestiona 20260414.xlsx', 592) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1785, '1785', '1029/2025', 'CD-expdte Gestiona 20260414.xlsx', 593) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1789, '1789', '1036/2025', 'CD-expdte Gestiona 20260414.xlsx', 594) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1790, '1790', '1039/2025', 'CD-expdte Gestiona 20260414.xlsx', 595) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1791, '1791', '1040/2025', 'CD-expdte Gestiona 20260414.xlsx', 596) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1792, '1792', '1041/20205', 'CD-expdte Gestiona 20260414.xlsx', 597) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1793, '1793', '1042/2025', 'CD-expdte Gestiona 20260414.xlsx', 598) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-247', '1043/2025', 'CD-expdte Gestiona 20260414.xlsx', 599) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1794, '1794', '1048/2025', 'CD-expdte Gestiona 20260414.xlsx', 600) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-263', '1052/2025', 'CD-expdte Gestiona 20260414.xlsx', 601) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1795, '1795', '1049/2025', 'CD-expdte Gestiona 20260414.xlsx', 602) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1796, '1796', '1053/2025', 'CD-expdte Gestiona 20260414.xlsx', 603) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1797, '1797', '1054/2025', 'CD-expdte Gestiona 20260414.xlsx', 604) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1799, '1799', '1056/2025', 'CD-expdte Gestiona 20260414.xlsx', 605) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1798, '1798', '1055/2025', 'CD-expdte Gestiona 20260414.xlsx', 606) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1800, '1800', '1057/2025', 'CD-expdte Gestiona 20260414.xlsx', 607) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1802, '1802', '1059/2025', 'CD-expdte Gestiona 20260414.xlsx', 608) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1803, '1803', '1060/2025', 'CD-expdte Gestiona 20260414.xlsx', 609) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1804, '1804', '1061/2025', 'CD-expdte Gestiona 20260414.xlsx', 610) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1805, '1805', '1062/2025', 'CD-expdte Gestiona 20260414.xlsx', 611) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-264', '1066/2025', 'CD-expdte Gestiona 20260414.xlsx', 612) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1806, '1806', '1063/2025', 'CD-expdte Gestiona 20260414.xlsx', 613) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1807, '1807', '1067/2025', 'CD-expdte Gestiona 20260414.xlsx', 614) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1808, '1808', '1068/2025', 'CD-expdte Gestiona 20260414.xlsx', 615) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1809, '1809', '1069/2025', 'CD-expdte Gestiona 20260414.xlsx', 616) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1801, '1801', '1058/2025', 'CD-expdte Gestiona 20260414.xlsx', 617) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1810, '1810', '1070/2025', 'CD-expdte Gestiona 20260414.xlsx', 618) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1811, '1811', '1071/2025', 'CD-expdte Gestiona 20260414.xlsx', 619) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1812, '1812', '1072/2025', 'CD-expdte Gestiona 20260414.xlsx', 620) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1813, '1813', '1073/2025', 'CD-expdte Gestiona 20260414.xlsx', 621) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1814, '1814', '1081/2025', 'CD-expdte Gestiona 20260414.xlsx', 622) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1815, '1815', '1084/2025', 'CD-expdte Gestiona 20260414.xlsx', 623) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1818, '1818', '1088/2025', 'CD-expdte Gestiona 20260414.xlsx', 624) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1817, '1817', '1087/2025', 'CD-expdte Gestiona 20260414.xlsx', 625) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1816, '1816', '1085/2025', 'CD-expdte Gestiona 20260414.xlsx', 626) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1819, '1819', '1089/2025', 'CD-expdte Gestiona 20260414.xlsx', 627) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1820, '1820', '1090/2025', 'CD-expdte Gestiona 20260414.xlsx', 628) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1821, '1821', '1091/2025', 'CD-expdte Gestiona 20260414.xlsx', 629) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-276', '1086/2025', 'CD-expdte Gestiona 20260414.xlsx', 630) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1822, '1822', '1092/2025', 'CD-expdte Gestiona 20260414.xlsx', 631) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-338', '843/2025', 'CD-expdte Gestiona 20260414.xlsx', 632) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '1786 - 1788', '1034/2025', 'CD-expdte Gestiona 20260414.xlsx', 633) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-280', '1095/2025', 'CD-expdte Gestiona 20260414.xlsx', 634) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1825, '1825', '1109/2025', 'CD-expdte Gestiona 20260414.xlsx', 635) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2024-E-RE-833', '903/2025', 'CD-expdte Gestiona 20260414.xlsx', 636) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-276', '1093/2025', 'CD-expdte Gestiona 20260414.xlsx', 637) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1823, '1823', '1107/2025', 'CD-expdte Gestiona 20260414.xlsx', 638) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1824, '1824', '1108/2025', 'CD-expdte Gestiona 20260414.xlsx', 639) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1827, '1827', '1111/2025', 'CD-expdte Gestiona 20260414.xlsx', 640) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1826, '1826', '1110/2025', 'CD-expdte Gestiona 20260414.xlsx', 641) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1828, '1828', '1112/2025', 'CD-expdte Gestiona 20260414.xlsx', 642) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1829, '1829', '1113/2025', 'CD-expdte Gestiona 20260414.xlsx', 643) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1834, '1834', '1118/2025', 'CD-expdte Gestiona 20260414.xlsx', 644) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1831, '1831', '1115/2025', 'CD-expdte Gestiona 20260414.xlsx', 645) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-527', '1100/2025', 'CD-expdte Gestiona 20260414.xlsx', 646) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-285', '1103/2025', 'CD-expdte Gestiona 20260414.xlsx', 647) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1830, '1830', '1114/2025', 'CD-expdte Gestiona 20260414.xlsx', 648) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1832, '1832', '1116/2025', 'CD-expdte Gestiona 20260414.xlsx', 649) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1833, '1833', '1117/2025', 'CD-expdte Gestiona 20260414.xlsx', 650) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-534', '1104/2025', 'CD-expdte Gestiona 20260414.xlsx', 651) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1838, '1838', '1122/2025', 'CD-expdte Gestiona 20260414.xlsx', 652) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1839, '1839', '1123/2025', 'CD-expdte Gestiona 20260414.xlsx', 653) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1835, '1835', '1119/2025', 'CD-expdte Gestiona 20260414.xlsx', 654) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1836, '1836', '1120/2025', 'CD-expdte Gestiona 20260414.xlsx', 655) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1837, '1837', '1121/2025', 'CD-expdte Gestiona 20260414.xlsx', 656) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1840, '1840', '1124/2025', 'CD-expdte Gestiona 20260414.xlsx', 657) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1841, '1841', '1125/2025', 'CD-expdte Gestiona 20260414.xlsx', 658) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1842, '1842', '1126/2025', 'CD-expdte Gestiona 20260414.xlsx', 659) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1844, '1844', '1128/2025', 'CD-expdte Gestiona 20260414.xlsx', 660) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1845, '1845', '1129/2025', 'CD-expdte Gestiona 20260414.xlsx', 661) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1846, '1846', '1130/2025', 'CD-expdte Gestiona 20260414.xlsx', 662) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1847, '1847', '1131/2025', 'CD-expdte Gestiona 20260414.xlsx', 663) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1843, '1843', '1127/2025', 'CD-expdte Gestiona 20260414.xlsx', 664) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-287', '1133/2025', 'CD-expdte Gestiona 20260414.xlsx', 665) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1848, '1848', '1147/2025', 'CD-expdte Gestiona 20260414.xlsx', 666) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1849, '1849', '1148/2025', 'CD-expdte Gestiona 20260414.xlsx', 667) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1850, '1850', '1149/2025', 'CD-expdte Gestiona 20260414.xlsx', 668) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1852, '1852', '1152/2025', 'CD-expdte Gestiona 20260414.xlsx', 669) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1853, '1853', '1154/2025', 'CD-expdte Gestiona 20260414.xlsx', 670) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1854, '1854', '1155/2025', 'CD-expdte Gestiona 20260414.xlsx', 671) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1855, '1855', '1156/2025', 'CD-expdte Gestiona 20260414.xlsx', 672) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1857, '1857', '1158/2025', 'CD-expdte Gestiona 20260414.xlsx', 673) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-288', '1150/2025', 'CD-expdte Gestiona 20260414.xlsx', 674) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1856, '1856', '1157/2025', 'CD-expdte Gestiona 20260414.xlsx', 675) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1851, '1851', '1151/2025', 'CD-expdte Gestiona 20260414.xlsx', 676) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1858, '1858', '1159/2025', 'CD-expdte Gestiona 20260414.xlsx', 677) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1859, '1859', '1165/2025', 'CD-expdte Gestiona 20260414.xlsx', 678) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1860, '1860', '1166/2025', 'CD-expdte Gestiona 20260414.xlsx', 679) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1861, '1861', '1167/2025', 'CD-expdte Gestiona 20260414.xlsx', 680) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1863, '1863', '1169/2025', 'CD-expdte Gestiona 20260414.xlsx', 681) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1862, '1862', '1168/2025', 'CD-expdte Gestiona 20260414.xlsx', 682) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1864, '1864', '1170/2025', 'CD-expdte Gestiona 20260414.xlsx', 683) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1868, '1868', '1186/2025', 'CD-expdte Gestiona 20260414.xlsx', 684) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1865, '1865', '1171/2025', 'CD-expdte Gestiona 20260414.xlsx', 685) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1866, '1866', '1172/2025', 'CD-expdte Gestiona 20260414.xlsx', 686) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1867, '1867', '1173/2025', 'CD-expdte Gestiona 20260414.xlsx', 687) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1869, '1869', '1187/2028', 'CD-expdte Gestiona 20260414.xlsx', 688) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1870, '1870', '1188/2025', 'CD-expdte Gestiona 20260414.xlsx', 689) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1871, '1871', '1189/2025', 'CD-expdte Gestiona 20260414.xlsx', 690) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1872, '1872', '1192/2025', 'CD-expdte Gestiona 20260414.xlsx', 691) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1873, '1873', '1193/2025', 'CD-expdte Gestiona 20260414.xlsx', 692) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1875, '1875', '1195/2025', 'CD-expdte Gestiona 20260414.xlsx', 693) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1874, '1874', '1194/2025', 'CD-expdte Gestiona 20260414.xlsx', 694) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1876, '1876', '1196/2025', 'CD-expdte Gestiona 20260414.xlsx', 695) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-301', '1175/2025', 'CD-expdte Gestiona 20260414.xlsx', 696) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1878, '1878', '1198/2025', 'CD-expdte Gestiona 20260414.xlsx', 697) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-300', '1641/2025', 'CD-expdte Gestiona 20260414.xlsx', 698) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1877, '1877', '1197/2025', 'CD-expdte Gestiona 20260414.xlsx', 699) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1879, '1879', '1199/2025', 'CD-expdte Gestiona 20260414.xlsx', 700) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1881, '1881', '1201/2025', 'CD-expdte Gestiona 20260414.xlsx', 701) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1882, '1882', '1202/2025', 'CD-expdte Gestiona 20260414.xlsx', 702) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1883, '1883', '1203/2025', 'CD-expdte Gestiona 20260414.xlsx', 703) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1885, '1885', '1205/2025', 'CD-expdte Gestiona 20260414.xlsx', 704) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1886, '1886', '1206/2025', 'CD-expdte Gestiona 20260414.xlsx', 705) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1880, '1880', '1200/2025', 'CD-expdte Gestiona 20260414.xlsx', 706) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1884, '1884', '1204/2025', 'CD-expdte Gestiona 20260414.xlsx', 707) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1887, '1887', '1207/2025', 'CD-expdte Gestiona 20260414.xlsx', 708) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1888, '1888', '1208/2025', 'CD-expdte Gestiona 20260414.xlsx', 709) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1889, '1889', '1209/2025', 'CD-expdte Gestiona 20260414.xlsx', 710) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-305', '1179/2025', 'CD-expdte Gestiona 20260414.xlsx', 711) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1890, '1890', '1210/2025', 'CD-expdte Gestiona 20260414.xlsx', 712) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1892, '1892', '1212/2025', 'CD-expdte Gestiona 20260414.xlsx', 713) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-310', '1183/2025', 'CD-expdte Gestiona 20260414.xlsx', 714) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1891, '1891', '1211/2025', 'CD-expdte Gestiona 20260414.xlsx', 715) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1894, '1894', '1214/2025', 'CD-expdte Gestiona 20260414.xlsx', 716) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1895, '1895', '1215/2025', 'CD-expdte Gestiona 20260414.xlsx', 717) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1896, '1896', '1216/2025', 'CD-expdte Gestiona 20260414.xlsx', 718) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1893, '1893', '1213/2025', 'CD-expdte Gestiona 20260414.xlsx', 719) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1897, '1897', '1217/2025', 'CD-expdte Gestiona 20260414.xlsx', 720) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1898, '1898', '1218/2025', 'CD-expdte Gestiona 20260414.xlsx', 721) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1899, '1899', '1219/2025', 'CD-expdte Gestiona 20260414.xlsx', 722) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1900, '1900', '1220/2025', 'CD-expdte Gestiona 20260414.xlsx', 723) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1901, '1901', '1221/2025', 'CD-expdte Gestiona 20260414.xlsx', 724) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1902, '1902', '1222/2025', 'CD-expdte Gestiona 20260414.xlsx', 725) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1903, '1903', '1223/2025', 'CD-expdte Gestiona 20260414.xlsx', 726) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1904, '1904', '1224/2025', 'CD-expdte Gestiona 20260414.xlsx', 727) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1905, '1905', '1227/2025', 'CD-expdte Gestiona 20260414.xlsx', 728) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1906, '1906', '1229/2025', 'CD-expdte Gestiona 20260414.xlsx', 729) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1907, '1907', '1230/2025', 'CD-expdte Gestiona 20260414.xlsx', 730) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-576', '1228/2025', 'CD-expdte Gestiona 20260414.xlsx', 731) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1909, '1909', '1233/2025', 'CD-expdte Gestiona 20260414.xlsx', 732) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1908, '1908', '1231/2025', 'CD-expdte Gestiona 20260414.xlsx', 733) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1910, '1910', '1234/2025', 'CD-expdte Gestiona 20260414.xlsx', 734) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1911, '1911', '1235/2025', 'CD-expdte Gestiona 20260414.xlsx', 735) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1912, '1912', '1236/2025', 'CD-expdte Gestiona 20260414.xlsx', 736) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-319', '1237/2025', 'CD-expdte Gestiona 20260414.xlsx', 737) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1913, '1913', '1240/2025', 'CD-expdte Gestiona 20260414.xlsx', 738) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1914, '1914', '1241/2025', 'CD-expdte Gestiona 20260414.xlsx', 739) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1915, '1915', '1242/2025', 'CD-expdte Gestiona 20260414.xlsx', 740) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1916, '1916', '1243/2025', 'CD-expdte Gestiona 20260414.xlsx', 741) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1917, '1917', '1245/2025', 'CD-expdte Gestiona 20260414.xlsx', 742) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1918, '1918', '1246/2025', 'CD-expdte Gestiona 20260414.xlsx', 743) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-321', '1244/2025', 'CD-expdte Gestiona 20260414.xlsx', 744) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1919, '1919', '1247/2025', 'CD-expdte Gestiona 20260414.xlsx', 745) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1920, '1920', '1248/2025', 'CD-expdte Gestiona 20260414.xlsx', 746) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1921, '1921', '1249/2025', 'CD-expdte Gestiona 20260414.xlsx', 747) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-320', '1239/2025', 'CD-expdte Gestiona 20260414.xlsx', 748) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1922, '1922', '1250/2025', 'CD-expdte Gestiona 20260414.xlsx', 749) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1924, '1924', '1252/2025', 'CD-expdte Gestiona 20260414.xlsx', 750) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1923, '1923', '1251/2025', 'CD-expdte Gestiona 20260414.xlsx', 751) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1925, '1925', '1253/2025', 'CD-expdte Gestiona 20260414.xlsx', 752) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1927, '1927', '1255/2025', 'CD-expdte Gestiona 20260414.xlsx', 753) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1928, '1928', '1259/2025', 'CD-expdte Gestiona 20260414.xlsx', 754) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1926, '1926', '1254/2025', 'CD-expdte Gestiona 20260414.xlsx', 755) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-328', '1256/2025', 'CD-expdte Gestiona 20260414.xlsx', 756) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-329', '1258/2025', 'CD-expdte Gestiona 20260414.xlsx', 757) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1929, '1929', '1260/2025', 'CD-expdte Gestiona 20260414.xlsx', 758) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1930, '1930', '1261/2025', 'CD-expdte Gestiona 20260414.xlsx', 759) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1932, '1932', '1263/2025', 'CD-expdte Gestiona 20260414.xlsx', 760) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1931, '1931', '1262/2025', 'CD-expdte Gestiona 20260414.xlsx', 761) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1933, '1933', '1264/2025', 'CD-expdte Gestiona 20260414.xlsx', 762) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1934, '1934', '1265/2025', 'CD-expdte Gestiona 20260414.xlsx', 763) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1935, '1935', '1266/2025', 'CD-expdte Gestiona 20260414.xlsx', 764) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1936, '1936', '1267/2025', 'CD-expdte Gestiona 20260414.xlsx', 765) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1938, '1938', '1269/2025', 'CD-expdte Gestiona 20260414.xlsx', 766) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1937, '1937', '1268/2025', 'CD-expdte Gestiona 20260414.xlsx', 767) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1939, '1939', '1270/2025', 'CD-expdte Gestiona 20260414.xlsx', 768) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1940, '1940', '1271/2025', 'CD-expdte Gestiona 20260414.xlsx', 769) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1941, '1941', '1272/2025', 'CD-expdte Gestiona 20260414.xlsx', 770) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1942, '1942', '1273/2025', 'CD-expdte Gestiona 20260414.xlsx', 771) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1943, '1943', '1274/2025', 'CD-expdte Gestiona 20260414.xlsx', 772) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1944, '1944', '1279/2025', 'CD-expdte Gestiona 20260414.xlsx', 773) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1945, '1945', '1275/2025', 'CD-expdte Gestiona 20260414.xlsx', 774) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1946, '1946', '1276/2025', 'CD-expdte Gestiona 20260414.xlsx', 775) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1947, '1947', '1277/2025', 'CD-expdte Gestiona 20260414.xlsx', 776) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1948, '1948', '1286/2025', 'CD-expdte Gestiona 20260414.xlsx', 777) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1949, '1949', '1285/2025', 'CD-expdte Gestiona 20260414.xlsx', 778) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1950, '1950', '1280/2025', 'CD-expdte Gestiona 20260414.xlsx', 779) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-338', '1288/2025', 'CD-expdte Gestiona 20260414.xlsx', 780) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1954, '1954', '1291/2025', 'CD-expdte Gestiona 20260414.xlsx', 782) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1952, '1952', '1289/2025', 'CD-expdte Gestiona 20260414.xlsx', 783) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1953, '1953', '1290/2025', 'CD-expdte Gestiona 20260414.xlsx', 784) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1954, '1954', '1292/2025', 'CD-expdte Gestiona 20260414.xlsx', 785) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1955, '1955', '1293/2025', 'CD-expdte Gestiona 20260414.xlsx', 786) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1956, '1956', '1294/2025', 'CD-expdte Gestiona 20260414.xlsx', 787) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1957, '1957', '1295/2025', 'CD-expdte Gestiona 20260414.xlsx', 788) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1959, '1959', '1298/2025', 'CD-expdte Gestiona 20260414.xlsx', 789) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-339', '1296/2025', 'CD-expdte Gestiona 20260414.xlsx', 790) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-341', '1300/2025', 'CD-expdte Gestiona 20260414.xlsx', 794) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1960, '1960', '1301/2025', 'CD-expdte Gestiona 20260414.xlsx', 795) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-340', '1299/2025', 'CD-expdte Gestiona 20260414.xlsx', 796) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1969, '1969', '1310/2025', 'CD-expdte Gestiona 20260414.xlsx', 800) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1968, '1968', '1309/2025', 'CD-expdte Gestiona 20260414.xlsx', 801) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1969, '1969', '1307/2025', 'CD-expdte Gestiona 20260414.xlsx', 802) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1972, '1972', '1315/2025', 'CD-expdte Gestiona 20260414.xlsx', 803) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1971, '1971', '1314/2025', 'CD-expdte Gestiona 20260414.xlsx', 804) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1973, '1973', '1316/2025', 'CD-expdte Gestiona 20260414.xlsx', 805) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1970, '1970', '1313/2025', 'CD-expdte Gestiona 20260414.xlsx', 806) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-343', '1312/2025', 'CD-expdte Gestiona 20260414.xlsx', 807) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1974, '1974', '1317/2025', 'CD-expdte Gestiona 20260414.xlsx', 808) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1975, '1975', '1336/2025', 'CD-expdte Gestiona 20260414.xlsx', 809) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1976, '1976', '1337/2025', 'CD-expdte Gestiona 20260414.xlsx', 810) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1977, '1977', '1338/2025', 'CD-expdte Gestiona 20260414.xlsx', 811) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-347', '1319/2025', 'CD-expdte Gestiona 20260414.xlsx', 812) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1978, '1978', '1339/2025', 'CD-expdte Gestiona 20260414.xlsx', 813) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1981, '1981', '1342/2025', 'CD-expdte Gestiona 20260414.xlsx', 814) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-349', '1321/2025', 'CD-expdte Gestiona 20260414.xlsx', 815) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1979, '1979', '1340/2025', 'CD-expdte Gestiona 20260414.xlsx', 816) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1980, '1980', '1341/2025', 'CD-expdte Gestiona 20260414.xlsx', 817) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1983, '1983', '1344/2025', 'CD-expdte Gestiona 20260414.xlsx', 818) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-351', '1327/2025', 'CD-expdte Gestiona 20260414.xlsx', 819) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1982, '1982', '1343/2025', 'CD-expdte Gestiona 20260414.xlsx', 820) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1984, '1984', '1345/2025', 'CD-expdte Gestiona 20260414.xlsx', 821) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1986, '1986', '1346/2025', 'CD-expdte Gestiona 20260414.xlsx', 822) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1985, '1985', '1347/2025', 'CD-expdte Gestiona 20260414.xlsx', 823) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1987, '1987', '1348/2025', 'CD-expdte Gestiona 20260414.xlsx', 824) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1989, '1989', '1350/2025', 'CD-expdte Gestiona 20260414.xlsx', 825) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1988, '1988', '1349/2025', 'CD-expdte Gestiona 20260414.xlsx', 826) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1990, '1990', '1351/2025', 'CD-expdte Gestiona 20260414.xlsx', 827) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1991, '1991', '1352/2025', 'CD-expdte Gestiona 20260414.xlsx', 828) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1992, '1992', '1353/2025', 'CD-expdte Gestiona 20260414.xlsx', 829) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1994, '1994', '1357/2025', 'CD-expdte Gestiona 20260414.xlsx', 830) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1993, '1993', '1354/2025', 'CD-expdte Gestiona 20260414.xlsx', 831) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1995, '1995', '1358/2025', 'CD-expdte Gestiona 20260414.xlsx', 832) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1998, '1998', '1364/2025', 'CD-expdte Gestiona 20260414.xlsx', 833) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2002, '2002', '1368/2025', 'CD-expdte Gestiona 20260414.xlsx', 834) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-357', '1359/2025', 'CD-expdte Gestiona 20260414.xlsx', 835) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2000, '2000', '1366/2025', 'CD-expdte Gestiona 20260414.xlsx', 836) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1996, '1996', '1360/2025', 'CD-expdte Gestiona 20260414.xlsx', 837) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1997, '1997', '1361/2025', 'CD-expdte Gestiona 20260414.xlsx', 838) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-361', '1362/2025', 'CD-expdte Gestiona 20260414.xlsx', 839) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (1999, '1999', '1365/2025', 'CD-expdte Gestiona 20260414.xlsx', 840) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2001, '2001', '1367/2025', 'CD-expdte Gestiona 20260414.xlsx', 841) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2003, '2003', '1369/2025', 'CD-expdte Gestiona 20260414.xlsx', 842) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2004, '2004', '1370/2025', 'CD-expdte Gestiona 20260414.xlsx', 843) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2007, '2007', '1384/2025', 'CD-expdte Gestiona 20260414.xlsx', 844) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2005, '2005', '1380/2025', 'CD-expdte Gestiona 20260414.xlsx', 845) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2006, '2006', '1383/2025', 'CD-expdte Gestiona 20260414.xlsx', 846) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2009, '2009', '1386/2025', 'CD-expdte Gestiona 20260414.xlsx', 847) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2008, '2008', '1385/2025', 'CD-expdte Gestiona 20260414.xlsx', 848) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2010, '2010', '1387/2025', 'CD-expdte Gestiona 20260414.xlsx', 849) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2011, '2011', '1388/2025', 'CD-expdte Gestiona 20260414.xlsx', 850) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2012, '2012', '1389/2025', 'CD-expdte Gestiona 20260414.xlsx', 851) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2013, '2013', '1394/2025', 'CD-expdte Gestiona 20260414.xlsx', 852) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2014, '2014', '1396/2025', 'CD-expdte Gestiona 20260414.xlsx', 853) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2015, '2015', '1397/2025', 'CD-expdte Gestiona 20260414.xlsx', 854) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-381', '1395/2025', 'CD-expdte Gestiona 20260414.xlsx', 855) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2016, '2016', '1402/2025', 'CD-expdte Gestiona 20260414.xlsx', 856) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-384', '1404/2025', 'CD-expdte Gestiona 20260414.xlsx', 858) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-385', '1407/2025', 'CD-expdte Gestiona 20260414.xlsx', 859) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2018, '2018', '1409/2025', 'CD-expdte Gestiona 20260414.xlsx', 860) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2020, '2020', '1411/2025', 'CD-expdte Gestiona 20260414.xlsx', 861) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2021, '2021', '1412/2025', 'CD-expdte Gestiona 20260414.xlsx', 862) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2023, '2023', '1414/2025', 'CD-expdte Gestiona 20260414.xlsx', 863) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2019, '2019', '1410/2025', 'CD-expdte Gestiona 20260414.xlsx', 864) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2022, '2022', '1413/2025', 'CD-expdte Gestiona 20260414.xlsx', 865) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2024, '2024', '1415/2025', 'CD-expdte Gestiona 20260414.xlsx', 866) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2025, '2025', '1426/2025', 'CD-expdte Gestiona 20260414.xlsx', 867) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2026, '2026', '1427/2025', 'CD-expdte Gestiona 20260414.xlsx', 868) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2027, '2027', '1428/2025', 'CD-expdte Gestiona 20260414.xlsx', 869) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2028, '2028', '1429/2025', 'CD-expdte Gestiona 20260414.xlsx', 870) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2029, '2029', '1430/2025', 'CD-expdte Gestiona 20260414.xlsx', 871) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2030, '2030', '1431/2025', 'CD-expdte Gestiona 20260414.xlsx', 872) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2032, '2032', '1439/2025', 'CD-expdte Gestiona 20260414.xlsx', 873) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2031, '2031', '1438/2025', 'CD-expdte Gestiona 20260414.xlsx', 874) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2034, '2034', '1445/2025', 'CD-expdte Gestiona 20260414.xlsx', 875) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-387', '1441/2025', 'CD-expdte Gestiona 20260414.xlsx', 876) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (446, '446', '1443/2025', 'CD-expdte Gestiona 20260414.xlsx', 877) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2033, '2033', '1444/2025', 'CD-expdte Gestiona 20260414.xlsx', 878) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2035, '2035', '1446/2025', 'CD-expdte Gestiona 20260414.xlsx', 879) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2036, '2036', '1452/2025', 'CD-expdte Gestiona 20260414.xlsx', 880) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-678', '1455/2025', 'CD-expdte Gestiona 20260414.xlsx', 881) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2038, '2038', '1459/2025', 'CD-expdte Gestiona 20260414.xlsx', 882) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2040, '2040', '1465/2025', 'CD-expdte Gestiona 20260414.xlsx', 883) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-393', '1457/2025', 'CD-expdte Gestiona 20260414.xlsx', 884) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2037, '2037', '1458/2025', 'CD-expdte Gestiona 20260414.xlsx', 885) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2039, '2039', '1464/2025', 'CD-expdte Gestiona 20260414.xlsx', 886) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2041, '2041', '1466/2025', 'CD-expdte Gestiona 20260414.xlsx', 887) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2042, '2042', '1467/2025', 'CD-expdte Gestiona 20260414.xlsx', 888) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2046, '2046', '1474/2025', 'CD-expdte Gestiona 20260414.xlsx', 889) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2043, '2043', '1469/2025', 'CD-expdte Gestiona 20260414.xlsx', 890) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2044, '2044', '1472/2025', 'CD-expdte Gestiona 20260414.xlsx', 891) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2045, '2045', '1473/2025', 'CD-expdte Gestiona 20260414.xlsx', 892) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2047, '2047', '1475/2025', 'CD-expdte Gestiona 20260414.xlsx', 893) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2050, '2050', '1478/2025', 'CD-expdte Gestiona 20260414.xlsx', 894) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2051, '2051', '1479/2025', 'CD-expdte Gestiona 20260414.xlsx', 895) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2048, '2048', '1476/2025', 'CD-expdte Gestiona 20260414.xlsx', 896) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2049, '2049', '1477/2025', 'CD-expdte Gestiona 20260414.xlsx', 897) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2052, '2052', '1480/2025', 'CD-expdte Gestiona 20260414.xlsx', 898) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2053, '2053', '1486/2025', 'CD-expdte Gestiona 20260414.xlsx', 899) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2054, '2054', '1487/2025', 'CD-expdte Gestiona 20260414.xlsx', 900) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2055, '2055', '1488/2025', 'CD-expdte Gestiona 20260414.xlsx', 901) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-396', '1493/2025', 'CD-expdte Gestiona 20260414.xlsx', 902) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2058, '2058', '1498/2025', 'CD-expdte Gestiona 20260414.xlsx', 903) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2056, '2056', '1489/2025', 'CD-expdte Gestiona 20260414.xlsx', 904) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-397', '1492/2025', 'CD-expdte Gestiona 20260414.xlsx', 905) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-398', '1494/2025', 'CD-expdte Gestiona 20260414.xlsx', 906) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-399', '1495/2025', 'CD-expdte Gestiona 20260414.xlsx', 907) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2057, '2057', '1497/2025', 'CD-expdte Gestiona 20260414.xlsx', 908) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2059, '2059', '1500/2025', 'CD-expdte Gestiona 20260414.xlsx', 909) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2060, '2060', '1501/2025', 'CD-expdte Gestiona 20260414.xlsx', 910) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2062, '2062', '1506/2025', 'CD-expdte Gestiona 20260414.xlsx', 911) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2061, '2061', '1505/2025', 'CD-expdte Gestiona 20260414.xlsx', 912) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2063, '2063', '1507/2025', 'CD-expdte Gestiona 20260414.xlsx', 913) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2067, '2067', '1513/2025', 'CD-expdte Gestiona 20260414.xlsx', 914) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2064, '2064', '1510/2025', 'CD-expdte Gestiona 20260414.xlsx', 915) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2065, '2065', '1511/2025', 'CD-expdte Gestiona 20260414.xlsx', 916) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2066, '2066', '1512/2025', 'CD-expdte Gestiona 20260414.xlsx', 917) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2069, '2069', '1515/2025', 'CD-expdte Gestiona 20260414.xlsx', 918) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2068, '2068', '1514/2025', 'CD-expdte Gestiona 20260414.xlsx', 919) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2070, '2070', '1517/2025', 'CD-expdte Gestiona 20260414.xlsx', 920) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2071, '2071', '1518/2025', 'CD-expdte Gestiona 20260414.xlsx', 921) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2072, '2072', '1519/2025', 'CD-expdte Gestiona 20260414.xlsx', 922) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2073, '2073', '1520/2025', 'CD-expdte Gestiona 20260414.xlsx', 923) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2074, '2074', '1532/2025', 'CD-expdte Gestiona 20260414.xlsx', 924) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2075, '2075', '1533/2025', 'CD-expdte Gestiona 20260414.xlsx', 925) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2076, '2076', '1534/2025', 'CD-expdte Gestiona 20260414.xlsx', 926) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2077, '2077', '1535/2025', 'CD-expdte Gestiona 20260414.xlsx', 927) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2078, '2078', '1536/2025', 'CD-expdte Gestiona 20260414.xlsx', 928) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2079, '2079', '1537/2025', 'CD-expdte Gestiona 20260414.xlsx', 929) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2080, '2080', '1538/2025', 'CD-expdte Gestiona 20260414.xlsx', 930) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2081, '2081', '1541/2025', 'CD-expdte Gestiona 20260414.xlsx', 931) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2084, '2084', '1545/2025', 'CD-expdte Gestiona 20260414.xlsx', 932) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2085, '2085', '1546/2025', 'CD-expdte Gestiona 20260414.xlsx', 933) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2086, '2086', '1547/2025', 'CD-expdte Gestiona 20260414.xlsx', 934) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2087, '2087', '1548/2025', 'CD-expdte Gestiona 20260414.xlsx', 935) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2082, '2082', '1543/2025', 'CD-expdte Gestiona 20260414.xlsx', 936) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-413', '1549/2025', 'CD-expdte Gestiona 20260414.xlsx', 937) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-734', '1553/2025', 'CD-expdte Gestiona 20260414.xlsx', 938) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2083, '2083', '1544/2025', 'CD-expdte Gestiona 20260414.xlsx', 939) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2092, '2092', '1558/2025', 'CD-expdte Gestiona 20260414.xlsx', 940) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2091, '2091', '1557/2025', 'CD-expdte Gestiona 20260414.xlsx', 941) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2088, '2088', '1554/2025', 'CD-expdte Gestiona 20260414.xlsx', 942) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2089, '2089', '1555/2025', 'CD-expdte Gestiona 20260414.xlsx', 943) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2090, '2090', '1556/2025', 'CD-expdte Gestiona 20260414.xlsx', 944) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2093, '2093', '1559/2025', 'CD-expdte Gestiona 20260414.xlsx', 945) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2094, '2094', '1560/2025', 'CD-expdte Gestiona 20260414.xlsx', 946) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2098, '2098', '1567/2025', 'CD-expdte Gestiona 20260414.xlsx', 947) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-422', '1579/2025', 'CD-expdte Gestiona 20260414.xlsx', 948) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-415', '1563/2025', 'CD-expdte Gestiona 20260414.xlsx', 949) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2095, '2095', '1564//2025', 'CD-expdte Gestiona 20260414.xlsx', 950) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2096, '2096', '1565/2025', 'CD-expdte Gestiona 20260414.xlsx', 951) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2097, '2097', '1566/2025', 'CD-expdte Gestiona 20260414.xlsx', 952) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2101, '2101', '1580/2025', 'CD-expdte Gestiona 20260414.xlsx', 953) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2105, '2105', '1584/2025', 'CD-expdte Gestiona 20260414.xlsx', 954) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2099, '2099', '1573/2025', 'CD-expdte Gestiona 20260414.xlsx', 955) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2103, '2103', '1582/2025', 'CD-expdte Gestiona 20260414.xlsx', 956) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2104, '2104', '1583/2025', 'CD-expdte Gestiona 20260414.xlsx', 957) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2102, '2102', '1581/2025', 'CD-expdte Gestiona 20260414.xlsx', 958) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2100, '2100', '1574/2025', 'CD-expdte Gestiona 20260414.xlsx', 959) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2106, '2106', '1585/2025', 'CD-expdte Gestiona 20260414.xlsx', 960) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2107, '2107', '1586/2025', 'CD-expdte Gestiona 20260414.xlsx', 961) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2108, '2108', '1587/2025', 'CD-expdte Gestiona 20260414.xlsx', 962) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2109, '2109', '1588/2025', 'CD-expdte Gestiona 20260414.xlsx', 963) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2110, '2110', '1595/2025', 'CD-expdte Gestiona 20260414.xlsx', 964) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC -423', '1589/2025', 'CD-expdte Gestiona 20260414.xlsx', 965) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC - 425', '1591/2025', 'CD-expdte Gestiona 20260414.xlsx', 966) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-439', '1610/2025', 'CD-expdte Gestiona 20260414.xlsx', 967) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2111, '2111', '1596/2025', 'CD-expdte Gestiona 20260414.xlsx', 968) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-435', '1600/2025', 'CD-expdte Gestiona 20260414.xlsx', 969) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2112, '2112', '1604/2025', 'CD-expdte Gestiona 20260414.xlsx', 970) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2113, '2113', '1605/2025', 'CD-expdte Gestiona 20260414.xlsx', 971) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2115, '2115', '1607/2025', 'CD-expdte Gestiona 20260414.xlsx', 972) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2114, '2114', '1606/2025', 'CD-expdte Gestiona 20260414.xlsx', 973) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-440', '1612/2025', 'CD-expdte Gestiona 20260414.xlsx', 974) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2116, '2116', '1615/2025', 'CD-expdte Gestiona 20260414.xlsx', 975) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2117, '2117', '1618/2025', 'CD-expdte Gestiona 20260414.xlsx', 976) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-443', '1620/2025', 'CD-expdte Gestiona 20260414.xlsx', 977) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2118, '2118', '1622/2025', 'CD-expdte Gestiona 20260414.xlsx', 978) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2119, '2119', '1623/2025', 'CD-expdte Gestiona 20260414.xlsx', 979) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2120, '2120', '1629/2025', 'CD-expdte Gestiona 20260414.xlsx', 980) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2121, '2121', '1630/2025', 'CD-expdte Gestiona 20260414.xlsx', 981) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2122, '2122', '1631/2025', 'CD-expdte Gestiona 20260414.xlsx', 982) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2123, '2123', '1635/2025', 'CD-expdte Gestiona 20260414.xlsx', 983) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2124, '2124', '1637/2025', 'CD-expdte Gestiona 20260414.xlsx', 984) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2125, '2125', '1638/2025', 'CD-expdte Gestiona 20260414.xlsx', 985) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-447', '1643/2025', 'CD-expdte Gestiona 20260414.xlsx', 986) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-450', '1646/2025', 'CD-expdte Gestiona 20260414.xlsx', 987) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2127, '2127', '1648/2025', 'CD-expdte Gestiona 20260414.xlsx', 988) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2128, '2128', '1649/2025', 'CD-expdte Gestiona 20260414.xlsx', 989) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-452', '1653/2025', 'CD-expdte Gestiona 20260414.xlsx', 990) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2129, '2129', '1654/2025', 'CD-expdte Gestiona 20260414.xlsx', 991) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2130, '2130', '1655/2025', 'CD-expdte Gestiona 20260414.xlsx', 992) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2132, '2132', '1660/2025', 'CD-expdte Gestiona 20260414.xlsx', 993) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2135, '2135', '1666/2025', 'CD-expdte Gestiona 20260414.xlsx', 994) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2131, '2131', '1657/2025', 'CD-expdte Gestiona 20260414.xlsx', 995) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2133, '2133', '1661/2025', 'CD-expdte Gestiona 20260414.xlsx', 996) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2134, '2134', '1662/2025', 'CD-expdte Gestiona 20260414.xlsx', 997) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-819', '1669/2025', 'CD-expdte Gestiona 20260414.xlsx', 998) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2139, '2139', '1674/2025', 'CD-expdte Gestiona 20260414.xlsx', 999) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2140, '2140', '1675/2025', 'CD-expdte Gestiona 20260414.xlsx', 1000) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-306', '1670/2025', 'CD-expdte Gestiona 20260414.xlsx', 1001) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2138, '2138', '1673/2025', 'CD-expdte Gestiona 20260414.xlsx', 1002) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2137, '2137', '1672/2025', 'CD-expdte Gestiona 20260414.xlsx', 1003) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2136, '2136', '1636/2025', 'CD-expdte Gestiona 20260414.xlsx', 1004) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2141, '2141', '1676/2025', 'CD-expdte Gestiona 20260414.xlsx', 1005) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2142, '2142', '1678/2025', 'CD-expdte Gestiona 20260414.xlsx', 1006) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2143, '2143', '1682/2025', 'CD-expdte Gestiona 20260414.xlsx', 1007) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2144, '2144', '1683/2025', 'CD-expdte Gestiona 20260414.xlsx', 1008) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2145, '2145', '1684/2025', 'CD-expdte Gestiona 20260414.xlsx', 1009) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2146, '2146', '1685/2025', 'CD-expdte Gestiona 20260414.xlsx', 1010) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2147, '2147', '1688/2025', 'CD-expdte Gestiona 20260414.xlsx', 1011) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2148, '2148', '1689/2025', 'CD-expdte Gestiona 20260414.xlsx', 1012) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2151, '2151', '1694/2025', 'CD-expdte Gestiona 20260414.xlsx', 1013) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-809', '1687/2025', 'CD-expdte Gestiona 20260414.xlsx', 1014) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2149, '2149', '1692/2025', 'CD-expdte Gestiona 20260414.xlsx', 1015) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2150, '2150', '1693/2025', 'CD-expdte Gestiona 20260414.xlsx', 1016) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2152, '2152', '1695/2025', 'CD-expdte Gestiona 20260414.xlsx', 1017) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-468', '1699/2025', 'CD-expdte Gestiona 20260414.xlsx', 1018) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2155, '2155', '1702/2025', 'CD-expdte Gestiona 20260414.xlsx', 1019) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2156, '2156', '1703/2025', 'CD-expdte Gestiona 20260414.xlsx', 1020) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-466', '1696/2025', 'CD-expdte Gestiona 20260414.xlsx', 1021) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2153, '2153', '1700/2025', 'CD-expdte Gestiona 20260414.xlsx', 1022) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2154, '2154', '1701/2025', 'CD-expdte Gestiona 20260414.xlsx', 1023) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2157, '2157', '1704/2025', 'CD-expdte Gestiona 20260414.xlsx', 1024) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-470', '1706/2025', 'CD-expdte Gestiona 20260414.xlsx', 1025) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2159, '2159', '1712/2025', 'CD-expdte Gestiona 20260414.xlsx', 1026) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2158, '2158', '1705/2025', 'CD-expdte Gestiona 20260414.xlsx', 1027) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2160, '2160', '1713/2025', 'CD-expdte Gestiona 20260414.xlsx', 1028) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2165, '2165', '1719/2025', 'CD-expdte Gestiona 20260414.xlsx', 1029) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2163, '2163', '1717/2025', 'CD-expdte Gestiona 20260414.xlsx', 1030) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2164, '2164', '1718/2025', 'CD-expdte Gestiona 20260414.xlsx', 1031) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2161, '2161', '1714/2025', 'CD-expdte Gestiona 20260414.xlsx', 1032) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2162, '2162', '1715/2025', 'CD-expdte Gestiona 20260414.xlsx', 1033) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2167, '2167', '1725/2025', 'CD-expdte Gestiona 20260414.xlsx', 1034) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2168, '2168', '1726/2025', 'CD-expdte Gestiona 20260414.xlsx', 1035) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2166, '2166', '1724/2025', 'CD-expdte Gestiona 20260414.xlsx', 1036) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2170, '2170', '1722/2025', 'CD-expdte Gestiona 20260414.xlsx', 1037) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-879', '1763/2025', 'CD-expdte Gestiona 20260414.xlsx', 1038) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2169, '2169', '1721/2025', 'CD-expdte Gestiona 20260414.xlsx', 1039) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2171, '2171', '1723/2025', 'CD-expdte Gestiona 20260414.xlsx', 1040) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2172, '2172', '1727/2025', 'CD-expdte Gestiona 20260414.xlsx', 1041) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2173, '2173', '1728/2025', 'CD-expdte Gestiona 20260414.xlsx', 1042) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2175, '2175', '1730/2025', 'CD-expdte Gestiona 20260414.xlsx', 1043) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2177, '2177', '1732/2025', 'CD-expdte Gestiona 20260414.xlsx', 1044) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2174, '2174', '1729/2025', 'CD-expdte Gestiona 20260414.xlsx', 1045) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2176, '2176', '1731/2025', 'CD-expdte Gestiona 20260414.xlsx', 1046) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2180, '2180', '1737/2025', 'CD-expdte Gestiona 20260414.xlsx', 1047) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2179, '2179', '1736/2025', 'CD-expdte Gestiona 20260414.xlsx', 1048) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2178, '2178', '1735/2025', 'CD-expdte Gestiona 20260414.xlsx', 1049) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2182, '2182', '1739/2025', 'CD-expdte Gestiona 20260414.xlsx', 1050) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2183, '2183', '1746/2025', 'CD-expdte Gestiona 20260414.xlsx', 1051) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2181, '2181', '1738/2025', 'CD-expdte Gestiona 20260414.xlsx', 1052) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-474', '1741/2025', 'CD-expdte Gestiona 20260414.xlsx', 1053) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-477', '1742/2025', 'CD-expdte Gestiona 20260414.xlsx', 1054) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2184, '2184', '1747/2025', 'CD-expdte Gestiona 20260414.xlsx', 1055) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2185, '2185', '1748/2025', 'CD-expdte Gestiona 20260414.xlsx', 1056) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2188, '2188', '1751/2025', 'CD-expdte Gestiona 20260414.xlsx', 1057) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2190, '2190', '1756/2025', 'CD-expdte Gestiona 20260414.xlsx', 1058) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2186, '2186', '1749/2025', 'CD-expdte Gestiona 20260414.xlsx', 1059) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2189, '2189', '1752/2025', 'CD-expdte Gestiona 20260414.xlsx', 1060) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2187, '2187', '1750/2025', 'CD-expdte Gestiona 20260414.xlsx', 1061) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2192, '2192', '1758/2025', 'CD-expdte Gestiona 20260414.xlsx', 1062) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2193, '2193', '1759/2025', 'CD-expdte Gestiona 20260414.xlsx', 1063) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2191, '2191', '1757/2025', 'CD-expdte Gestiona 20260414.xlsx', 1064) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2194, '2194', '1760/2025', 'CD-expdte Gestiona 20260414.xlsx', 1065) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2197, '2197', '1770/2025', 'CD-expdte Gestiona 20260414.xlsx', 1066) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2196, '2196', '1762/2025', 'CD-expdte Gestiona 20260414.xlsx', 1067) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2195, '2195', '1761/2025', 'CD-expdte Gestiona 20260414.xlsx', 1068) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2198, '2198', '1771/2025', 'CD-expdte Gestiona 20260414.xlsx', 1069) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2202, '2202', '1775/2025', 'CD-expdte Gestiona 20260414.xlsx', 1070) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2199, '2199', '1772/2025', 'CD-expdte Gestiona 20260414.xlsx', 1071) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2200, '2200', '1773/2025', 'CD-expdte Gestiona 20260414.xlsx', 1072) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2201, '2201', '1774/2025', 'CD-expdte Gestiona 20260414.xlsx', 1073) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2203, '2203', '1776/2025', 'CD-expdte Gestiona 20260414.xlsx', 1074) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2204, '2204', '1777/2025', 'CD-expdte Gestiona 20260414.xlsx', 1075) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2205, '2205', '1778/2025', 'CD-expdte Gestiona 20260414.xlsx', 1076) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2207, '2207', '1780/2025', 'CD-expdte Gestiona 20260414.xlsx', 1077) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2206, '2206', '1779/2025', 'CD-expdte Gestiona 20260414.xlsx', 1078) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2208, '2208', '1781/2025', 'CD-expdte Gestiona 20260414.xlsx', 1079) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2209, '2209', '1782/2025', 'CD-expdte Gestiona 20260414.xlsx', 1080) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-486', '1769/2025', 'CD-expdte Gestiona 20260414.xlsx', 1081) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-475', '1783/2025', 'CD-expdte Gestiona 20260414.xlsx', 1082) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-484', '1768/2025', 'CD-expdte Gestiona 20260414.xlsx', 1083) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-487', '1784/2025', 'CD-expdte Gestiona 20260414.xlsx', 1084) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2210, '2210', '1786/2025', 'CD-expdte Gestiona 20260414.xlsx', 1085) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-901', '1785/2025', 'CD-expdte Gestiona 20260414.xlsx', 1086) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2212, '2212', '1788/2025', 'CD-expdte Gestiona 20260414.xlsx', 1087) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2211, '2211', '1787/2025', 'CD-expdte Gestiona 20260414.xlsx', 1088) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2213, '2213', '1797/2025', 'CD-expdte Gestiona 20260414.xlsx', 1089) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2214, '2214', '1798/2025', 'CD-expdte Gestiona 20260414.xlsx', 1090) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2215, '2215', '1799//2025', 'CD-expdte Gestiona 20260414.xlsx', 1091) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2216, '2216', '1800/2025', 'CD-expdte Gestiona 20260414.xlsx', 1092) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2217, '2217', '1801/2025', 'CD-expdte Gestiona 20260414.xlsx', 1093) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2218, '2218', '1805/2025', 'CD-expdte Gestiona 20260414.xlsx', 1094) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2221, '2221', '1815/2025', 'CD-expdte Gestiona 20260414.xlsx', 1095) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2219, '2219', '1813/2025', 'CD-expdte Gestiona 20260414.xlsx', 1096) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2220, '2220', '1814/2025', 'CD-expdte Gestiona 20260414.xlsx', 1097) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-491', '1812/2025', 'CD-expdte Gestiona 20260414.xlsx', 1098) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2222, '2222', '1816/2025', 'CD-expdte Gestiona 20260414.xlsx', 1099) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2223, '2223', '1817/2025', 'CD-expdte Gestiona 20260414.xlsx', 1100) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2225, '2225', '1821/2025', 'CD-expdte Gestiona 20260414.xlsx', 1101) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2224, '2224', '1820/2025', 'CD-expdte Gestiona 20260414.xlsx', 1102) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2227, '2227', '1824/2025', 'CD-expdte Gestiona 20260414.xlsx', 1103) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2226, '2226', '1822/2025', 'CD-expdte Gestiona 20260414.xlsx', 1104) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2228, '2228', '1825/2025', 'CD-expdte Gestiona 20260414.xlsx', 1105) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2229, '2229', '1826/2025', 'CD-expdte Gestiona 20260414.xlsx', 1106) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-501', '1828/2025', 'CD-expdte Gestiona 20260414.xlsx', 1107) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2230, '2230', '1833/2025', 'CD-expdte Gestiona 20260414.xlsx', 1108) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2232, '2232', '1835/2025', 'CD-expdte Gestiona 20260414.xlsx', 1109) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-507', '1831/2025', 'CD-expdte Gestiona 20260414.xlsx', 1110) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2231, '2231', '1834/2025', 'CD-expdte Gestiona 20260414.xlsx', 1111) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2238, '2238', '1844/2025', 'CD-expdte Gestiona 20260414.xlsx', 1112) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2234, '2234', '1838/2025', 'CD-expdte Gestiona 20260414.xlsx', 1113) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2236, '2236', '1842/2025', 'CD-expdte Gestiona 20260414.xlsx', 1114) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2233, '2233', '1837/2025', 'CD-expdte Gestiona 20260414.xlsx', 1115) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2237, '2237', '1843/2025', 'CD-expdte Gestiona 20260414.xlsx', 1116) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2235, '2235', '1841/2025', 'CD-expdte Gestiona 20260414.xlsx', 1117) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2240, '2240', '1846/2025', 'CD-expdte Gestiona 20260414.xlsx', 1118) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2241, '2241', '1847/2025', 'CD-expdte Gestiona 20260414.xlsx', 1119) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2239, '2239', '1845/2025', 'CD-expdte Gestiona 20260414.xlsx', 1120) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2240, '2240', '1848/2025', 'CD-expdte Gestiona 20260414.xlsx', 1121) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2241, '2241', '1849/2025', 'CD-expdte Gestiona 20260414.xlsx', 1122) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2242, '2242', '1850/2025', 'CD-expdte Gestiona 20260414.xlsx', 1123) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2243, '2243', '1851/2025', 'CD-expdte Gestiona 20260414.xlsx', 1124) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2244, '2244', '1852/2025', 'CD-expdte Gestiona 20260414.xlsx', 1125) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2247, '2247', '1853/2025', 'CD-expdte Gestiona 20260414.xlsx', 1126) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2248, '2248', '1858/2025', 'CD-expdte Gestiona 20260414.xlsx', 1127) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2249, '2249', '1859/2025', 'CD-expdte Gestiona 20260414.xlsx', 1128) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2250, '2250', '1860/2025', 'CD-expdte Gestiona 20260414.xlsx', 1129) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2251, '2251', '1861/2025', 'CD-expdte Gestiona 20260414.xlsx', 1130) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2252, '2252', '1862/2025', 'CD-expdte Gestiona 20260414.xlsx', 1131) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2253, '2253', '1863/2025', 'CD-expdte Gestiona 20260414.xlsx', 1132) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2255, '2255', '1872/2025', 'CD-expdte Gestiona 20260414.xlsx', 1133) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2256, '2256', '1873/2025', 'CD-expdte Gestiona 20260414.xlsx', 1134) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-518', '1870/2025', 'CD-expdte Gestiona 20260414.xlsx', 1135) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2254, '2254', '1871/2025', 'CD-expdte Gestiona 20260414.xlsx', 1136) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2259, '2259', '1879/2025', 'CD-expdte Gestiona 20260414.xlsx', 1137) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2257, '2257', '1874/2025', 'CD-expdte Gestiona 20260414.xlsx', 1138) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2258, '2258', '1878/2025', 'CD-expdte Gestiona 20260414.xlsx', 1139) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2260, '2260', '1880/2025', 'CD-expdte Gestiona 20260414.xlsx', 1140) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2263, '2263', '1883/2025', 'CD-expdte Gestiona 20260414.xlsx', 1141) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2264, '2264', '1884/2025', 'CD-expdte Gestiona 20260414.xlsx', 1142) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2262, '2262', '1882/2025', 'CD-expdte Gestiona 20260414.xlsx', 1143) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2265, '2265', '1885/2025', 'CD-expdte Gestiona 20260414.xlsx', 1144) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2261, '2261', '1881/2025', 'CD-expdte Gestiona 20260414.xlsx', 1145) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2266, '2266', '1886/2025', 'CD-expdte Gestiona 20260414.xlsx', 1146) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2267, '2267', '1887/2025', 'CD-expdte Gestiona 20260414.xlsx', 1147) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2268, '2268', '1888/2025', 'CD-expdte Gestiona 20260414.xlsx', 1148) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2271, '2271', '1894/2025', 'CD-expdte Gestiona 20260414.xlsx', 1149) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2270, '2270', '1893/2025', 'CD-expdte Gestiona 20260414.xlsx', 1150) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2269, '2269', '1892/2025', 'CD-expdte Gestiona 20260414.xlsx', 1151) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2273, '2273', '1896/2025', 'CD-expdte Gestiona 20260414.xlsx', 1152) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2275, '2275', '1898/2025', 'CD-expdte Gestiona 20260414.xlsx', 1153) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2272, '2272', '1895/2025', 'CD-expdte Gestiona 20260414.xlsx', 1154) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2274, '2274', '1897/2025', 'CD-expdte Gestiona 20260414.xlsx', 1155) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2277, '2277', '1904/2025', 'CD-expdte Gestiona 20260414.xlsx', 1156) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2276, '2276', '1899/2025', 'CD-expdte Gestiona 20260414.xlsx', 1157) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2278, '2278', '1905/2025', 'CD-expdte Gestiona 20260414.xlsx', 1158) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2279, '2279', '1906/2025', 'CD-expdte Gestiona 20260414.xlsx', 1159) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2280, '2280', '1907/2025', 'CD-expdte Gestiona 20260414.xlsx', 1160) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2282, '2282', '1909/2025', 'CD-expdte Gestiona 20260414.xlsx', 1161) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2281, '2281', '1908/2025', 'CD-expdte Gestiona 20260414.xlsx', 1162) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2283, '2283', '1916/2025', 'CD-expdte Gestiona 20260414.xlsx', 1163) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2284, '2284', '1917/2025', 'CD-expdte Gestiona 20260414.xlsx', 1164) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2285, '2285', '1918/2025', 'CD-expdte Gestiona 20260414.xlsx', 1165) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2286, '2286', '1919/2025', 'CD-expdte Gestiona 20260414.xlsx', 1166) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2289, '2289', '1926/2025', 'CD-expdte Gestiona 20260414.xlsx', 1167) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-534', '1921/2025', 'CD-expdte Gestiona 20260414.xlsx', 1168) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-635', '1922/2025', 'CD-expdte Gestiona 20260414.xlsx', 1169) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2287, '2287', '1924/2025', 'CD-expdte Gestiona 20260414.xlsx', 1170) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2288, '2288', '1925/2025', 'CD-expdte Gestiona 20260414.xlsx', 1171) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-541', '1928/2025', 'CD-expdte Gestiona 20260414.xlsx', 1172) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-542', '1929/2025', 'CD-expdte Gestiona 20260414.xlsx', 1173) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2290, '2290', '1932/2025', 'CD-expdte Gestiona 20260414.xlsx', 1174) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2292, '2292', '1933/2025', 'CD-expdte Gestiona 20260414.xlsx', 1175) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2293, '2293', '1934/2025', 'CD-expdte Gestiona 20260414.xlsx', 1176) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2294, '2294', '1937/2025', 'CD-expdte Gestiona 20260414.xlsx', 1177) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-999', '1938/2025', 'CD-expdte Gestiona 20260414.xlsx', 1178) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-546', '1941/2025', 'CD-expdte Gestiona 20260414.xlsx', 1179) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2295, '2295', '0001/2026', 'CD-expdte Gestiona 20260414.xlsx', 1180) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2296, '2296', '0002/2026', 'CD-expdte Gestiona 20260414.xlsx', 1181) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2297, '2297', '0003/2026', 'CD-expdte Gestiona 20260414.xlsx', 1182) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2298, '2298', '0004/2026', 'CD-expdte Gestiona 20260414.xlsx', 1183) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2299, '2299', '0005/2026', 'CD-expdte Gestiona 20260414.xlsx', 1184) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2300, '2300', '0006/2026', 'CD-expdte Gestiona 20260414.xlsx', 1185) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2301, '2301', '0007/2026', 'CD-expdte Gestiona 20260414.xlsx', 1186) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2302, '2302', '0008/2026', 'CD-expdte Gestiona 20260414.xlsx', 1187) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2303, '2303', '0009/2026', 'CD-expdte Gestiona 20260414.xlsx', 1188) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2304, '2304', '0010/2026', 'CD-expdte Gestiona 20260414.xlsx', 1189) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2305, '2305', '0011/2026', 'CD-expdte Gestiona 20260414.xlsx', 1190) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2306, '2306', '0012/2026', 'CD-expdte Gestiona 20260414.xlsx', 1191) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2307, '2307', '0013/2026', 'CD-expdte Gestiona 20260414.xlsx', 1192) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2308, '2308', '0014/2026', 'CD-expdte Gestiona 20260414.xlsx', 1193) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2309, '2309', '0015/2026', 'CD-expdte Gestiona 20260414.xlsx', 1194) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2310, '2310', '0016/2026', 'CD-expdte Gestiona 20260414.xlsx', 1195) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2311, '2311', '0017/2026', 'CD-expdte Gestiona 20260414.xlsx', 1196) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2312, '2312', '0018/2026', 'CD-expdte Gestiona 20260414.xlsx', 1197) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2313, '2313', '0019/2026', 'CD-expdte Gestiona 20260414.xlsx', 1198) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2314, '2314', '0020/2026', 'CD-expdte Gestiona 20260414.xlsx', 1199) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2315, '2315', '0022/2026', 'CD-expdte Gestiona 20260414.xlsx', 1200) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2316, '2316', '0023/2026', 'CD-expdte Gestiona 20260414.xlsx', 1201) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2317, '2317', '0024/2026', 'CD-expdte Gestiona 20260414.xlsx', 1202) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2318, '2318', '0025/2026', 'CD-expdte Gestiona 20260414.xlsx', 1203) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2319, '2319', '0026/2026', 'CD-expdte Gestiona 20260414.xlsx', 1204) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2320, '2320', '0027/2026', 'CD-expdte Gestiona 20260414.xlsx', 1205) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2321, '2321', '0030/2026', 'CD-expdte Gestiona 20260414.xlsx', 1206) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2322, '2322', '0031/2026', 'CD-expdte Gestiona 20260414.xlsx', 1207) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2323, '2323', '0032/2026', 'CD-expdte Gestiona 20260414.xlsx', 1208) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-3', '0037/2026', 'CD-expdte Gestiona 20260414.xlsx', 1209) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-4', '0038/2026', 'CD-expdte Gestiona 20260414.xlsx', 1210) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2324, '2324', '0042/2026', 'CD-expdte Gestiona 20260414.xlsx', 1211) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2325, '2325', '0043/2026', 'CD-expdte Gestiona 20260414.xlsx', 1212) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2326, '2326', '0044/2026', 'CD-expdte Gestiona 20260414.xlsx', 1213) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2327, '2327', '0045/2026', 'CD-expdte Gestiona 20260414.xlsx', 1214) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2328, '2328', '0046/2026', 'CD-expdte Gestiona 20260414.xlsx', 1215) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2329, '2329', '0047/2026', 'CD-expdte Gestiona 20260414.xlsx', 1216) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-10', '0051/2026', 'CD-expdte Gestiona 20260414.xlsx', 1217) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2330, '2330', '0053/2026', 'CD-expdte Gestiona 20260414.xlsx', 1218) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2331, '2331', '0054/2026', 'CD-expdte Gestiona 20260414.xlsx', 1219) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2332, '2332', '0055/2026', 'CD-expdte Gestiona 20260414.xlsx', 1220) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2333, '2333', '0056/2026', 'CD-expdte Gestiona 20260414.xlsx', 1221) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2334, '2334', '0057/2026', 'CD-expdte Gestiona 20260414.xlsx', 1222) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2335, '2335', '0058/2026', 'CD-expdte Gestiona 20260414.xlsx', 1223) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-11', '0059/2026', 'CD-expdte Gestiona 20260414.xlsx', 1224) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2336, '2336', '0063/2026', 'CD-expdte Gestiona 20260414.xlsx', 1225) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-19', '0069/2026', 'CD-expdte Gestiona 20260414.xlsx', 1226) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-20', '0071/2026', 'CD-expdte Gestiona 20260414.xlsx', 1227) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2337, '2337', '0075/2026', 'CD-expdte Gestiona 20260414.xlsx', 1228) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2338, '2338', '0076/2026', 'CD-expdte Gestiona 20260414.xlsx', 1229) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2339, '2339', '0077/2026', 'CD-expdte Gestiona 20260414.xlsx', 1230) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2340, '2340', '0078/2026', 'CD-expdte Gestiona 20260414.xlsx', 1231) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2341, '2341', '0079/2026', 'CD-expdte Gestiona 20260414.xlsx', 1232) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2342, '2342', '0080/2026', 'CD-expdte Gestiona 20260414.xlsx', 1233) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2343, '2343', '0081/2026', 'CD-expdte Gestiona 20260414.xlsx', 1234) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2344, '2344', '0082/2026', 'CD-expdte Gestiona 20260414.xlsx', 1235) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2345, '2345', '0083/2026', 'CD-expdte Gestiona 20260414.xlsx', 1236) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2346, '2346', '0087/2026', 'CD-expdte Gestiona 20260414.xlsx', 1237) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2347, '2347', '0088/2026', 'CD-expdte Gestiona 20260414.xlsx', 1238) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2348, '2348', '0089/2026', 'CD-expdte Gestiona 20260414.xlsx', 1239) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2349, '2349', '0090/2026', 'CD-expdte Gestiona 20260414.xlsx', 1240) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2350, '2350', '0091/2026', 'CD-expdte Gestiona 20260414.xlsx', 1241) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2351, '2351', '0092/2026', 'CD-expdte Gestiona 20260414.xlsx', 1242) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2352, '2352', '0093/2026', 'CD-expdte Gestiona 20260414.xlsx', 1243) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2353, '2353', '0094/2026', 'CD-expdte Gestiona 20260414.xlsx', 1244) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2354, '2354', '0099/2026', 'CD-expdte Gestiona 20260414.xlsx', 1245) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2355, '2355', '0100/2026', 'CD-expdte Gestiona 20260414.xlsx', 1246) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2356, '2356', '0109/2026', 'CD-expdte Gestiona 20260414.xlsx', 1247) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2357, '2357', '0110/2026', 'CD-expdte Gestiona 20260414.xlsx', 1248) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '1+B1262', '0111/2026', 'CD-expdte Gestiona 20260414.xlsx', 1249) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-28', '0117/2026', 'CD-expdte Gestiona 20260414.xlsx', 1250) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-29', '0121/2026', 'CD-expdte Gestiona 20260414.xlsx', 1251) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2359, '2359', '0122/2026', 'CD-expdte Gestiona 20260414.xlsx', 1252) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2360, '2360', '0123/2026', 'CD-expdte Gestiona 20260414.xlsx', 1253) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2361, '2361', '0124/2026', 'CD-expdte Gestiona 20260414.xlsx', 1254) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2362, '2362', '0125/2026', 'CD-expdte Gestiona 20260414.xlsx', 1255) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-30', '0126/2026', 'CD-expdte Gestiona 20260414.xlsx', 1256) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2363, '2363', '0128/2026', 'CD-expdte Gestiona 20260414.xlsx', 1257) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2364, '2364', '0129/2026', 'CD-expdte Gestiona 20260414.xlsx', 1258) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2365, '2365', '0130/2026', 'CD-expdte Gestiona 20260414.xlsx', 1259) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2366, '2366', '0131/2026', 'CD-expdte Gestiona 20260414.xlsx', 1260) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2367, '2367', '0132/2026', 'CD-expdte Gestiona 20260414.xlsx', 1261) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2368, '2368', '0135/2026', 'CD-expdte Gestiona 20260414.xlsx', 1262) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2369, '2369', '0136/2026', 'CD-expdte Gestiona 20260414.xlsx', 1263) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2370, '2370', '0137/2026', 'CD-expdte Gestiona 20260414.xlsx', 1264) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2371, '2371', '0138/2026', 'CD-expdte Gestiona 20260414.xlsx', 1265) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2372, '2372', '0142/2026', 'CD-expdte Gestiona 20260414.xlsx', 1266) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2373, '2373', '0143/2026', 'CD-expdte Gestiona 20260414.xlsx', 1267) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2374, '2374', '0144/2026', 'CD-expdte Gestiona 20260414.xlsx', 1268) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2375, '2375', '0145/2026', 'CD-expdte Gestiona 20260414.xlsx', 1269) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2376, '2376', '0146/2026', 'CD-expdte Gestiona 20260414.xlsx', 1270) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2377, '2377', '0147/2026', 'CD-expdte Gestiona 20260414.xlsx', 1271) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2378, '2378', '0148/2026', 'CD-expdte Gestiona 20260414.xlsx', 1272) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2379, '2379', '0149/2026', 'CD-expdte Gestiona 20260414.xlsx', 1273) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2380, '2380', '0152/2026', 'CD-expdte Gestiona 20260414.xlsx', 1274) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2381, '2381', '0153/2026', 'CD-expdte Gestiona 20260414.xlsx', 1275) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2382, '2382', '0154/2026', 'CD-expdte Gestiona 20260414.xlsx', 1276) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2383, '2383', '0155/2026', 'CD-expdte Gestiona 20260414.xlsx', 1277) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2384, '2384', '0168/2026', 'CD-expdte Gestiona 20260414.xlsx', 1278) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2385, '2385', '0169/2026', 'CD-expdte Gestiona 20260414.xlsx', 1279) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2386, '2386', '0170/2026', 'CD-expdte Gestiona 20260414.xlsx', 1280) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2387, '2387', '0171/2026', 'CD-expdte Gestiona 20260414.xlsx', 1281) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2388, '2388', '0172/2026', 'CD-expdte Gestiona 20260414.xlsx', 1282) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2389, '2389', '0173/2026', 'CD-expdte Gestiona 20260414.xlsx', 1283) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2390, '2390', '0174/2026', 'CD-expdte Gestiona 20260414.xlsx', 1284) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2391, '2391', '0175/2026', 'CD-expdte Gestiona 20260414.xlsx', 1285) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2392, '2392', '0178/2026', 'CD-expdte Gestiona 20260414.xlsx', 1286) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-41', '0162/2026', 'CD-expdte Gestiona 20260414.xlsx', 1287) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-49', '0176/2026', 'CD-expdte Gestiona 20260414.xlsx', 1288) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-50', '0177/2026', 'CD-expdte Gestiona 20260414.xlsx', 1289) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2393, '2393', '0179/2026', 'CD-expdte Gestiona 20260414.xlsx', 1290) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2394, '2394', '0180/2026', 'CD-expdte Gestiona 20260414.xlsx', 1291) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2395, '2395', '0181/2026', 'CD-expdte Gestiona 20260414.xlsx', 1292) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2396, '2396', '0183/2026', 'CD-expdte Gestiona 20260414.xlsx', 1293) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2397, '2397', '0184/2026', 'CD-expdte Gestiona 20260414.xlsx', 1294) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2398, '2398', '0185/2026', 'CD-expdte Gestiona 20260414.xlsx', 1295) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2399, '2399', '0186/2026', 'CD-expdte Gestiona 20260414.xlsx', 1296) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2400, '2400', '0187/2026', 'CD-expdte Gestiona 20260414.xlsx', 1297) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2401, '2401', '0188/2026', 'CD-expdte Gestiona 20260414.xlsx', 1298) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2402, '2402', '0189/2026', 'CD-expdte Gestiona 20260414.xlsx', 1299) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2403, '2403', '0190/2026', 'CD-expdte Gestiona 20260414.xlsx', 1300) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-54', '0192/2026', 'CD-expdte Gestiona 20260414.xlsx', 1301) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2404, '2404', '0195/2026', 'CD-expdte Gestiona 20260414.xlsx', 1302) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2405, '2405', '0196/2026', 'CD-expdte Gestiona 20260414.xlsx', 1303) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2406, '2406', '0197/2026', 'CD-expdte Gestiona 20260414.xlsx', 1304) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2407, '2407', '0198/2026', 'CD-expdte Gestiona 20260414.xlsx', 1305) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-74', '0199/2026', 'CD-expdte Gestiona 20260414.xlsx', 1306) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2408, '2408', '0205/2026', 'CD-expdte Gestiona 20260414.xlsx', 1307) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2409, '2409', '0206/2026', 'CD-expdte Gestiona 20260414.xlsx', 1308) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2410, '2410', '0207/2026', 'CD-expdte Gestiona 20260414.xlsx', 1309) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2411, '2411', '0208/2026', 'CD-expdte Gestiona 20260414.xlsx', 1310) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2412, '2412', '0210/2026', 'CD-expdte Gestiona 20260414.xlsx', 1311) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2413, '2413', '0211/2026', 'CD-expdte Gestiona 20260414.xlsx', 1312) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2414, '2414', '0213/2026', 'CD-expdte Gestiona 20260414.xlsx', 1313) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2415, '2415', '0214/2026', 'CD-expdte Gestiona 20260414.xlsx', 1314) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2416, '2416', '0215/2026', 'CD-expdte Gestiona 20260414.xlsx', 1315) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2417, '2417', '0216/2026', 'CD-expdte Gestiona 20260414.xlsx', 1316) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2418, '2418', '0217/2026', 'CD-expdte Gestiona 20260414.xlsx', 1317) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2419, '2419', '0218/2026', 'CD-expdte Gestiona 20260414.xlsx', 1318) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2420, '2420', '0219/2026', 'CD-expdte Gestiona 20260414.xlsx', 1319) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2421, '2421', '0220/2026', 'CD-expdte Gestiona 20260414.xlsx', 1320) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-111', '0221/2026', 'CD-expdte Gestiona 20260414.xlsx', 1321) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2422, '2422', '0225/2026', 'CD-expdte Gestiona 20260414.xlsx', 1322) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2423, '2423', '0226/2026', 'CD-expdte Gestiona 20260414.xlsx', 1323) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2424, '2424', '0227/2026', 'CD-expdte Gestiona 20260414.xlsx', 1324) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-128', '0232/2026', 'CD-expdte Gestiona 20260414.xlsx', 1325) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2425, '2425', '0236/2026', 'CD-expdte Gestiona 20260414.xlsx', 1326) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2426, '2426', '0237/2026', 'CD-expdte Gestiona 20260414.xlsx', 1327) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2427, '2427', '0238/2026', 'CD-expdte Gestiona 20260414.xlsx', 1328) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2428, '2428', '0239/2026', 'CD-expdte Gestiona 20260414.xlsx', 1329) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2429, '2429', '0240/2026', 'CD-expdte Gestiona 20260414.xlsx', 1330) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2430, '2430', '0241/2026', 'CD-expdte Gestiona 20260414.xlsx', 1331) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2431, '2431', '0242/2026', 'CD-expdte Gestiona 20260414.xlsx', 1332) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2432, '2432', '0243/2026', 'CD-expdte Gestiona 20260414.xlsx', 1333) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2433, '2433', '0244/2026', 'CD-expdte Gestiona 20260414.xlsx', 1334) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2434, '2434', '0245/2026', 'CD-expdte Gestiona 20260414.xlsx', 1335) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2435, '2435', '0259/2026', 'CD-expdte Gestiona 20260414.xlsx', 1336) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2436, '2436', '0260/2026', 'CD-expdte Gestiona 20260414.xlsx', 1337) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2437, '2437', '0261/2026', 'CD-expdte Gestiona 20260414.xlsx', 1338) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2438, '2438', '0262/2026', 'CD-expdte Gestiona 20260414.xlsx', 1339) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2439, '2439', '0263/2026', 'CD-expdte Gestiona 20260414.xlsx', 1340) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2440, '2440', '0264/2026', 'CD-expdte Gestiona 20260414.xlsx', 1341) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2441, '2441', '0265/2026', 'CD-expdte Gestiona 20260414.xlsx', 1342) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2442, '2442', '0266/2026', 'CD-expdte Gestiona 20260414.xlsx', 1343) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2443, '2443', '0269/2026', 'CD-expdte Gestiona 20260414.xlsx', 1344) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2444, '2444', '0270/2026', 'CD-expdte Gestiona 20260414.xlsx', 1345) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2445, '2445', '0271/2026', 'CD-expdte Gestiona 20260414.xlsx', 1346) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2446, '2446', '0272/2026', 'CD-expdte Gestiona 20260414.xlsx', 1347) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2447, '2447', '0273/2026', 'CD-expdte Gestiona 20260414.xlsx', 1348) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2448, '2448', '0274/2026', 'CD-expdte Gestiona 20260414.xlsx', 1349) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2449, '2449', '0275/2026', 'CD-expdte Gestiona 20260414.xlsx', 1350) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2450, '2450', '0276/2026', 'CD-expdte Gestiona 20260414.xlsx', 1351) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2451, '2451', '0280/2026', 'CD-expdte Gestiona 20260414.xlsx', 1352) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2452, '2452', '0281/2026', 'CD-expdte Gestiona 20260414.xlsx', 1353) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-182', '0282/2026', 'CD-expdte Gestiona 20260414.xlsx', 1354) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2453, '2453', '0283/2026', 'CD-expdte Gestiona 20260414.xlsx', 1355) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2454, '2454', '0284/2026', 'CD-expdte Gestiona 20260414.xlsx', 1356) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2455, '2455', '0286/2026', 'CD-expdte Gestiona 20260414.xlsx', 1357) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2456, '2456', '0287/2026', 'CD-expdte Gestiona 20260414.xlsx', 1358) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2457, '2457', '0288/2026', 'CD-expdte Gestiona 20260414.xlsx', 1359) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2458, '2458', '0289/2026', 'CD-expdte Gestiona 20260414.xlsx', 1360) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2459, '2459', '0291/2026', 'CD-expdte Gestiona 20260414.xlsx', 1361) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2460, '2460', '0292/2026', 'CD-expdte Gestiona 20260414.xlsx', 1362) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2461, '2461', '0293/2026', 'CD-expdte Gestiona 20260414.xlsx', 1363) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2462, '2462', '0294/2026', 'CD-expdte Gestiona 20260414.xlsx', 1364) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2463, '2463', '0295/2026', 'CD-expdte Gestiona 20260414.xlsx', 1365) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2464, '2464', '0296/2026', 'CD-expdte Gestiona 20260414.xlsx', 1366) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2465, '2465', '0297/2026', 'CD-expdte Gestiona 20260414.xlsx', 1367) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2466, '2466', '0298/2026', 'CD-expdte Gestiona 20260414.xlsx', 1368) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-188', '0299/2026', 'CD-expdte Gestiona 20260414.xlsx', 1369) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-89', '0301/2026', 'CD-expdte Gestiona 20260414.xlsx', 1370) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-93', '0304/2026', 'CD-expdte Gestiona 20260414.xlsx', 1371) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-94', '0306/2026', 'CD-expdte Gestiona 20260414.xlsx', 1372) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-95', '0309/2026', 'CD-expdte Gestiona 20260414.xlsx', 1373) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-96', '0321/2026', 'CD-expdte Gestiona 20260414.xlsx', 1374) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2467, '2467', '0324/2026', 'CD-expdte Gestiona 20260414.xlsx', 1375) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2468, '2468', '0325/2026', 'CD-expdte Gestiona 20260414.xlsx', 1376) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2469, '2469', '0326/2026', 'CD-expdte Gestiona 20260414.xlsx', 1377) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2470, '2470', '0327/2026', 'CD-expdte Gestiona 20260414.xlsx', 1378) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2471, '2471', '0328/2026', 'CD-expdte Gestiona 20260414.xlsx', 1379) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2472, '2472', '0329/2026', 'CD-expdte Gestiona 20260414.xlsx', 1380) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2473, '2473', '0330/2026', 'CD-expdte Gestiona 20260414.xlsx', 1381) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2474, '2474', '0331/2026', 'CD-expdte Gestiona 20260414.xlsx', 1382) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2475, '2475', '0332/2026', 'CD-expdte Gestiona 20260414.xlsx', 1383) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2476, '2476', '0333/2026', 'CD-expdte Gestiona 20260414.xlsx', 1384) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2477, '2477', '0334/2026', 'CD-expdte Gestiona 20260414.xlsx', 1385) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2478, '2478', '0335/2026', 'CD-expdte Gestiona 20260414.xlsx', 1386) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2479, '2479', '0336/2026', 'CD-expdte Gestiona 20260414.xlsx', 1387) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2480, '2480', '0337/2026', 'CD-expdte Gestiona 20260414.xlsx', 1388) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2481, '2481', '0338/2026', 'CD-expdte Gestiona 20260414.xlsx', 1389) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2482, '2482', '0339/2026', 'CD-expdte Gestiona 20260414.xlsx', 1390) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2483, '2483', '0340/2026', 'CD-expdte Gestiona 20260414.xlsx', 1391) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2484, '2484', '0341/2026', 'CD-expdte Gestiona 20260414.xlsx', 1392) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2485, '2485', '0342/2026', 'CD-expdte Gestiona 20260414.xlsx', 1393) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2486, '2486', '0343/2026', 'CD-expdte Gestiona 20260414.xlsx', 1394) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2487, '2487', '0344/2026', 'CD-expdte Gestiona 20260414.xlsx', 1395) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-97', '0346/2026', 'CD-expdte Gestiona 20260414.xlsx', 1396) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2488, '2488', '0348/2026', 'CD-expdte Gestiona 20260414.xlsx', 1397) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-98', '0349/2026', 'CD-expdte Gestiona 20260414.xlsx', 1398) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2490, '2490', '0350/2026', 'CD-expdte Gestiona 20260414.xlsx', 1399) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-101', '0351/2026', 'CD-expdte Gestiona 20260414.xlsx', 1400) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2492, '2492', '0358/2026', 'CD-expdte Gestiona 20260414.xlsx', 1401) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2493, '2493', '0359/2026', 'CD-expdte Gestiona 20260414.xlsx', 1402) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2494, '2494', '0360/2026', 'CD-expdte Gestiona 20260414.xlsx', 1403) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2495, '2495', '0363/2026', 'CD-expdte Gestiona 20260414.xlsx', 1405) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2496, '2496', '0364/2026', 'CD-expdte Gestiona 20260414.xlsx', 1406) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2497, '2497', '0365/2026', 'CD-expdte Gestiona 20260414.xlsx', 1407) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2498, '2498', '0366/2026', 'CD-expdte Gestiona 20260414.xlsx', 1408) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2499, '2499', '0367/2026', 'CD-expdte Gestiona 20260414.xlsx', 1409) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RC-113', '0370/2026', 'CD-expdte Gestiona 20260414.xlsx', 1410) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-115', '0372/2026', 'CD-expdte Gestiona 20260414.xlsx', 1411) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-116', '0376/2026', 'CD-expdte Gestiona 20260414.xlsx', 1412) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-117', '0379/2026', 'CD-expdte Gestiona 20260414.xlsx', 1413) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2500, '2500', '0383/2026', 'CD-expdte Gestiona 20260414.xlsx', 1414) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2501, '2501', '0384/2026', 'CD-expdte Gestiona 20260414.xlsx', 1415) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2502, '2502', '0385/2026', 'CD-expdte Gestiona 20260414.xlsx', 1416) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2503, '2503', '0386/2026', 'CD-expdte Gestiona 20260414.xlsx', 1417) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2504, '2504', '0387/2026', 'CD-expdte Gestiona 20260414.xlsx', 1418) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2505, '2505', '0388/2026', 'CD-expdte Gestiona 20260414.xlsx', 1419) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2506, '2506', '0389/2026', 'CD-expdte Gestiona 20260414.xlsx', 1420) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2507, '2507', '0390/2026', 'CD-expdte Gestiona 20260414.xlsx', 1421) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2508, '2508', '0391/2026', 'CD-expdte Gestiona 20260414.xlsx', 1422) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2509, '2509', '0392/2026', 'CD-expdte Gestiona 20260414.xlsx', 1423) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2510, '2510', '0393/2026', 'CD-expdte Gestiona 20260414.xlsx', 1424) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2511, '2511', '0394/2026', 'CD-expdte Gestiona 20260414.xlsx', 1425) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2512, '2512', '0395/2026', 'CD-expdte Gestiona 20260414.xlsx', 1426) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2513, '2513', '0396/2026', 'CD-expdte Gestiona 20260414.xlsx', 1427) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2514, '2514', '0397/2026', 'CD-expdte Gestiona 20260414.xlsx', 1428) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2515, '2515', '0398/2026', 'CD-expdte Gestiona 20260414.xlsx', 1429) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2516, '2516', '0400/2026', 'CD-expdte Gestiona 20260414.xlsx', 1430) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2517, '2517', '0401/2026', 'CD-expdte Gestiona 20260414.xlsx', 1431) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-122', '0403/2026', 'CD-expdte Gestiona 20260414.xlsx', 1432) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2519, '2519', '0404/2026', 'CD-expdte Gestiona 20260414.xlsx', 1433) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2520, '2520', '0405/2026', 'CD-expdte Gestiona 20260414.xlsx', 1434) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2521, '2521', '0406/2026', 'CD-expdte Gestiona 20260414.xlsx', 1435) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2525, '2525', '0408/2026', 'CD-expdte Gestiona 20260414.xlsx', 1436) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2526, '2526', '0409/2026', 'CD-expdte Gestiona 20260414.xlsx', 1437) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2527, '2527', '0410/2026', 'CD-expdte Gestiona 20260414.xlsx', 1438) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2528, '2528', '0411/2026', 'CD-expdte Gestiona 20260414.xlsx', 1439) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2529, '2529', '0412/2026', 'CD-expdte Gestiona 20260414.xlsx', 1440) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2530, '2530', '0413/2026', 'CD-expdte Gestiona 20260414.xlsx', 1441) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-130', '0418/2026', 'CD-expdte Gestiona 20260414.xlsx', 1442) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-284', '0419/2026', 'CD-expdte Gestiona 20260414.xlsx', 1443) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-133', '0420/2026', 'CD-expdte Gestiona 20260414.xlsx', 1444) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2531, '2531', '0421/2026', 'CD-expdte Gestiona 20260414.xlsx', 1445) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2532, '2532', '0422/2026', 'CD-expdte Gestiona 20260414.xlsx', 1446) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2533, '2533', '0423/2026', 'CD-expdte Gestiona 20260414.xlsx', 1447) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2534, '2534', '0424/2026', 'CD-expdte Gestiona 20260414.xlsx', 1448) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2535, '2535', '0425/2026', 'CD-expdte Gestiona 20260414.xlsx', 1449) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2536, '2536', '0426/2026', 'CD-expdte Gestiona 20260414.xlsx', 1450) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2537, '2537', '0427/2026', 'CD-expdte Gestiona 20260414.xlsx', 1451) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2538, '2538', '0428/2026', 'CD-expdte Gestiona 20260414.xlsx', 1452) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-134', '0429/2026', 'CD-expdte Gestiona 20260414.xlsx', 1453) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2539, '2539', '0431/2026', 'CD-expdte Gestiona 20260414.xlsx', 1454) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-135', '0432/2026', 'CD-expdte Gestiona 20260414.xlsx', 1455) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2540, '2540', '0448/2026', 'CD-expdte Gestiona 20260414.xlsx', 1456) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2541, '2541', '0449/2026', 'CD-expdte Gestiona 20260414.xlsx', 1457) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2542, '2542', '0450/2026', 'CD-expdte Gestiona 20260414.xlsx', 1458) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2543, '2543', '0451/2026', 'CD-expdte Gestiona 20260414.xlsx', 1459) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2544, '2544', '0452/2026', 'CD-expdte Gestiona 20260414.xlsx', 1460) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2545, '2545', '0453/2026', 'CD-expdte Gestiona 20260414.xlsx', 1461) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2551, '2551', '0454/2026', 'CD-expdte Gestiona 20260414.xlsx', 1462) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2552, '2552', '0455/2026', 'CD-expdte Gestiona 20260414.xlsx', 1463) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2553, '2553', '0456/2026', 'CD-expdte Gestiona 20260414.xlsx', 1464) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2554, '2554', '0457/2026', 'CD-expdte Gestiona 20260414.xlsx', 1465) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2555, '2555', '0458/2026', 'CD-expdte Gestiona 20260414.xlsx', 1466) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2556, '2556', '0459/2026', 'CD-expdte Gestiona 20260414.xlsx', 1467) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2557, '2557', '0460/2026', 'CD-expdte Gestiona 20260414.xlsx', 1468) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-152', '0464/2026', 'CD-expdte Gestiona 20260414.xlsx', 1469) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-153', '0465/2026', 'CD-expdte Gestiona 20260414.xlsx', 1470) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-154', '0467/2026', 'CD-expdte Gestiona 20260414.xlsx', 1471) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-155', '0469/2026', 'CD-expdte Gestiona 20260414.xlsx', 1472) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2558, '2558', '0478/2026', 'CD-expdte Gestiona 20260414.xlsx', 1473) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2559, '2559', '0479/2026', 'CD-expdte Gestiona 20260414.xlsx', 1474) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2560, '2560', '0480/2026', 'CD-expdte Gestiona 20260414.xlsx', 1475) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2561, '2561', '0481/2026', 'CD-expdte Gestiona 20260414.xlsx', 1476) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2562, '2562', '0482/2026', 'CD-expdte Gestiona 20260414.xlsx', 1477) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2563, '2563', '0483/2026', 'CD-expdte Gestiona 20260414.xlsx', 1478) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2564, '2564', '0484/2026', 'CD-expdte Gestiona 20260414.xlsx', 1479) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2565, '2565', '0485/2026', 'CD-expdte Gestiona 20260414.xlsx', 1480) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2566, '2566', '0487/2026', 'CD-expdte Gestiona 20260414.xlsx', 1481) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2567, '2567', '0488/2026', 'CD-expdte Gestiona 20260414.xlsx', 1482) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2568, '2568', '0489/2026', 'CD-expdte Gestiona 20260414.xlsx', 1483) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2569, '2569', '0490/2026', 'CD-expdte Gestiona 20260414.xlsx', 1484) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2570, '2570', '0491/2026', 'CD-expdte Gestiona 20260414.xlsx', 1485) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2571, '2571', '0492/2026', 'CD-expdte Gestiona 20260414.xlsx', 1486) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2572, '2572', '0493/2026', 'CD-expdte Gestiona 20260414.xlsx', 1487) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2573, '2573', '0494/2026', 'CD-expdte Gestiona 20260414.xlsx', 1488) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2574, '2574', '0500/2026', 'CD-expdte Gestiona 20260414.xlsx', 1489) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2575, '2575', '0501/2026', 'CD-expdte Gestiona 20260414.xlsx', 1490) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2576, '2576', '0502/2026', 'CD-expdte Gestiona 20260414.xlsx', 1491) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-202', '0504/2026', 'CD-expdte Gestiona 20260414.xlsx', 1492) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2577, '2577', '0512/2026', 'CD-expdte Gestiona 20260414.xlsx', 1493) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2578, '2578', '0513/2026', 'CD-expdte Gestiona 20260414.xlsx', 1494) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2579, '2579', '0514/2026', 'CD-expdte Gestiona 20260414.xlsx', 1495) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2580, '2580', '0515/2026', 'CD-expdte Gestiona 20260414.xlsx', 1496) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2581, '2581', '0516/2026', 'CD-expdte Gestiona 20260414.xlsx', 1497) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2582, '2582', '0517/2026', 'CD-expdte Gestiona 20260414.xlsx', 1498) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2583, '2583', '0523/2026', 'CD-expdte Gestiona 20260414.xlsx', 1499) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2584, '2584', '0524/2026', 'CD-expdte Gestiona 20260414.xlsx', 1500) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2585, '2585', '0531/2026', 'CD-expdte Gestiona 20260414.xlsx', 1501) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2586, '2586', '0532/2026', 'CD-expdte Gestiona 20260414.xlsx', 1502) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2587, '2587', '0533/2026', 'CD-expdte Gestiona 20260414.xlsx', 1503) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-351', '0534/2026', 'CD-expdte Gestiona 20260414.xlsx', 1504) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-352', '0541/2026', 'CD-expdte Gestiona 20260414.xlsx', 1505) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-234', '0551/2026', 'CD-expdte Gestiona 20260414.xlsx', 1506) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2588, '2588', '0553/2026', 'CD-expdte Gestiona 20260414.xlsx', 1507) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2589, '2589', '0554/2026', 'CD-expdte Gestiona 20260414.xlsx', 1508) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2590, '2590', '0555/2026', 'CD-expdte Gestiona 20260414.xlsx', 1509) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2591, '2591', '0556/2026', 'CD-expdte Gestiona 20260414.xlsx', 1510) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2592, '2592', '0557/2026', 'CD-expdte Gestiona 20260414.xlsx', 1511) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-237', '0558/2026', 'CD-expdte Gestiona 20260414.xlsx', 1512) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RC-238', '0559/2026', 'CD-expdte Gestiona 20260414.xlsx', 1513) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2593, '2593', '0576/2026', 'CD-expdte Gestiona 20260414.xlsx', 1514) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2594, '2594', '0577/2026', 'CD-expdte Gestiona 20260414.xlsx', 1515) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2595, '2595', '0578/2026', 'CD-expdte Gestiona 20260414.xlsx', 1516) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2596, '2596', '0591/2026', 'CD-expdte Gestiona 20260414.xlsx', 1517) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2597, '2597', '0592/2026', 'CD-expdte Gestiona 20260414.xlsx', 1518) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2598, '2598', '0593/2026', 'CD-expdte Gestiona 20260414.xlsx', 1519) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2599, '2599', '0594/2026', 'CD-expdte Gestiona 20260414.xlsx', 1520) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2600, '2600', '0653/2026', 'CD-expdte Gestiona 20260414.xlsx', 1521) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2601, '2601', '0654/2026', 'CD-expdte Gestiona 20260414.xlsx', 1522) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2602, '2602', '0655/2026', 'CD-expdte Gestiona 20260414.xlsx', 1523) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2603, '2603', '0656/2026', 'CD-expdte Gestiona 20260414.xlsx', 1524) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2604, '2604', '0657/2026', 'CD-expdte Gestiona 20260414.xlsx', 1525) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2605, '2605', '0658/2026', 'CD-expdte Gestiona 20260414.xlsx', 1526) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2606, '2606', '0659/2026', 'CD-expdte Gestiona 20260414.xlsx', 1527) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2607, '2607', '0660/2026', 'CD-expdte Gestiona 20260414.xlsx', 1528) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2608, '2608', '0701/2026', 'CD-expdte Gestiona 20260414.xlsx', 1529) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2609, '2609', '0702/2026', 'CD-expdte Gestiona 20260414.xlsx', 1530) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2610, '2610', '0703/2026', 'CD-expdte Gestiona 20260414.xlsx', 1531) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2611, '2611', '0704/2026', 'CD-expdte Gestiona 20260414.xlsx', 1532) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2612, '2612', '0705/2026', 'CD-expdte Gestiona 20260414.xlsx', 1533) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2613, '2613', '0706/2026', 'CD-expdte Gestiona 20260414.xlsx', 1534) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2614, '2614', '0707/2026', 'CD-expdte Gestiona 20260414.xlsx', 1535) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2615, '2615', '0708/2026', 'CD-expdte Gestiona 20260414.xlsx', 1536) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2616, '2616', '0709/2026', 'CD-expdte Gestiona 20260414.xlsx', 1537) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (2617, '2617', '0710/2026', 'CD-expdte Gestiona 20260414.xlsx', 1538) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2026-E-RE-496', '0711/2026', 'CD-expdte Gestiona 20260414.xlsx', 1539) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +INSERT INTO gestiona_file_exceptions (external_report_id, external_reference, gestiona_file_code, notes, source_row) +VALUES (NULL, '2025-E-RE-916', '0714/2026', 'CD-expdte Gestiona 20260414.xlsx', 1540) +ON DUPLICATE KEY UPDATE + external_report_id = VALUES(external_report_id), + notes = VALUES(notes), + source_row = VALUES(source_row), + updated_at_utc = CURRENT_TIMESTAMP(6); + +-- Verificacion rapida +SELECT COUNT(*) AS total_excepciones FROM gestiona_file_exceptions; +SELECT external_reference, COUNT(*) AS total +FROM gestiona_file_exceptions +GROUP BY external_reference +HAVING COUNT(*) > 1 +ORDER BY total DESC, external_reference; +SELECT * FROM gestiona_file_exceptions ORDER BY source_row DESC LIMIT 20; \ No newline at end of file diff --git a/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_schema.sql b/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_schema.sql index 44d47db..fa2d54a 100644 --- a/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_schema.sql +++ b/Antifraude.Net/ApiDenuncias/Scripts/gestiondenuncias_schema.sql @@ -64,6 +64,8 @@ CREATE TABLE IF NOT EXISTS complaints ( workflow_status TEXT NOT NULL, selected_document_name TEXT NULL, gestiona_uploaded_at_utc DATETIME(6) NULL, + gestiona_last_upload_type TEXT NOT NULL, + gestiona_assigned_group TEXT NOT NULL, is_in_gestiona TINYINT(1) NOT NULL DEFAULT 0, is_rejected TINYINT(1) NOT NULL DEFAULT 0, created_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), @@ -133,6 +135,24 @@ CREATE TABLE IF NOT EXISTS user_inbox_reports ( ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +CREATE TABLE IF NOT EXISTS gestiona_upload_history ( + id BIGINT NOT NULL AUTO_INCREMENT, + external_report_id INT NOT NULL, + gestiona_file_url TEXT NOT NULL, + gestiona_file_code VARCHAR(128) NOT NULL DEFAULT '', + upload_type VARCHAR(64) NOT NULL DEFAULT '', + assigned_group_code VARCHAR(32) NOT NULL DEFAULT '', + uploaded_by_username VARCHAR(256) NOT NULL DEFAULT '', + uploaded_at_utc DATETIME(6) NOT NULL, + subject TEXT NULL, + document_names TEXT NULL, + created_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + PRIMARY KEY (id), + KEY ix_gestiona_upload_history_report (external_report_id), + KEY ix_gestiona_upload_history_uploaded_at (uploaded_at_utc), + KEY ix_gestiona_upload_history_user (uploaded_by_username) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + CREATE TABLE IF NOT EXISTS complaint_attachments ( id BIGINT NOT NULL AUTO_INCREMENT, complaint_id BIGINT NOT NULL, diff --git a/Antifraude.Net/ApiDenuncias/Services/AppConfigurationService.cs b/Antifraude.Net/ApiDenuncias/Services/AppConfigurationService.cs index 38e9a63..19d478e 100644 --- a/Antifraude.Net/ApiDenuncias/Services/AppConfigurationService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/AppConfigurationService.cs @@ -35,7 +35,12 @@ public sealed class AppConfigurationService ? null : Convert.ToString(value, CultureInfo.InvariantCulture); - return new AppConfigurationDto(string.IsNullOrWhiteSpace(dateText) ? null : dateText); + var latestEncryptionKey = await GetLatestEncryptionKeyAsync(connection, cancellationToken); + + return new AppConfigurationDto( + string.IsNullOrWhiteSpace(dateText) ? null : dateText, + latestEncryptionKey?.KeyDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + latestEncryptionKey?.Status); } public async Task SetExternalUpdateCutoffDateAsync( @@ -59,7 +64,42 @@ public sealed class AppConfigurationService command.Parameters.AddWithValue("@settingValue", string.IsNullOrWhiteSpace(dateText) ? DBNull.Value : dateText); await command.ExecuteNonQueryAsync(cancellationToken); - return new AppConfigurationDto(dateText); + var latestEncryptionKey = await GetLatestEncryptionKeyAsync(connection, cancellationToken); + return new AppConfigurationDto( + dateText, + latestEncryptionKey?.KeyDate.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + latestEncryptionKey?.Status); + } + + private static async Task GetLatestEncryptionKeyAsync( + MySqlConnection connection, + CancellationToken cancellationToken) + { + try + { + await using var command = new MySqlCommand( + """ + SELECT key_date, status + FROM encryption_keys + ORDER BY key_date DESC + LIMIT 1; + """, + connection); + + await using var reader = await command.ExecuteReaderAsync(cancellationToken); + if (!await reader.ReadAsync(cancellationToken)) + { + return null; + } + + return new LatestEncryptionKey( + DateOnly.FromDateTime(reader.GetDateTime("key_date")), + reader.GetString("status")); + } + catch (MySqlException ex) when (ex.Number == 1146) + { + return null; + } } private async Task OpenConnectionAsync(CancellationToken cancellationToken) @@ -84,4 +124,6 @@ public sealed class AppConfigurationService connection); await command.ExecuteNonQueryAsync(cancellationToken); } + + private sealed record LatestEncryptionKey(DateOnly KeyDate, string Status); } diff --git a/Antifraude.Net/ApiDenuncias/Services/DenunciaInboxService.cs b/Antifraude.Net/ApiDenuncias/Services/DenunciaInboxService.cs index 9da75e8..5cacfb9 100644 --- a/Antifraude.Net/ApiDenuncias/Services/DenunciaInboxService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/DenunciaInboxService.cs @@ -1,4 +1,6 @@ using System.IO.Compression; +using System.Globalization; +using System.Security.Cryptography; using System.Text; using ApiDenuncias.Helpers; using GestionaDenuncias.Shared.Models; @@ -7,8 +9,6 @@ namespace ApiDenuncias.Services; public sealed class DenunciaInboxService { - private const string RootPath = @"C:\ZipsDenuncias"; - private static readonly HashSet BlockedAttachmentExtensions = new(StringComparer.OrdinalIgnoreCase) { ".ade", @@ -55,91 +55,46 @@ public sealed class DenunciaInboxService }; private readonly IGestionaService _gestionaService; + private readonly GestionaExpedienteExceptionStore _gestionaExceptionStore; private readonly IDenunciaStore _denunciaStore; + private readonly IFilteredDenunciaStore _filteredDenunciaStore; private readonly ILogger _logger; public DenunciaInboxService( IGestionaService gestionaService, + GestionaExpedienteExceptionStore gestionaExceptionStore, IDenunciaStore denunciaStore, + IFilteredDenunciaStore filteredDenunciaStore, ILogger logger) { _gestionaService = gestionaService; + _gestionaExceptionStore = gestionaExceptionStore; _denunciaStore = denunciaStore; + _filteredDenunciaStore = filteredDenunciaStore; _logger = logger; } public async Task EnsureStorageReadyAsync(CancellationToken cancellationToken = default) { - Directory.CreateDirectory(RootPath); await _denunciaStore.EnsureSchemaAsync(cancellationToken); - } - - public async Task> GetExistingZipNamesAsync(CancellationToken cancellationToken = default) - { - await EnsureStorageReadyAsync(cancellationToken); - return Directory - .GetFiles(RootPath, "*.zip") - .Select(Path.GetFileName) - .Where(name => !string.IsNullOrWhiteSpace(name)) - .OrderBy(name => name, StringComparer.OrdinalIgnoreCase) - .ToArray()!; - } - - public async Task DeleteZipAsync(string zipName, CancellationToken cancellationToken = default) - { - await EnsureStorageReadyAsync(cancellationToken); - - var fullPath = Path.Combine(RootPath, zipName); - if (File.Exists(fullPath)) - { - File.Delete(fullPath); - } - } - - public async Task ProcessPendingFolderZipsAsync(CancellationToken cancellationToken = default) - { - await EnsureStorageReadyAsync(cancellationToken); - - var zipPaths = Directory.GetFiles(RootPath, "*.zip") - .OrderBy(path => path, StringComparer.OrdinalIgnoreCase) - .ToList(); - - var errors = new List(); - var warnings = new List(); - var importedCount = 0; - var complaintIds = new List(); - - foreach (var zipPath in zipPaths) - { - try - { - var zipBytes = await File.ReadAllBytesAsync(zipPath, cancellationToken); - var result = await ProcessZipAsync(zipBytes, Path.GetFileName(zipPath), null, cancellationToken); - File.Delete(zipPath); - importedCount++; - complaintIds.Add(result.ComplaintId); - warnings.AddRange(result.Warnings.Select(warning => $"{Path.GetFileName(zipPath)}: {warning}")); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error procesando el ZIP local {ZipPath}", zipPath); - errors.Add($"{Path.GetFileName(zipPath)}: {ex.Message}"); - } - } - - return new ImportSummary(zipPaths.Count, importedCount, errors, complaintIds, warnings); + await _gestionaExceptionStore.EnsureSchemaAsync(cancellationToken); } public async Task ImportFromGlobalLeaksAsync( - FileDownloadResult zipDownload, + FileDownloadResult reportDownload, FileDownloadResult? jsonDownload, + ReportDetailDto? reportDetail, CancellationToken cancellationToken = default) { await EnsureStorageReadyAsync(cancellationToken); - var fileName = string.IsNullOrWhiteSpace(zipDownload.FileName) - ? $"report-{Guid.NewGuid():N}.zip" - : zipDownload.FileName; + var sourceName = string.IsNullOrWhiteSpace(reportDownload.FileName) + ? $"report-{Guid.NewGuid():N}" + : reportDownload.FileName; + if (sourceName.EndsWith(".zip", StringComparison.OrdinalIgnoreCase)) + { + sourceName = Path.GetFileNameWithoutExtension(sourceName); + } var json = jsonDownload is null ? null @@ -147,24 +102,72 @@ public sealed class DenunciaInboxService try { - var result = await ProcessZipAsync(zipDownload.Content, fileName, json, cancellationToken); - return new ImportSummary(1, 1, [], [result.ComplaintId], result.Warnings); + var result = await ProcessGlobalLeaksPackageAsync(reportDownload.Content, sourceName, json, reportDetail, cancellationToken); + return new ImportSummary( + 1, + result.ImportedCount, + [], + result.ImportedCount > 0 ? [result.ComplaintId] : [], + result.Warnings); } catch (Exception ex) { - _logger.LogError(ex, "Error importando denuncia desde GlobalLeaks {FileName}", fileName); - return new ImportSummary(1, 0, [$"{fileName}: {ex.Message}"]); + _logger.LogError(ex, "Error importando denuncia desde GlobalLeaks {SourceName}", sourceName); + return new ImportSummary(1, 0, [ToUserImportErrorMessage(sourceName, ex)]); } } - private async Task ProcessZipAsync( - byte[] zipBytes, + private static string ToUserImportErrorMessage(string sourceName, Exception ex) + { + var message = ex.Message ?? string.Empty; + + if (ex is EncryptionKeyUnavailableException || + message.Contains("encryption_keys", StringComparison.OrdinalIgnoreCase) || + message.Contains("clave de cifrado", StringComparison.OrdinalIgnoreCase)) + { + return $"{sourceName}: no hay una clave de cifrado activa para guardar la denuncia. Avisa al equipo tecnico."; + } + + if (message.Contains("max_allowed_packet", StringComparison.OrdinalIgnoreCase) || + message.Contains("Error submitting", StringComparison.OrdinalIgnoreCase)) + { + return $"{sourceName}: la denuncia contiene un adjunto demasiado grande para guardarse. Revisa los adjuntos o consulta con soporte."; + } + + if (message.Contains("Connection must be Open", StringComparison.OrdinalIgnoreCase) || + message.Contains("current state is Closed", StringComparison.OrdinalIgnoreCase)) + { + return $"{sourceName}: se ha perdido la conexion mientras se guardaba la denuncia. Vuelve a intentarlo."; + } + + if (ex is InvalidDataException) + { + return $"{sourceName}: el paquete descargado de GlobalLeaks no se ha podido leer correctamente. Vuelve a intentarlo."; + } + + if (ex is InvalidOperationException && IsUserFacingImportMessage(message)) + { + return $"{sourceName}: {message}"; + } + + return $"{sourceName}: no se ha podido importar la denuncia. Vuelve a intentarlo; si se repite, avisa al equipo tecnico."; + } + + private static bool IsUserFacingImportMessage(string message) + => message.StartsWith("El paquete de GlobalLeaks", StringComparison.OrdinalIgnoreCase) || + message.StartsWith("El report viene", StringComparison.OrdinalIgnoreCase) || + message.StartsWith("El archivo", StringComparison.OrdinalIgnoreCase) || + message.StartsWith("Denuncia no disponible", StringComparison.OrdinalIgnoreCase); + + private async Task ProcessGlobalLeaksPackageAsync( + byte[] packageBytes, string sourceName, string? globalLeaksJson, + ReportDetailDto? reportDetail, CancellationToken cancellationToken) { - using var zipStream = new MemoryStream(zipBytes, writable: false); - using var archive = new ZipArchive(zipStream, ZipArchiveMode.Read, leaveOpen: false); + using var packageStream = new MemoryStream(packageBytes, writable: false); + using var archive = new ZipArchive(packageStream, ZipArchiveMode.Read, leaveOpen: false); var reportEntry = FindReportEntry(archive); @@ -178,8 +181,8 @@ public sealed class DenunciaInboxService throw new InvalidOperationException( entries.Length == 0 - ? "El ZIP no contiene ficheros." - : $"El ZIP no contiene un report reconocible. Ficheros encontrados: {string.Join(", ", entries)}"); + ? "El paquete de GlobalLeaks no contiene ficheros." + : $"El paquete de GlobalLeaks no contiene un report reconocible. Ficheros encontrados: {string.Join(", ", entries)}"); } var reportIsPdf = IsPdfEntry(reportEntry); @@ -224,16 +227,51 @@ public sealed class DenunciaInboxService denuncia.Expediente_Gestiona = "Pendiente"; } - var readFilesResult = await ReadFilesFromArchiveAsync(archive, reportEntry, denuncia.Id_Denuncia, cancellationToken); + var readFilesResult = await ReadFilesFromArchiveAsync( + archive, + reportEntry, + denuncia.Id_Denuncia, + denuncia.Fecha, + reportDetail, + cancellationToken); await MergeComplaintAsync(denuncia, cancellationToken); + var storedComplaintBeforeFiles = await _denunciaStore.GetDenunciaByIdAsync(denuncia.Id_Denuncia, cancellationToken); + var existingFiles = IsAlreadyUploadedToGestiona(storedComplaintBeforeFiles) + ? await GetFicherosMetadataByDenunciaForImportAsync(denuncia.Id_Denuncia, cancellationToken) + : []; + PreserveKnownUploadedReportStatus(readFilesResult.Files, existingFiles, storedComplaintBeforeFiles); await MergeFilesAsync(readFilesResult.Files, cancellationToken); - return new ProcessZipResult(denuncia.Id_Denuncia, readFilesResult.Warnings); + + var warnings = readFilesResult.Warnings.ToList(); + var storedComplaint = await _denunciaStore.GetDenunciaByIdAsync(denuncia.Id_Denuncia, cancellationToken); + if (IsAlreadyUploadedToGestiona(storedComplaint)) + { + var storedFiles = await GetFicherosMetadataByDenunciaForImportAsync(denuncia.Id_Denuncia, cancellationToken); + if (!HasPendingFilesForGestiona(storedFiles)) + { + storedComplaint!.EsActualizacion = false; + storedComplaint.EnGestiona = true; + await _denunciaStore.UpsertDenunciaAsync(storedComplaint, cancellationToken); + + warnings.Add($"La denuncia #{denuncia.Id_Denuncia} ya esta en Gestiona y no tiene documentos nuevos pendientes de subir."); + return new ProcessPackageResult(denuncia.Id_Denuncia, 0, warnings); + } + } + + return new ProcessPackageResult(denuncia.Id_Denuncia, 1, warnings); } + private Task> GetFicherosMetadataByDenunciaForImportAsync( + int denunciaId, + CancellationToken cancellationToken) + => _filteredDenunciaStore.GetFicherosMetadataByDenunciaAsync(denunciaId, cancellationToken); + private async Task ReadFilesFromArchiveAsync( ZipArchive archive, ZipArchiveEntry reportEntry, int denunciaId, + DateTime reportDateUtc, + ReportDetailDto? reportDetail, CancellationToken cancellationToken) { var warnings = new List(); @@ -243,9 +281,9 @@ public sealed class DenunciaInboxService id_Fichero: 0, id_Tipo: 1, descripcion: IsPdfEntry(reportEntry) ? "report.pdf original" : "report.txt original", - fecha: reportEntry.LastWriteTime.UtcDateTime == DateTime.MinValue - ? DateTime.UtcNow - : reportEntry.LastWriteTime.UtcDateTime, + fecha: reportDateUtc == DateTime.MinValue + ? GetEntryFallbackDateUtc(reportEntry) + : NormalizeUtc(reportDateUtc), observaciones: "", id_Denuncia: denunciaId, nombreFichero: IsPdfEntry(reportEntry) ? "report.pdf" : "report.txt", @@ -264,9 +302,7 @@ public sealed class DenunciaInboxService id_Fichero: 0, id_Tipo: 1, descripcion: null, - fecha: entry.LastWriteTime.UtcDateTime == DateTime.MinValue - ? DateTime.UtcNow - : entry.LastWriteTime.UtcDateTime, + fecha: ResolveAttachmentDateUtc(entry, reportDetail), observaciones: "", id_Denuncia: denunciaId, nombreFichero: Path.GetFileName(entry.FullName), @@ -308,6 +344,67 @@ public sealed class DenunciaInboxService return _denunciaStore.UpsertFicherosAsync(nuevosFicheros, cancellationToken); } + private static void PreserveKnownUploadedReportStatus( + List newFiles, + IReadOnlyList existingFiles, + DenunciasGestiona? storedComplaint) + { + if (!IsAlreadyUploadedToGestiona(storedComplaint) || existingFiles.Count == 0) + { + return; + } + + var existingReportHashes = existingFiles + .Where(file => file.EsReport && !string.IsNullOrWhiteSpace(file.ContentSha256)) + .GroupBy(file => file.ContentSha256, StringComparer.OrdinalIgnoreCase) + .ToDictionary(group => group.Key, group => group.First(), StringComparer.OrdinalIgnoreCase); + + foreach (var report in newFiles.Where(file => file.EsReport)) + { + var hash = string.IsNullOrWhiteSpace(report.ContentSha256) + ? ComputeSha256Hex(report.Fichero ?? []) + : report.ContentSha256.Trim().ToLowerInvariant(); + report.ContentSha256 = hash; + + if (!existingReportHashes.TryGetValue(hash, out var existingReport)) + { + continue; + } + + report.Subido = true; + report.FechaSubida = existingReport.FechaSubida ?? + (storedComplaint!.FechaSubidaAGestiona == DateTime.MinValue + ? null + : storedComplaint.FechaSubidaAGestiona); + } + } + + private static bool HasPendingFilesForGestiona(IReadOnlyList files) + { + var plannedHashes = files + .Where(file => file.Subido && !string.IsNullOrWhiteSpace(file.ContentSha256)) + .Select(file => file.ContentSha256) + .ToHashSet(StringComparer.OrdinalIgnoreCase); + + foreach (var file in files.Where(file => !file.Subido)) + { + if (string.IsNullOrWhiteSpace(file.ContentSha256)) + { + return true; + } + + if (plannedHashes.Add(file.ContentSha256)) + { + return true; + } + } + + return false; + } + + private static string ComputeSha256Hex(byte[] content) + => Convert.ToHexString(SHA256.HashData(content)).ToLowerInvariant(); + private async Task CompleteGestionaStatusAsync( DenunciasGestiona denuncia, CancellationToken cancellationToken) @@ -330,15 +427,15 @@ public sealed class DenunciaInboxService var match = await _gestionaService.BuscarExpedientePorIdEnAsuntoAsync(denuncia.Id_Denuncia); if (match is null) { - ApplyPendingGestionaStatus(denuncia); - return; + match = await TryFindGestionaExceptionMatchAsync(denuncia, cancellationToken); + if (match is null) + { + ApplyPendingGestionaStatus(denuncia); + return; + } } - denuncia.EsActualizacion = true; - denuncia.EnGestiona = true; - denuncia.Expediente_Gestiona = match.FileUrl; - denuncia.CodigoExpedienteGestiona = match.CodigoExpediente ?? string.Empty; - denuncia.NombreDenuncia = match.FreeTitle ?? $"Denuncia {denuncia.Id_Denuncia}-CD"; + ApplyGestionaMatch(denuncia, match); } catch (Exception ex) { @@ -350,6 +447,39 @@ public sealed class DenunciaInboxService } } + private async Task TryFindGestionaExceptionMatchAsync( + DenunciasGestiona denuncia, + CancellationToken cancellationToken) + { + var exception = await _gestionaExceptionStore.FindAsync(denuncia, cancellationToken); + if (exception is null) + { + return null; + } + + var match = await _gestionaService.BuscarExpedientePorCodigoAsync(exception.GestionaFileCode); + if (match is null) + { + _logger.LogWarning( + "La denuncia {DenunciaId} tiene excepcion Gestiona con codigo {GestionaFileCode}, pero no se ha encontrado expediente en Gestiona.", + denuncia.Id_Denuncia, + exception.GestionaFileCode); + } + + return match; + } + + private static void ApplyGestionaMatch( + DenunciasGestiona denuncia, + GestionaExpedienteInfo match) + { + denuncia.EsActualizacion = true; + denuncia.EnGestiona = true; + denuncia.Expediente_Gestiona = match.FileUrl; + denuncia.CodigoExpedienteGestiona = match.CodigoExpediente ?? string.Empty; + denuncia.NombreDenuncia = match.FreeTitle ?? $"Denuncia {denuncia.Id_Denuncia}-CD"; + } + private static bool TryApplyGestionaStatusFromStore( DenunciasGestiona target, DenunciasGestiona? storedComplaint) @@ -474,6 +604,83 @@ public sealed class DenunciaInboxService return IsDirectChildOf(normalized, "files") || IsDirectChildOf(normalized, "files_attached_from_recipients"); } + private static DateTime ResolveAttachmentDateUtc(ZipArchiveEntry entry, ReportDetailDto? reportDetail) + { + if (reportDetail is not null) + { + var normalized = NormalizeEntryPath(entry.FullName); + var preferredFiles = IsDirectChildOf(normalized, "files_attached_from_recipients") + ? reportDetail.ReceiverFiles + : reportDetail.WhistleblowerFiles; + + var detailDate = TryFindReportFileDateUtc(entry, preferredFiles) ?? + TryFindReportFileDateUtc(entry, reportDetail.WhistleblowerFiles.Concat(reportDetail.ReceiverFiles)); + if (detailDate is not null) + { + return detailDate.Value; + } + } + + return GetEntryFallbackDateUtc(entry); + } + + private static DateTime? TryFindReportFileDateUtc(ZipArchiveEntry entry, IEnumerable reportFiles) + { + var entryName = NormalizeFileName(entry.Name); + var candidates = reportFiles + .Where(file => !string.IsNullOrWhiteSpace(file.Name) && + string.Equals(NormalizeFileName(file.Name), entryName, StringComparison.OrdinalIgnoreCase)) + .OrderByDescending(file => file.Size is null || file.Size == entry.Length) + .ToList(); + + foreach (var candidate in candidates) + { + var parsed = TryParseGlobalLeaksDateUtc(candidate.CreationDate); + if (parsed is not null) + { + return parsed; + } + } + + return null; + } + + private static DateTime? TryParseGlobalLeaksDateUtc(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return null; + } + + var normalized = value.Replace("Z", "+00:00", StringComparison.Ordinal); + return DateTimeOffset.TryParse( + normalized, + CultureInfo.InvariantCulture, + DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, + out var parsed) + ? parsed.UtcDateTime + : null; + } + + private static DateTime GetEntryFallbackDateUtc(ZipArchiveEntry entry) + { + var utcDate = entry.LastWriteTime.UtcDateTime; + return utcDate == DateTime.MinValue + ? DateTime.UtcNow + : utcDate; + } + + private static DateTime NormalizeUtc(DateTime value) + => value.Kind switch + { + DateTimeKind.Utc => value, + DateTimeKind.Local => value.ToUniversalTime(), + _ => DateTime.SpecifyKind(value, DateTimeKind.Utc) + }; + + private static string NormalizeFileName(string fileName) + => Path.GetFileName(fileName.Replace('\\', '/')).Trim(); + private static bool IsBlockedAttachmentEntry(ZipArchiveEntry entry) { var extension = Path.GetExtension(entry.Name); @@ -667,7 +874,7 @@ public sealed class DenunciaInboxService builder.AppendLine(); } - private sealed record ProcessZipResult(int ComplaintId, IReadOnlyList Warnings); + private sealed record ProcessPackageResult(int ComplaintId, int ImportedCount, IReadOnlyList Warnings); private sealed record ReadFilesResult(List Files, IReadOnlyList Warnings); } diff --git a/Antifraude.Net/ApiDenuncias/Services/EncryptedDenunciaStore.cs b/Antifraude.Net/ApiDenuncias/Services/EncryptedDenunciaStore.cs index 1f6a1f4..847769e 100644 --- a/Antifraude.Net/ApiDenuncias/Services/EncryptedDenunciaStore.cs +++ b/Antifraude.Net/ApiDenuncias/Services/EncryptedDenunciaStore.cs @@ -121,6 +121,51 @@ public sealed class EncryptedDenunciaStore : IDenunciaStore, IFilteredDenunciaSt return await UnprotectAttachmentsAsync(ficheros, skipPurgedRows: false, cancellationToken); } + public Task> GetFicherosMetadataByDenunciaAsync( + int denunciaId, + CancellationToken cancellationToken = default) + => _inner.GetFicherosMetadataByDenunciaAsync(denunciaId, cancellationToken); + + public async Task> GetGestionaUploadHistoryAsync(CancellationToken cancellationToken = default) + { + var history = await _inner.GetGestionaUploadHistoryAsync(cancellationToken); + var knownIds = history + .Select(item => item.DenunciaId) + .ToHashSet(); + + List fallbackHistory = []; + try + { + var storedComplaints = await _inner.GetDenunciasByScopeAsync(DenunciaListScope.InGestiona, cancellationToken); + var fallbackComplaints = await UnprotectComplaintsAsync(storedComplaints, skipPurgedRows: true, cancellationToken); + fallbackHistory = fallbackComplaints + .Where(complaint => complaint.FechaSubidaAGestiona != DateTime.MinValue && + !knownIds.Contains(complaint.Id_Denuncia)) + .Select(complaint => new GestionaUploadHistoryEntry( + 0, + complaint.Id_Denuncia, + complaint.Expediente_Gestiona ?? string.Empty, + complaint.ExpedienteGestionaMostrable, + complaint.UltimaSubidaGestionaTipoMostrable, + ExtractGroupCode(complaint.UltimoGrupoAsignadoGestionaMostrable), + "No registrado", + complaint.FechaSubidaAGestiona, + complaint.NombreDenuncia ?? string.Empty, + complaint.ArchivoElegido ?? string.Empty)) + .ToList(); + } + catch (Exception ex) + { + _logger.LogWarning(ex, "No se ha podido completar el historico de Gestiona con denuncias antiguas descifrables."); + } + + return history + .Concat(fallbackHistory) + .OrderByDescending(item => item.UploadedAtUtc) + .ThenByDescending(item => item.Id) + .ToList(); + } + private async Task> UnprotectAttachmentsAsync( List ficheros, bool skipPurgedRows, @@ -165,6 +210,12 @@ public sealed class EncryptedDenunciaStore : IDenunciaStore, IFilteredDenunciaSt await _inner.UpsertFicherosAsync(ficheros.Select(fichero => ProtectAttachment(fichero, key)).ToArray(), cancellationToken); } + public Task AddGestionaUploadHistoryAsync( + GestionaUploadHistoryCreateRequest request, + string username, + CancellationToken cancellationToken = default) + => _inner.AddGestionaUploadHistoryAsync(request, username, cancellationToken); + public Task MarkFicherosAsUploadedAsync( int denunciaId, IEnumerable fileNames, @@ -219,6 +270,8 @@ public sealed class EncryptedDenunciaStore : IDenunciaStore, IFilteredDenunciaSt EstadoDenuncia = source.EstadoDenuncia, ArchivoElegido = source.ArchivoElegido, FechaSubidaAGestiona = source.FechaSubidaAGestiona, + UltimaSubidaGestionaTipo = source.UltimaSubidaGestionaTipo, + UltimoGrupoAsignadoGestiona = source.UltimoGrupoAsignadoGestiona, EnGestiona = source.EnGestiona, EnRechazada = source.EnRechazada, @@ -252,6 +305,18 @@ public sealed class EncryptedDenunciaStore : IDenunciaStore, IFilteredDenunciaSt return rebuilt; } + private static string ExtractGroupCode(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return string.Empty; + } + + var trimmed = value.Trim(); + var code = new string(trimmed.TakeWhile(char.IsDigit).ToArray()); + return string.IsNullOrWhiteSpace(code) ? trimmed : code; + } + private static DenunciasGestiona? TryParseStoredReport(DenunciasGestiona stored) { if (string.IsNullOrWhiteSpace(stored.TextoOriginalReport)) @@ -286,6 +351,8 @@ public sealed class EncryptedDenunciaStore : IDenunciaStore, IFilteredDenunciaSt target.EstadoDenuncia = stored.EstadoDenuncia; target.ArchivoElegido = stored.ArchivoElegido; target.FechaSubidaAGestiona = stored.FechaSubidaAGestiona; + target.UltimaSubidaGestionaTipo = stored.UltimaSubidaGestionaTipo; + target.UltimoGrupoAsignadoGestiona = stored.UltimoGrupoAsignadoGestiona; target.EnGestiona = stored.EnGestiona; target.EnRechazada = stored.EnRechazada; } diff --git a/Antifraude.Net/ApiDenuncias/Services/GestionaDocumentWorkflowService.cs b/Antifraude.Net/ApiDenuncias/Services/GestionaDocumentWorkflowService.cs index f13a7ea..4b727c1 100644 --- a/Antifraude.Net/ApiDenuncias/Services/GestionaDocumentWorkflowService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/GestionaDocumentWorkflowService.cs @@ -1,5 +1,6 @@ using System.Net.Http.Headers; using System.Security.Cryptography; +using System.Globalization; using System.Text; using System.Text.Json; using Microsoft.Extensions.Logging; @@ -35,6 +36,17 @@ public sealed class GestionaDocumentWorkflowService _configuration["Gestiona:AccessToken"] ?? throw new InvalidOperationException("Falta Gestiona:AccessToken en appsettings."); + private string DocumentMetadataLanguage => + _configuration["Gestiona:DocumentMetadataLanguage"] ?? "es"; + + private string DocumentMetadataType => + _configuration["Gestiona:DocumentMetadataType"] + ?? throw new InvalidOperationException("Falta Gestiona:DocumentMetadataType para informar el tipo documental."); + + private string DocumentMetadataSubtype => + _configuration["Gestiona:DocumentMetadataSubtype"] + ?? throw new InvalidOperationException("Falta Gestiona:DocumentMetadataSubtype para informar el subtipo documental."); + public async Task UploadDocumentAndReturnUrlAsync(string fileUrl, byte[] contentBytes, string fileName) { var fileUrlAbs = EnsureAbsoluteGestionaUrl(fileUrl, GestionaApiBase); @@ -47,7 +59,9 @@ public sealed class GestionaDocumentWorkflowService name = fileName, description = "Documento de denuncia", elaboration_state = "EE01", - metadata_language = "ES", + metadata_language = DocumentMetadataLanguage, + metadata_type = DocumentMetadataType, + metadata_subtype = DocumentMetadataSubtype, links = new[] { new { rel = "content", href = uploadUri } } }; @@ -106,28 +120,24 @@ public sealed class GestionaDocumentWorkflowService throw new InvalidOperationException("No se pudo obtener la URL del documento creado en Gestiona."); } - public async Task TramitarDocumentoAsync(string documentUrl, string assignedGroupHref, int? complaintId = null) + public async Task TramitarDocumentoAsync( + string documentUrl, + string assignedGroupCode, + int? complaintId = null, + bool isUpdate = false) { - _ = assignedGroupHref; - var docUrlAbs = EnsureAbsoluteGestionaUrl(documentUrl, GestionaApiBase); - var templateHref = GetConfiguredTemplateHref(docUrlAbs); - - if (string.IsNullOrWhiteSpace(templateHref)) - { - throw new InvalidOperationException( - "Falta Gestiona:CircuitTemplateId. No se listan plantillas para evitar campos deprecated."); - } - - var payload = await GetCircuitTemplatePayloadAsync(templateHref); + var operationLabel = isUpdate ? $"actualizacion grupo {NormalizeGroupCode(assignedGroupCode)}" : "nueva denuncia"; + var (templateHref, payload) = await ResolveCircuitTemplatePayloadAsync(docUrlAbs, isUpdate, assignedGroupCode); var (success, statusCode, body) = await TryPostCircuitAsync(docUrlAbs, payload); if (success) { _logger.LogInformation( - "Documento {DocumentUrl} enviado a circuito con plantilla {TemplateHref}. Denuncia={ComplaintId}.", + "Documento {DocumentUrl} enviado a circuito con plantilla {TemplateHref}. Denuncia={ComplaintId}. Tipo={OperationType}.", docUrlAbs, templateHref, - complaintId); + complaintId, + operationLabel); return; } @@ -142,6 +152,171 @@ public sealed class GestionaDocumentWorkflowService $"TramitarDocumentoAsync: {(int)statusCode} {statusCode}\n{body}"); } + private async Task<(string TemplateHref, string Payload)> ResolveCircuitTemplatePayloadAsync( + string documentUrl, + bool isUpdate, + string? assignedGroupCode) + { + var templatesUrl = $"{documentUrl.TrimEnd('/')}/circuit/templates"; + var templates = await GetCircuitTemplatesAsync(templatesUrl); + if (templates.Count == 0) + { + throw new InvalidOperationException("Gestiona no ha devuelto plantillas de circuito para el documento."); + } + + var selection = GetOperationCircuitTemplateSelection(isUpdate, assignedGroupCode); + if (!string.IsNullOrWhiteSpace(selection.TemplateName)) + { + var resolved = await TryResolveCircuitTemplatePayloadByNameAsync(templates, selection.TemplateName); + if (resolved is not null) + { + return resolved.Value; + } + + if (selection.Required) + { + throw new InvalidOperationException( + $"No se ha encontrado la plantilla de circuito '{selection.TemplateName}' para {selection.OperationLabel}."); + } + } + + var configuredName = _configuration["Gestiona:CircuitTemplateName"]; + var configuredResolved = await TryResolveCircuitTemplatePayloadByNameAsync(templates, configuredName); + if (configuredResolved is not null) + { + return configuredResolved.Value; + } + + var signerTitle = _configuration["Gestiona:CircuitSignerStampTitle"]; + if (!string.IsNullOrWhiteSpace(signerTitle)) + { + foreach (var template in templates) + { + var href = GetRequiredSelfHref(template); + var payload = await GetCircuitTemplatePayloadAsync(href); + if (payload.Contains(signerTitle, StringComparison.OrdinalIgnoreCase)) + { + return (href, payload); + } + } + } + + if (templates.Count == 1) + { + var href = GetRequiredSelfHref(templates[0]); + return (href, await GetCircuitTemplatePayloadAsync(href)); + } + + throw new InvalidOperationException( + "No se puede seleccionar de forma inequivoca la plantilla de circuito. Configura Gestiona:CircuitTemplateName o Gestiona:CircuitSignerStampTitle."); + } + + private CircuitTemplateSelection GetOperationCircuitTemplateSelection(bool isUpdate, string? assignedGroupCode) + { + if (!isUpdate) + { + return new CircuitTemplateSelection( + _configuration["Gestiona:CircuitNewComplaintTemplateName"], + Required: true, + OperationLabel: "nueva denuncia"); + } + + var defaultUpdateTemplateName = FirstConfigured( + _configuration["Gestiona:CircuitTemplateName"], + _configuration["Gestiona:CircuitUpdateTemplateName"]); + + return NormalizeGroupCode(assignedGroupCode) switch + { + "510" => new CircuitTemplateSelection( + FirstConfigured( + _configuration["Gestiona:CircuitUpdateSdiTemplateName"], + _configuration["Gestiona:CircuitUpdateTemplateNameSdi"]), + Required: true, + OperationLabel: "actualizacion de denuncia SDI"), + + "600" => new CircuitTemplateSelection( + FirstConfigured( + _configuration["Gestiona:CircuitUpdateSajTemplateName"], + _configuration["Gestiona:CircuitUpdateTemplateNameSaj"]), + Required: true, + OperationLabel: "actualizacion de denuncia SAJ"), + + _ => new CircuitTemplateSelection( + defaultUpdateTemplateName, + Required: !string.IsNullOrWhiteSpace(defaultUpdateTemplateName), + OperationLabel: "actualizacion de denuncia") + }; + } + + private static string? FirstConfigured(params string?[] values) + => values.FirstOrDefault(value => !string.IsNullOrWhiteSpace(value)); + + private static string NormalizeGroupCode(string? assignedGroupCode) + { + if (string.IsNullOrWhiteSpace(assignedGroupCode)) + { + return string.Empty; + } + + var digits = new string(assignedGroupCode.Where(char.IsDigit).ToArray()); + return string.IsNullOrWhiteSpace(digits) ? assignedGroupCode.Trim() : digits; + } + + private sealed record CircuitTemplateSelection(string? TemplateName, bool Required, string OperationLabel); + + private async Task<(string TemplateHref, string Payload)?> TryResolveCircuitTemplatePayloadByNameAsync( + List templates, + string? templateName) + { + var configuredName = NormalizeKey(templateName); + if (string.IsNullOrWhiteSpace(configuredName)) + { + return null; + } + + foreach (var template in templates) + { + if (NormalizeKey(GetJsonString(template, "name")).Contains(configuredName, StringComparison.Ordinal) || + NormalizeKey(GetJsonString(template, "title")).Contains(configuredName, StringComparison.Ordinal)) + { + var href = GetRequiredSelfHref(template); + return (href, await GetCircuitTemplatePayloadAsync(href)); + } + } + + return null; + } + + private async Task> GetCircuitTemplatesAsync(string templatesUrl) + { + using var req = new HttpRequestMessage(HttpMethod.Get, templatesUrl); + req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", GestionaAccessToken); + req.Headers.Accept.Add( + MediaTypeWithQualityHeaderValue.Parse("application/vnd.gestiona.circuits.templates-filedoc-page+json")); + + using var resp = await CreateRawHttp().SendAsync(req); + LogDeprecatedHeaders(resp, "GET plantillas circuito Gestiona"); + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException( + $"GetCircuitTemplatesAsync: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); + } + + using var doc = JsonDocument.Parse(body); + var source = doc.RootElement.TryGetProperty("content", out var content) && + content.ValueKind == JsonValueKind.Array + ? content + : doc.RootElement; + + if (source.ValueKind != JsonValueKind.Array) + { + return []; + } + + return source.EnumerateArray().Select(item => item.Clone()).ToList(); + } + private async Task GetCircuitTemplatePayloadAsync(string templateHref) { using var req = new HttpRequestMessage(HttpMethod.Get, templateHref); @@ -182,14 +357,6 @@ public sealed class GestionaDocumentWorkflowService return (resp.IsSuccessStatusCode, resp.StatusCode, body); } - private string? GetConfiguredTemplateHref(string documentUrl) - { - var templateId = _configuration["Gestiona:CircuitTemplateId"]; - return string.IsNullOrWhiteSpace(templateId) - ? null - : $"{documentUrl.TrimEnd('/')}/circuit/templates/{templateId.Trim()}"; - } - private HttpClient CreateRawHttp() => _httpClientFactory.CreateClient(); private async Task CreateUploadAsync(byte[] contentBytes, string fileName) @@ -279,6 +446,65 @@ public sealed class GestionaDocumentWorkflowService return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); } + private static string GetRequiredSelfHref(JsonElement item) + { + return GetLinkHref(item, "self") + ?? throw new InvalidOperationException("La plantilla de circuito no contiene link 'self'."); + } + + private static string? GetLinkHref(JsonElement item, string rel) + { + if (!item.TryGetProperty("links", out var links) || links.ValueKind != JsonValueKind.Array) + { + return null; + } + + foreach (var link in links.EnumerateArray()) + { + if (link.TryGetProperty("rel", out var relProp) && + string.Equals(relProp.GetString(), rel, StringComparison.OrdinalIgnoreCase) && + link.TryGetProperty("href", out var hrefProp) && + hrefProp.ValueKind == JsonValueKind.String) + { + return hrefProp.GetString(); + } + } + + return null; + } + + private static string? GetJsonString(JsonElement item, string propertyName) + { + return item.TryGetProperty(propertyName, out var property) && + property.ValueKind == JsonValueKind.String + ? property.GetString() + : null; + } + + private static string NormalizeKey(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return string.Empty; + } + + var normalized = value.Normalize(NormalizationForm.FormD); + var builder = new StringBuilder(normalized.Length); + + foreach (var character in normalized) + { + var category = CharUnicodeInfo.GetUnicodeCategory(character); + if (category == UnicodeCategory.NonSpacingMark) + { + continue; + } + + builder.Append(char.IsLetterOrDigit(character) ? char.ToUpperInvariant(character) : ' '); + } + + return string.Join(' ', builder.ToString().Split(' ', StringSplitOptions.RemoveEmptyEntries)); + } + private void LogDeprecatedHeaders(HttpResponseMessage response, string operation) { if (response.Headers.TryGetValues("X-Gestiona-Deprecated", out var deprecated)) diff --git a/Antifraude.Net/ApiDenuncias/Services/GestionaExpedienteExceptionStore.cs b/Antifraude.Net/ApiDenuncias/Services/GestionaExpedienteExceptionStore.cs new file mode 100644 index 0000000..3c9f297 --- /dev/null +++ b/Antifraude.Net/ApiDenuncias/Services/GestionaExpedienteExceptionStore.cs @@ -0,0 +1,135 @@ +using System.Globalization; +using GestionaDenuncias.Shared.Models; +using MySqlConnector; + +namespace ApiDenuncias.Services; + +public sealed class GestionaExpedienteExceptionStore +{ + private readonly MySqlConnectionStringProvider _connectionStringProvider; + + public GestionaExpedienteExceptionStore(MySqlConnectionStringProvider connectionStringProvider) + { + _connectionStringProvider = connectionStringProvider; + } + + public async Task EnsureSchemaAsync(CancellationToken cancellationToken = default) + { + await using var connection = await OpenConnectionAsync(cancellationToken); + await EnsureTableAsync(connection, cancellationToken); + } + + public async Task FindAsync( + DenunciasGestiona denuncia, + CancellationToken cancellationToken = default) + { + await using var connection = await OpenConnectionAsync(cancellationToken); + await EnsureTableAsync(connection, cancellationToken); + + var references = BuildReferences(denuncia); + await using var command = connection.CreateCommand(); + command.Parameters.AddWithValue("@externalReportId", denuncia.Id_Denuncia); + + var referenceFilter = string.Empty; + if (references.Count > 0) + { + var parameterNames = new List(references.Count); + for (var i = 0; i < references.Count; i++) + { + var parameterName = $"@reference{i}"; + parameterNames.Add(parameterName); + command.Parameters.AddWithValue(parameterName, references[i]); + } + + referenceFilter = $" OR external_reference IN ({string.Join(", ", parameterNames)})"; + } + + command.CommandText = $""" + SELECT external_report_id, external_reference, gestiona_file_code + FROM gestiona_file_exceptions + WHERE external_report_id = @externalReportId + {referenceFilter} + ORDER BY + CASE WHEN external_report_id = @externalReportId THEN 0 ELSE 1 END, + source_row DESC, + id DESC + LIMIT 1; + """; + + await using var reader = await command.ExecuteReaderAsync(cancellationToken); + if (!await reader.ReadAsync(cancellationToken)) + { + return null; + } + + return new GestionaExpedienteException( + reader.IsDBNull(reader.GetOrdinal("external_report_id")) + ? null + : reader.GetInt32(reader.GetOrdinal("external_report_id")), + reader.IsDBNull(reader.GetOrdinal("external_reference")) + ? null + : reader.GetString(reader.GetOrdinal("external_reference")), + reader.GetString(reader.GetOrdinal("gestiona_file_code"))); + } + + private static List BuildReferences(DenunciasGestiona denuncia) + { + var references = new HashSet(StringComparer.OrdinalIgnoreCase); + + if (denuncia.Id_RegistroDenuncia > 0) + { + references.Add(denuncia.Id_RegistroDenuncia.ToString(CultureInfo.InvariantCulture)); + } + + AddReference(references, denuncia.Etiqueta); + AddReference(references, denuncia.Asunto); + + return references.ToList(); + } + + private static void AddReference(HashSet references, string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return; + } + + references.Add(value.Trim()); + } + + private async Task OpenConnectionAsync(CancellationToken cancellationToken) + { + var connectionString = await _connectionStringProvider.GetConnectionStringAsync(cancellationToken); + var connection = new MySqlConnection(connectionString); + await connection.OpenAsync(cancellationToken); + return connection; + } + + private static async Task EnsureTableAsync(MySqlConnection connection, CancellationToken cancellationToken) + { + await using var command = new MySqlCommand( + """ + CREATE TABLE IF NOT EXISTS gestiona_file_exceptions ( + id INT AUTO_INCREMENT PRIMARY KEY, + external_report_id INT NULL, + external_reference VARCHAR(100) NOT NULL, + gestiona_file_code VARCHAR(50) NOT NULL, + notes VARCHAR(255) NULL, + source_row INT NULL, + created_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + updated_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), + UNIQUE KEY uq_gestiona_file_exceptions_ref_code (external_reference, gestiona_file_code), + KEY ix_gestiona_file_exceptions_report (external_report_id), + KEY ix_gestiona_file_exceptions_reference (external_reference), + KEY ix_gestiona_file_exceptions_code (gestiona_file_code) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + """, + connection); + await command.ExecuteNonQueryAsync(cancellationToken); + } +} + +public sealed record GestionaExpedienteException( + int? ExternalReportId, + string? ExternalReference, + string GestionaFileCode); diff --git a/Antifraude.Net/ApiDenuncias/Services/GestionaService.cs b/Antifraude.Net/ApiDenuncias/Services/GestionaService.cs index b4a2403..ef3204b 100644 --- a/Antifraude.Net/ApiDenuncias/Services/GestionaService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/GestionaService.cs @@ -12,6 +12,7 @@ using System.Text; using System.Text.Json; using System.Text.Json.Serialization; using System.Text.RegularExpressions; +using System.Threading; using System.Threading.Tasks; namespace ApiDenuncias.Services @@ -106,17 +107,12 @@ namespace ApiDenuncias.Services // Expedientes (file) // ========================================================= - public async Task CreateFileAsync(Guid procedureId, string subject, string documentSeries, string siaCode) + public async Task CreateFileAsync(string subject, string documentSeries, string siaCode) { _ = subject; _ = documentSeries; - _ = siaCode; - var effectiveProcedureId = procedureId == Guid.Empty - ? Guid.Parse("82722c9b-cecc-4299-8a7b-ce5abeb8170b") - : procedureId; - - var url = await ResolveExternalProcedureCreateFileUrlAsync(effectiveProcedureId); + var url = await ResolveExternalProcedureCreateFileUrlAsync(siaCode); using var req = new HttpRequestMessage(HttpMethod.Post, url); req.Headers.Accept.Clear(); req.Headers.Accept.Add( @@ -138,24 +134,263 @@ namespace ApiDenuncias.Services return new GestionaCreateFileResponse(fileUrl, fileOpenUrl); } - private Task ResolveExternalProcedureCreateFileUrlAsync(Guid procedureId) + private async Task ResolveExternalProcedureCreateFileUrlAsync(string siaCode) { - var externalProcedureId = Guid.TryParse(_opts.ExternalProcedureId, out var configuredExternalProcedureId) - ? configuredExternalProcedureId - : procedureId; + var proceduresUrl = await ResolveRootLinkHrefAsync("vnd.gestiona.catalog-2015") + ?? "/rest/catalog-2015/procedures"; + var procedures = await GetContentArrayAsync( + proceduresUrl, + "application/vnd.gestiona.procedures-2015-page+json", + "GET catalogo de procedimientos Gestiona"); - return Task.FromResult( - $"/rest/catalog-2015/procedures/{procedureId}/external-procedures/{externalProcedureId}/create-file"); + var procedure = SelectProcedure(procedures, siaCode); + var externalProceduresUrl = GetLinkHref(procedure, "external-procedures") + ?? throw new InvalidOperationException( + "El procedimiento seleccionado no contiene link 'external-procedures'."); + var externalProcedures = await GetContentArrayAsync( + externalProceduresUrl, + "application/vnd.gestiona.external-procedures-2015-page+json", + "GET procedimientos externos Gestiona"); + + var externalProcedure = SelectExternalProcedure(externalProcedures, procedure, siaCode); + return GetLinkHref(externalProcedure, "create-file") + ?? throw new InvalidOperationException( + "El procedimiento externo seleccionado no contiene link 'create-file'."); + } + + private async Task ResolveRootLinkHrefAsync(string rel) + { + using var req = new HttpRequestMessage(HttpMethod.Get, "/rest"); + AddBasicHeaders(req); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, "GET /rest"); + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException($"ResolveRootLinkHrefAsync: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); + } + + using var doc = JsonDocument.Parse(body); + return ToAbsoluteGestionaHref(GetLinkHref(doc.RootElement, rel)); + } + + private async Task> GetContentArrayAsync(string url, string accept, string operation) + { + using var req = new HttpRequestMessage(HttpMethod.Get, url); + req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", _opts.AccessToken); + req.Headers.Accept.Clear(); + req.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(accept)); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, operation); + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException($"{operation}: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); + } + + using var doc = JsonDocument.Parse(body); + var source = doc.RootElement.TryGetProperty("content", out var content) && + content.ValueKind == JsonValueKind.Array + ? content + : doc.RootElement; + + if (source.ValueKind != JsonValueKind.Array) + { + return []; + } + + return source.EnumerateArray().Select(item => item.Clone()).ToList(); + } + + private JsonElement SelectProcedure(IReadOnlyList procedures, string siaCode) + { + if (procedures.Count == 0) + { + throw new InvalidOperationException("Gestiona no ha devuelto procedimientos en el catalogo."); + } + + var configuredName = NormalizeKey(_opts.ProcedureName); + if (!string.IsNullOrWhiteSpace(configuredName)) + { + var match = procedures.FirstOrDefault(item => + NormalizeKey(GetJsonString(item, "name")).Contains(configuredName, StringComparison.Ordinal) || + NormalizeKey(GetJsonString(item, "title")).Contains(configuredName, StringComparison.Ordinal) || + NormalizeKey(GetJsonString(item, "description")).Contains(configuredName, StringComparison.Ordinal)); + + if (match.ValueKind != JsonValueKind.Undefined) + { + return match; + } + + throw new InvalidOperationException( + $"No se ha encontrado en Gestiona el procedimiento configurado '{_opts.ProcedureName}'. Procedimientos disponibles: {DescribeCatalogItems(procedures)}."); + } + + var normalizedSia = NormalizeKey(siaCode); + if (!string.IsNullOrWhiteSpace(normalizedSia)) + { + var match = procedures.FirstOrDefault(item => + NormalizeKey(GetJsonString(item, "sia_code")) == normalizedSia || + NormalizeKey(GetJsonString(item, "code")) == normalizedSia); + + if (match.ValueKind != JsonValueKind.Undefined) + { + return match; + } + } + + if (procedures.Count == 1) + { + return procedures[0]; + } + + throw new InvalidOperationException( + "Falta configurar Gestiona:ProcedureName para seleccionar el procedimiento sin usar IDs fijos."); + } + + private JsonElement SelectExternalProcedure( + IReadOnlyList externalProcedures, + JsonElement selectedProcedure, + string siaCode) + { + var withCreateFile = externalProcedures + .Where(item => !string.IsNullOrWhiteSpace(GetLinkHref(item, "create-file"))) + .ToList(); + + if (withCreateFile.Count == 0) + { + throw new InvalidOperationException("El procedimiento seleccionado no tiene procedimientos externos con link 'create-file'."); + } + + var configuredSia = NormalizeKey( + string.IsNullOrWhiteSpace(_opts.ExternalProcedureSiaCode) + ? siaCode + : _opts.ExternalProcedureSiaCode); + if (!string.IsNullOrWhiteSpace(configuredSia)) + { + var match = withCreateFile.FirstOrDefault(item => + NormalizeKey(GetJsonString(item, "sia_code")) == configuredSia || + NormalizeKey(GetJsonString(item, "code")) == configuredSia); + + if (match.ValueKind != JsonValueKind.Undefined) + { + return match; + } + } + + var configuredName = NormalizeKey(_opts.ExternalProcedureName); + if (!string.IsNullOrWhiteSpace(configuredName)) + { + var match = withCreateFile.FirstOrDefault(item => + NormalizeKey(GetJsonString(item, "name")).Contains(configuredName, StringComparison.Ordinal) || + NormalizeKey(GetJsonString(item, "title")).Contains(configuredName, StringComparison.Ordinal)); + + if (match.ValueKind != JsonValueKind.Undefined) + { + return match; + } + } + + var procedureId = GetJsonString(selectedProcedure, "id"); + if (!string.IsNullOrWhiteSpace(procedureId)) + { + var sameId = withCreateFile.FirstOrDefault(item => + string.Equals(GetJsonString(item, "id"), procedureId, StringComparison.OrdinalIgnoreCase)); + if (sameId.ValueKind != JsonValueKind.Undefined) + { + return sameId; + } + } + + if (withCreateFile.Count == 1) + { + return withCreateFile[0]; + } + + throw new InvalidOperationException( + $"No se puede seleccionar de forma inequivoca el procedimiento externo. Configura Gestiona:ExternalProcedureName o Gestiona:ExternalProcedureSiaCode. Disponibles: {DescribeCatalogItems(withCreateFile)}."); + } + + private async Task ResolveAssignableGroupHrefAsync(string groupCode) + { + if (string.IsNullOrWhiteSpace(groupCode)) + { + throw new InvalidOperationException("Debe indicarse el codigo funcional del grupo de Gestiona."); + } + + var groupsUrl = await ResolveRootLinkHrefAsync("vnd.gestiona.files.assignees.groups") + ?? "/rest/files/assignees/groups"; + var groups = await GetContentArrayAsync( + groupsUrl, + "application/vnd.gestiona.groups-page+json", + "GET grupos asignables Gestiona"); + + var normalizedCode = NormalizeKey(groupCode); + foreach (var group in groups) + { + var code = NormalizeKey(GetJsonString(group, "code")); + var name = NormalizeKey(GetJsonString(group, "name")); + var title = NormalizeKey(GetJsonString(group, "title")); + + if (code == normalizedCode || + name == normalizedCode || + title == normalizedCode || + name.StartsWith(normalizedCode + " ", StringComparison.Ordinal) || + title.StartsWith(normalizedCode + " ", StringComparison.Ordinal)) + { + var href = ToAbsoluteGestionaHref(GetLinkHref(group, "self")); + if (!string.IsNullOrWhiteSpace(href)) + { + return href!; + } + } + } + + throw new InvalidOperationException( + $"No se ha encontrado en Gestiona el grupo asignable '{groupCode}'. Grupos disponibles: {DescribeCatalogItems(groups)}."); + } + + private string? ToAbsoluteGestionaHref(string? href) + { + if (string.IsNullOrWhiteSpace(href)) + { + return null; + } + + if (Uri.TryCreate(href, UriKind.Absolute, out _)) + { + return href; + } + + return href.StartsWith("/", StringComparison.Ordinal) + ? $"{_opts.ApiBase.TrimEnd('/')}{href}" + : href; + } + + private static string DescribeCatalogItems(IEnumerable items) + { + var values = items + .Select(item => FirstNonEmpty( + GetJsonString(item, "name"), + GetJsonString(item, "title"), + GetJsonString(item, "code"), + GetJsonString(item, "sia_code"), + GetJsonString(item, "id"))) + .Where(value => !string.IsNullOrWhiteSpace(value)) + .Take(10) + .ToList(); + + return values.Count == 0 ? "(sin nombres disponibles)" : string.Join("; ", values); } public async Task OpenFileAsync( string fileUrl, string? fileOpenUrl, - Guid managementUnitGroupId, - Guid assignedGroupId, + string assignedGroupCode, bool confidential, - string freeTitle, - string siaCode) + string freeTitle) { if (string.IsNullOrWhiteSpace(fileOpenUrl)) { @@ -164,20 +399,24 @@ namespace ApiDenuncias.Services } var url = fileOpenUrl; + var assignedGroupHref = await ResolveAssignableGroupHrefAsync(assignedGroupCode); + var managementGroupCode = string.IsNullOrWhiteSpace(_opts.ManagementUnitGroupCode) + ? "700" + : _opts.ManagementUnitGroupCode.Trim(); + var managementGroupHref = await ResolveAssignableGroupHrefAsync(managementGroupCode); var payload = new { free_title = freeTitle, - location = siaCode, entry_date = DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(), confidential, initial_assignation = new[] { - new { rel = "group", href = $"{_opts.ApiBase}/rest/groups/{assignedGroupId}" } + new { rel = "group", href = assignedGroupHref } }, links = new[] { - new { rel = "management-unit-group", href = $"{_opts.ApiBase}/rest/groups/{managementUnitGroupId}" } + new { rel = "management-unit-group", href = managementGroupHref } } }; @@ -195,6 +434,67 @@ namespace ApiDenuncias.Services throw new InvalidOperationException($"OpenFileAsync: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); } + public async Task AssignFileAsync(string fileUrl, string assignedGroupCode) + { + if (string.IsNullOrWhiteSpace(fileUrl)) + { + throw new InvalidOperationException("AssignFileAsync: falta la URL del expediente."); + } + + if (string.IsNullOrWhiteSpace(assignedGroupCode)) + { + throw new InvalidOperationException("AssignFileAsync: falta el grupo asignado."); + } + + var assigneesUrl = await ResolveFileAssigneesUrlAsync(fileUrl); + var assignedGroupHref = await ResolveAssignableGroupHrefAsync(assignedGroupCode); + var payload = new + { + links = new[] + { + new { rel = "group", href = assignedGroupHref } + } + }; + var json = JsonSerializer.Serialize(payload); + using var content = new StringContent(json, Encoding.UTF8, "application/vnd.gestiona.links"); + + using var req = new HttpRequestMessage(HttpMethod.Put, assigneesUrl) + { + Content = content + }; + req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", _opts.AccessToken); + req.Headers.Accept.Clear(); + req.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/vnd.gestiona.links")); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, "PUT file assignees"); + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException($"AssignFileAsync: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); + } + } + + private async Task ResolveFileAssigneesUrlAsync(string fileUrl) + { + var normalizedFileUrl = fileUrl.TrimEnd('/'); + using var req = new HttpRequestMessage(HttpMethod.Get, normalizedFileUrl); + AddTokenAndAccept(req, "application/vnd.gestiona.file+json", "2"); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, $"GET {normalizedFileUrl}"); + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException( + $"ResolveFileAssigneesUrlAsync: {(int)resp.StatusCode} {resp.StatusCode}\n{body}"); + } + + using var doc = JsonDocument.Parse(body); + return ToAbsoluteGestionaHref(GetLinkHref(doc.RootElement, "assignees")) + ?? $"{normalizedFileUrl}/assignees"; + } + public async Task CreateFolderAsync(string fileUrl, string folderName) { var endpoint = $"{fileUrl}/documents-and-folders"; @@ -336,16 +636,16 @@ namespace ApiDenuncias.Services { var filtro = new { - result = new { max_results = 25 }, - filter = new { nif } + nif }; - var jsonFiltro = JsonSerializer.Serialize(filtro); - var b64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(jsonFiltro)); - var url = $"{_opts.ApiBase}/rest/thirds?filter-view={Uri.EscapeDataString(b64)}"; - using var req = new HttpRequestMessage(HttpMethod.Get, url); + using var req = new HttpRequestMessage(HttpMethod.Get, "/rest/thirds"); req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", _opts.AccessToken); req.Headers.TryAddWithoutValidation("Accept", "application/vnd.gestiona.thirds-page+json"); + req.Content = new StringContent( + JsonSerializer.Serialize(filtro), + Encoding.UTF8, + "application/vnd.gestiona.filter.thirds+json"); using var resp = await _http.SendAsync(req); resp.EnsureSuccessStatusCode(); @@ -507,14 +807,18 @@ namespace ApiDenuncias.Services throw new InvalidOperationException($"Error EnlazarTerceroExistenteAsync: {resp.StatusCode}\n{body}"); } - public async Task AsegurarTerceroYEnlazarAsync(string fileUrl, ThirdPartyIdentityData thirdParty) + public async Task AsegurarTerceroYEnlazarAsync(string fileUrl, ThirdPartyIdentityData thirdParty) { if (thirdParty is null) throw new ArgumentNullException(nameof(thirdParty)); thirdParty = NormalizeThirdParty(thirdParty); + var warnings = new List(); - if (string.IsNullOrWhiteSpace(thirdParty.DocumentId)) return; + if (string.IsNullOrWhiteSpace(thirdParty.DocumentId)) + { + return new GestionaEnsureThirdResponse(true, warnings); + } var encontrado = await BuscarTerceroPorNifAsync(thirdParty.DocumentId); @@ -525,19 +829,175 @@ namespace ApiDenuncias.Services _logger.LogWarning( "Se omite la creacion/enlace del tercero en Gestiona para el expediente {FileUrl}: datos identificativos incompletos.", fileUrl); - return; + return new GestionaEnsureThirdResponse(true, warnings); } encontrado = await CrearTerceroAsync(thirdParty); } - else if (thirdParty.Address?.HasAnyValue == true) + else { - await TryEnsureThirdAddressAsync(encontrado.SelfHref, thirdParty.Address); + warnings.AddRange(await BuildThirdPartyDifferenceWarningsAsync(encontrado.SelfHref, thirdParty)); + if (thirdParty.Address?.HasAnyValue == true) + { + await TryEnsureThirdAddressAsync(encontrado.SelfHref, thirdParty.Address); + } } var yaEnlazados = await ObtenerTercerosEnlazadosAsync(fileUrl); if (!yaEnlazados.Contains(encontrado.SelfHref)) await EnlazarTerceroExistenteAsync(fileUrl, encontrado.SelfHref); + + return new GestionaEnsureThirdResponse(true, warnings); + } + + private async Task> BuildThirdPartyDifferenceWarningsAsync( + string thirdSelfHref, + ThirdPartyIdentityData thirdParty) + { + var warnings = new List(); + var details = await GetThirdPartyDetailsAsync(thirdSelfHref); + if (details is null) + { + return warnings; + } + + var gestionaType = GetJsonString(details.Value, "type"); + var expectedType = thirdParty.IsLegalEntity ? "JURIDICAL" : "PHISIC"; + AddThirdDifferenceWarning(warnings, "tipo de tercero", expectedType, gestionaType, normalizeAsCode: true); + + if (thirdParty.IsLegalEntity) + { + AddThirdDifferenceWarning( + warnings, + "razon social", + thirdParty.BusinessName, + GetJsonString(details.Value, "business_name")); + } + else + { + AddThirdDifferenceWarning( + warnings, + "nombre", + thirdParty.FirstName, + GetJsonString(details.Value, "first_name")); + + var gestionaLastName = string.Join( + ' ', + new[] + { + GetJsonString(details.Value, "first_surname"), + GetJsonString(details.Value, "second_surname") + }.Where(value => !string.IsNullOrWhiteSpace(value))); + AddThirdDifferenceWarning(warnings, "apellidos", thirdParty.LastName, gestionaLastName); + } + + AddThirdDifferenceWarning(warnings, "email", thirdParty.Email, GetJsonString(details.Value, "email")); + AddThirdDifferenceWarning( + warnings, + "pais del documento", + NormalizeCountryCode(thirdParty.CountryCode), + GetJsonString(details.Value, "nif_country"), + normalizeAsCode: true); + AddThirdDifferenceWarning( + warnings, + "canal de notificacion", + BuildNotificationChannel(thirdParty), + GetJsonString(details.Value, "notification_channel"), + normalizeAsCode: true); + + if (warnings.Count > 0) + { + warnings.Insert( + 0, + "El tercero ya existia en Gestiona y no se han sustituido sus datos. Si alguno debe cambiarse, actualizalo manualmente en Gestiona."); + } + + return warnings; + } + + private async Task GetThirdPartyDetailsAsync(string thirdSelfHref) + { + if (string.IsNullOrWhiteSpace(thirdSelfHref)) + { + return null; + } + + using var req = new HttpRequestMessage(HttpMethod.Get, thirdSelfHref); + req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", _opts.AccessToken); + req.Headers.Accept.Clear(); + req.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/vnd.gestiona.third+json; version=3")); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, "GET third"); + if (!resp.IsSuccessStatusCode) + { + return null; + } + + var body = await resp.Content.ReadAsStringAsync(); + if (string.IsNullOrWhiteSpace(body)) + { + return null; + } + + using var doc = JsonDocument.Parse(body); + return doc.RootElement.Clone(); + } + + private static void AddThirdDifferenceWarning( + List warnings, + string fieldName, + string? complaintValue, + string? gestionaValue, + bool normalizeAsCode = false) + { + if (string.IsNullOrWhiteSpace(complaintValue)) + { + return; + } + + var left = normalizeAsCode + ? NormalizeKey(complaintValue) + : NormalizeForComparison(complaintValue); + var right = normalizeAsCode + ? NormalizeKey(gestionaValue) + : NormalizeForComparison(gestionaValue); + + if (string.Equals(left, right, StringComparison.Ordinal)) + { + return; + } + + warnings.Add( + $"El campo {fieldName} no coincide con Gestiona (denuncia: '{FormatWarningValue(complaintValue)}'; Gestiona: '{FormatWarningValue(gestionaValue)}')."); + } + + private static string NormalizeForComparison(string? value) + { + return string.Join( + ' ', + (value ?? string.Empty) + .Trim() + .Split(' ', StringSplitOptions.RemoveEmptyEntries)) + .ToUpperInvariant(); + } + + private static string FormatWarningValue(string? value) + { + var normalized = string.Join( + ' ', + (value ?? string.Empty) + .Trim() + .Split(' ', StringSplitOptions.RemoveEmptyEntries)); + if (string.IsNullOrWhiteSpace(normalized)) + { + return "sin dato"; + } + + const int maxLength = 80; + return normalized.Length <= maxLength + ? normalized + : normalized[..maxLength] + "..."; } private static ThirdPartyIdentityData NormalizeThirdParty(ThirdPartyIdentityData thirdParty) @@ -563,6 +1023,9 @@ namespace ApiDenuncias.Services BusinessName = businessName, Email = (thirdParty.Email ?? string.Empty).Trim(), CountryCode = string.IsNullOrWhiteSpace(thirdParty.CountryCode) ? "ESP" : thirdParty.CountryCode.Trim(), + NotificationPreference = thirdParty.NotificationPreference ?? string.Empty, + ElectronicNotification = thirdParty.ElectronicNotification ?? string.Empty, + PostalNotificationPreference = thirdParty.PostalNotificationPreference ?? string.Empty, Address = thirdParty.Address }; } @@ -577,6 +1040,9 @@ namespace ApiDenuncias.Services BusinessName = string.Empty, Email = string.Empty, CountryCode = string.IsNullOrWhiteSpace(thirdParty.CountryCode) ? "ESP" : thirdParty.CountryCode, + NotificationPreference = thirdParty.NotificationPreference ?? string.Empty, + ElectronicNotification = thirdParty.ElectronicNotification ?? string.Empty, + PostalNotificationPreference = thirdParty.PostalNotificationPreference ?? string.Empty, Address = null }; } @@ -718,6 +1184,51 @@ namespace ApiDenuncias.Services return null; } + public async Task BuscarExpedientePorCodigoAsync(string codigoExpediente) + { + if (string.IsNullOrWhiteSpace(codigoExpediente)) + { + return null; + } + + var normalizedCode = codigoExpediente.Trim(); + var json = await GetFilesAsync(new + { + code = normalizedCode + }); + using var doc = JsonDocument.Parse(json); + + if (!TryGetFilesContent(doc, out var content) || content.GetArrayLength() == 0) + { + return null; + } + + GestionaExpedienteInfo? first = null; + foreach (var item in content.EnumerateArray()) + { + var expediente = BuildExpedienteInfo(item); + if (expediente is null) + { + continue; + } + + if (first is null) + { + first = expediente; + } + + if (string.Equals( + expediente.CodigoExpediente?.Trim(), + normalizedCode, + StringComparison.OrdinalIgnoreCase)) + { + return expediente; + } + } + + return first; + } + public async Task ObtenerExpedienteAsync(string fileUrl) { if (string.IsNullOrWhiteSpace(fileUrl)) @@ -797,13 +1308,78 @@ namespace ApiDenuncias.Services } + public async Task ObtenerUltimaAuditoriaExpedienteAsync(string fileUrl) + { + if (string.IsNullOrWhiteSpace(fileUrl)) + { + return null; + } + + var auditUrl = $"{fileUrl.TrimEnd('/')}/audit"; + using var req = new HttpRequestMessage(HttpMethod.Get, auditUrl); + req.Headers.TryAddWithoutValidation("X-Gestiona-Access-Token", _opts.AccessToken); + req.Headers.Accept.Clear(); + req.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/vnd.gestiona.audit.entries-page")); + + using var resp = await _http.SendAsync(req); + LogDeprecatedHeaders(resp, $"GET {auditUrl}"); + if (resp.StatusCode == System.Net.HttpStatusCode.NoContent || + resp.StatusCode == System.Net.HttpStatusCode.NotFound) + { + return null; + } + + var body = await resp.Content.ReadAsStringAsync(); + if (!resp.IsSuccessStatusCode) + { + throw new InvalidOperationException( + $"ObtenerUltimaAuditoriaExpedienteAsync: {(int)resp.StatusCode} {resp.ReasonPhrase}\n{body}"); + } + + if (string.IsNullOrWhiteSpace(body)) + { + return null; + } + + using var doc = JsonDocument.Parse(body); + if (!doc.RootElement.TryGetProperty("content", out var content) || + content.ValueKind != JsonValueKind.Array || + content.GetArrayLength() == 0) + { + return null; + } + + GestionaAuditInfo? latest = null; + foreach (var item in content.EnumerateArray()) + { + var entryDate = GetJsonDateTimeOffset(item, "entry_date"); + if (entryDate is null) + { + continue; + } + + if (latest?.Fecha is not null && entryDate.Value <= latest.Fecha.Value) + { + continue; + } + + latest = new GestionaAuditInfo + { + Fecha = entryDate, + Mensaje = GetJsonString(item, "message") + }; + } + + return latest; + } + public async Task> ObtenerExpedientesPorTerceroAsync( string nif, DateTimeOffset? desde = null, DateTimeOffset? hasta = null, int maxPages = 1, int maxResults = 30, - int maxParallel = 6 // de momento NO se usa, dejamos la firma por compatibilidad + int maxParallel = 6 ) { if (string.IsNullOrWhiteSpace(nif)) @@ -811,21 +1387,11 @@ namespace ApiDenuncias.Services nif = nif.Trim().ToUpperInvariant(); _ = maxPages; - _ = maxParallel; - - // 1) Localizar el tercero por NIF - var tercero = await BuscarTerceroPorNifAsync(nif); - if (string.IsNullOrEmpty(tercero.SelfHref)) - return new List(); // no hay tercero => no hay expedientes var resultados = new List(); var json = await GetFilesAsync(new { - third_rest_link = new - { - rel = "third", - href = tercero.SelfHref - } + dni = nif }); using var doc = JsonDocument.Parse(json); @@ -841,20 +1407,15 @@ namespace ApiDenuncias.Services break; } - DateTimeOffset? creation = null; - if (item.TryGetProperty("creation_date", out var pCreation)) - { - if (pCreation.ValueKind == JsonValueKind.Number && - pCreation.TryGetInt64(out var ts)) - { - creation = DateTimeOffset.FromUnixTimeSeconds(ts); - } - else if (pCreation.ValueKind == JsonValueKind.String && - long.TryParse(pCreation.GetString(), out var tsString)) - { - creation = DateTimeOffset.FromUnixTimeSeconds(tsString); - } - } + var creation = GetJsonDateTimeOffset(item, "creation_date"); + var updated = GetFirstJsonDateTimeOffset( + item, + "update_date", + "updated_at", + "modification_date", + "modified_at", + "last_update", + "last_modified"); if (desde.HasValue && creation.HasValue && creation.Value < desde.Value) continue; @@ -905,14 +1466,67 @@ namespace ApiDenuncias.Services FileUrl = fileUrl, CodigoExpediente = code, Asunto = asunto, + Procedimiento = procedureName, FechaCreacion = creation, + FechaUltimaModificacion = updated ?? creation, Estado = state }); } + await EnrichExpedientesWithAuditAsync(resultados, maxParallel); return resultados; } + private async Task EnrichExpedientesWithAuditAsync( + IReadOnlyList expedientes, + int maxParallel) + { + if (expedientes.Count == 0) + { + return; + } + + var parallelism = Math.Clamp(maxParallel, 1, 6); + using var gate = new SemaphoreSlim(parallelism, parallelism); + var tasks = expedientes + .Where(expediente => !string.IsNullOrWhiteSpace(expediente.FileUrl)) + .Select(async expediente => + { + await gate.WaitAsync(); + try + { + var audit = await ObtenerUltimaAuditoriaExpedienteAsync(expediente.FileUrl); + if (audit is null) + { + return; + } + + if (audit.Fecha is not null) + { + expediente.FechaUltimaModificacion = audit.Fecha; + } + + if (!string.IsNullOrWhiteSpace(audit.Mensaje)) + { + expediente.UltimaAuditoriaMensaje = audit.Mensaje; + } + } + catch (Exception ex) + { + _logger.LogWarning( + ex, + "No se ha podido consultar la auditoria del expediente {FileUrl}.", + expediente.FileUrl); + } + finally + { + gate.Release(); + } + }); + + await Task.WhenAll(tasks); + } + private async Task TryEnsureThirdAddressAsync(string thirdSelfHref, ThirdPartyAddressData address) { if (!address.HasAnyValue) @@ -1138,6 +1752,58 @@ namespace ApiDenuncias.Services : null; } + private static DateTimeOffset? GetFirstJsonDateTimeOffset(JsonElement item, params string[] propertyNames) + { + foreach (var propertyName in propertyNames) + { + var value = GetJsonDateTimeOffset(item, propertyName); + if (value is not null) + { + return value; + } + } + + return null; + } + + private static DateTimeOffset? GetJsonDateTimeOffset(JsonElement item, string propertyName) + { + if (!item.TryGetProperty(propertyName, out var property)) + { + return null; + } + + if (property.ValueKind == JsonValueKind.Number && + property.TryGetInt64(out var timestamp)) + { + return DateTimeOffset.FromUnixTimeSeconds(timestamp); + } + + if (property.ValueKind != JsonValueKind.String) + { + return null; + } + + var raw = property.GetString(); + if (string.IsNullOrWhiteSpace(raw)) + { + return null; + } + + if (long.TryParse(raw, NumberStyles.Integer, CultureInfo.InvariantCulture, out var timestampString)) + { + return DateTimeOffset.FromUnixTimeSeconds(timestampString); + } + + return DateTimeOffset.TryParse( + raw.Replace("Z", "+00:00", StringComparison.Ordinal), + CultureInfo.InvariantCulture, + DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal, + out var parsed) + ? parsed + : null; + } + private static string? FirstNonEmpty(params string?[] values) { foreach (var value in values) @@ -1171,7 +1837,25 @@ namespace ApiDenuncias.Services private static string BuildNotificationChannel(ThirdPartyIdentityData thirdParty) { - _ = thirdParty; + var notificationText = NormalizeKey(string.Join( + ' ', + thirdParty.NotificationPreference, + thirdParty.ElectronicNotification, + thirdParty.PostalNotificationPreference)); + + var requestsPostal = + notificationText.Contains("CORREO POSTAL", StringComparison.Ordinal) || + notificationText.Contains("POSTAL", StringComparison.Ordinal); + var requestsElectronic = + notificationText.Contains("ELECTRONICA", StringComparison.Ordinal) || + notificationText.Contains("TELEMATICA", StringComparison.Ordinal) || + notificationText.Contains("ONLINE", StringComparison.Ordinal); + + if (requestsPostal && thirdParty.Address?.HasAnyValue == true && !requestsElectronic) + { + return "PAPER"; + } + return "TELEMATIC"; } diff --git a/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksClient.cs b/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksClient.cs index 8586d03..35d3096 100644 --- a/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksClient.cs +++ b/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksClient.cs @@ -3,6 +3,7 @@ using System.Globalization; using System.Net; using System.Net.Http.Headers; using System.Net.Http.Json; +using System.Security.Cryptography; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; @@ -18,6 +19,8 @@ public sealed record PreparedGlobalLeaksCredentials(string Username, string Fina public sealed class GlobalLeaksClient { private static readonly JsonSerializerOptions JsonOptions = new(JsonSerializerDefaults.Web); + private const int ActivityAnalysisMaxParallelism = 3; + private const string AuthenticationPath = "/api/auth/authentication"; private readonly HttpClient _httpClient; private readonly ILogger _logger; private readonly GlobalLeaksOptions _options; @@ -129,11 +132,12 @@ public sealed class GlobalLeaksClient authcode?.Length ?? 0); var currentTokenAnswer = tokenAnswer; + using var dpopKey = ECDsa.Create(ECCurve.NamedCurves.nistP256); for (var attempt = 0; attempt < 2; attempt++) { using var authRequest = CreateRequest( HttpMethod.Post, - $"/api/auth/authentication?token={Uri.EscapeDataString(currentTokenAnswer)}"); + AuthenticationPath); authRequest.Content = CreateJsonContent(new { tid = 1, @@ -142,8 +146,9 @@ public sealed class GlobalLeaksClient authcode = authcode?.Trim() ?? string.Empty, }); authRequest.Headers.TryAddWithoutValidation("X-Token", currentTokenAnswer); + authRequest.Headers.TryAddWithoutValidation("DPoP", CreateDpopProof(dpopKey, "POST", AuthenticationPath)); - using var authResponse = await SendLoginRequestAsync(authRequest, "/api/auth/authentication", cancellationToken); + using var authResponse = await SendLoginRequestAsync(authRequest, AuthenticationPath, cancellationToken); if (authResponse.IsSuccessStatusCode) { var authBody = await authResponse.Content.ReadAsStringAsync(cancellationToken); @@ -168,6 +173,9 @@ public sealed class GlobalLeaksClient throw authResponse.StatusCode switch { + HttpStatusCode.Unauthorized when IsInvalidDpopProof(body) => new GlobalLeaksValidationException( + "GlobalLeaks ha rechazado la prueba DPoP del login. Revisa la version de GlobalLeaks y el formato del proof.", + StatusCodes.Status401Unauthorized), HttpStatusCode.Unauthorized => new GlobalLeaksValidationException( "Credenciales incorrectas o codigo 2FA invalido.", StatusCodes.Status401Unauthorized), @@ -291,13 +299,65 @@ public sealed class GlobalLeaksClient ReminderDate = t.ReminderDate, AccessDate = t.AccessDate, LastAccess = t.LastAccess, + WhistleblowerLastAccess = t.WhistleblowerLastAccess, Status = t.Status, Updated = t.Updated, + Accessible = t.Accessible, Label = t.Label, }) .ToArray(); } + public async Task> EnrichReportsWithActivityAsync( + string sessionId, + IReadOnlyList reports, + DateTimeOffset? fallbackReference, + CancellationToken cancellationToken) + { + if (reports.Count == 0) + { + return reports; + } + + var enriched = reports.ToArray(); + var candidates = reports + .Select((report, index) => (Report: report, Index: index)) + .Where(item => ShouldAnalyzeCitizenActivity(item.Report)) + .ToList(); + + if (candidates.Count == 0) + { + return enriched; + } + + using var gate = new SemaphoreSlim(ActivityAnalysisMaxParallelism, ActivityAnalysisMaxParallelism); + var tasks = candidates.Select(async item => + { + await gate.WaitAsync(cancellationToken); + try + { + var reference = GetActivityReference(item.Report, fallbackReference); + var activity = await AnalyzeReportActivityAsync(sessionId, item.Report, reference, cancellationToken); + enriched[item.Index] = ApplyActivity(item.Report, activity); + } + catch (Exception ex) when (ex is GlobalLeaksValidationException or HttpRequestException or TaskCanceledException) + { + _logger.LogWarning( + ex, + "No se ha podido analizar la actividad ciudadano/OAAF de la denuncia {Progressive} ({ReportId}).", + item.Report.Progressive, + item.Report.Id); + } + finally + { + gate.Release(); + } + }); + + await Task.WhenAll(tasks); + return enriched; + } + public async Task GetReportDetailAsync( string sessionId, string reportId, @@ -306,23 +366,25 @@ public sealed class GlobalLeaksClient { ValidateUuid(reportId); - using var detailRequest = CreateAuthenticatedRequest(HttpMethod.Get, $"/api/recipient/rtips/{reportId}", sessionId); - using var detailResponse = await SendGlRequestAsync(detailRequest, cancellationToken); - - var contentType = detailResponse.Content.Headers.ContentType?.MediaType ?? string.Empty; - var content = await detailResponse.Content.ReadAsByteArrayAsync(cancellationToken); - if (!contentType.Contains("json", StringComparison.OrdinalIgnoreCase) || content.Length == 0) + var reference = ParseDate(lastAccess); + using var document = await ReadReportDetailDocumentAsync(sessionId, reportId, cancellationToken); + IReadOnlyList? comments = null; + try { - throw new GlobalLeaksValidationException( - "No se pudo leer el detalle de la denuncia. Puede estar cifrada sin clave disponible en el servidor.", - 422); + comments = await GetReportCommentsAsync(sessionId, reportId, reference, defaultNewWhenNoReference: true, cancellationToken); + } + catch (Exception ex) when (ex is GlobalLeaksValidationException or HttpRequestException or TaskCanceledException) + { + _logger.LogWarning( + ex, + "No se han podido leer los comentarios dedicados de la denuncia {ReportId}. Se intentara usar el detalle del tip.", + reportId); } - using var document = JsonDocument.Parse(content); - return ParseReportDetail(reportId, lastAccess, document.RootElement); + return ParseReportDetail(reportId, lastAccess, document.RootElement, comments); } - public async Task DownloadReportZipAsync( + public async Task DownloadReportPackageAsync( string sessionId, string reportId, CancellationToken cancellationToken) @@ -347,7 +409,7 @@ public sealed class GlobalLeaksClient var fileName = SanitizeFileName( ExtractFileName(response.Content.Headers.ContentDisposition), - $"report-{reportId}.zip"); + $"report-{reportId}"); return new FileDownloadResult(content, fileName); } @@ -379,6 +441,164 @@ public sealed class GlobalLeaksClient return new FileDownloadResult(content, $"report-{progressive}.json"); } + private async Task ReadReportDetailDocumentAsync( + string sessionId, + string reportId, + CancellationToken cancellationToken) + { + using var detailRequest = CreateAuthenticatedRequest(HttpMethod.Get, $"/api/recipient/rtips/{reportId}", sessionId); + using var detailResponse = await SendGlRequestAsync(detailRequest, cancellationToken); + + var contentType = detailResponse.Content.Headers.ContentType?.MediaType ?? string.Empty; + var content = await detailResponse.Content.ReadAsByteArrayAsync(cancellationToken); + if (!contentType.Contains("json", StringComparison.OrdinalIgnoreCase) || content.Length == 0) + { + throw new GlobalLeaksValidationException( + "No se pudo leer el detalle de la denuncia. Puede estar cifrada sin clave disponible en el servidor.", + 422); + } + + return JsonDocument.Parse(content); + } + + private async Task> GetReportCommentsAsync( + string sessionId, + string reportId, + DateTimeOffset? reference, + bool defaultNewWhenNoReference, + CancellationToken cancellationToken) + { + using var request = CreateAuthenticatedRequest(HttpMethod.Get, $"/api/recipient/rtips/{reportId}/comments", sessionId); + using var response = await SendGlRequestAsync(request, cancellationToken); + + var contentType = response.Content.Headers.ContentType?.MediaType ?? string.Empty; + var content = await response.Content.ReadAsByteArrayAsync(cancellationToken); + if (!contentType.Contains("json", StringComparison.OrdinalIgnoreCase) || content.Length == 0) + { + return []; + } + + using var document = JsonDocument.Parse(content); + var root = document.RootElement; + var comments = root.ValueKind == JsonValueKind.Array + ? root + : FindArrayProperty(root, "comments", "items", "data", "entries", "results"); + + if (comments is null || comments.Value.ValueKind != JsonValueKind.Array) + { + return []; + } + + return comments.Value + .EnumerateArray() + .Select(item => CreateReportComment(item, reference, defaultNewWhenNoReference)) + .ToArray(); + } + + private async Task AnalyzeReportActivityAsync( + string sessionId, + ReportDto report, + DateTimeOffset? reference, + CancellationToken cancellationToken) + { + var reportId = report.Id; + using var document = await ReadReportDetailDocumentAsync(sessionId, reportId, cancellationToken); + IReadOnlyList comments; + try + { + comments = await GetReportCommentsAsync( + sessionId, + reportId, + reference, + defaultNewWhenNoReference: false, + cancellationToken); + } + catch (Exception ex) when (ex is GlobalLeaksValidationException or HttpRequestException or TaskCanceledException) + { + _logger.LogWarning( + ex, + "No se han podido leer los comentarios dedicados para analizar actividad de la denuncia {ReportId}. Se usara el detalle del tip si contiene comentarios.", + reportId); + comments = EnumerateArray(document.RootElement, "comments") + .Select(item => CreateReportComment(item, reference, defaultNewWhenNoReference: false)) + .ToArray(); + } + + var whistleblowerFiles = ParseReportFiles( + document.RootElement, + reference, + defaultNewWhenNoReference: false, + "wbfiles", + "files"); + var receiverFiles = ParseReportFiles( + document.RootElement, + reference, + defaultNewWhenNoReference: false, + "rfiles"); + + var citizenCommentDates = comments + .Where(comment => IsWhistleblowerActivityType(comment.Type)) + .Select(comment => ParseDate(comment.CreationDate)) + .Where(date => date is not null) + .Select(date => date!.Value); + var receiverCommentDates = comments + .Where(comment => IsReceiverActivityType(comment.Type)) + .Select(comment => ParseDate(comment.CreationDate)) + .Where(date => date is not null) + .Select(date => date!.Value); + var unclassifiedCommentDates = comments + .Where(comment => IsUnclassifiedActivityType(comment.Type)) + .Select(comment => ParseDate(comment.CreationDate)) + .Where(date => date is not null) + .Select(date => date!.Value); + var citizenFileDates = whistleblowerFiles + .Select(file => ParseDate(file.CreationDate)) + .Where(date => date is not null) + .Select(date => date!.Value); + var receiverFileDates = receiverFiles + .Select(file => ParseDate(file.CreationDate)) + .Where(date => date is not null) + .Select(date => date!.Value); + + var reportCreationDate = ParseDate(report.CreationDate) ?? + ParseDate(GetString(document.RootElement, "creation_date", "creationDate")); + var citizenActivityDates = reportCreationDate is null + ? citizenCommentDates.Concat(citizenFileDates) + : citizenCommentDates.Concat(citizenFileDates).Append(reportCreationDate.Value); + + var citizenLast = MaxDate(citizenActivityDates); + var receiverLast = MaxDate(receiverCommentDates.Concat(receiverFileDates).Concat(unclassifiedCommentDates)); + + return new ReportActivitySnapshot( + citizenLast, + comments.Any(comment => + IsWhistleblowerActivityType(comment.Type) && + comment.IsNew), + whistleblowerFiles.Any(file => file.IsNew), + receiverLast, + comments.Any(comment => + IsReceiverActivityType(comment.Type) && + comment.IsNew) || + comments.Any(comment => + IsUnclassifiedActivityType(comment.Type) && + comment.IsNew) || + receiverFiles.Any(file => file.IsNew)); + } + + private static ReportDto ApplyActivity(ReportDto report, ReportActivitySnapshot activity) + { + return report with + { + ActivityAnalyzed = true, + CitizenLastActivity = activity.CitizenLastActivity?.ToString("O", CultureInfo.InvariantCulture), + CitizenHasNewActivity = activity.HasNewCitizenComment || activity.HasNewCitizenFile, + CitizenHasNewComment = activity.HasNewCitizenComment, + CitizenHasNewFile = activity.HasNewCitizenFile, + ReceiverLastActivity = activity.ReceiverLastActivity?.ToString("O", CultureInfo.InvariantCulture), + ReceiverHasNewActivity = activity.HasNewReceiverActivity + }; + } + private async Task SendLoginRequestAsync( HttpRequestMessage request, string endpoint, @@ -497,6 +717,49 @@ public sealed class GlobalLeaksClient return Convert.ToBase64String(hash); } + private static string CreateDpopProof(ECDsa privateKey, string method, string path) + { + var publicParameters = privateKey.ExportParameters(includePrivateParameters: false); + var jwk = new Dictionary + { + ["kty"] = "EC", + ["crv"] = "P-256", + ["x"] = Base64UrlEncode(publicParameters.Q.X ?? []), + ["y"] = Base64UrlEncode(publicParameters.Q.Y ?? []), + }; + + var header = new Dictionary + { + ["typ"] = "dpop+jwt", + ["alg"] = "ES256", + ["jwk"] = jwk, + }; + + var payload = new Dictionary + { + ["jti"] = Guid.NewGuid().ToString(), + ["htm"] = method, + ["htu"] = path, + ["iat"] = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), + }; + + var encodedHeader = Base64UrlEncode(JsonSerializer.SerializeToUtf8Bytes(header, JsonOptions)); + var encodedPayload = Base64UrlEncode(JsonSerializer.SerializeToUtf8Bytes(payload, JsonOptions)); + var signingInput = $"{encodedHeader}.{encodedPayload}"; + var signature = privateKey.SignData( + Encoding.ASCII.GetBytes(signingInput), + HashAlgorithmName.SHA256, + DSASignatureFormat.IeeeP1363FixedFieldConcatenation); + + return $"{signingInput}.{Base64UrlEncode(signature)}"; + } + + private static string Base64UrlEncode(byte[] bytes) + => Convert.ToBase64String(bytes) + .TrimEnd('=') + .Replace('+', '-') + .Replace('/', '_'); + private static byte[] ComputeArgon2(byte[] input, byte[] salt, int iterations, int memoryKb) { var argon2 = new Argon2id(input) @@ -530,6 +793,34 @@ public sealed class GlobalLeaksClient : null; } + private static bool ShouldAnalyzeCitizenActivity(ReportDto report) + { + return report.Accessible != false && !string.IsNullOrWhiteSpace(report.Id); + } + + private static DateTimeOffset? GetActivityReference(ReportDto report, DateTimeOffset? fallbackReference) + { + return ParseDate(report.LastDownloadedAt) ?? + fallbackReference ?? + ParseDate(report.LastAccess) ?? + ParseDate(report.AccessDate) ?? + ParseDate(report.CreationDate); + } + + private static DateTimeOffset? MaxDate(IEnumerable values) + { + DateTimeOffset? max = null; + foreach (var value in values) + { + if (max is null || value > max.Value) + { + max = value; + } + } + + return max; + } + private static string ExtractName(JsonElement? name, string fallback) { if (name is null) @@ -636,8 +927,10 @@ public sealed class GlobalLeaksClient ReminderDate = GetString(item, "reminder_date", "reminderDate"), AccessDate = GetString(item, "access_date", "accessDate"), LastAccess = GetString(item, "last_access", "lastAccess"), + WhistleblowerLastAccess = GetString(item, "wb_last_access", "wbLastAccess"), Status = GetString(item, "status"), Updated = GetBool(item, "updated"), + Accessible = GetNullableBool(item, "accessible"), Label = GetString(item, "label"), }); } @@ -645,53 +938,192 @@ public sealed class GlobalLeaksClient return reports; } - private static ReportDetailDto ParseReportDetail(string reportId, string? lastAccess, JsonElement root) + private static ReportDetailDto ParseReportDetail( + string reportId, + string? lastAccess, + JsonElement root, + IReadOnlyList? commentsOverride = null) { var lastAccessDate = ParseDate(lastAccess); - bool IsNew(string? value) - { - if (lastAccessDate is null) - { - return true; - } - - var itemDate = ParseDate(value); - return itemDate is not null && itemDate > lastAccessDate; - } - - var comments = EnumerateArray(root, "comments") - .Select(item => new ReportCommentDto( - GetString(item, "id"), - GetString(item, "type"), - GetString(item, "content", "text", "message"), - GetString(item, "creation_date", "creationDate"), - IsNew(GetString(item, "creation_date", "creationDate")))) + var comments = commentsOverride ?? EnumerateArray(root, "comments") + .Select(item => CreateReportComment(item, lastAccessDate, defaultNewWhenNoReference: true)) .ToArray(); - var whistleblowerFiles = EnumerateArray(root, "wbfiles", "files") - .Select(item => new ReportFileDto( - GetString(item, "id"), - GetLocalizedString(item, "name", "file_name", "filename"), - GetInt64(item, "size"), - GetString(item, "content_type", "contentType", "mime_type", "mimetype"), - GetString(item, "creation_date", "creationDate"), - IsNew(GetString(item, "creation_date", "creationDate")))) - .ToArray(); - - var receiverFiles = EnumerateArray(root, "rfiles") - .Select(item => new ReportFileDto( - GetString(item, "id"), - GetLocalizedString(item, "name", "file_name", "filename"), - GetInt64(item, "size"), - GetString(item, "content_type", "contentType", "mime_type", "mimetype"), - GetString(item, "creation_date", "creationDate"), - IsNew(GetString(item, "creation_date", "creationDate")))) - .ToArray(); + var whistleblowerFiles = ParseReportFiles(root, lastAccessDate, defaultNewWhenNoReference: true, "wbfiles", "files"); + var receiverFiles = ParseReportFiles(root, lastAccessDate, defaultNewWhenNoReference: true, "rfiles"); return new ReportDetailDto(reportId, lastAccess, comments, whistleblowerFiles, receiverFiles); } + private static ReportCommentDto CreateReportComment( + JsonElement item, + DateTimeOffset? reference, + bool defaultNewWhenNoReference) + { + var creationDate = GetString(item, "creation_date", "creationDate", "date", "created_at", "createdAt"); + return new ReportCommentDto( + GetString(item, "id"), + GetCommentActivityType(item), + GetString(item, "content", "text", "message"), + creationDate, + IsAfterReference(creationDate, reference, defaultNewWhenNoReference)); + } + + private static string? GetCommentActivityType(JsonElement item) + { + if (GetBool(item, "whistleblower", "from_whistleblower", "fromWhistleblower", "is_whistleblower", "isWhistleblower")) + { + return "whistleblower"; + } + + if (GetBool(item, "receiver", "recipient", "from_receiver", "fromReceiver", "is_receiver", "isReceiver", "admin", "operator", "staff")) + { + return "receiver"; + } + + var direct = GetString( + item, + "type", + "kind", + "author_type", + "authorType", + "author_role", + "authorRole", + "role", + "user_role", + "userRole", + "sender", + "sender_type", + "senderType", + "source", + "actor", + "creator", + "from"); + + if (!string.IsNullOrWhiteSpace(direct)) + { + return direct; + } + + return GetNestedCommentActivityType(item, "author", "user", "creator", "sender", "actor", "owner"); + } + + private static string? GetNestedCommentActivityType(JsonElement item, params string[] names) + { + foreach (var name in names) + { + if (!item.TryGetProperty(name, out var property)) + { + continue; + } + + if (property.ValueKind == JsonValueKind.String) + { + return property.GetString(); + } + + if (property.ValueKind != JsonValueKind.Object) + { + continue; + } + + var nested = GetString( + property, + "type", + "kind", + "role", + "user_role", + "userRole", + "author_type", + "authorType", + "name", + "username", + "display_name", + "displayName"); + + if (!string.IsNullOrWhiteSpace(nested)) + { + return nested; + } + } + + return null; + } + + private static bool IsWhistleblowerActivityType(string? value) + { + return MatchesAny(value, "whistleblower", "citizen", "source", "tipper", "submitter", "denunciante"); + } + + private static bool IsReceiverActivityType(string? value) + { + return MatchesAny(value, "receiver", "recipient", "admin", "administrator", "operator", "staff", "custodian", "moderator", "gestor", "oaaf"); + } + + private static bool IsUnclassifiedActivityType(string? value) + { + return !IsWhistleblowerActivityType(value) && !IsReceiverActivityType(value); + } + + private static bool MatchesAny(string? value, params string[] candidates) + { + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + var normalized = NormalizeActivityType(value); + return candidates.Any(candidate => + { + var candidateToken = NormalizeActivityType(candidate); + return normalized == candidateToken || + normalized.StartsWith(candidateToken + " ", StringComparison.Ordinal) || + normalized.EndsWith(" " + candidateToken, StringComparison.Ordinal) || + normalized.Contains(" " + candidateToken + " ", StringComparison.Ordinal); + }); + } + + private static string NormalizeActivityType(string value) + { + return Regex.Replace(value.Trim().ToLowerInvariant(), @"[^a-z0-9]+", " ").Trim(); + } + + private static ReportFileDto[] ParseReportFiles( + JsonElement root, + DateTimeOffset? reference, + bool defaultNewWhenNoReference, + params string[] propertyNames) + { + return EnumerateArray(root, propertyNames) + .Select(item => + { + var creationDate = GetString(item, "creation_date", "creationDate"); + return new ReportFileDto( + GetString(item, "id"), + GetLocalizedString(item, "name", "file_name", "filename"), + GetInt64(item, "size"), + GetString(item, "content_type", "contentType", "mime_type", "mimetype"), + creationDate, + IsAfterReference(creationDate, reference, defaultNewWhenNoReference)); + }) + .ToArray(); + } + + private static bool IsAfterReference( + string? value, + DateTimeOffset? reference, + bool defaultWhenNoReference) + { + if (reference is null) + { + return defaultWhenNoReference; + } + + var itemDate = ParseDate(value); + return itemDate is not null && itemDate > reference; + } + private static IEnumerable EnumerateArray(JsonElement root, params string[] names) { if (root.ValueKind != JsonValueKind.Object) @@ -839,6 +1271,28 @@ public sealed class GlobalLeaksClient return false; } + private static bool? GetNullableBool(JsonElement element, params string[] names) + { + foreach (var name in names) + { + if (element.TryGetProperty(name, out var property)) + { + if (property.ValueKind is JsonValueKind.True or JsonValueKind.False) + { + return property.GetBoolean(); + } + + if (property.ValueKind == JsonValueKind.String && + bool.TryParse(property.GetString(), out var value)) + { + return value; + } + } + } + + return null; + } + private static string SanitizeFileName(string? name, string fallback) { if (string.IsNullOrWhiteSpace(name)) @@ -922,8 +1376,20 @@ public sealed class GlobalLeaksClient body.Contains("Invalid request: No token", StringComparison.OrdinalIgnoreCase)); } + private static bool IsInvalidDpopProof(string body) + { + return !string.IsNullOrWhiteSpace(body) && + body.Contains("Invalid DPoP proof", StringComparison.OrdinalIgnoreCase); + } + private sealed record TokenResponse(string Id, string Salt); private sealed record AuthTypeResponse(string Type, string Salt); + private sealed record ReportActivitySnapshot( + DateTimeOffset? CitizenLastActivity, + bool HasNewCitizenComment, + bool HasNewCitizenFile, + DateTimeOffset? ReceiverLastActivity, + bool HasNewReceiverActivity); private sealed record RawReport { @@ -936,8 +1402,10 @@ public sealed class GlobalLeaksClient public string? ReminderDate { get; init; } public string? AccessDate { get; init; } public string? LastAccess { get; init; } + public string? WhistleblowerLastAccess { get; init; } public string? Status { get; init; } public bool Updated { get; init; } + public bool? Accessible { get; init; } public string? Label { get; init; } } } diff --git a/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksSessionStore.cs b/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksSessionStore.cs index 330a937..65c7972 100644 --- a/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksSessionStore.cs +++ b/Antifraude.Net/ApiDenuncias/Services/GlobalLeaksSessionStore.cs @@ -8,7 +8,7 @@ namespace ApiDenuncias.Services; public sealed class GlobalLeaksSessionStore { - private const string RootPath = @"C:\ZipsDenuncias\.gl-auth"; + private const string RootPath = @"C:\GestionaDenuncias\.gl-auth"; private static readonly JsonSerializerOptions JsonOptions = new(JsonSerializerDefaults.Web) { WriteIndented = false, diff --git a/Antifraude.Net/ApiDenuncias/Services/IFilteredDenunciaStore.cs b/Antifraude.Net/ApiDenuncias/Services/IFilteredDenunciaStore.cs index abf8859..4168822 100644 --- a/Antifraude.Net/ApiDenuncias/Services/IFilteredDenunciaStore.cs +++ b/Antifraude.Net/ApiDenuncias/Services/IFilteredDenunciaStore.cs @@ -16,4 +16,8 @@ public interface IFilteredDenunciaStore Task> GetFicherosByDenunciaIdsAsync( IReadOnlyCollection denunciaIds, CancellationToken cancellationToken = default); + + Task> GetFicherosMetadataByDenunciaAsync( + int denunciaId, + CancellationToken cancellationToken = default); } diff --git a/Antifraude.Net/ApiDenuncias/Services/IGestionaService.cs b/Antifraude.Net/ApiDenuncias/Services/IGestionaService.cs index 6b0f067..6b4fc33 100644 --- a/Antifraude.Net/ApiDenuncias/Services/IGestionaService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/IGestionaService.cs @@ -1,4 +1,4 @@ -using GestionaDenuncias.Shared.Models; +using GestionaDenuncias.Shared.Models; using System; using System.Collections.Generic; using System.Threading.Tasks; @@ -12,26 +12,31 @@ namespace ApiDenuncias.Services // ========================= /// - /// Crea un expediente para el procedimiento indicado y devuelve los links 'file' y 'file-open'. + /// Crea un expediente resolviendo el procedimiento externo desde el catalogo de Gestiona y devuelve los links 'file' y 'file-open'. /// Task CreateFileAsync( - Guid procedureId, string subject, string documentSeries, string siaCode ); /// - /// Abre el expediente (lo pone en OPEN_EDITABLE), asigna título, clasificación y lo vincula al grupo indicado. + /// Abre el expediente (lo pone en OPEN_EDITABLE), asigna título, clasificación y lo vincula al grupo indicado. /// Task OpenFileAsync( string fileUrl, string? fileOpenUrl, - Guid managementUnitGroupId, - Guid assignedGroupId, + string assignedGroupCode, bool confidential, - string freeTitle, - string siaCode + string freeTitle + ); + + /// + /// Reemplaza los grupos/usuarios asignados al expediente. No modifica la unidad gestora. + /// + Task AssignFileAsync( + string fileUrl, + string assignedGroupCode ); // ========================= @@ -47,7 +52,7 @@ namespace ApiDenuncias.Services ); /// - /// Crea el documento (metadata) y sube el contenido PDF a la raíz o a una carpeta. + /// Crea el documento (metadata) y sube el contenido PDF a la raíz o a una carpeta. /// Task UploadDocumentAsync( string fileUrl, @@ -56,7 +61,7 @@ namespace ApiDenuncias.Services ); /// - /// Crea una carpeta de nombre 'folderName' en la raíz del expediente y devuelve su GUID. + /// Crea una carpeta de nombre 'folderName' en la raíz del expediente y devuelve su GUID. /// Task CreateFolderAsync( string fileUrl, @@ -89,11 +94,11 @@ namespace ApiDenuncias.Services /// /// Usa el NIF tal cual viene. - /// Si es anónimo o vacío ? no crea ni enlaza. + /// Si es anónimo o vacío ? no crea ni enlaza. /// Si no existe, lo crea. - /// Si no está enlazado al expediente, lo enlaza. + /// Si no está enlazado al expediente, lo enlaza. /// - Task AsegurarTerceroYEnlazarAsync(string fileUrl, ThirdPartyIdentityData thirdParty); + Task AsegurarTerceroYEnlazarAsync(string fileUrl, ThirdPartyIdentityData thirdParty); @@ -102,21 +107,31 @@ namespace ApiDenuncias.Services // ========================= /// - /// Devuelve el JSON crudo del listado operativo de expedientes, sin recorrer histórico paginado. + /// Devuelve el JSON crudo del listado operativo de expedientes, sin recorrer histórico paginado. /// Task ListarExpedientesJsonAsyncBasico(int maxPages = 1); /// /// Busca directamente un expediente cuyo asunto sea "Denuncia {idDenuncia}-CD". - /// Devuelve URL, número de expediente y título si lo encuentra; null si no. + /// Devuelve URL, número de expediente y título si lo encuentra; null si no. /// Task BuscarExpedientePorIdEnAsuntoAsync(int idDenuncia); + /// + /// Busca un expediente por su numero/codigo visible de Gestiona, por ejemplo "151/2025". + /// + Task BuscarExpedientePorCodigoAsync(string codigoExpediente); + /// /// Obtiene los metadatos visibles de un expediente concreto. /// Task ObtenerExpedienteAsync(string fileUrl); + /// + /// Obtiene la última entrada de auditoría del expediente, si Gestiona devuelve contenido. + /// + Task ObtenerUltimaAuditoriaExpedienteAsync(string fileUrl); + Task> ObtenerExpedientesPorTerceroAsync( string nif, DateTimeOffset? desde = null, @@ -130,3 +145,5 @@ namespace ApiDenuncias.Services } } + + diff --git a/Antifraude.Net/ApiDenuncias/Services/InboxTrackingService.cs b/Antifraude.Net/ApiDenuncias/Services/InboxTrackingService.cs index 07a1a36..3072e70 100644 --- a/Antifraude.Net/ApiDenuncias/Services/InboxTrackingService.cs +++ b/Antifraude.Net/ApiDenuncias/Services/InboxTrackingService.cs @@ -262,6 +262,106 @@ public sealed class InboxTrackingService : IInboxTrackingService } } + public async Task MarkReportHandledInGestionaAsync( + string username, + int denunciaId, + DateTime uploadedAtUtc, + CancellationToken cancellationToken = default) + { + await _denunciaStore.EnsureSchemaAsync(cancellationToken); + + if (string.IsNullOrWhiteSpace(username) || denunciaId <= 0) + { + return; + } + + var handledAtUtc = uploadedAtUtc.Kind switch + { + DateTimeKind.Utc => uploadedAtUtc, + DateTimeKind.Local => uploadedAtUtc.ToUniversalTime(), + _ => DateTime.SpecifyKind(uploadedAtUtc, DateTimeKind.Utc) + }; + + await using var connection = await OpenConnectionAsync(cancellationToken); + var userId = await EnsureUserAsync(connection, username, cancellationToken); + await using var transaction = await connection.BeginTransactionAsync(cancellationToken); + + try + { + const string updateInboxSql = """ + UPDATE inbox_reports + SET + last_downloaded_at_utc = + CASE + WHEN last_downloaded_at_utc IS NULL THEN @handledAtUtc + WHEN @handledAtUtc > last_downloaded_at_utc THEN @handledAtUtc + ELSE last_downloaded_at_utc + END, + last_downloaded_by_user_id = @userId, + imported_complaint_report_id = COALESCE(imported_complaint_report_id, @denunciaId), + imported_to_store_at_utc = COALESCE(imported_to_store_at_utc, @handledAtUtc), + updated_at_utc = CURRENT_TIMESTAMP(6) + WHERE progressive_id = @denunciaId + OR imported_complaint_report_id = @denunciaId; + """; + + await using (var updateInbox = new MySqlCommand(updateInboxSql, connection, (MySqlTransaction)transaction)) + { + updateInbox.Parameters.AddWithValue("@handledAtUtc", handledAtUtc); + updateInbox.Parameters.AddWithValue("@userId", userId); + updateInbox.Parameters.AddWithValue("@denunciaId", denunciaId); + await updateInbox.ExecuteNonQueryAsync(cancellationToken); + } + + const string updateUserReportSql = """ + INSERT INTO user_inbox_reports ( + app_user_id, + inbox_report_id, + first_seen_at_utc, + last_seen_at_utc, + first_downloaded_at_utc, + last_downloaded_at_utc, + download_count + ) + SELECT + @userId, + ir.id, + CURRENT_TIMESTAMP(6), + CURRENT_TIMESTAMP(6), + @handledAtUtc, + @handledAtUtc, + 1 + FROM inbox_reports ir + WHERE ir.progressive_id = @denunciaId + OR ir.imported_complaint_report_id = @denunciaId + ON DUPLICATE KEY UPDATE + last_seen_at_utc = CURRENT_TIMESTAMP(6), + first_downloaded_at_utc = COALESCE(first_downloaded_at_utc, VALUES(first_downloaded_at_utc)), + last_downloaded_at_utc = + CASE + WHEN last_downloaded_at_utc IS NULL THEN VALUES(last_downloaded_at_utc) + WHEN VALUES(last_downloaded_at_utc) > last_downloaded_at_utc THEN VALUES(last_downloaded_at_utc) + ELSE last_downloaded_at_utc + END; + """; + + await using (var updateUserReport = new MySqlCommand(updateUserReportSql, connection, (MySqlTransaction)transaction)) + { + updateUserReport.Parameters.AddWithValue("@userId", userId); + updateUserReport.Parameters.AddWithValue("@handledAtUtc", handledAtUtc); + updateUserReport.Parameters.AddWithValue("@denunciaId", denunciaId); + await updateUserReport.ExecuteNonQueryAsync(cancellationToken); + } + + await transaction.CommitAsync(cancellationToken); + } + catch + { + await SafeRollbackAsync(transaction, cancellationToken); + throw; + } + } + private async Task EnsureUserAsync(MySqlConnection connection, string username, CancellationToken cancellationToken) { const string insertSql = """ diff --git a/Antifraude.Net/ApiDenuncias/Services/MySqlDenunciaStore.cs b/Antifraude.Net/ApiDenuncias/Services/MySqlDenunciaStore.cs index 497b5b4..0e956cf 100644 --- a/Antifraude.Net/ApiDenuncias/Services/MySqlDenunciaStore.cs +++ b/Antifraude.Net/ApiDenuncias/Services/MySqlDenunciaStore.cs @@ -29,6 +29,26 @@ public sealed class MySqlDenunciaStore : IDenunciaStore ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci """; + private const string GestionaUploadHistoryTableSql = """ + CREATE TABLE IF NOT EXISTS gestiona_upload_history ( + id BIGINT NOT NULL AUTO_INCREMENT, + external_report_id INT NOT NULL, + gestiona_file_url TEXT NOT NULL, + gestiona_file_code VARCHAR(128) NOT NULL DEFAULT '', + upload_type VARCHAR(64) NOT NULL DEFAULT '', + assigned_group_code VARCHAR(32) NOT NULL DEFAULT '', + uploaded_by_username VARCHAR(256) NOT NULL DEFAULT '', + uploaded_at_utc DATETIME(6) NOT NULL, + subject TEXT NULL, + document_names TEXT NULL, + created_at_utc DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), + PRIMARY KEY (id), + KEY ix_gestiona_upload_history_report (external_report_id), + KEY ix_gestiona_upload_history_uploaded_at (uploaded_at_utc), + KEY ix_gestiona_upload_history_user (uploaded_by_username) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci + """; + private const string ComplaintSelectColumns = """ external_registry_id, external_report_id, @@ -94,6 +114,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore workflow_status, selected_document_name, gestiona_uploaded_at_utc, + gestiona_last_upload_type, + gestiona_assigned_group, is_in_gestiona, is_rejected, key_date, @@ -118,6 +140,23 @@ public sealed class MySqlDenunciaStore : IDenunciaStore a.encrypted_at_utc """; + private const string AttachmentMetadataSelectColumns = """ + a.id, + a.attachment_type_id, + a.description, + a.attachment_date_utc, + a.notes, + c.external_report_id, + a.original_file_name, + NULL AS content, + a.content_sha256, + a.uploaded_to_gestiona, + a.uploaded_at_utc, + a.key_date, + a.encryption_scheme, + a.encrypted_at_utc + """; + private static readonly (string Table, string Column, string Definition)[] SchemaColumnsToEnsure = [ ("complaints", "gestiona_file_code", "`gestiona_file_code` VARCHAR(128) NOT NULL DEFAULT ''"), @@ -143,6 +182,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore ("complaints", "key_date", "`key_date` DATE NULL"), ("complaints", "encryption_scheme", "`encryption_scheme` VARCHAR(64) NOT NULL DEFAULT 'none'"), ("complaints", "encrypted_at_utc", "`encrypted_at_utc` DATETIME(6) NULL"), + ("complaints", "gestiona_last_upload_type", "`gestiona_last_upload_type` VARCHAR(64) NOT NULL DEFAULT ''"), + ("complaints", "gestiona_assigned_group", "`gestiona_assigned_group` VARCHAR(255) NOT NULL DEFAULT ''"), ("complaint_attachments", "content_sha256", "`content_sha256` CHAR(64) NOT NULL DEFAULT ''"), ("complaint_attachments", "key_date", "`key_date` DATE NULL"), ("complaint_attachments", "encryption_scheme", "`encryption_scheme` VARCHAR(64) NOT NULL DEFAULT 'none'"), @@ -211,6 +252,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore ("complaints", "`display_name` TEXT NOT NULL"), ("complaints", "`workflow_status` TEXT NOT NULL"), ("complaints", "`selected_document_name` TEXT NULL"), + ("complaints", "`gestiona_last_upload_type` TEXT NOT NULL"), + ("complaints", "`gestiona_assigned_group` TEXT NOT NULL"), ("complaint_attachments", "`description` TEXT NULL"), ("complaint_attachments", "`notes` TEXT NOT NULL"), ]; @@ -422,6 +465,68 @@ public sealed class MySqlDenunciaStore : IDenunciaStore return result; } + public async Task> GetFicherosMetadataByDenunciaAsync( + int denunciaId, + CancellationToken cancellationToken = default) + { + await EnsureSchemaReadyAsync(cancellationToken); + + var sql = $""" + SELECT + {AttachmentMetadataSelectColumns} + FROM complaint_attachments a + INNER JOIN complaints c ON c.id = a.complaint_id + WHERE c.external_report_id = @denunciaId + ORDER BY a.original_file_name ASC; + """; + + await using var connection = await OpenConnectionAsync(cancellationToken); + await using var command = new MySqlCommand(sql, connection); + command.Parameters.AddWithValue("@denunciaId", denunciaId); + + var result = new List(); + await using var reader = await command.ExecuteReaderAsync(cancellationToken); + while (await reader.ReadAsync(cancellationToken)) + { + result.Add(MapAttachment(reader)); + } + + return result; + } + + public async Task> GetGestionaUploadHistoryAsync(CancellationToken cancellationToken = default) + { + await EnsureSchemaReadyAsync(cancellationToken); + + const string sql = """ + SELECT + id, + external_report_id, + gestiona_file_url, + gestiona_file_code, + upload_type, + assigned_group_code, + uploaded_by_username, + uploaded_at_utc, + subject, + document_names + FROM gestiona_upload_history + ORDER BY uploaded_at_utc DESC, id DESC; + """; + + await using var connection = await OpenConnectionAsync(cancellationToken); + await using var command = new MySqlCommand(sql, connection); + + var result = new List(); + await using var reader = await command.ExecuteReaderAsync(cancellationToken); + while (await reader.ReadAsync(cancellationToken)) + { + result.Add(MapGestionaUploadHistory(reader)); + } + + return result; + } + public async Task GetDenunciaByIdAsync( int denunciaId, CancellationToken cancellationToken = default) @@ -446,6 +551,60 @@ public sealed class MySqlDenunciaStore : IDenunciaStore : null; } + public async Task AddGestionaUploadHistoryAsync( + GestionaUploadHistoryCreateRequest request, + string username, + CancellationToken cancellationToken = default) + { + await EnsureSchemaReadyAsync(cancellationToken); + + const string sql = """ + INSERT INTO gestiona_upload_history ( + external_report_id, + gestiona_file_url, + gestiona_file_code, + upload_type, + assigned_group_code, + uploaded_by_username, + uploaded_at_utc, + subject, + document_names + ) + SELECT + @externalReportId, + @gestionaFileUrl, + @gestionaFileCode, + @uploadType, + @assignedGroupCode, + @uploadedByUsername, + @uploadedAtUtc, + @subject, + @documentNames + WHERE NOT EXISTS ( + SELECT 1 + FROM gestiona_upload_history + WHERE external_report_id = @externalReportId + AND uploaded_at_utc = @uploadedAtUtc + AND upload_type = @uploadType + LIMIT 1 + ); + """; + + await using var connection = await OpenConnectionAsync(cancellationToken); + await using var command = new MySqlCommand(sql, connection); + command.Parameters.AddWithValue("@externalReportId", request.DenunciaId); + command.Parameters.AddWithValue("@gestionaFileUrl", request.ExpedienteGestionaUrl ?? string.Empty); + command.Parameters.AddWithValue("@gestionaFileCode", request.CodigoExpedienteGestiona ?? string.Empty); + command.Parameters.AddWithValue("@uploadType", request.TipoSubida ?? string.Empty); + command.Parameters.AddWithValue("@assignedGroupCode", ExtractGroupCode(request.GrupoAsignado)); + command.Parameters.AddWithValue("@uploadedByUsername", string.IsNullOrWhiteSpace(username) ? "(sin usuario)" : username.Trim()); + command.Parameters.AddWithValue("@uploadedAtUtc", request.UploadedAtUtc == DateTime.MinValue ? DateTime.UtcNow : request.UploadedAtUtc); + command.Parameters.AddWithValue("@subject", ToDbStringOrNull(request.Asunto)); + command.Parameters.AddWithValue("@documentNames", ToDbStringOrNull(request.Documentos)); + + await command.ExecuteNonQueryAsync(cancellationToken); + } + public async Task UpsertDenunciaAsync(DenunciasGestiona denuncia, CancellationToken cancellationToken = default) { await EnsureSchemaReadyAsync(cancellationToken); @@ -516,6 +675,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore workflow_status, selected_document_name, gestiona_uploaded_at_utc, + gestiona_last_upload_type, + gestiona_assigned_group, is_in_gestiona, is_rejected, key_date, @@ -586,6 +747,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore @workflowStatus, @selectedDocumentName, @gestionaUploadedAtUtc, + @gestionaLastUploadType, + @gestionaAssignedGroup, @isInGestiona, @isRejected, @keyDate, @@ -656,6 +819,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore workflow_status = VALUES(workflow_status), selected_document_name = VALUES(selected_document_name), gestiona_uploaded_at_utc = VALUES(gestiona_uploaded_at_utc), + gestiona_last_upload_type = VALUES(gestiona_last_upload_type), + gestiona_assigned_group = VALUES(gestiona_assigned_group), is_in_gestiona = VALUES(is_in_gestiona), is_rejected = VALUES(is_rejected), key_date = VALUES(key_date), @@ -731,6 +896,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore command.Parameters.AddWithValue("@workflowStatus", denuncia.EstadoDenuncia ?? string.Empty); command.Parameters.AddWithValue("@selectedDocumentName", ToDbStringOrNull(denuncia.ArchivoElegido)); command.Parameters.AddWithValue("@gestionaUploadedAtUtc", ToDbDate(denuncia.FechaSubidaAGestiona)); + command.Parameters.AddWithValue("@gestionaLastUploadType", denuncia.UltimaSubidaGestionaTipo ?? string.Empty); + command.Parameters.AddWithValue("@gestionaAssignedGroup", denuncia.UltimoGrupoAsignadoGestiona ?? string.Empty); command.Parameters.AddWithValue("@isInGestiona", denuncia.EnGestiona); command.Parameters.AddWithValue("@isRejected", denuncia.EnRechazada); command.Parameters.AddWithValue("@keyDate", ToDbDate(denuncia.KeyDate)); @@ -799,12 +966,10 @@ public sealed class MySqlDenunciaStore : IDenunciaStore content_mime_type = @contentMimeType, content_sha256 = @contentSha256, uploaded_to_gestiona = CASE - WHEN LOWER(@originalFileName) = 'report.txt' OR LOWER(@originalFileName) = 'report.pdf' THEN @uploadedToGestiona WHEN complaint_attachments.content_sha256 = @contentSha256 THEN complaint_attachments.uploaded_to_gestiona ELSE @uploadedToGestiona END, uploaded_at_utc = CASE - WHEN LOWER(@originalFileName) = 'report.txt' OR LOWER(@originalFileName) = 'report.pdf' THEN @uploadedAtUtc WHEN complaint_attachments.content_sha256 = @contentSha256 THEN complaint_attachments.uploaded_at_utc ELSE @uploadedAtUtc END, @@ -1125,6 +1290,7 @@ public sealed class MySqlDenunciaStore : IDenunciaStore CancellationToken cancellationToken) { await EnsureAttachmentChunksTableAsync(connection, cancellationToken); + await EnsureGestionaUploadHistoryTableAsync(connection, cancellationToken); foreach (var (table, column, definition) in SchemaColumnsToEnsure) { @@ -1167,6 +1333,15 @@ public sealed class MySqlDenunciaStore : IDenunciaStore await command.ExecuteNonQueryAsync(cancellationToken); } + private static async Task EnsureGestionaUploadHistoryTableAsync( + MySqlConnection connection, + CancellationToken cancellationToken) + { + await using var command = connection.CreateCommand(); + command.CommandText = GestionaUploadHistoryTableSql; + await command.ExecuteNonQueryAsync(cancellationToken); + } + private static string ExtractColumnName(string definition) { var first = definition.IndexOf('`'); @@ -1462,6 +1637,8 @@ public sealed class MySqlDenunciaStore : IDenunciaStore EstadoDenuncia = GetString(record, "workflow_status"), ArchivoElegido = GetString(record, "selected_document_name"), FechaSubidaAGestiona = GetDateTime(record, "gestiona_uploaded_at_utc"), + UltimaSubidaGestionaTipo = GetString(record, "gestiona_last_upload_type"), + UltimoGrupoAsignadoGestiona = GetString(record, "gestiona_assigned_group"), EnGestiona = GetBoolean(record, "is_in_gestiona"), EnRechazada = GetBoolean(record, "is_rejected"), KeyDate = GetNullableDateOnly(record, "key_date"), @@ -1491,6 +1668,33 @@ public sealed class MySqlDenunciaStore : IDenunciaStore }; } + private static GestionaUploadHistoryEntry MapGestionaUploadHistory(IDataRecord record) + { + return new GestionaUploadHistoryEntry( + Convert.ToInt64(record["id"]), + GetInt32(record, "external_report_id"), + GetString(record, "gestiona_file_url"), + GetString(record, "gestiona_file_code"), + GetString(record, "upload_type"), + ExtractGroupCode(GetString(record, "assigned_group_code")), + GetString(record, "uploaded_by_username"), + GetDateTime(record, "uploaded_at_utc"), + GetString(record, "subject"), + GetString(record, "document_names")); + } + + private static string ExtractGroupCode(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return string.Empty; + } + + var trimmed = value.Trim(); + var code = new string(trimmed.TakeWhile(char.IsDigit).ToArray()); + return string.IsNullOrWhiteSpace(code) ? trimmed : code; + } + private static object ToDbDate(DateTime value) { return value == DateTime.MinValue ? DBNull.Value : value; diff --git a/Antifraude.Net/ApiDenuncias/appsettings.json b/Antifraude.Net/ApiDenuncias/appsettings.json index cc57554..1fe56c5 100644 --- a/Antifraude.Net/ApiDenuncias/appsettings.json +++ b/Antifraude.Net/ApiDenuncias/appsettings.json @@ -36,15 +36,19 @@ "Gestiona": { "ApiBase": "https://02.g3stiona.com", "AccessToken": "_yr.xVvPOllsyd1TYZRxUxg__c", - "ExternalProcedureId": "82722c9b-cecc-4299-8a7b-ce5abeb8170b", - "CircuitTemplateId": "bb997758-7436-46ab-9dc3-50dce2e02cfa", - "CircuitSignerStampHref": "https://02.g3stiona.com/rest/organ-stamps/3c6eaab4-7fcd-4b21-8676-bf8719be5d36", + "ProcedureName": "Procedimiento test 2", + "ExternalProcedureName": "", + "ExternalProcedureSiaCode": "3109963", + "ManagementUnitGroupCode": "700", + "CircuitTemplateName": "Firma automatizada", + "CircuitNewComplaintTemplateName": "CT-Nueva denuncia", + "CircuitUpdateSajTemplateName": "CT-Actualización denuncia SAJ", + "CircuitUpdateSdiTemplateName": "CT-Actualización denuncia SDI", "CircuitSignerStampTitle": "oaaf-complaints-tramit", - "CircuitRecipientGroupHref": "https://02.g3stiona.com/rest/groups/454fa4ec-8b82-4240-9419-113f45d4b004", "CircuitVersion": "2", - "UserLink": "https://02.g3stiona.com/rest/users/0c168833-8e27-4695-a301-b79924031f63", - "GroupLink": "https://02.g3stiona.com/rest/groups/6dbfc433-1eb6-4b9a-a533-bfebc652c101", - "Location": "2.02.01" + "DocumentMetadataLanguage": "es", + "DocumentMetadataType": "TD15", + "DocumentMetadataSubtype": "TD15_011" }, "GlobalLeaks": { "BaseUrl": "https://prebuzon.antifraudeandalucia.es", diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Helpers/PdfHelper.cs b/Antifraude.Net/GestionaDenuncias.Shared/Helpers/PdfHelper.cs index a1bd4c4..77e0ff8 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Helpers/PdfHelper.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Helpers/PdfHelper.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Text; using PdfSharpCore.Drawing; @@ -10,14 +11,30 @@ namespace GestionaDenuncias.Shared.Helpers { public static class PdfHelper { + private const double ReportTextMarginLeft = 95; + private const double ReportPdfSignatureGutter = 70; + private const double ReportPdfRightMargin = 20; + /// - /// Fusiona varios ficheros (PDF, imágenes, TXT) en un único PDF. - /// Los .txt se renderizan con márgenes iguales, alineación a la izquierda y ajuste de líneas, - /// preservando líneas en blanco. + /// Fusiona varios ficheros (PDF, imágenes, TXT) en un único PDF. + /// Los .txt se renderizan con márgenes iguales, alineación a la izquierda y ajuste de líneas, + /// preservando líneas en blanco. /// /// Secuencia de tuplas (FileName, ContentBytes) /// Bytes del PDF combinado public static byte[] MergeFilesToPdf(IEnumerable<(string FileName, byte[] Content)> files) + => MergeFilesToPdf(files, textMarginLeft: 40, insetPdfPagesForSignature: false); + + public static byte[] MergeReportToPdf(IEnumerable<(string FileName, byte[] Content)> files) + => MergeFilesToPdf( + files, + textMarginLeft: ReportTextMarginLeft, + insetPdfPagesForSignature: true); + + private static byte[] MergeFilesToPdf( + IEnumerable<(string FileName, byte[] Content)> files, + double textMarginLeft, + bool insetPdfPagesForSignature) { if (files == null) throw new ArgumentNullException(nameof(files)); @@ -33,8 +50,16 @@ namespace GestionaDenuncias.Shared.Helpers { case ".pdf": using (var src = PdfReader.Open(new MemoryStream(content), PdfDocumentOpenMode.Import)) + { foreach (var page in src.Pages) - outputDoc.AddPage(page); + { + var importedPage = outputDoc.AddPage(page); + if (insetPdfPagesForSignature) + { + InsetPdfPageForSignature(importedPage); + } + } + } break; case ".jpg": @@ -52,12 +77,12 @@ namespace GestionaDenuncias.Shared.Helpers break; case ".txt": - // Renderizado de TXT con margen y ajuste de líneas, preservando líneas en blanco + // Renderizado de TXT con margen y ajuste de líneas, preservando líneas en blanco var text = Encoding.UTF8.GetString(content); PdfPage pageTxt = outputDoc.AddPage(); XGraphics gfxTxt = XGraphics.FromPdfPage(pageTxt); - const double marginLeft = 40; + var marginLeft = textMarginLeft; const double marginRight = 40; const double marginTop = 40; const double marginBottom = 40; @@ -72,7 +97,7 @@ namespace GestionaDenuncias.Shared.Helpers foreach (var origLine in text.Replace("\r\n", "\n").Replace('\r', '\n').Split('\n')) { - // Línea en blanco: preservarla + // Línea en blanco: preservarla if (string.IsNullOrWhiteSpace(origLine)) { y += lineHeight; @@ -99,7 +124,7 @@ namespace GestionaDenuncias.Shared.Helpers } else { - // Dibujar la línea acumulada + // Dibujar la línea acumulada gfxTxt.DrawString( currentLine, font, @@ -109,7 +134,7 @@ namespace GestionaDenuncias.Shared.Helpers y += lineHeight; currentLine = word; - // Paginación si se sale por abajo + // Paginación si se sale por abajo if (y + lineHeight > pageHeight - marginBottom) { gfxTxt.Dispose(); @@ -120,7 +145,7 @@ namespace GestionaDenuncias.Shared.Helpers } } - // Dibujar la última línea del párrafo + // Dibujar la última línea del párrafo if (!string.IsNullOrEmpty(currentLine)) { gfxTxt.DrawString( @@ -145,7 +170,7 @@ namespace GestionaDenuncias.Shared.Helpers break; default: - throw new NotSupportedException($"Extensión no soportada: {ext}"); + throw new NotSupportedException($"Extensión no soportada: {ext}"); } } @@ -154,7 +179,24 @@ namespace GestionaDenuncias.Shared.Helpers return ms.ToArray(); } + private static void InsetPdfPageForSignature(PdfPage page) + { + var pageWidth = page.Width.Point; + var availableWidth = Math.Max(1, pageWidth - ReportPdfSignatureGutter - ReportPdfRightMargin); + var scaleX = Math.Min(1, availableWidth / pageWidth); + + var command = string.Create( + CultureInfo.InvariantCulture, + $"q {scaleX:0.#####} 0 0 1 {ReportPdfSignatureGutter:0.#####} 0 cm\n"); + + var prepend = page.Contents.PrependContent(); + prepend.Stream = prepend.CreateStream(Encoding.ASCII.GetBytes(command)); + + var append = page.Contents.AppendContent(); + append.Stream = append.CreateStream(Encoding.ASCII.GetBytes("\nQ\n")); + } + } -} \ No newline at end of file +} diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/ApiDenunciasDtos.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/ApiDenunciasDtos.cs index 55d7f6d..535ab81 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Models/ApiDenunciasDtos.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/ApiDenunciasDtos.cs @@ -36,12 +36,16 @@ public sealed record MarkReportImportedRequest( ReportDto Report, int? ComplaintId); +public sealed record MarkReportHandledInGestionaRequest( + string Username, + int DenunciaId, + DateTime UploadedAtUtc); + public sealed record TrackingImportPermissionRequest( string Username, ReportDto Report); public sealed record GestionaCreateFileRequest( - Guid ProcedureId, string Subject, string DocumentSeries, string SiaCode); @@ -53,16 +57,22 @@ public sealed record GestionaCreateFileResponse( public sealed record GestionaOpenFileRequest( string FileUrl, string? FileOpenUrl, - Guid ManagementUnitGroupId, - Guid AssignedGroupId, + string AssignedGroupCode, bool Confidential, - string FreeTitle, - string SiaCode); + string FreeTitle); + +public sealed record GestionaAssignFileRequest( + string FileUrl, + string AssignedGroupCode); public sealed record GestionaEnsureThirdRequest( string FileUrl, ThirdPartyIdentityData ThirdParty); +public sealed record GestionaEnsureThirdResponse( + bool Ok, + IReadOnlyList Warnings); + public sealed record GestionaCreateFolderRequest( string FileUrl, string FolderName); @@ -80,8 +90,9 @@ public sealed record GestionaUploadDocumentResponse(string DocumentUrl); public sealed record GestionaTramitarDocumentoRequest( string DocumentUrl, - string AssignedGroupHref, - int? ComplaintId); + string AssignedGroupCode, + int? ComplaintId, + bool IsUpdate = false); public sealed record ManualPurgeRequest(string Date); @@ -91,6 +102,23 @@ public sealed record ManualPurgeResponse( int StatusCode, string ResponseBody); -public sealed record AppConfigurationDto(string? ExternalUpdateCutoffDate); +public sealed record AppConfigurationDto( + string? ExternalUpdateCutoffDate, + string? LatestEncryptionKeyDate = null, + string? LatestEncryptionKeyStatus = null); public sealed record UpdateExternalUpdateCutoffRequest(string? Date); + +public sealed record GestionaComplaintFieldsResponse( + DateTime? FechaDenuncia, + int NumeroDenunciaCanal, + string AQuienDenuncia, + string ResumenDenuncia, + string FechaHechos, + string LugarHechos, + string AmbitoCompetencias, + string SolicitaProteccion, + string SexoDenunciante, + string AutorizaRemisionDenuncia, + string AutorizaNotificacionesViaSms, + string PreferenciaNotificacionSeguimientoDenuncia); diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/DenunciasGestiona.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/DenunciasGestiona.cs index 8f35e0b..2e44ba8 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Models/DenunciasGestiona.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/DenunciasGestiona.cs @@ -77,6 +77,8 @@ public class DenunciasGestiona public string EstadoDenuncia { get; set; } = string.Empty; public string ArchivoElegido { get; set; } = string.Empty; public DateTime FechaSubidaAGestiona { get; set; } = DateTime.MinValue; + public string UltimaSubidaGestionaTipo { get; set; } = string.Empty; + public string UltimoGrupoAsignadoGestiona { get; set; } = string.Empty; public bool EnGestiona { get; set; } public bool EnRechazada { get; set; } @@ -185,6 +187,18 @@ public class DenunciasGestiona } } + [JsonIgnore] + public string UltimaSubidaGestionaTipoMostrable => + string.IsNullOrWhiteSpace(UltimaSubidaGestionaTipo) + ? string.Empty + : UltimaSubidaGestionaTipo.Trim(); + + [JsonIgnore] + public string UltimoGrupoAsignadoGestionaMostrable => + string.IsNullOrWhiteSpace(UltimoGrupoAsignadoGestiona) + ? string.Empty + : UltimoGrupoAsignadoGestiona.Trim(); + public IReadOnlyList GetCamposFormulario() { if (string.IsNullOrWhiteSpace(CamposFormularioJson)) diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/ExpedienteTerceroDto.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/ExpedienteTerceroDto.cs index 468cc75..1edfb30 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Models/ExpedienteTerceroDto.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/ExpedienteTerceroDto.cs @@ -5,7 +5,10 @@ namespace GestionaDenuncias.Shared.Models public string FileUrl { get; set; } = ""; public string? CodigoExpediente { get; set; } // name / code / etc. public string? Asunto { get; set; } // subject / free_title + public string? Procedimiento { get; set; } public DateTimeOffset? FechaCreacion { get; set; } + public DateTimeOffset? FechaUltimaModificacion { get; set; } + public string? UltimaAuditoriaMensaje { get; set; } public string? Estado { get; set; } } } diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaAuditInfo.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaAuditInfo.cs new file mode 100644 index 0000000..4fb07b1 --- /dev/null +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaAuditInfo.cs @@ -0,0 +1,7 @@ +namespace GestionaDenuncias.Shared.Models; + +public sealed class GestionaAuditInfo +{ + public DateTimeOffset? Fecha { get; set; } + public string? Mensaje { get; set; } +} diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaUploadHistoryEntry.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaUploadHistoryEntry.cs new file mode 100644 index 0000000..402b06d --- /dev/null +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/GestionaUploadHistoryEntry.cs @@ -0,0 +1,23 @@ +namespace GestionaDenuncias.Shared.Models; + +public sealed record GestionaUploadHistoryEntry( + long Id, + int DenunciaId, + string ExpedienteGestionaUrl, + string CodigoExpedienteGestiona, + string TipoSubida, + string GrupoAsignado, + string Usuario, + DateTime UploadedAtUtc, + string Asunto, + string Documentos); + +public sealed record GestionaUploadHistoryCreateRequest( + int DenunciaId, + string ExpedienteGestionaUrl, + string CodigoExpedienteGestiona, + string TipoSubida, + string GrupoAsignado, + DateTime UploadedAtUtc, + string Asunto, + string Documentos); diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/ReportDto.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/ReportDto.cs index 3aa320f..88ff0a1 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Models/ReportDto.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/ReportDto.cs @@ -12,9 +12,18 @@ public sealed record ReportDto public string? ReminderDate { get; init; } public string? AccessDate { get; init; } public string? LastAccess { get; init; } + public string? WhistleblowerLastAccess { get; init; } public string? Status { get; init; } public bool Updated { get; init; } + public bool? Accessible { get; init; } public string? Label { get; init; } + public bool ActivityAnalyzed { get; init; } + public string? CitizenLastActivity { get; init; } + public bool CitizenHasNewActivity { get; init; } + public bool CitizenHasNewComment { get; init; } + public bool CitizenHasNewFile { get; init; } + public string? ReceiverLastActivity { get; init; } + public bool ReceiverHasNewActivity { get; init; } public bool DownloadedByCurrentUser { get; init; } public bool DownloadedByAnotherUser { get; init; } public string? LastDownloadedByUsername { get; init; } diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Models/ThirdPartyIdentityData.cs b/Antifraude.Net/GestionaDenuncias.Shared/Models/ThirdPartyIdentityData.cs index fd6b60f..a1fb863 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Models/ThirdPartyIdentityData.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Models/ThirdPartyIdentityData.cs @@ -12,6 +12,9 @@ public sealed class ThirdPartyIdentityData public string BusinessName { get; set; } = string.Empty; public string Email { get; set; } = string.Empty; public string CountryCode { get; set; } = string.Empty; + public string NotificationPreference { get; set; } = string.Empty; + public string ElectronicNotification { get; set; } = string.Empty; + public string PostalNotificationPreference { get; set; } = string.Empty; public ThirdPartyAddressData? Address { get; set; } public string DisplayName => @@ -53,6 +56,9 @@ public sealed class ThirdPartyIdentityData BusinessName = isAnonymous ? string.Empty : businessName, Email = (denuncia.Correo_Electronico ?? string.Empty).Trim(), CountryCode = string.IsNullOrWhiteSpace(denuncia.Pais) ? denuncia.PaisOrigen : denuncia.Pais, + NotificationPreference = denuncia.Notificacion_Preferencia ?? string.Empty, + ElectronicNotification = denuncia.Notificacion_Electronica ?? string.Empty, + PostalNotificationPreference = denuncia.NotificacionPostal ?? string.Empty, Address = isAnonymous ? null : ThirdPartyAddressData.FromComplaint(denuncia) }; } diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Services/IDenunciaStore.cs b/Antifraude.Net/GestionaDenuncias.Shared/Services/IDenunciaStore.cs index cce667f..97e608a 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Services/IDenunciaStore.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Services/IDenunciaStore.cs @@ -9,9 +9,14 @@ public interface IDenunciaStore Task> GetDenunciasByScopeAsync(DenunciaListScope scope, CancellationToken cancellationToken = default); Task> GetAllFicherosAsync(CancellationToken cancellationToken = default); Task> GetFicherosByDenunciaAsync(int denunciaId, CancellationToken cancellationToken = default); + Task> GetGestionaUploadHistoryAsync(CancellationToken cancellationToken = default); Task GetDenunciaByIdAsync(int denunciaId, CancellationToken cancellationToken = default); Task UpsertDenunciaAsync(DenunciasGestiona denuncia, CancellationToken cancellationToken = default); Task UpsertFicherosAsync(IEnumerable ficheros, CancellationToken cancellationToken = default); + Task AddGestionaUploadHistoryAsync( + GestionaUploadHistoryCreateRequest request, + string username, + CancellationToken cancellationToken = default); Task MarkFicherosAsUploadedAsync( int denunciaId, IEnumerable fileNames, diff --git a/Antifraude.Net/GestionaDenuncias.Shared/Services/IInboxTrackingService.cs b/Antifraude.Net/GestionaDenuncias.Shared/Services/IInboxTrackingService.cs index c35ad8d..96ab5e2 100644 --- a/Antifraude.Net/GestionaDenuncias.Shared/Services/IInboxTrackingService.cs +++ b/Antifraude.Net/GestionaDenuncias.Shared/Services/IInboxTrackingService.cs @@ -15,6 +15,12 @@ public interface IInboxTrackingService int? complaintId, CancellationToken cancellationToken = default); + Task MarkReportHandledInGestionaAsync( + string username, + int denunciaId, + DateTime uploadedAtUtc, + CancellationToken cancellationToken = default); + Task EnsureReportCanBeImportedByUserAsync( string username, ReportDto report, diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Layout/MainLayout.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Layout/MainLayout.razor index 05ff174..2543400 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Layout/MainLayout.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Layout/MainLayout.razor @@ -1,10 +1,12 @@ @inherits LayoutComponentBase @implements IDisposable +@using System.Globalization @inject GestionaDenunciasAN.Models.UserState userState @inject IHttpContextAccessor HttpContextAccessor @inject IJSRuntime JSRuntime @inject NavigationManager Navigation @inject UiBusyService Busy +@inject ApiDenunciasClient ApiDenuncias
-
- - Sesion interna activa +
+
+ + Sesion interna activa +
+ +
+ + @EncryptionKeyText +
-
@@ -204,7 +196,7 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.ExpedienteGestionaMostrable)) { -
Nº expediente Gestiona
+
Nº expediente Gestiona
@denuncia.ExpedienteGestionaMostrable
} @if (!string.IsNullOrWhiteSpace(denuncia.Etiqueta)) @@ -245,7 +237,7 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.RazonSocialResuelta)) { -
Razón social
+
Razón social
@denuncia.RazonSocialResuelta
} @if (!string.IsNullOrWhiteSpace(denuncia.NombreResuelto)) @@ -255,12 +247,12 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.PrimerApellidoResuelto)) { -
1º apellido
+
1º apellido
@denuncia.PrimerApellidoResuelto
} @if (!string.IsNullOrWhiteSpace(denuncia.SegundoApellidoResuelto)) { -
2º apellido
+
2º apellido
@denuncia.SegundoApellidoResuelto
} @if (!string.IsNullOrWhiteSpace(denuncia.ApellidosResueltos)) @@ -280,14 +272,14 @@ else
Asunto
@denuncia.Asunto
-
A Quién
+
A Quién
@denuncia.A_Quien_Denuncia
@if (!string.IsNullOrWhiteSpace(denuncia.DenunciadoDetalle)) {
Detalle denunciado
@denuncia.DenunciadoDetalle
} -
Descripción
+
Descripción
@denuncia.Descripcion_Denuncia
@if (!string.IsNullOrWhiteSpace(denuncia.OrganismoDenunciado)) { @@ -296,7 +288,7 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.SolicitaProteccion)) { -
Solicita protección
+
Solicita protección
@denuncia.SolicitaProteccion
} @if (!string.IsNullOrWhiteSpace(denuncia.MedidasProteccionSolicitadas)) @@ -313,7 +305,7 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.AutorizaRemision)) { -
Autoriza remisión
+
Autoriza remisión
@denuncia.AutorizaRemision
}
@@ -324,14 +316,14 @@ else @if (camposFormulario.Count > 0) {
Formulario Original
- @foreach (var grupoCampos in camposFormulario.GroupBy(field => string.IsNullOrWhiteSpace(field.Section) ? "Sin sección" : field.Section)) + @foreach (var grupoCampos in camposFormulario.GroupBy(field => string.IsNullOrWhiteSpace(field.Section) ? "Sin sección" : field.Section)) {
@grupoCampos.Key
@foreach (var campo in grupoCampos) {
@campo.Label
-
@(string.IsNullOrWhiteSpace(campo.Value) ? "—" : campo.Value)
+
@(string.IsNullOrWhiteSpace(campo.Value) ? "—" : campo.Value)
}
} @@ -347,7 +339,7 @@ else Nombre Fecha Motivo - Tamaño (bytes) + Tamaño (bytes) Ver @@ -396,7 +388,7 @@ else } else { - + — } @@ -447,19 +439,19 @@ else { } else if (autoSearchTried && !string.IsNullOrWhiteSpace(autoFoundFileUrl)) { @@ -468,12 +460,7 @@ else { } @@ -491,17 +478,25 @@ else } - + @if (!string.IsNullOrWhiteSpace(selectedDenuncias.ExpedienteGestionaMostrable)) + { + + } + +
- +
+ placeholder="Ej.: Gestión AN (Documento Adjunto 1 Gestión AN...)" /> - Se aplica al modo individual. report.txt se sube como Denuncia si entra en esta actualización. + Se aplica al modo individual. report.txt se sube como Denuncia si entra en esta actualización.
@@ -509,7 +504,7 @@ else
- +
- -
-
- - +
@{ @@ -542,13 +532,13 @@ else
- Los datos del tercero se cargan automáticamente desde la denuncia y no se pueden editar aquí. + Los datos del tercero se cargan automáticamente desde la denuncia y no se pueden editar aquí.
@if (modalThirdParty.IsAnonymous) {
- Denuncia anónima. Se enlazará automáticamente el tercero 00000000T. + Denuncia anónima. Se enlazará automáticamente el tercero 00000000T.
} @@ -577,7 +567,7 @@ else {
- +
@@ -590,11 +580,11 @@ else
- +
- +
@@ -604,14 +594,14 @@ else {
- +
} - Antes de subir la actualización se comprobará el tercero extraído del formulario y, si no está enlazado al expediente, se enlazará. + Antes de subir la actualización se comprobará el tercero extraído del formulario y, si no está enlazado al expediente, se enlazará. @@ -639,14 +629,14 @@ else // --- Modal / estado --- private bool showModal = false; private bool isUploading = false; - private string uploadMode = "merge"; + private string uploadMode = "individual"; private string selectedGroup = "600"; private string nuevoAsunto = ""; private string nombreDocumentos = ""; private DenunciasGestiona? selectedDenuncias; private ThirdPartyIdentityData? selectedThirdParty; - // --- Detección automática en Gestiona por asunto --- + // --- Detección automática en Gestiona por asunto --- private bool autoSearchLoading = false; private bool autoSearchTried = false; private string? autoFoundFileUrl = null; @@ -668,19 +658,15 @@ else var config = await ApiDenuncias.GetAppConfigurationAsync(); externalUpdateCutoffDate = ParseConfiguredCutoffDate(config.ExternalUpdateCutoffDate); var todas = await CargarDenunciasJsonAsync(); - - foreach (var d in todas.Where(x => x.ProcedureId == Guid.Empty)) - { - d.ProcedureId = Guid.Parse("82722c9b-cecc-4299-8a7b-ce5abeb8170b"); - d.GroupId = Guid.Parse("6dbfc433-1eb6-4b9a-a533-bfebc652c101"); - } - actualizaciones = todas .Where(d => d.EsActualizacion) .OrderByDescending(d => d.FechaSubidaAGestiona != DateTime.MinValue ? d.FechaSubidaAGestiona : d.Fecha) .ToList(); ficherosAdjuntos = await CargarFicherosPorDenunciaAsync(actualizaciones); + actualizaciones = actualizaciones + .Where(d => ficherosAdjuntos.ContainsKey(d.Id_Denuncia)) + .ToList(); } catch (Exception ex) { @@ -715,12 +701,13 @@ else return result; } - private void OpenEnviarAGestionaModal(DenunciasGestiona d) + private async Task OpenEnviarAGestionaModal(DenunciasGestiona d) { selectedDenuncias = d; nuevoAsunto = string.IsNullOrWhiteSpace(d.NombreDenuncia) ? $"Denuncia-{d.Id_Denuncia}-CD" : d.NombreDenuncia; nombreDocumentos = ""; selectedThirdParty = ThirdPartyIdentityData.FromComplaint(d); + selectedGroup = NormalizeUpdateGroup(selectedGroup); operationError = string.Empty; operationNotice = string.Empty; @@ -729,6 +716,12 @@ else useAutoFoundExpediente = true; autoSearchTried = false; + if (!string.IsNullOrWhiteSpace(d.Expediente_Gestiona) && + string.IsNullOrWhiteSpace(d.CodigoExpedienteGestiona)) + { + await SincronizarExpedienteGestionaAsync(d, d.Expediente_Gestiona); + } + if (string.IsNullOrWhiteSpace(d.Expediente_Gestiona)) { autoSearchLoading = true; @@ -737,7 +730,7 @@ else try { - // Búsqueda automática desactivada temporalmente + // Búsqueda automática desactivada temporalmente } catch { @@ -799,48 +792,20 @@ else return new string(clean.Where(ch => ch <= 127).ToArray()); } + private string BuildMergedAttachmentsFileName(int denunciaId, DateTime timestampUtc) + { + var baseName = string.IsNullOrWhiteSpace(nombreDocumentos) + ? $"Adjuntos {denunciaId}_{timestampUtc:yyyyMMddHHmmss}" + : nombreDocumentos.Trim(); + + return FixFileName($"{Path.GetFileNameWithoutExtension(baseName)}.pdf"); + } + private async Task ActualizarDenunciaAsync(DenunciasGestiona d) { await DenunciaStore.UpsertDenunciaAsync(d); } - private async Task MoverADenunciasPendientes() - { - if (selectedDenuncias is null) return; - - selectedDenuncias.EsActualizacion = false; - selectedDenuncias.EnGestiona = false; - selectedDenuncias.EnRechazada = false; - selectedDenuncias.Expediente_Gestiona = "Pendiente"; - selectedDenuncias.FechaSubidaAGestiona = DateTime.MinValue; - selectedDenuncias.ArchivoElegido = string.Empty; - - await ActualizarDenunciaAsync(selectedDenuncias); - - actualizaciones.RemoveAll(x => x.Id_Denuncia == selectedDenuncias.Id_Denuncia); - - CloseModal(); - StateHasChanged(); - } - - private async Task MoverAPendientes(DenunciasGestiona d) - { - if (d is null) return; - - d.EsActualizacion = false; - d.EnGestiona = false; - d.EnRechazada = false; - d.Expediente_Gestiona = "Pendiente"; - d.FechaSubidaAGestiona = DateTime.MinValue; - d.ArchivoElegido = string.Empty; - - await ActualizarDenunciaAsync(d); - - actualizaciones.RemoveAll(x => x.Id_Denuncia == d.Id_Denuncia); - - StateHasChanged(); - } - private async Task ConfirmarEnvio() { if (selectedDenuncias == null) return; @@ -857,6 +822,7 @@ else isUploading = true; operationError = string.Empty; operationNotice = string.Empty; + selectedGroup = NormalizeUpdateGroup(selectedGroup); using var busy = Busy.Show( "Enviando actualizacion", "Preparando expediente, carpeta de actualizacion y documentos."); @@ -889,12 +855,13 @@ else if (!todos.Any()) { operationError = ficherosVacios.Count == 0 - ? $"La denuncia #{selectedDenuncias.Id_Denuncia} no tiene ficheros pendientes para subir como actualización." - : $"La denuncia #{selectedDenuncias.Id_Denuncia} solo tiene ficheros vacíos y no se ha subido nada. Ficheros omitidos: {string.Join(", ", ficherosVacios)}."; + ? $"La denuncia #{selectedDenuncias.Id_Denuncia} no tiene ficheros pendientes para subir como actualización." + : $"La denuncia #{selectedDenuncias.Id_Denuncia} solo tiene ficheros vacíos y no se ha subido nada. Ficheros omitidos: {string.Join(", ", ficherosVacios)}."; return; } // 2) Determinar expediente destino + var expedienteCreadoEnGestiona = false; string fileUrl; if (selectedDenuncias.EnGestiona && !string.IsNullOrWhiteSpace(selectedDenuncias.Expediente_Gestiona)) { @@ -910,7 +877,6 @@ else { Busy.Update(message: "Creando expediente nuevo en Gestiona.", detail: "Paso 2 de 8"); var createdFile = await ApiDenuncias.CreateGestionaFileAsync( - selectedDenuncias.ProcedureId, nuevoAsunto, "RQ2ZLC - Expediente de Denuncias", "3109963" @@ -920,33 +886,29 @@ else await ApiDenuncias.OpenGestionaFileAsync( fileUrl, createdFile.FileOpenUrl, - managementUnitGroupId: Guid.Parse("a4ad4dfb-70dc-4219-8ee3-4dcc939f0955"), - assignedGroupId: selectedGroup switch - { - "510" => Guid.Parse("6dbfc433-1eb6-4b9a-a533-bfebc652c101"), - "600" => Guid.Parse("454fa4ec-8b82-4240-9419-113f45d4b004"), - "700" => Guid.Parse("a4ad4dfb-70dc-4219-8ee3-4dcc939f0955"), - _ => throw new InvalidOperationException($"Grupo desconocido: {selectedGroup}") - }, + assignedGroupCode: selectedGroup, confidential: selectedDenuncias.Confidencial, - freeTitle: nuevoAsunto, - siaCode: "3109963" + freeTitle: nuevoAsunto ); selectedDenuncias.Expediente_Gestiona = fileUrl; selectedDenuncias.EnGestiona = true; + expedienteCreadoEnGestiona = true; } Busy.Update(message: "Guardando referencia local del expediente.", detail: "Paso 3 de 8"); selectedDenuncias.Expediente_Gestiona = fileUrl; selectedDenuncias.EnGestiona = true; + Busy.Update(message: "Asignando el expediente al grupo elegido.", detail: "Paso 3 de 8"); + await ApiDenuncias.AssignGestionaFileAsync(fileUrl, selectedGroup); + var thirdParty = selectedThirdParty ?? ThirdPartyIdentityData.FromComplaint(selectedDenuncias); Busy.Update(message: "Resolviendo tercero y enlazandolo al expediente.", detail: "Paso 4 de 8"); - await ApiDenuncias.EnsureGestionaThirdAndLinkAsync(fileUrl, thirdParty); + var thirdResult = await ApiDenuncias.EnsureGestionaThirdAndLinkAsync(fileUrl, thirdParty); var ahoraUtc = DateTime.UtcNow; - var carpetaActualizacion = FixFileName($"Actualizacion {DateTime.Now:yyyy-MM-dd HH-mm-ss}"); + var carpetaActualizacion = FixFileName($"Actualizacion {DateTime.Now:yyyy-MM-dd HH-mm}"); Busy.Update(message: "Creando carpeta de actualizacion en Gestiona.", detail: "Paso 5 de 8"); var carpetaActualizacionGestiona = await ApiDenuncias.CreateGestionaFolderAsync(fileUrl, carpetaActualizacion); var documentsTargetUrl = carpetaActualizacionGestiona.DocumentsTargetUrl; @@ -959,8 +921,8 @@ else if (!string.IsNullOrWhiteSpace(report.FileName)) { - Busy.Update(message: "Preparando y subiendo el report para firma.", detail: "Paso 6 de 8"); - var reportPdfBytes = PdfHelper.MergeFilesToPdf( + Busy.Update(message: "Preparando y subiendo el documento principal.", detail: "Paso 6 de 8"); + var reportPdfBytes = PdfHelper.MergeReportToPdf( new (string FileName, byte[] Content)[] { (report.FileName, report.Content) }); var reportFinalName = FixFileName("Denuncia.pdf"); documentoParaTramitar = await ApiDenuncias.UploadGestionaDocumentAsync( @@ -979,7 +941,7 @@ else { Busy.Update(message: "Uniendo adjuntos nuevos en un unico PDF y subiendolo.", detail: "Paso 7 de 8"); var pdfBytes = PdfHelper.MergeFilesToPdf(adjuntos); - var pdfName = FixFileName($"Adjuntos {selectedDenuncias.Id_Denuncia}_{ahoraUtc:yyyyMMddHHmmss}.pdf"); + var pdfName = BuildMergedAttachmentsFileName(selectedDenuncias.Id_Denuncia, ahoraUtc); var docUrl = await ApiDenuncias.UploadGestionaDocumentAsync(documentsTargetUrl, pdfBytes, pdfName); if (string.IsNullOrWhiteSpace(documentoParaTramitar)) { @@ -1040,11 +1002,13 @@ else if (!string.IsNullOrWhiteSpace(documentoParaTramitar)) { - Busy.Update(message: "Enviando el report al circuito de firma.", detail: "Paso 8 de 8"); + Busy.Update(message: "Finalizando el documento principal en Gestiona.", detail: "Paso 8 de 8"); + selectedGroup = NormalizeUpdateGroup(selectedGroup); await ApiDenuncias.TramitarGestionaDocumentAsync( documentoParaTramitar, - GetAssignedGroupLinkBySelectedGroup(), - selectedDenuncias.Id_Denuncia); + selectedGroup, + selectedDenuncias.Id_Denuncia, + isUpdate: true); } foreach (var orig in nombresOriginalesSubidos) @@ -1066,7 +1030,16 @@ else selectedDenuncias.EsActualizacion = false; selectedDenuncias.NombreDenuncia = nuevoAsunto; selectedDenuncias.FechaSubidaAGestiona = ahoraUtc; + selectedDenuncias.UltimaSubidaGestionaTipo = "Actualización"; + selectedDenuncias.UltimoGrupoAsignadoGestiona = GetGestionaGroupDisplay(selectedGroup); + await SincronizarExpedienteGestionaAsync(selectedDenuncias, fileUrl); await ActualizarDenunciaAsync(selectedDenuncias); + var historialAviso = await RegistrarHistorialGestionaAsync( + selectedDenuncias, + "Actualización", + selectedGroup, + ahoraUtc, + string.Join("; ", nombresFinalesSubidos)); var denunciaProcesadaId = selectedDenuncias.Id_Denuncia; actualizaciones.RemoveAll(x => x.Id_Denuncia == denunciaProcesadaId); @@ -1076,22 +1049,35 @@ else var avisos = new List(); if (ficherosVacios.Count > 0) { - avisos.Add($"Se omitieron ficheros vacíos: {string.Join(", ", ficherosVacios)}."); + avisos.Add($"Se omitieron ficheros vacíos: {string.Join(", ", ficherosVacios)}."); } if (ficherosNoSeleccionados.Count > 0) { - avisos.Add($"No se subieron por selección del usuario: {string.Join(", ", ficherosNoSeleccionados)}."); + avisos.Add($"No se subieron por selección del usuario: {string.Join(", ", ficherosNoSeleccionados)}."); } - if (avisos.Count > 0) + if (thirdResult.Warnings.Count > 0) { - operationNotice = $"Actualización #{denunciaProcesadaId} completada. {string.Join(" ", avisos)}"; + avisos.AddRange(thirdResult.Warnings); } + if (!string.IsNullOrWhiteSpace(historialAviso)) + { + avisos.Add(historialAviso); + } + var expedienteInfo = string.IsNullOrWhiteSpace(selectedDenuncias.ExpedienteGestionaMostrable) + ? string.Empty + : $" Nº expediente Gestiona: {selectedDenuncias.ExpedienteGestionaMostrable}."; + var resumen = expedienteCreadoEnGestiona + ? $"Actualización #{denunciaProcesadaId}: se ha creado el expediente en Gestiona y se han subido los documentos.{expedienteInfo}" + : $"Actualización #{denunciaProcesadaId}: se han añadido los documentos al expediente de Gestiona.{expedienteInfo}"; + operationNotice = avisos.Count > 0 + ? $"{resumen} {string.Join(" ", avisos)}" + : resumen; StateHasChanged(); } catch (Exception ex) { - Console.Error.WriteLine($"Error al confirmar envío (Actualizaciones): {ex}"); - operationError = $"No se ha podido completar la actualización #{selectedDenuncias?.Id_Denuncia}: {ex.Message}"; + Console.Error.WriteLine($"Error al confirmar envío (Actualizaciones): {ex}"); + operationError = $"No se ha podido completar la actualización #{selectedDenuncias?.Id_Denuncia}: {ex.Message}"; } finally { @@ -1186,7 +1172,7 @@ else } private static string GetReadOnlyValue(string? value) => - string.IsNullOrWhiteSpace(value) ? "—" : value; + string.IsNullOrWhiteSpace(value) ? "—" : value; private static bool IsExternalGestionaUpdate(DenunciasGestiona denuncia) { @@ -1264,7 +1250,7 @@ else private static List GetPendingUpdateFiles(List files, DateOnly? externalUpdateCutoffDate = null) { var uploadedHashes = files - .Where(file => file.Subido && !file.EsReport && !string.IsNullOrWhiteSpace(file.ContentSha256)) + .Where(file => file.Subido && !string.IsNullOrWhiteSpace(file.ContentSha256)) .Select(file => file.ContentSha256) .ToHashSet(StringComparer.OrdinalIgnoreCase); @@ -1275,9 +1261,12 @@ else .Where(file => file.EsReport) .OrderByDescending(file => file.Fecha) .FirstOrDefault(); - if (report is not null) + if (report is not null && !report.Subido) { - pending.Add(report); + if (string.IsNullOrWhiteSpace(report.ContentSha256) || plannedHashes.Add(report.ContentSha256)) + { + pending.Add(report); + } } foreach (var file in files @@ -1341,15 +1330,40 @@ else : "Sin historico local"; } - private string GetAssignedGroupLinkBySelectedGroup() + private static string NormalizeUpdateGroup(string? groupCode) + => groupCode == "510" ? "510" : "600"; + + private static string GetGestionaGroupDisplay(string? groupCode) { - return selectedGroup switch + return string.IsNullOrWhiteSpace(groupCode) ? string.Empty : groupCode.Trim(); + } + + private async Task RegistrarHistorialGestionaAsync( + DenunciasGestiona denuncia, + string tipoSubida, + string grupo, + DateTime uploadedAtUtc, + string documentos) + { + try { - "510" => "https://02.g3stiona.com/rest/groups/6dbfc433-1eb6-4b9a-a533-bfebc652c101", - "600" => "https://02.g3stiona.com/rest/groups/454fa4ec-8b82-4240-9419-113f45d4b004", - "700" => "https://02.g3stiona.com/rest/groups/a4ad4dfb-70dc-4219-8ee3-4dcc939f0955", - _ => throw new InvalidOperationException($"Grupo desconocido: {selectedGroup}") - }; + await ApiDenuncias.RegisterGestionaUploadHistoryAsync( + new GestionaUploadHistoryCreateRequest( + denuncia.Id_Denuncia, + denuncia.Expediente_Gestiona ?? string.Empty, + denuncia.ExpedienteGestionaMostrable, + tipoSubida, + grupo, + uploadedAtUtc, + denuncia.NombreDenuncia ?? string.Empty, + documentos)); + return null; + } + catch (Exception ex) + { + Console.Error.WriteLine($"No se ha podido registrar el historico de subida a Gestiona: {ex}"); + return "La subida se ha completado, pero no se ha podido registrar el histórico operativo en la aplicación."; + } } private async Task SincronizarExpedienteGestionaAsync(DenunciasGestiona denuncia, string fileUrl) @@ -1385,3 +1399,4 @@ else } } + diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Buscador.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Buscador.razor index 7edefa3..48c7fe2 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Buscador.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Buscador.razor @@ -144,9 +144,9 @@ Expediente - Asunto + Título expediente Fecha creación - Estado + Última actividad Gestiona @@ -157,11 +157,11 @@ @exp.CodigoExpediente @exp.Asunto @(exp.FechaCreacion?.ToLocalTime().ToString("dd/MM/yyyy HH:mm")) - @exp.Estado + @(exp.FechaUltimaModificacion?.ToLocalTime().ToString("dd/MM/yyyy HH:mm") ?? "-") @@ -172,26 +172,30 @@
Expediente
-
@exp.CodigoExpediente
+
@FormatDetailValue(exp.CodigoExpediente)
-
Asunto
-
@exp.Asunto
+
Título expediente
+
@FormatDetailValue(exp.Asunto)
+ +
Procedimiento
+
@FormatDetailValue(exp.Procedimiento)
Fecha creación
- @exp.FechaCreacion?.ToLocalTime().ToString("dd/MM/yyyy HH:mm") + @(exp.FechaCreacion?.ToLocalTime().ToString("dd/MM/yyyy HH:mm") ?? "-")
-
Estado
-
@exp.Estado
+
Última actividad en Gestiona
+
+ @(exp.FechaUltimaModificacion?.ToLocalTime().ToString("dd/MM/yyyy HH:mm") ?? "-") +
- @if (!string.IsNullOrWhiteSpace(exp.FileUrl)) + @if (!string.IsNullOrWhiteSpace(exp.UltimaAuditoriaMensaje)) { -
Enlace Gestiona
-
- @exp.FileUrl -
+
Última acción
+
@exp.UltimaAuditoriaMensaje
} +
@@ -233,6 +237,8 @@ private bool IsModo(string valor) => string.Equals(modoFecha, valor, StringComparison.Ordinal); private void SetModo(string valor) => modoFecha = valor; + private static string FormatDetailValue(string? value) + => string.IsNullOrWhiteSpace(value) ? "-" : value; private void ToggleDetalle(ExpedienteTerceroDto exp) { diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Configuracion.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Configuracion.razor index bc33608..7151c25 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Configuracion.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Configuracion.razor @@ -4,14 +4,34 @@ @using System.Globalization @using GestionaDenunciasAN.Services +@using Microsoft.AspNetCore.Components.Authorization @inject ApiDenunciasClient ApiDenuncias +@inject AuthenticationStateProvider AuthenticationStateProvider @inject UiBusyService Busy Configuracion

Configuracion

+@if (!hasCheckedConfigurationAccess) +{ +
+
+ + Cargando configuracion... +
+
+} +else if (!hasConfigurationAccess) +{ +
+ Configuracion restringida. +
Esta pantalla solo esta disponible para los usuarios autorizados del sistema.
+
+} +else +{
Fecha de actualizaciones externas
@@ -79,6 +99,21 @@
Purga manual con reemplazo
+
+
+ + Ultima clave diaria registrada + @(string.IsNullOrWhiteSpace(latestEncryptionKeyDate) ? "No disponible" : latestEncryptionKeyDate) + @if (!string.IsNullOrWhiteSpace(latestEncryptionKeyStatus)) + { + @latestEncryptionKeyStatus + } +
+
+ Es la fecha de la fila mas reciente en encryption_keys; sirve para comprobar rapidamente que la rotacion diaria esta llegando a la base de datos. +
+
+
@@ -169,11 +204,22 @@
@purgeErrorMessage
} +} @code { private const string RequiredConfirmation = "PURGAR CLAVE ACTUAL"; + private static readonly HashSet ConfigurationUsers = new(StringComparer.OrdinalIgnoreCase) + { + "pcornejo", + "Rgarciaglbk", + "eaguilarGestor" + }; + private bool hasCheckedConfigurationAccess; + private bool hasConfigurationAccess; private string externalUpdateCutoffDate = string.Empty; + private string latestEncryptionKeyDate = string.Empty; + private string latestEncryptionKeyStatus = string.Empty; private string? configurationNotice; private string? configurationError; private bool isSavingConfiguration; @@ -191,6 +237,14 @@ protected override async Task OnInitializedAsync() { + var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); + hasConfigurationAccess = IsConfigurationUser(authState.User.Identity?.Name); + hasCheckedConfigurationAccess = true; + if (!hasConfigurationAccess) + { + return; + } + await LoadConfigurationAsync(); } @@ -201,6 +255,8 @@ configurationError = null; var config = await ApiDenuncias.GetAppConfigurationAsync(); externalUpdateCutoffDate = ToSpanishDateText(config.ExternalUpdateCutoffDate); + latestEncryptionKeyDate = ToSpanishDateText(config.LatestEncryptionKeyDate); + latestEncryptionKeyStatus = ToSpanishKeyStatus(config.LatestEncryptionKeyStatus); } catch (Exception ex) { @@ -219,6 +275,8 @@ var config = await ApiDenuncias.UpdateExternalUpdateCutoffDateAsync(date); externalUpdateCutoffDate = ToSpanishDateText(config.ExternalUpdateCutoffDate); + latestEncryptionKeyDate = ToSpanishDateText(config.LatestEncryptionKeyDate); + latestEncryptionKeyStatus = ToSpanishKeyStatus(config.LatestEncryptionKeyStatus); configurationNotice = string.IsNullOrWhiteSpace(externalUpdateCutoffDate) ? "Fecha de corte eliminada." : $"Fecha de corte guardada: {externalUpdateCutoffDate}."; @@ -287,6 +345,25 @@ : value.Trim(); } + private static string ToSpanishKeyStatus(string? status) + { + if (string.IsNullOrWhiteSpace(status)) + { + return string.Empty; + } + + return status.Trim().ToLowerInvariant() switch + { + "active" => "activa", + "purged" => "purgada", + _ => status.Trim() + }; + } + + private static bool IsConfigurationUser(string? username) + => !string.IsNullOrWhiteSpace(username) && + ConfigurationUsers.Contains(username.Trim()); + private async Task ExecutePurgeAsync() { if (!CanExecutePurge) @@ -305,6 +382,7 @@ try { purgeResult = await ApiDenuncias.ExecuteCurrentManualPurgeAsync(); + await LoadConfigurationAsync(); acceptedRisk = false; confirmation = string.Empty; } diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/GestionZip.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Entrada.razor similarity index 75% rename from Antifraude.Net/GestionaDenunciasAN/Components/Pages/GestionZip.razor rename to Antifraude.Net/GestionaDenunciasAN/Components/Pages/Entrada.razor index 8d17566..f99baa0 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/GestionZip.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Entrada.razor @@ -1,8 +1,9 @@ -@page "/GestionZip" +@page "/Entrada" @rendermode @(new InteractiveServerRenderMode(prerender: false)) @attribute [Authorize] @implements IAsyncDisposable @using System.Globalization +@using System.Text.RegularExpressions @using GestionaDenunciasAN.Models @inject AuthenticationStateProvider AuthenticationStateProvider @inject ApiDenunciasClient ApiDenuncias @@ -73,9 +74,81 @@ .report-detail-close { flex: 0 0 auto; } + + .report-row-disabled { + opacity: 0.62; + } + + .report-row-disabled td { + cursor: not-allowed; + } + + .inbox-table-wrap { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } + + .inbox-table { + min-width: 1080px; + font-size: 0.84rem; + white-space: nowrap; + } + + .inbox-table th, + .inbox-table td { + vertical-align: middle; + padding: 0.45rem 0.5rem; + } + + .inbox-report-cell { + width: 4.5rem; + } + + .inbox-channel-cell { + width: 10.5rem; + max-width: 10.5rem; + } + + .inbox-channel-cell .text-truncate { + max-width: 100%; + } + + .inbox-tracking-cell { + width: 11rem; + max-width: 11rem; + overflow: hidden; + text-overflow: ellipsis; + } + + .inbox-activity-cell { + width: 9.25rem; + } + + .inbox-action-cell { + width: 5.5rem; + text-align: right; + } + + + .inbox-detail-button { + padding-inline: 0.55rem; + white-space: nowrap; + } + + @@media (max-width: 768px) { + .inbox-table { + min-width: 1020px; + font-size: 0.8rem; + } + + .inbox-table th, + .inbox-table td { + padding: 0.4rem 0.42rem; + } + } -
+

Entrada de denuncias

@@ -96,43 +169,43 @@
@FilterWarningMessage
} -
-
-
-
-
Sesion GlobalLeaks
-

Usuario: @CurrentUsername

-

Estado: @SessionStatusText

-

- Ultima descarga registrada: - @(UserInboxState.LastDownloadedReportMomentUtc is null - ? "Sin descargas previas" - : UserInboxState.LastDownloadedReportMomentUtc.Value.ToLocalTime().ToString("dd/MM/yyyy HH:mm")) -

-

- La base de datos lleva la cuenta de lo que ya ha descargado este usuario, de lo que han descargado otros - y de si el expediente ya esta creado en Gestiona. -

- -
- - +
+
+
+
+
Sesion GlobalLeaks
+
+ Usuario: @CurrentUsername + Estado: @SessionStatusText + + Ultima descarga: + @(UserInboxState.LastDownloadedReportMomentUtc is null + ? "Sin descargas previas" + : UserInboxState.LastDownloadedReportMomentUtc.Value.ToLocalTime().ToString("dd/MM/yyyy HH:mm")) +
+
+
+ + +
+ +
+
-
-
+
@@ -152,7 +225,7 @@
@@ -206,6 +279,12 @@
@VisibleReports.Count denuncia(s) visibles, @SelectedReportsCount seleccionada(s). + @if (VisibleReports.Any(report => report.Accessible == false)) + { + + @VisibleReports.Count(report => report.Accessible == false) denuncia(s) marcadas por GlobalLeaks como no accesibles para este usuario. + + } @if (UserInboxState.LastDownloadedReportMomentUtc is not null) { @@ -214,7 +293,7 @@ }
-
-
- +
+
- + + + - - + + @if (!CanUseGlobalLeaks) { - - + } else if (ReportsBusy) { - - + + } else if (!VisibleReports.Any()) { - + } else @@ -266,33 +347,35 @@ - - + + - + + + - - @@ -303,8 +386,6 @@ - - @if (DetailModalVisible) @@ -451,7 +532,7 @@ private bool CanUseGlobalLeaks => SessionInfo?.HasActiveSession == true; private bool RenewPrepared => !string.IsNullOrWhiteSpace(RenewPendingLoginId); - private int SelectedReportsCount => SelectedIds.Count; + private int SelectedReportsCount => Reports.Count(report => SelectedIds.Contains(report.Id) && CanUseReport(report)); private bool CanImportSelected => CanUseGlobalLeaks && SelectedReportsCount > 0 && !ImportBusy; private string SessionStatusText => SessionInfo is null ? "Sin credenciales guardadas" @@ -464,7 +545,7 @@ private string SessionRenewBusyText => RenewPrepared ? "Validando 2FA..." : "Preparando..."; - private string SelectAllLabel => VisibleReports.Count > 0 && VisibleReports.All(report => SelectedIds.Contains(report.Id)) + private string SelectAllLabel => VisibleReports.Any(CanUseReport) && VisibleReports.Where(CanUseReport).All(report => SelectedIds.Contains(report.Id)) ? "Deseleccionar todas" : "Seleccionar todas"; @@ -631,9 +712,16 @@ { var selectedReports = Reports .Where(report => SelectedIds.Contains(report.Id)) + .Where(CanUseReport) .OrderBy(report => report.Progressive ?? 0) .ToList(); + if (selectedReports.Count == 0) + { + SetStatus("No hay denuncias accesibles seleccionadas para importar.", "alert-warning"); + return; + } + using var busy = Busy.Show( "Importando denuncias", $"Descargando y procesando {selectedReports.Count} denuncia(s) desde GlobalLeaks.", @@ -685,6 +773,20 @@ { SetStatus($"Se han importado {importedCount} denuncia(s) desde GlobalLeaks.", "alert-success"); } + else if (errors.Count == 0 && importedCount == 0) + { + var parts = new List + { + "No se ha incorporado ninguna denuncia nueva." + }; + + if (warnings.Count > 0) + { + parts.Add($"Avisos: {string.Join(" | ", warnings)}"); + } + + SetStatus(string.Join(" ", parts), "alert-warning"); + } else { var parts = new List @@ -713,6 +815,12 @@ private async Task OpenReportDetailAsync(ReportDto report) { + if (report.Accessible == false) + { + SetStatus($"La denuncia #{report.Progressive ?? 0} no es accesible para este usuario en GlobalLeaks.", "alert-warning"); + return; + } + if (!CanUseGlobalLeaks) { SetStatus("Renueva antes la sesion de GlobalLeaks para consultar el detalle.", "alert-warning"); @@ -790,7 +898,7 @@ filtered = Filter switch { "new" => filtered.Where(report => string.IsNullOrWhiteSpace(report.AccessDate) || string.Equals(report.Status, "new", StringComparison.OrdinalIgnoreCase)), - "updated" => filtered.Where(report => report.Updated), + "updated" => filtered.Where(report => report.CitizenHasNewActivity || report.Updated), _ => filtered }; @@ -813,7 +921,10 @@ .OrderByDescending(report => report.Progressive ?? 0) .ToList(); - var validIds = Reports.Select(report => report.Id).ToHashSet(StringComparer.OrdinalIgnoreCase); + var validIds = Reports + .Where(CanUseReport) + .Select(report => report.Id) + .ToHashSet(StringComparer.OrdinalIgnoreCase); SelectedIds.RemoveWhere(id => !validIds.Contains(id)); } @@ -887,16 +998,23 @@ return reports; } - private void ToggleSelection(string reportId, ChangeEventArgs args) + private void ToggleSelection(ReportDto report, ChangeEventArgs args) { + if (report.Accessible == false) + { + SelectedIds.Remove(report.Id); + StateHasChanged(); + return; + } + var isChecked = GetCheckedValue(args); if (isChecked) { - SelectedIds.Add(reportId); + SelectedIds.Add(report.Id); } else { - SelectedIds.Remove(reportId); + SelectedIds.Remove(report.Id); } StateHasChanged(); @@ -904,9 +1022,12 @@ private void ToggleSelectAll() { - var shouldSelect = !VisibleReports.All(report => SelectedIds.Contains(report.Id)); + var selectableReports = VisibleReports + .Where(CanUseReport) + .ToList(); + var shouldSelect = selectableReports.Count > 0 && !selectableReports.All(report => SelectedIds.Contains(report.Id)); - foreach (var report in VisibleReports) + foreach (var report in selectableReports) { if (shouldSelect) { @@ -980,15 +1101,58 @@ } private static string FormatDate(string? value) + { + return FormatOptionalDate(value) ?? "-"; + } + + private static string? FormatOptionalDate(string? value) { if (string.IsNullOrWhiteSpace(value)) { - return "-"; + return null; } return DateTimeOffset.TryParse(value, out var parsed) ? parsed.ToLocalTime().ToString("dd/MM/yyyy HH:mm") - : "-"; + : null; + } + + private static string FormatCitizenActivity(ReportDto report) + { + var citizenDate = FormatOptionalDate(report.CitizenLastActivity); + if (!string.IsNullOrWhiteSpace(citizenDate)) + { + return citizenDate; + } + + if (!report.ActivityAnalyzed) + { + return "No analizada"; + } + + var accessDate = FormatOptionalDate(report.WhistleblowerLastAccess); + if (!string.IsNullOrWhiteSpace(accessDate)) + { + return accessDate; + } + + return "Sin fecha"; + } + + private static string FormatReceiverActivity(ReportDto report) + { + var receiverDate = FormatOptionalDate(report.ReceiverLastActivity); + if (!string.IsNullOrWhiteSpace(receiverDate)) + { + return receiverDate; + } + + if (!report.ActivityAnalyzed) + { + return "No analizada"; + } + + return "Sin actividad"; } private static string FormatBytes(long? value) @@ -1013,15 +1177,42 @@ } private static string GetCommentAuthorLabel(string? type) - => string.Equals(type, "whistleblower", StringComparison.OrdinalIgnoreCase) + => IsWhistleblowerActivityType(type) ? "Denunciante" - : string.Equals(type, "receiver", StringComparison.OrdinalIgnoreCase) + : IsReceiverActivityType(type) ? "Receptor" : "Comentario"; + private static bool IsWhistleblowerActivityType(string? value) + => MatchesAny(value, "whistleblower", "citizen", "source", "tipper", "submitter", "denunciante"); + + private static bool IsReceiverActivityType(string? value) + => MatchesAny(value, "receiver", "recipient", "admin", "administrator", "operator", "staff", "custodian", "moderator", "gestor", "oaaf"); + + private static bool MatchesAny(string? value, params string[] candidates) + { + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + var normalized = NormalizeActivityType(value); + return candidates.Any(candidate => + { + var candidateToken = NormalizeActivityType(candidate); + return normalized == candidateToken || + normalized.StartsWith(candidateToken + " ", StringComparison.Ordinal) || + normalized.EndsWith(" " + candidateToken, StringComparison.Ordinal) || + normalized.Contains(" " + candidateToken + " ", StringComparison.Ordinal); + }); + } + + private static string NormalizeActivityType(string value) + => Regex.Replace(value.Trim().ToLowerInvariant(), @"[^a-z0-9]+", " ").Trim(); + private static DateTimeOffset? GetEffectiveMoment(ReportDto report) { - return ParseDate(report.UpdateDate) ?? ParseDate(report.CreationDate); + return ParseDate(report.CitizenLastActivity) ?? ParseDate(report.ReceiverLastActivity) ?? ParseDate(report.UpdateDate) ?? ParseDate(report.CreationDate); } private static DateTimeOffset? ParseDate(string? value) @@ -1043,6 +1234,16 @@ return "Sin leer"; } + if (report.CitizenHasNewActivity) + { + return "Actualizacion ciudadano"; + } + + if (IsReceiverOnlyUpdate(report)) + { + return "Actividad OAAF"; + } + if (report.Updated) { return "Actualizada"; @@ -1060,16 +1261,81 @@ return "bg-warning text-dark"; } - if (report.Updated) + if (report.CitizenHasNewActivity) { return "bg-info text-dark"; } + if (IsReceiverOnlyUpdate(report)) + { + return "bg-secondary"; + } + + if (report.Updated) + { + return "bg-light text-dark"; + } + return string.Equals(report.Status, "closed", StringComparison.OrdinalIgnoreCase) ? "bg-secondary" : "bg-primary"; } + private static string GetAccessLabel(ReportDto report) + => report.Accessible switch + { + true => "Accesible", + false => "Sin acceso", + _ => "Sin dato" + }; + + private static string GetAccessBadgeCss(ReportDto report) + => report.Accessible switch + { + true => "bg-success", + false => "bg-danger", + _ => "bg-light text-dark" + }; + + private static bool CanUseReport(ReportDto report) + => report.Accessible != false && !IsReceiverOnlyUpdate(report); + + private static bool IsReceiverOnlyUpdate(ReportDto report) + => report.AlreadyInGestiona && + report.ActivityAnalyzed && + !report.CitizenHasNewActivity && + report.ReceiverHasNewActivity; + + private static string? GetReportActionBlockReason(ReportDto report) + { + if (report.Accessible == false) + { + return "GlobalLeaks indica que esta denuncia no es accesible para este usuario."; + } + + if (IsReceiverOnlyUpdate(report)) + { + return "La actividad nueva procede de OAAF/gestor; no se importa como actualizacion del ciudadano."; + } + + return null; + } + + private static string GetReportDetailTitle(ReportDto report) + { + if (report.Accessible == false) + { + return "GlobalLeaks indica que esta denuncia no es accesible para este usuario."; + } + + if (IsReceiverOnlyUpdate(report)) + { + return "Actividad interna detectada; puedes consultar el detalle, pero no importarla como actualizacion."; + } + + return "Consulta mensajes y ficheros. GlobalLeaks puede marcar la denuncia como leida."; + } + private static string GetTrackingLabel(ReportDto report) { if (report.AlreadyInGestiona) @@ -1122,6 +1388,16 @@ private static string? GetReportRowCss(ReportDto report) { + if (report.Accessible == false) + { + return "table-danger report-row-disabled"; + } + + if (IsReceiverOnlyUpdate(report)) + { + return "table-secondary report-row-disabled"; + } + if (report.AlreadyInGestiona) { return "table-success"; diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Gestiona.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Gestiona.razor index 52ad7e3..015dea4 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Gestiona.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Gestiona.razor @@ -3,14 +3,16 @@ @attribute [Authorize] @using GestionaDenunciasAN.Models @using GestionaDenunciasAN.Services +@using GestionaDenuncias.Shared.Models @using System.Globalization @attribute [StreamRendering] @inject GestionaDenunciasAN.Models.UserState userState @inject NavigationManager Navigation @inject IHostEnvironment HostEnvironment @inject IDenunciaStore DenunciaStore +@inject ApiDenunciasClient ApiDenuncias -Denuncias Gestión +Denuncias Gestión -

Denuncias en Gestión

+

Denuncias en Gestión

- + Cargando datos... } -else if (denunciasGestiona == null || !denunciasGestiona.Any()) +else if ((historialGestiona == null || !historialGestiona.Any()) && + (denunciasGestiona == null || !denunciasGestiona.Any())) { -

No hay denuncias en gestión.

+

No hay denuncias en gestión.

} else { @@ -102,21 +105,50 @@ else (!string.IsNullOrEmpty(d.NombreDenuncia) && d.NombreDenuncia.Contains(busqueda, StringComparison.OrdinalIgnoreCase)) || (!string.IsNullOrEmpty(d.ArchivoElegido) && d.ArchivoElegido.Contains(busqueda, StringComparison.OrdinalIgnoreCase)) || (!string.IsNullOrEmpty(d.Estado) && d.Estado.Contains(busqueda, StringComparison.OrdinalIgnoreCase)) - )) + )) { var collapseId = $"collapse{denuncia.Id_Denuncia}"; + var latestHistory = GetLatestHistory(denuncia.Id_Denuncia); + var uploadMoment = GetUploadMoment(denuncia, latestHistory);
+ @if (ficherosAdjuntosPurgados.Contains(denuncia.Id_Denuncia)) + { +
+ La informacion de detalle de esta denuncia no se puede mostrar porque sus datos estan purgados criptograficamente. Se mantiene visible la cabecera operativa del expediente. +
+ } + else + {
Datos Generales
@@ -137,12 +169,22 @@ else } @if (!string.IsNullOrWhiteSpace(denuncia.ExpedienteGestionaMostrable)) { -
Nº expediente Gestiona
+
Nº expediente Gestiona
@denuncia.ExpedienteGestionaMostrable
} + @if (!string.IsNullOrWhiteSpace(GetAuditDateText(denuncia))) + { +
Última actividad Gestiona
+
@GetAuditDateText(denuncia)
+ } + @if (!string.IsNullOrWhiteSpace(GetAuditMessage(denuncia))) + { +
Última acción Gestiona
+
@GetAuditMessage(denuncia)
+ } @if (denuncia.Id_Persona_Gestiona != 0) { -
ID Persona Gestión
+
ID Persona Gestión
@denuncia.Id_Persona_Gestiona
} @if (!string.IsNullOrWhiteSpace(denuncia.Etiqueta)) @@ -191,13 +233,13 @@ else
@denuncia.Asunto
A Quien Denuncia
@denuncia.A_Quien_Denuncia
-
Descripción Denuncia
+
Descripción Denuncia
@denuncia.Descripcion_Denuncia
Denunciado Ante Inst
@denuncia.Denunciado_Ante_Inst
@if (!string.IsNullOrWhiteSpace(denuncia.Modalidad_Informacion)) { -
Modalidad Información
+
Modalidad Información
@denuncia.Modalidad_Informacion
}
Lugar Hechos
@@ -209,27 +251,27 @@ else }
- -
Datos de Notificación
+ +
Datos de Notificación
@if (!string.IsNullOrWhiteSpace(denuncia.Notificacion_Preferencia)) { -
Notificación Preferencia
+
Notificación Preferencia
@denuncia.Notificacion_Preferencia
} @if (!string.IsNullOrWhiteSpace(denuncia.Notificacion_Electronica)) { -
Notificación Electrónica
+
Notificación Electrónica
@denuncia.Notificacion_Electronica
} @if (!string.IsNullOrWhiteSpace(denuncia.Correo_Electronico)) { -
Correo Electrónico
+
Correo Electrónico
@denuncia.Correo_Electronico
} @if (!string.IsNullOrWhiteSpace(denuncia.Notificacion_Sms)) { -
Notificación SMS
+
Notificación SMS
@denuncia.Notificacion_Sms
}
@@ -240,7 +282,7 @@ else @if (denuncia.Condiciones) {
Condiciones
-
+
Sí
} @if (!string.IsNullOrWhiteSpace(denuncia.Comments)) { @@ -257,7 +299,7 @@ else
- + @@ -277,6 +319,29 @@ else
# Canal PresentacionUltima actualizacionActividad ciudadanoActividad OAAF EstadoAcceso SeguimientoDetalle
Detalle
+
Renueva la sesion de GlobalLeaks con un 2FA valido para cargar la bandeja.
Cargando denuncias...
Cargando denuncias...
No hay denuncias con los filtros actuales.No hay denuncias con los filtros actuales.
+ disabled="@(!CanUseReport(report) || ImportBusy)" + title="@GetReportActionBlockReason(report)" + @onchange="@((ChangeEventArgs args) => ToggleSelection(report, args))" /> #@(report.Progressive ?? 0)@(report.ContextName ?? report.ContextId ?? "-")#@(report.Progressive ?? 0)@(report.ContextName ?? report.ContextId ?? "-") @FormatDate(report.CreationDate)@FormatDate(report.UpdateDate)@FormatCitizenActivity(report)@FormatReceiverActivity(report) @GetStatusLabel(report) + + + + @GetAccessLabel(report) - - @GetTrackingLabel(report) - - @if (!string.IsNullOrWhiteSpace(report.TrackingNote)) - { -
@report.TrackingNote
- } +
+ @GetTrackingLabel(report) +
NombreTamaño (bytes)Tamaño (bytes) Ver
} + } +
+
+
+ } + @foreach (var item in GetHeaderOnlyHistoryItems()) + { + var uploadMoment = item.UploadedAtUtc; +
+
+
Denuncia ID: @item.DenunciaId
+
+ Asunto: @DisplayOrDash(item.Asunto) + Nº expediente: @DisplayOrDash(item.CodigoExpedienteGestiona) + Última subida: @DisplayOrDash(item.TipoSubida) + Grupo asignado: @DisplayOrDash(FormatGroupCode(item.GrupoAsignado)) + @if (!string.IsNullOrWhiteSpace(GetUploadUser(item))) + { + Usuario subida: @GetUploadUser(item) + } + Fecha de Subida: @FormatUploadDate(uploadMoment) + Hora de Subida: @FormatUploadTime(uploadMoment) + Detalle no disponible por purga criptográfica.
@@ -305,9 +370,12 @@ else @code { private List denunciasGestiona = new(); + private List historialGestiona = new(); private Dictionary> ficherosAdjuntos = new(); + private HashSet ficherosAdjuntosPurgados = new(); + private Dictionary auditoriasGestiona = new(); - // Variable para la búsqueda + // Variable para la búsqueda private string busqueda = ""; private bool hasLoaded = false; @@ -316,8 +384,10 @@ else { if (firstRender) { + await CargarHistorialGestionaAsync(); await CargarGestionaAsync(); await CargarFicherosAdjuntosAsync(denunciasGestiona.Select(d => d.Id_Denuncia)); + await CargarAuditoriasGestionaAsync(denunciasGestiona); hasLoaded = true; StateHasChanged(); } @@ -331,25 +401,228 @@ else .ToList(); } - + private async Task CargarHistorialGestionaAsync() + { + try + { + historialGestiona = await ApiDenuncias.GetGestionaUploadHistoryAsync(); + } + catch (Exception ex) + { + Console.Error.WriteLine($"No se ha podido cargar el histórico de subidas a Gestiona: {ex}"); + historialGestiona = new List(); + } + } private async Task> CargarDenunciasJsonAsync() { return await DenunciaStore.GetDenunciasByScopeAsync(DenunciaListScope.InGestiona); } + private async Task CargarAuditoriasGestionaAsync(IEnumerable denuncias) + { + auditoriasGestiona.Clear(); + var items = denuncias + .Where(d => d.Id_Denuncia > 0 && !string.IsNullOrWhiteSpace(d.Expediente_Gestiona) && !string.Equals(d.Expediente_Gestiona, "Pendiente", StringComparison.OrdinalIgnoreCase)) + .DistinctBy(d => d.Id_Denuncia) + .ToList(); + + using var gate = new System.Threading.SemaphoreSlim(4, 4); + var tasks = items.Select(async denuncia => + { + await gate.WaitAsync(); + try + { + var audit = await ApiDenuncias.GetGestionaFileLatestAuditAsync(denuncia.Expediente_Gestiona); + if (audit?.Fecha is null && string.IsNullOrWhiteSpace(audit?.Mensaje)) + { + return; + } + + lock (auditoriasGestiona) + { + auditoriasGestiona[denuncia.Id_Denuncia] = audit; + } + } + catch (Exception ex) + { + Console.Error.WriteLine($"No se ha podido cargar la auditoría de Gestiona para la denuncia {denuncia.Id_Denuncia}: {ex}"); + } + finally + { + gate.Release(); + } + }); + + await Task.WhenAll(tasks); + } + + private string GetAuditDateText(DenunciasGestiona denuncia) + { + return auditoriasGestiona.TryGetValue(denuncia.Id_Denuncia, out var audit) && audit.Fecha is not null + ? audit.Fecha.Value.ToLocalTime().ToString("dd/MM/yyyy HH:mm") + : string.Empty; + } + + private string GetAuditMessage(DenunciasGestiona denuncia) + { + return auditoriasGestiona.TryGetValue(denuncia.Id_Denuncia, out var audit) + ? audit.Mensaje ?? string.Empty + : string.Empty; + } + + private GestionaUploadHistoryEntry? GetLatestHistory(int denunciaId) + { + return historialGestiona + .Where(item => item.DenunciaId == denunciaId) + .OrderByDescending(item => item.UploadedAtUtc) + .ThenByDescending(item => item.Id) + .FirstOrDefault(); + } + + private IEnumerable GetHeaderOnlyHistoryItems() + { + var visibleComplaintIds = denunciasGestiona + .Select(denuncia => denuncia.Id_Denuncia) + .ToHashSet(); + + return historialGestiona + .Where(item => !visibleComplaintIds.Contains(item.DenunciaId)) + .Where(MatchesHistorySearch) + .GroupBy(item => item.DenunciaId) + .Select(group => group + .OrderByDescending(item => item.UploadedAtUtc) + .ThenByDescending(item => item.Id) + .First()) + .OrderByDescending(item => item.UploadedAtUtc) + .ThenByDescending(item => item.Id); + } + + private static DateTime GetUploadMoment(DenunciasGestiona denuncia, GestionaUploadHistoryEntry? history) + { + if (history?.UploadedAtUtc is DateTime historyDate && historyDate != DateTime.MinValue) + { + return historyDate; + } + + return denuncia.FechaSubidaAGestiona; + } + + private static string GetHeaderSubject(DenunciasGestiona denuncia, GestionaUploadHistoryEntry? history) + { + return !string.IsNullOrWhiteSpace(history?.Asunto) + ? history.Asunto.Trim() + : DisplayOrDash(denuncia.NombreDenuncia); + } + + private static string GetUploadType(DenunciasGestiona denuncia, GestionaUploadHistoryEntry? history) + { + return !string.IsNullOrWhiteSpace(history?.TipoSubida) + ? history.TipoSubida.Trim() + : denuncia.UltimaSubidaGestionaTipoMostrable; + } + + private static string GetAssignedGroup(DenunciasGestiona denuncia, GestionaUploadHistoryEntry? history) + { + return !string.IsNullOrWhiteSpace(history?.GrupoAsignado) + ? history.GrupoAsignado.Trim() + : denuncia.UltimoGrupoAsignadoGestionaMostrable; + } + + private static string GetUploadUser(GestionaUploadHistoryEntry? history) + { + return string.IsNullOrWhiteSpace(history?.Usuario) || + string.Equals(history.Usuario, "No registrado", StringComparison.OrdinalIgnoreCase) + ? string.Empty + : history.Usuario.Trim(); + } + + private static string FormatUploadDate(DateTime value) + { + var local = ToLocalUploadTime(value); + return local == DateTime.MinValue ? "-" : local.ToString("dd/MM/yyyy"); + } + + private static string FormatUploadTime(DateTime value) + { + var local = ToLocalUploadTime(value); + return local == DateTime.MinValue ? "-" : local.ToString("HH:mm"); + } + + private static DateTime ToLocalUploadTime(DateTime value) + { + return value == DateTime.MinValue + ? DateTime.MinValue + : DateTime.SpecifyKind(value, DateTimeKind.Utc).ToLocalTime(); + } + + private bool MatchesHistorySearch(GestionaUploadHistoryEntry item) + { + if (string.IsNullOrWhiteSpace(busqueda)) + { + return true; + } + + var search = busqueda.Trim(); + return item.DenunciaId.ToString(CultureInfo.InvariantCulture).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.CodigoExpedienteGestiona ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.TipoSubida ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.GrupoAsignado ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.Usuario ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.Asunto ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase) || + (item.Documentos ?? string.Empty).Contains(search, StringComparison.OrdinalIgnoreCase); + } + + private static string FormatHistoryDate(DateTime value) + { + var local = ToLocalUploadTime(value); + return local == DateTime.MinValue + ? "-" + : local.ToString("dd/MM/yyyy HH:mm"); + } + + private static string DisplayOrDash(string? value) + => string.IsNullOrWhiteSpace(value) ? "-" : value.Trim(); + + private static string FormatGroupCode(string? value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return string.Empty; + } + + var trimmed = value.Trim(); + var code = new string(trimmed.TakeWhile(char.IsDigit).ToArray()); + return string.IsNullOrWhiteSpace(code) ? trimmed : code; + } private async Task CargarFicherosAdjuntosAsync(IEnumerable denunciaIds) { ficherosAdjuntos.Clear(); + ficherosAdjuntosPurgados.Clear(); foreach (var denunciaId in denunciaIds.Where(id => id > 0).Distinct()) { - var ficheros = await DenunciaStore.GetFicherosByDenunciaAsync(denunciaId); - if (ficheros.Count > 0) + try { - ficherosAdjuntos[denunciaId] = ficheros; + var ficheros = await DenunciaStore.GetFicherosByDenunciaAsync(denunciaId); + if (ficheros.Count > 0) + { + ficherosAdjuntos[denunciaId] = ficheros; + } + } + catch (InvalidOperationException ex) when (IsPurgedDataError(ex)) + { + ficherosAdjuntosPurgados.Add(denunciaId); + Console.Error.WriteLine($"No se han podido cargar los adjuntos de la denuncia {denunciaId} porque estan purgados: {ex.Message}"); } } } + private static bool IsPurgedDataError(Exception ex) + { + var message = ex.Message ?? string.Empty; + return message.Contains("datos purgados", StringComparison.OrdinalIgnoreCase) || + message.Contains("Denuncia no disponible", StringComparison.OrdinalIgnoreCase); + } + private static string BuildAttachmentContentUrl(int denunciaId, string? fileName) { return $"/api/denuncias/{denunciaId}/ficheros/content?fileName={Uri.EscapeDataString(fileName ?? string.Empty)}"; diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Login.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Login.razor index 81f31ff..cfddbf6 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Login.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Login.razor @@ -355,7 +355,7 @@ return ReturnUrl; } - return "/GestionZip"; + return "/Entrada"; } private static T? ReadData(ApiJsResponse response) diff --git a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Pendientes.razor b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Pendientes.razor index aa5875c..a3a29c1 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Pendientes.razor +++ b/Antifraude.Net/GestionaDenunciasAN/Components/Pages/Pendientes.razor @@ -1,4 +1,4 @@ -@page "/Pendientes" +@page "/Pendientes" @rendermode InteractiveServer @attribute [Authorize] @@ -205,16 +205,7 @@ else class="btn btn-success btn-sm me-2" @onclick:stopPropagation="true" @onclick="() => OpenEnviarAGestionaModal(denuncia)"> - Configurar subida - - - -
} - +
+ placeholder="Ej.: Gestión AN (lo verás como: Documento Adjunto 1 Gestión AN, ...)" /> - Se aplicará al subir en modo individual. El report.txt se subirá como Denuncia. + Se aplicará al subir en modo individual. El report.txt se subirá como Denuncia.
@@ -569,7 +560,7 @@ else checked='@(uploadMode == "merge")' @onclick='() => uploadMode = "merge"' />
@@ -593,7 +584,7 @@ else checked='@(selectedGroup == "600")' @onclick='() => selectedGroup = "600"' />
@*
@@ -604,7 +595,7 @@ else checked='@(selectedGroup == "510")' @onclick='() => selectedGroup = "510"' />
@@ -626,13 +617,13 @@ else
- Los datos del tercero se cargan automáticamente desde la denuncia y no se pueden editar aquí. + Los datos del tercero se cargan automáticamente desde la denuncia y no se pueden editar aquí.
@if (modalThirdParty.IsAnonymous) {
- Denuncia anónima. Se enlazará automáticamente el tercero 00000000T. + Denuncia anónima. Se enlazará automáticamente el tercero 00000000T.
} @@ -661,7 +652,7 @@ else {
- +
@@ -674,11 +665,11 @@ else
- +
- +
@@ -688,14 +679,14 @@ else {
- +
} - Al confirmar, se enlazará en Gestiona el tercero obtenido del formulario de la denuncia. + Al confirmar, se enlazará en Gestiona el tercero obtenido del formulario de la denuncia. @if (!modalThirdParty.IsAnonymous && !string.IsNullOrWhiteSpace(modalThirdParty.DocumentId)) @@ -768,7 +759,7 @@ else {
- Cargando expedientes… + Cargando expedientes…
} else if (!string.IsNullOrWhiteSpace(errorExpedientes)) @@ -788,7 +779,7 @@ else Expediente Asunto - Fecha creación + Fecha creación Estado @@ -827,7 +818,7 @@ else private string nombreDocumentos = string.Empty; private bool isUploading = false; - private string uploadMode = "merge"; + private string uploadMode = "individual"; private string selectedGroup = "600"; @@ -870,14 +861,6 @@ else { loadError = string.Empty; var todas = await CargarDenunciasJsonAsync(); - - // Asegura ProcedureId/GroupId por si faltan - foreach (var d in todas.Where(x => x.ProcedureId == Guid.Empty)) - { - d.ProcedureId = Guid.Parse("82722c9b-cecc-4299-8a7b-ce5abeb8170b"); - d.GroupId = Guid.Parse("6dbfc433-1eb6-4b9a-a533-bfebc652c101"); - } - // SOLO pendientes pendientes = todas .Where(d => !d.EnGestiona && !d.EnRechazada && !d.EsActualizacion) @@ -944,6 +927,15 @@ else return new string(clean.Where(ch => ch <= 127).ToArray()); } + private string BuildMergedAttachmentsFileName(int denunciaId, DateTime timestampUtc) + { + var baseName = string.IsNullOrWhiteSpace(nombreDocumentos) + ? $"Adjuntos {denunciaId}_{timestampUtc:yyyyMMddHHmmss}" + : nombreDocumentos.Trim(); + + return FixFileName($"{Path.GetFileNameWithoutExtension(baseName)}.pdf"); + } + private async Task ConfirmarEnvio() { if (selectedDenuncias == null) return; @@ -988,10 +980,11 @@ else { operationError = ficherosVacios.Count == 0 ? $"La denuncia #{selectedDenuncias.Id_Denuncia} no tiene ficheros para subir." - : $"La denuncia #{selectedDenuncias.Id_Denuncia} solo tiene ficheros vacíos y no se ha subido nada. Ficheros omitidos: {string.Join(", ", ficherosVacios)}."; + : $"La denuncia #{selectedDenuncias.Id_Denuncia} solo tiene ficheros vacíos y no se ha subido nada. Ficheros omitidos: {string.Join(", ", ficherosVacios)}."; return; } + var expedienteCreadoEnGestiona = false; string fileUrl; if (selectedDenuncias.EnGestiona && !string.IsNullOrWhiteSpace(selectedDenuncias.Expediente_Gestiona)) { @@ -1001,7 +994,6 @@ else { Busy.Update(message: "Creando expediente nuevo en Gestiona.", detail: "Paso 2 de 7"); var createdFile = await ApiDenuncias.CreateGestionaFileAsync( - selectedDenuncias.ProcedureId, nuevoAsunto, "RQ2ZLC - Expediente de Denuncias", "3109963" @@ -1011,20 +1003,13 @@ else await ApiDenuncias.OpenGestionaFileAsync( fileUrl, createdFile.FileOpenUrl, - managementUnitGroupId: Guid.Parse("a4ad4dfb-70dc-4219-8ee3-4dcc939f0955"), - assignedGroupId: selectedGroup switch - { - "510" => Guid.Parse("6dbfc433-1eb6-4b9a-a533-bfebc652c101"), - "600" => Guid.Parse("454fa4ec-8b82-4240-9419-113f45d4b004"), - "700" => Guid.Parse("a4ad4dfb-70dc-4219-8ee3-4dcc939f0955"), - _ => throw new InvalidOperationException($"Grupo desconocido: {selectedGroup}") - }, + assignedGroupCode: selectedGroup, confidential: selectedDenuncias.Confidencial, - freeTitle: nuevoAsunto, - siaCode: "3109963" + freeTitle: nuevoAsunto ); selectedDenuncias.Expediente_Gestiona = fileUrl; selectedDenuncias.EnGestiona = true; + expedienteCreadoEnGestiona = true; } Busy.Update(message: "Guardando referencia local del expediente.", detail: "Paso 3 de 7"); @@ -1033,7 +1018,7 @@ else var thirdParty = selectedThirdParty ?? ThirdPartyIdentityData.FromComplaint(selectedDenuncias); Busy.Update(message: "Resolviendo tercero y enlazandolo al expediente.", detail: "Paso 4 de 7"); - await ApiDenuncias.EnsureGestionaThirdAndLinkAsync(fileUrl, thirdParty); + var thirdResult = await ApiDenuncias.EnsureGestionaThirdAndLinkAsync(fileUrl, thirdParty); var nombresOriginalesSubidos = new List(); var nombresFinalesSubidos = new List(); @@ -1045,8 +1030,8 @@ else if (!string.IsNullOrWhiteSpace(report.FileName)) { - Busy.Update(message: "Preparando y subiendo el report para firma.", detail: "Paso 5 de 7"); - var reportPdfBytes = PdfHelper.MergeFilesToPdf(new[] + Busy.Update(message: "Preparando y subiendo el documento principal.", detail: "Paso 5 de 7"); + var reportPdfBytes = PdfHelper.MergeReportToPdf(new[] { (FileName: report.FileName, Content: report.Content) }); @@ -1067,7 +1052,7 @@ else { Busy.Update(message: "Uniendo adjuntos en un unico PDF y subiendolo.", detail: "Paso 6 de 7"); var pdfBytes = PdfHelper.MergeFilesToPdf(adjuntos); - var pdfName = FixFileName($"Adjuntos {selectedDenuncias.Id_Denuncia}_{ahoraUtc:yyyyMMddHHmmss}.pdf"); + var pdfName = BuildMergedAttachmentsFileName(selectedDenuncias.Id_Denuncia, ahoraUtc); var docUrl = await ApiDenuncias.UploadGestionaDocumentAsync(fileUrl, pdfBytes, pdfName); if (string.IsNullOrWhiteSpace(documentoParaTramitar)) { @@ -1127,11 +1112,12 @@ else if (!string.IsNullOrWhiteSpace(documentoParaTramitar)) { - Busy.Update(message: "Enviando el report al circuito de firma.", detail: "Paso 7 de 7"); + Busy.Update(message: "Finalizando el documento principal en Gestiona.", detail: "Paso 7 de 7"); await ApiDenuncias.TramitarGestionaDocumentAsync( documentoParaTramitar, - GetAssignedGroupLinkBySelectedGroup(), - selectedDenuncias.Id_Denuncia); + selectedGroup, + selectedDenuncias.Id_Denuncia, + isUpdate: false); } foreach (var origName in nombresOriginalesSubidos) @@ -1155,7 +1141,16 @@ else selectedDenuncias.EsActualizacion = false; selectedDenuncias.NombreDenuncia = nuevoAsunto; selectedDenuncias.FechaSubidaAGestiona = ahoraUtc; + selectedDenuncias.UltimaSubidaGestionaTipo = "Nueva denuncia"; + selectedDenuncias.UltimoGrupoAsignadoGestiona = GetGestionaGroupDisplay(selectedGroup); + await SincronizarExpedienteGestionaAsync(selectedDenuncias, fileUrl); await ActualizarDenunciaAsync(selectedDenuncias); + var historialAviso = await RegistrarHistorialGestionaAsync( + selectedDenuncias, + "Nueva denuncia", + selectedGroup, + ahoraUtc, + string.Join("; ", nombresFinalesSubidos)); var denunciaProcesadaId = selectedDenuncias.Id_Denuncia; pendientes.Remove(selectedDenuncias); @@ -1165,22 +1160,35 @@ else var avisos = new List(); if (ficherosVacios.Count > 0) { - avisos.Add($"Se omitieron ficheros vacíos: {string.Join(", ", ficherosVacios)}."); + avisos.Add($"Se omitieron ficheros vacíos: {string.Join(", ", ficherosVacios)}."); } if (ficherosNoSeleccionados.Count > 0) { - avisos.Add($"No se subieron por selección del usuario: {string.Join(", ", ficherosNoSeleccionados)}."); + avisos.Add($"No se subieron por selección del usuario: {string.Join(", ", ficherosNoSeleccionados)}."); } - if (avisos.Count > 0) + if (thirdResult.Warnings.Count > 0) { - operationNotice = $"Denuncia #{denunciaProcesadaId} enviada. {string.Join(" ", avisos)}"; + avisos.AddRange(thirdResult.Warnings); } + if (!string.IsNullOrWhiteSpace(historialAviso)) + { + avisos.Add(historialAviso); + } + var expedienteInfo = string.IsNullOrWhiteSpace(selectedDenuncias.ExpedienteGestionaMostrable) + ? string.Empty + : $" Nº expediente Gestiona: {selectedDenuncias.ExpedienteGestionaMostrable}."; + var resumen = expedienteCreadoEnGestiona + ? $"Denuncia #{denunciaProcesadaId}: se ha creado el expediente en Gestiona y se han subido los documentos.{expedienteInfo}" + : $"Denuncia #{denunciaProcesadaId}: se han subido los documentos al expediente de Gestiona.{expedienteInfo}"; + operationNotice = avisos.Count > 0 + ? $"{resumen} {string.Join(" ", avisos)}" + : resumen; StateHasChanged(); } catch (Exception ex) { - Console.Error.WriteLine($"Error al confirmar envío: {ex}"); - operationError = $"No se ha podido completar el envío de la denuncia #{selectedDenuncias?.Id_Denuncia}: {ex.Message}"; + Console.Error.WriteLine($"Error al confirmar envío: {ex}"); + operationError = $"No se ha podido completar el envío de la denuncia #{selectedDenuncias?.Id_Denuncia}: {ex.Message}"; } finally { @@ -1226,15 +1234,37 @@ else } } - private string GetAssignedGroupLinkBySelectedGroup() + private static string GetGestionaGroupDisplay(string? groupCode) { - return selectedGroup switch + return string.IsNullOrWhiteSpace(groupCode) ? string.Empty : groupCode.Trim(); + } + + private async Task RegistrarHistorialGestionaAsync( + DenunciasGestiona denuncia, + string tipoSubida, + string grupo, + DateTime uploadedAtUtc, + string documentos) + { + try { - "510" => "https://02.g3stiona.com/rest/groups/6dbfc433-1eb6-4b9a-a533-bfebc652c101", - "600" => "https://02.g3stiona.com/rest/groups/454fa4ec-8b82-4240-9419-113f45d4b004", - "700" => "https://02.g3stiona.com/rest/groups/a4ad4dfb-70dc-4219-8ee3-4dcc939f0955", - _ => throw new InvalidOperationException($"Grupo desconocido: {selectedGroup}") - }; + await ApiDenuncias.RegisterGestionaUploadHistoryAsync( + new GestionaUploadHistoryCreateRequest( + denuncia.Id_Denuncia, + denuncia.Expediente_Gestiona ?? string.Empty, + denuncia.ExpedienteGestionaMostrable, + tipoSubida, + grupo, + uploadedAtUtc, + denuncia.NombreDenuncia ?? string.Empty, + documentos)); + return null; + } + catch (Exception ex) + { + Console.Error.WriteLine($"No se ha podido registrar el historico de subida a Gestiona: {ex}"); + return "La subida se ha completado, pero no se ha podido registrar el histórico operativo en la aplicación."; + } } private async Task ConfirmarRechazo() @@ -1379,7 +1409,7 @@ else } private static string GetReadOnlyValue(string? value) => - string.IsNullOrWhiteSpace(value) ? "—" : value; + string.IsNullOrWhiteSpace(value) ? "—" : value; private static bool HasPostalAddress(DenunciasGestiona denuncia) { @@ -1438,18 +1468,7 @@ else return string.Join(" | ", parts); } - // mover a Actualizaciones - private async Task MoverAActualizaciones(DenunciasGestiona d) - { - d.EsActualizacion = true; - d.EnRechazada = false; - await ActualizarDenunciaAsync(d); - - pendientes.RemoveAll(x => x.Id_Denuncia == d.Id_Denuncia); - StateHasChanged(); - } - - // ========= LÓGICA BUSCADOR DE EXPEDIENTES POR TERCERO ========= + // ========= LÓGICA BUSCADOR DE EXPEDIENTES POR TERCERO ========= private void CloseExpedientesModal() { @@ -1468,7 +1487,7 @@ else if (string.IsNullOrWhiteSpace(nif) || nif == "00000000T") { - errorExpedientes = "NIF no válido para búsqueda (anónimo o vacío)."; + errorExpedientes = "NIF no válido para búsqueda (anónimo o vacío)."; showExpedientesModal = true; StateHasChanged(); return; @@ -1499,3 +1518,4 @@ else } } + diff --git a/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciaStore.cs b/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciaStore.cs index 3cac7c1..2258982 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciaStore.cs +++ b/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciaStore.cs @@ -34,6 +34,9 @@ public sealed class ApiDenunciaStore : IDenunciaStore public async Task> GetFicherosByDenunciaAsync(int denunciaId, CancellationToken cancellationToken = default) => (await _api.GetAsync>($"api/denuncias/{denunciaId}/ficheros", cancellationToken)) ?? []; + public async Task> GetGestionaUploadHistoryAsync(CancellationToken cancellationToken = default) + => (await _api.GetAsync>("api/denuncias/gestiona-history", cancellationToken)) ?? []; + public Task GetDenunciaByIdAsync(int denunciaId, CancellationToken cancellationToken = default) => _api.GetAsync($"api/denuncias/{denunciaId}", cancellationToken); @@ -43,6 +46,12 @@ public sealed class ApiDenunciaStore : IDenunciaStore public Task UpsertFicherosAsync(IEnumerable ficheros, CancellationToken cancellationToken = default) => _api.PostAsync("api/denuncias/ficheros", new UpsertFicherosRequest(ficheros.ToArray()), cancellationToken); + public Task AddGestionaUploadHistoryAsync( + GestionaUploadHistoryCreateRequest request, + string username, + CancellationToken cancellationToken = default) + => _api.PostAsync("api/denuncias/gestiona-history", request, cancellationToken); + public Task MarkFicherosAsUploadedAsync( int denunciaId, IEnumerable fileNames, diff --git a/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciasClient.cs b/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciasClient.cs index 222608f..429e4ac 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciasClient.cs +++ b/Antifraude.Net/GestionaDenunciasAN/Services/ApiDenunciasClient.cs @@ -99,46 +99,35 @@ public sealed class ApiDenunciasClient cancellationToken); } - public Task EnsureStorageReadyAsync(CancellationToken cancellationToken = default) - => SendAsync(HttpMethod.Post, "api/inbox/local/ensure-storage", body: null, authorize: true, cancellationToken); - - public Task ProcessLocalZipsAsync(CancellationToken cancellationToken = default) - => SendAsync(HttpMethod.Post, "api/inbox/local/process", body: null, authorize: true, cancellationToken); - - public Task> GetExistingZipNamesAsync(CancellationToken cancellationToken = default) - => SendAsync>(HttpMethod.Get, "api/inbox/local/zips", body: null, authorize: true, cancellationToken); - - public Task DeleteZipAsync(string zipName, CancellationToken cancellationToken = default) - => SendAsync( - HttpMethod.Delete, - $"api/inbox/local/zips/{Uri.EscapeDataString(zipName)}", - body: null, - authorize: true, - cancellationToken); - public Task CreateGestionaFileAsync( - Guid procedureId, string subject, string documentSeries, string siaCode, CancellationToken cancellationToken = default) => PostAsync( "api/gestiona/files", - new GestionaCreateFileRequest(procedureId, subject, documentSeries, siaCode), + new GestionaCreateFileRequest(subject, documentSeries, siaCode), cancellationToken); public Task OpenGestionaFileAsync( string fileUrl, string? fileOpenUrl, - Guid managementUnitGroupId, - Guid assignedGroupId, + string assignedGroupCode, bool confidential, string freeTitle, - string siaCode, CancellationToken cancellationToken = default) => PostAsync( "api/gestiona/files/open", - new GestionaOpenFileRequest(fileUrl, fileOpenUrl, managementUnitGroupId, assignedGroupId, confidential, freeTitle, siaCode), + new GestionaOpenFileRequest(fileUrl, fileOpenUrl, assignedGroupCode, confidential, freeTitle), + cancellationToken); + + public Task AssignGestionaFileAsync( + string fileUrl, + string assignedGroupCode, + CancellationToken cancellationToken = default) + => PostAsync( + "api/gestiona/files/assignees", + new GestionaAssignFileRequest(fileUrl, assignedGroupCode), cancellationToken); public Task GetGestionaExpedienteAsync( @@ -149,11 +138,27 @@ public sealed class ApiDenunciasClient cancellationToken, allowNull: true); - public Task EnsureGestionaThirdAndLinkAsync( + public Task GetGestionaFileLatestAuditAsync( + string fileUrl, + CancellationToken cancellationToken = default) + => GetAsync( + $"api/gestiona/files/audit/latest?fileUrl={Uri.EscapeDataString(fileUrl)}", + cancellationToken, + allowNull: true); + + public Task> GetGestionaUploadHistoryAsync(CancellationToken cancellationToken = default) + => GetAsync>("api/denuncias/gestiona-history", cancellationToken); + + public Task RegisterGestionaUploadHistoryAsync( + GestionaUploadHistoryCreateRequest request, + CancellationToken cancellationToken = default) + => PostAsync("api/denuncias/gestiona-history", request, cancellationToken); + + public Task EnsureGestionaThirdAndLinkAsync( string fileUrl, ThirdPartyIdentityData thirdParty, CancellationToken cancellationToken = default) - => PostAsync( + => PostAsync( "api/gestiona/thirds/ensure-link", new GestionaEnsureThirdRequest(fileUrl, thirdParty), cancellationToken); @@ -183,12 +188,13 @@ public sealed class ApiDenunciasClient public Task TramitarGestionaDocumentAsync( string documentUrl, - string assignedGroupHref, + string assignedGroupCode, int? complaintId, + bool isUpdate = false, CancellationToken cancellationToken = default) => PostAsync( "api/gestiona/documents/tramitar", - new GestionaTramitarDocumentoRequest(documentUrl, assignedGroupHref, complaintId), + new GestionaTramitarDocumentoRequest(documentUrl, assignedGroupCode, complaintId, isUpdate), cancellationToken); public Task> GetGestionaExpedientesPorTerceroAsync( @@ -292,13 +298,16 @@ public sealed class ApiDenunciasClient using var response = await client.SendAsync(request, cancellationToken); if (response.StatusCode == HttpStatusCode.Unauthorized) { - if (authorize) + var message = await ReadErrorMessageAsync(response, cancellationToken); + if (!string.IsNullOrWhiteSpace(message) && + !message.StartsWith("La API de denuncias ha respondido con", StringComparison.OrdinalIgnoreCase)) { - throw new UnauthorizedAccessException($"La sesion de API ha caducado al llamar a {path}. Vuelve a iniciar sesion."); + throw new UnauthorizedAccessException(message); } - var message = await ReadErrorMessageAsync(response, cancellationToken); - throw new UnauthorizedAccessException(message); + throw new UnauthorizedAccessException(authorize + ? "La sesion de la aplicacion ha caducado. Vuelve a iniciar sesion." + : "No se ha podido autorizar la peticion. Vuelve a iniciar sesion."); } if (!response.IsSuccessStatusCode) diff --git a/Antifraude.Net/GestionaDenunciasAN/Services/ApiInboxTrackingService.cs b/Antifraude.Net/GestionaDenunciasAN/Services/ApiInboxTrackingService.cs index db166ca..063dbdf 100644 --- a/Antifraude.Net/GestionaDenunciasAN/Services/ApiInboxTrackingService.cs +++ b/Antifraude.Net/GestionaDenunciasAN/Services/ApiInboxTrackingService.cs @@ -33,6 +33,16 @@ public sealed class ApiInboxTrackingService : IInboxTrackingService new MarkReportImportedRequest(username, report, complaintId), cancellationToken); + public Task MarkReportHandledInGestionaAsync( + string username, + int denunciaId, + DateTime uploadedAtUtc, + CancellationToken cancellationToken = default) + => _api.PostAsync( + "api/tracking/handled-in-gestiona", + new MarkReportHandledInGestionaRequest(username, denunciaId, uploadedAtUtc), + cancellationToken); + public Task EnsureReportCanBeImportedByUserAsync( string username, ReportDto report, diff --git a/Antifraude.Net/GestionaDenunciasAN/wwwroot/app.css b/Antifraude.Net/GestionaDenunciasAN/wwwroot/app.css index ad10286..b8f6c0c 100644 --- a/Antifraude.Net/GestionaDenunciasAN/wwwroot/app.css +++ b/Antifraude.Net/GestionaDenunciasAN/wwwroot/app.css @@ -141,6 +141,13 @@ pre { gap: 0.85rem; } +.app-status-pills { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + gap: 0.65rem; +} + .app-session-pill { display: inline-flex; align-items: center; @@ -160,6 +167,24 @@ pre { box-shadow: 0 0 0 0.2rem rgba(31, 122, 85, 0.12); } +.app-key-pill { + background: rgba(42, 82, 152, 0.1); + color: var(--app-accent-strong); +} + +.app-key-pill .app-session-pill__dot { + box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.12); +} + +.app-key-pill--warning { + background: rgba(184, 117, 18, 0.14); + color: #8a5a12; +} + +.app-key-pill--warning .app-session-pill__dot { + box-shadow: 0 0 0 0.2rem rgba(184, 117, 18, 0.14); +} + .app-user-chip { display: inline-flex; align-items: center; @@ -548,6 +573,14 @@ h1:focus { align-items: stretch; } + .app-status-pills { + justify-content: stretch; + } + + .app-status-pills .app-session-pill { + flex: 1 1 14rem; + } + .app-user-chip, .app-session-pill { justify-content: center;