|
|
@ -1192,9 +1192,12 @@ exports.getIotDataByCustomer = async (req, reply) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
hardwareId,
|
|
|
|
hardwareId,
|
|
|
|
message,
|
|
|
|
message,
|
|
|
|
gsmDate: latestRecord?.date,
|
|
|
|
// gsmDate: latestRecord?.date,
|
|
|
|
|
|
|
|
masterName: relatedSensors[0]?.masterName ?? null,
|
|
|
|
|
|
|
|
location: relatedSensors[0]?.location ?? null,
|
|
|
|
tanks: tanksStatus
|
|
|
|
tanks: tanksStatus
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const iotDataGrouped = await Promise.all(latestDataPromises);
|
|
|
|
const iotDataGrouped = await Promise.all(latestDataPromises);
|
|
|
|