feat: se agregan sp insertando datos de medicion nivel y caudal
This commit is contained in:
parent
4b5b3ae3d9
commit
6edec57054
2 changed files with 43 additions and 0 deletions
|
@ -92,6 +92,7 @@ namespace BLL.Integracion_DGA
|
|||
).ToList();
|
||||
|
||||
await _jobs.InsertarDgaCaudal(caudalData);
|
||||
await _jobs.InsertarMedicionOperacionCaudal();
|
||||
}
|
||||
else if (item.name == "API - DGA - NIVELES")
|
||||
{
|
||||
|
@ -109,6 +110,7 @@ namespace BLL.Integracion_DGA
|
|||
).ToList();
|
||||
|
||||
await _jobs.InsertarDgaNivel(nivelData);
|
||||
await _jobs.InsertarMedicionOperacionNivel();
|
||||
}
|
||||
else if (item.name == "API - DGA")
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System.Data;
|
||||
using Dapper;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.Identity.Client;
|
||||
using Shared.DTO.Integracion_DGA;
|
||||
using Shared.DTO.VariablesEntorno;
|
||||
|
||||
|
@ -185,5 +186,45 @@ namespace DAL
|
|||
throw new Exception($"Error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> InsertarMedicionOperacionNivel()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection(BdConexion.StringConnection))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
await connection.ExecuteAsync(
|
||||
"SP_CALCULO_NIVEL_MEDICION_SMARTSCADA_OPERACION",
|
||||
commandType: CommandType.StoredProcedure
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception($"Error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> InsertarMedicionOperacionCaudal()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection(BdConexion.StringConnection))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
await connection.ExecuteAsync(
|
||||
"SP_CALCULO_CAUDAL_MEDICION_SMARTSCADA_OPERACION",
|
||||
commandType: CommandType.StoredProcedure
|
||||
);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception($"Error: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue