|
|
|
@ -2871,18 +2871,7 @@ exports.motorAction = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
const startTime = moment().tz('Asia/Kolkata').format('DD-MMM-YYYY - HH:mm');
|
|
|
|
|
|
|
|
|
|
const newMotorData = new MotorData({
|
|
|
|
|
customerId,
|
|
|
|
|
motor_id: motorId,
|
|
|
|
|
start_instance_id,
|
|
|
|
|
supplierTank: req.body.from,
|
|
|
|
|
receiverTank: req.body.to,
|
|
|
|
|
supplier_type: req.body.from_type,
|
|
|
|
|
receiver_type: req.body.to_type,
|
|
|
|
|
startTime,
|
|
|
|
|
receiverInitialwaterlevel: parseInt(receiverTank.waterlevel.replace(/,/g, ''), 10)
|
|
|
|
|
});
|
|
|
|
|
await newMotorData.save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await Tank.updateOne(
|
|
|
|
|
{ customerId, "connections.inputConnections.motor_id": motorId },
|
|
|
|
|