diff --git a/BLL/Integracion_DGA/BusinessLogic.cs b/BLL/Integracion_DGA/BusinessLogic.cs index caecaa2..3f97a85 100644 --- a/BLL/Integracion_DGA/BusinessLogic.cs +++ b/BLL/Integracion_DGA/BusinessLogic.cs @@ -40,11 +40,11 @@ namespace BLL.Integracion_DGA { string apiUrlBase = NexusApiUrl.ApiUrl; Dictionary headers = new Dictionary - { - { "nexustoken", NexusApiUrl.ApiKey }, - { "nexusapiversion", NexusApiUrl.Version }, - { "accept", "application/json" } - }; + { + { "nexustoken", NexusApiUrl.ApiKey }, + { "nexusapiversion", NexusApiUrl.Version }, + { "accept", "application/json" } + }; WriteLineAndLog($"Obteniendo Documentos"); string apiUrlDocuments = apiUrlBase + "/api/Documents"; diff --git a/DAL/LogMedicionScadaRepository.cs b/DAL/LogMedicionScadaRepository.cs index e7a67a0..548f83a 100644 --- a/DAL/LogMedicionScadaRepository.cs +++ b/DAL/LogMedicionScadaRepository.cs @@ -13,10 +13,7 @@ namespace DAL { using (var connection = new SqlConnection(BdConexion.StringConnection)) { - await connection.OpenAsync(); - - // Truncar la tabla antes de insertar - await connection.ExecuteAsync("TRUNCATE TABLE DGA_LOGS_OPERACION"); + await connection.OpenAsync(); // Insertar todos los datos de la lista usando Dapper var sql = @"INSERT INTO dbo.DGA_LOGS_OPERACION (estado_envio, json_enviado, json_recibido, comprobante, fecha_envio, id_medicion_smartscada_operacion) diff --git a/DAS/RegistrarMedicion.cs b/DAS/RegistrarMedicion.cs index 531c5fc..168998a 100644 --- a/DAS/RegistrarMedicion.cs +++ b/DAS/RegistrarMedicion.cs @@ -27,7 +27,7 @@ namespace DAS content.Headers.Add("codigoObra", codigoObra); content.Headers.Add("timeStampOrigen", timeStamp); - /*var response = await _httpClient.PostAsync($"{SubterraneaApiUrl.BaseUrl}{SubterraneaApiUrl.EndPoint}", content); + var response = await _httpClient.PostAsync($"{SubterraneaApiUrl.BaseUrl}{SubterraneaApiUrl.EndPoint}SSSSSSSSSSSSSSSSS", content); string jsonRecibido = await response.Content.ReadAsStringAsync(); string estado = response.IsSuccessStatusCode ? "OK" : "ERROR"; string comprobante = string.Empty; @@ -57,8 +57,8 @@ namespace DAS FechaEnvio = DateTime.UtcNow, IdMedicionSmartscadaOperacion = idMedicion }; - */ - //await _logMedicionScadaRepository.InsertarLogMedicionScadaAsync(logMedicionScada); + + await _logMedicionScadaRepository.InsertarLogMedicionScadaAsync(logMedicionScada); return true; } diff --git a/Integracion_DGA/Program.cs b/Integracion_DGA/Program.cs index 328d5ac..2117aa9 100644 --- a/Integracion_DGA/Program.cs +++ b/Integracion_DGA/Program.cs @@ -47,6 +47,7 @@ namespace Integracion_DGA services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); }) .Build(); diff --git a/Recuperacion_DGA/Program.cs b/Recuperacion_DGA/Program.cs index d8342f2..580a484 100644 --- a/Recuperacion_DGA/Program.cs +++ b/Recuperacion_DGA/Program.cs @@ -42,7 +42,6 @@ namespace Recuperacion_DGA services.AddScoped(); services.AddScoped(); services.AddHttpClient(); - services.AddScoped(); }) .Build(); diff --git a/SHARED/DTO/Envios_DGA/MedicionScada.cs b/SHARED/DTO/Envios_DGA/MedicionScada.cs index b26301a..4127a3f 100644 --- a/SHARED/DTO/Envios_DGA/MedicionScada.cs +++ b/SHARED/DTO/Envios_DGA/MedicionScada.cs @@ -22,5 +22,6 @@ public decimal? Nivel { get; set; } public string? tipo_empresa { get; set; } + public string? nivelFreaticoDelPozo { get; set; } } }