ashok 1 year ago
commit 7fbf3c2438

@ -1981,6 +1981,8 @@ else if (currentWaterLevel >= highWaterThreshold) {
const stopTime = req.body.stopTime || new Date().toISOString(); const stopTime = req.body.stopTime || new Date().toISOString();
const motorOnType = req.body.motor_on_type || "manual"; const motorOnType = req.body.motor_on_type || "manual";
if (action === "start") { if (action === "start") {
motorStopStatus = "2";
const startTime = req.body.startTime; const startTime = req.body.startTime;
const stopCriteria = const stopCriteria =
motorOnType === "time" motorOnType === "time"
@ -2109,6 +2111,7 @@ else if (currentWaterLevel >= highWaterThreshold) {
{ {
$set: { $set: {
[`connections.inputConnections.${index}.manual_threshold_time`]: req.body.manual_threshold_time, [`connections.inputConnections.${index}.manual_threshold_time`]: req.body.manual_threshold_time,
[`connections.inputConnections.${index}.threshold_type`]: "time",
[`connections.inputConnections.${index}.startTime`]: req.body.startTime, [`connections.inputConnections.${index}.startTime`]: req.body.startTime,
[`connections.inputConnections.${index}.start_instance_id`]: start_instance_id [`connections.inputConnections.${index}.start_instance_id`]: start_instance_id
} }

Loading…
Cancel
Save