diff --git a/src/controllers/installationController.js b/src/controllers/installationController.js index 02b3477e..32e36ec9 100644 --- a/src/controllers/installationController.js +++ b/src/controllers/installationController.js @@ -2662,6 +2662,7 @@ exports.getDisconnectedIssuesBySupportId = async (req, reply) => { const hardwareIds = [...hardwareSet]; const sensors = await Insensors.find({ hardwareId: { $in: hardwareIds } }).lean(); + console.log("sensors",sensors) // Map sensors by hardwareId const sensorMap = {}; for (const sensor of sensors) { @@ -2675,7 +2676,7 @@ exports.getDisconnectedIssuesBySupportId = async (req, reply) => { if (sensor.type === "master") { masterMap[sensor.hardwareId] = { hardwareId: sensor.hardwareId, - masterName: sensor.masterName || sensor.tankName || "", + masterName: sensor.masterName , location: sensor.location || "", type: "master", connected_status: sensor.connected_status, @@ -2758,7 +2759,7 @@ exports.getDisconnectedCustomerDetails = async (req, reply) => { // 3. Find disconnected Insensors const disconnectedSensors = await Insensors.find({ $or: [ - { hardwareId: { $in: hardwareIds } }, + // { hardwareId: { $in: hardwareIds } }, { connected_to: { $in: hardwareIds } } ], connected_status: "disconnected"