cambios variables de ambiente
This commit is contained in:
parent
222d5fdc08
commit
0d67a44d36
20 changed files with 261 additions and 297 deletions
|
@ -17,39 +17,48 @@ namespace BLL.Recuperacion_DGA
|
|||
_registrarMedicion = registrarMedicion;
|
||||
}
|
||||
|
||||
public async Task<List<MedicionScada>> ObtenerMedicionesAsync()
|
||||
public async Task<bool>RegistrarMedicionesAsync()
|
||||
{
|
||||
var mediciones = await _dGAMedicionScadaRepository.ObtenerMedicionesAsync();
|
||||
|
||||
foreach (var medicion in mediciones)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(medicion.Code))
|
||||
try
|
||||
{
|
||||
var body = new MedicionSubterraneaRequest
|
||||
if (!string.IsNullOrEmpty(medicion.Code))
|
||||
{
|
||||
Autenticacion = new Autenticacion
|
||||
var body = new MedicionSubterraneaRequest
|
||||
{
|
||||
Password = string.Empty,
|
||||
RutEmpresa = string.Empty,
|
||||
RutUsuario = string.Empty
|
||||
},
|
||||
MedicionSubterranea = new Medicion
|
||||
{
|
||||
Caudal = medicion.Caudal.ToString() ?? "",
|
||||
FechaMedicion = medicion.DateOrigen?.ToString("yyyy-MM-dd") ?? "",
|
||||
HoraMedicion = medicion.DateOrigen?.ToString("HH:mm:ss") ?? "",
|
||||
NivelFreaticoDelPozo = "",
|
||||
Totalizador = medicion.Totalizador.ToString() ?? "",
|
||||
}
|
||||
};
|
||||
Autenticacion = new Autenticacion
|
||||
{
|
||||
Password = string.Empty,
|
||||
RutEmpresa = string.Empty,
|
||||
RutUsuario = string.Empty
|
||||
},
|
||||
MedicionSubterranea = new Medicion
|
||||
{
|
||||
Caudal = medicion.Caudal.ToString() ?? "",
|
||||
FechaMedicion = medicion.DateOrigen?.ToString("yyyy-MM-dd") ?? "",
|
||||
HoraMedicion = medicion.DateOrigen?.ToString("HH:mm:ss") ?? "",
|
||||
NivelFreaticoDelPozo = "",
|
||||
Totalizador = medicion.Totalizador.ToString() ?? "",
|
||||
}
|
||||
};
|
||||
|
||||
await _registrarMedicion.EnviarMedicionAsync(medicion.Code, body,medicion.Id);
|
||||
//TODO: Agregar log texto
|
||||
|
||||
await _registrarMedicion.EnviarMedicionAsync(medicion.Code, body,medicion.Id);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//TODO: Agregar log texto
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return mediciones;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue