feat: se actualizan las mediciones una vez se envian y ahora se consideran solo als mediciones que hayan sido creadas durante 7 dias

This commit is contained in:
Leonel Toro 2025-07-03 13:06:58 -04:00
parent bd44537c93
commit fee40a25a4
4 changed files with 32 additions and 7 deletions

View file

@ -18,5 +18,19 @@ namespace DAL
return result.ToList();
}
public static async Task<bool> ActualizarMedicionesAsync(string medicionesJson)
{
try
{
await using var connection = new SqlConnection(BdConexion.StringConnection);
await connection.ExecuteAsync("SP_ACTUALIZAR_MEDICION_SMARTSCADA_OPERACION", new { JsonMediciones = medicionesJson }, commandType: CommandType.StoredProcedure);
return true;
}
catch (Exception ex)
{
throw new Exception($"Error: {ex.Message}");
}
}
}
}