master^2
Varun 6 months ago
parent d12e14e8be
commit 348204eb6c

@ -6231,6 +6231,7 @@ async function processIotData(hw_Id, data) {
if (inputConnection.motor_stop_status === "2" && status === 1) {
const motorData = await MotorData.findOne({ customerId:motorTank.customerId, motor_id: hw_Id, start_instance_id: inputConnection.start_instance_id });
const startinstance = inputConnection.start_instance_id;
const currentTime = moment().tz('Asia/Kolkata').format('DD-MMM-YYYY - HH:mm');
inputConnection.motor_stop_status = "1";
inputConnection.motor_on_type = "manual";
@ -6265,7 +6266,7 @@ async function processIotData(hw_Id, data) {
);
await MotorData.updateOne(
{ customerId:motorTank.customerId, motor_id: motorId, start_instance_id: start_instance_id },
{ customerId:motorTank.customerId, motor_id: motorId, start_instance_id: startinstance },
{
$set: {
stopTime: currentTime,

Loading…
Cancel
Save