diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index ff66269c..ce387ba3 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -363,7 +363,7 @@ exports.motorAction = async (req, reply) => { if(supplier_tank_type==="bore" && receiver_type === "sump"){ const receiver_capacity = parseInt(receiver_tank_info.capacity.replace(/,/g, ''), 10) - console.log(receiver_capacity,"0") + console.log(receiver_capacity,"0",receiver_tank_info.tankName) await Tank.findOneAndUpdate({customerId, tankName: receiver_tank,tankLocation:receiver_type}, { $set: { motor_status: "1" } }); let receiver_waterlevel = parseInt(receiver_tank_info.waterlevel.replace(/,/g, ''), 10) @@ -373,7 +373,7 @@ exports.motorAction = async (req, reply) => { const rcvr_info = await Tank.findOne({ customerId ,tankName:receiver_tank,tankLocation:receiver_type}); console.log(rcvr_info.motor_status) const newWaterLevel = receiver_waterlevel+450; - console.log(newWaterLevel,"2") + console.log(newWaterLevel,"2",receiver_tank_info.tankName) // Check if updating should stop if ((newWaterLevel/receiver_capacity)*100 >= 97 || (newWaterLevel/receiver_capacity)*100 >= desired_water_percentage || rcvr_info.motor_status === "0" ) { @@ -385,7 +385,7 @@ exports.motorAction = async (req, reply) => { receiver_waterlevel = newWaterLevel; - console.log((newWaterLevel/receiver_capacity)*100,"4") + console.log((newWaterLevel/receiver_capacity)*100,"4",receiver_tank_info.tankName) await Promise.all([ Tank.findOneAndUpdate({customerId, tankName: receiver_tank,tankLocation:receiver_type}, { $set: { waterlevel: newWaterLevel } }), ]);