|
|
@ -416,18 +416,7 @@ exports.getTankmotordata = async (req, reply) => {
|
|
|
|
const recordTime = moment(record.startTime, "DD-MMM-YYYY - HH:mm").toDate();
|
|
|
|
const recordTime = moment(record.startTime, "DD-MMM-YYYY - HH:mm").toDate();
|
|
|
|
return recordTime >= start && recordTime <= end;
|
|
|
|
return recordTime >= start && recordTime <= end;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
// Query the MotorData collection
|
|
|
|
|
|
|
|
// const motorDataDocs = await MotorData.find({
|
|
|
|
|
|
|
|
// customerId,
|
|
|
|
|
|
|
|
// $or: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// startTime: { $gte: startISODate, $lte: stopISODate }, // Date-based comparison
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// startTime: { $gte: startStringDate, $lte: stopStringDate }, // String-based comparison
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// }).exec();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reply.send({
|
|
|
|
reply.send({
|
|
|
|
status_code: 200,
|
|
|
|
status_code: 200,
|
|
|
|