|
|
@ -34,6 +34,14 @@ async function overspeedGet (ctx) { |
|
|
|
if (numberOfAxles) { |
|
|
|
findOption.where.numberOfAxles = numberOfAxles |
|
|
|
} |
|
|
|
|
|
|
|
if (overrunRateUpper && overrunRateFloor) { |
|
|
|
findOption.where['$and'] = [] |
|
|
|
findOption.where['$and'].push |
|
|
|
({ overrunRate: { $lte: overrunRateUpper } }) |
|
|
|
findOption.where['$and'].push |
|
|
|
({ overrunRate: { $gte: overrunRateFloor } }) |
|
|
|
} else { |
|
|
|
if (overrunRateUpper) { |
|
|
|
findOption.where.overrunRate = { |
|
|
|
$lte: overrunRateUpper |
|
|
@ -44,6 +52,9 @@ async function overspeedGet (ctx) { |
|
|
|
$gte: overrunRateFloor |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (testTime) { |
|
|
|
findOption.where.testTime = { |
|
|
|
$between: [moment(testTime).startOf('day').format(), moment(testTime).endOf('day').format()] |
|
|
|