Merge branch 'Desarrollo' into DEV-LT
This commit is contained in:
commit
e916948c4c
6 changed files with 11 additions and 13 deletions
|
@ -40,11 +40,11 @@ namespace BLL.Integracion_DGA
|
|||
{
|
||||
string apiUrlBase = NexusApiUrl.ApiUrl;
|
||||
Dictionary<string, string> headers = new Dictionary<string, string>
|
||||
{
|
||||
{ "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";
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ namespace Integracion_DGA
|
|||
services.AddScoped<LogMedicionScadaRepository>();
|
||||
services.AddScoped<ApiService>();
|
||||
services.AddScoped<BusinessLogic>();
|
||||
services.AddScoped<MedicionScadaVilosRepository>();
|
||||
})
|
||||
.Build();
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ namespace Recuperacion_DGA
|
|||
services.AddScoped<MedicionScadaVilosRepository>();
|
||||
services.AddScoped<EnvioDGA>();
|
||||
services.AddHttpClient<RegistrarMedicion>();
|
||||
|
||||
services.AddScoped<LogMedicionScadaRepository>();
|
||||
})
|
||||
.Build();
|
||||
|
|
|
@ -22,5 +22,6 @@
|
|||
public decimal? Nivel { get; set; }
|
||||
|
||||
public string? tipo_empresa { get; set; }
|
||||
public string? nivelFreaticoDelPozo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue