|
|
|
@ -2992,7 +2992,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
receiverfinalwaterlevel: receiverFinalWaterLevel.toString(),
|
|
|
|
receiverfinalwaterlevel: receiverFinalWaterLevel.toString(),
|
|
|
|
quantity_delivered: quantityDelivered.toString(),
|
|
|
|
quantity_delivered: quantityDelivered.toString(),
|
|
|
|
runtime: runtime.toString(),
|
|
|
|
runtime: runtime.toString(),
|
|
|
|
stopped_by:loggedInUser
|
|
|
|
stopped_by:loggedInUser.name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -3127,6 +3127,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
let dynamicInstanceId = null;
|
|
|
|
let dynamicInstanceId = null;
|
|
|
|
let user_name = loggedInUser.name
|
|
|
|
let user_name = loggedInUser.name
|
|
|
|
|
|
|
|
console.log(user_name,"user_name in stop1")
|
|
|
|
if (tankWithMotor) {
|
|
|
|
if (tankWithMotor) {
|
|
|
|
const connection = tankWithMotor.connections.inputConnections.find(conn => conn.motor_id === motorId);
|
|
|
|
const connection = tankWithMotor.connections.inputConnections.find(conn => conn.motor_id === motorId);
|
|
|
|
if (connection && connection.start_instance_id) {
|
|
|
|
if (connection && connection.start_instance_id) {
|
|
|
|
@ -3172,6 +3173,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function stopMotor(motorId, customerId, start_instance_id,user_name) {
|
|
|
|
async function stopMotor(motorId, customerId, start_instance_id,user_name) {
|
|
|
|
|
|
|
|
console.log(user_name,"user_name in stop2")
|
|
|
|
const currentTime = moment().tz('Asia/Kolkata').format('DD-MMM-YYYY - HH:mm');
|
|
|
|
const currentTime = moment().tz('Asia/Kolkata').format('DD-MMM-YYYY - HH:mm');
|
|
|
|
await Tank.updateOne(
|
|
|
|
await Tank.updateOne(
|
|
|
|
{ customerId, "connections.inputConnections.motor_id": motorId },
|
|
|
|
{ customerId, "connections.inputConnections.motor_id": motorId },
|
|
|
|
|