Modificación modulo lecturas de bomba
This commit is contained in:
@ -151,7 +151,7 @@ export class PumpReadingService{
|
||||
|
||||
//Actualizar estado
|
||||
|
||||
async updateSatatus(
|
||||
async updateStatus(
|
||||
id:string
|
||||
){
|
||||
const reading = await pumpReadingModel.findById(id);
|
||||
@ -211,7 +211,7 @@ export class PumpReadingService{
|
||||
|
||||
//Crear anomalía por diferencencia
|
||||
|
||||
async creataDifferenfeAnomaly(
|
||||
async creataDifferenceAnomaly(
|
||||
id:string
|
||||
){
|
||||
const reading = await pumpReadingModel.findById(id);
|
||||
@ -263,14 +263,14 @@ export class PumpReadingService{
|
||||
|
||||
const difference = await this.calculateDifference(id);
|
||||
|
||||
await this.updateSatatus(id);
|
||||
await this.updateStatus(id);
|
||||
|
||||
await this.updateFuelRequests(id);
|
||||
|
||||
//Crear anomalía
|
||||
|
||||
if(difference !== 0){
|
||||
await this.creataDifferenfeAnomaly(id);
|
||||
await this.creataDifferenceAnomaly(id);
|
||||
}
|
||||
|
||||
return await pumpReadingModel
|
||||
|
||||
Reference in New Issue
Block a user