diff --git a/api/app/lib/controllers/equipment/index.js b/api/app/lib/controllers/equipment/index.js index 310b722..7ec5058 100644 --- a/api/app/lib/controllers/equipment/index.js +++ b/api/app/lib/controllers/equipment/index.js @@ -23,10 +23,11 @@ async function getEquipment(ctx) { where: whereOption }], where: { - $and: [ - sequelize.where(sequelize.fn('date', sequelize.col('report_time')), '>=', moment(startTime).format('YYYY-MM-DD HH:mm:ss')), - sequelize.where(sequelize.fn('date', sequelize.col('report_time')), '<=', moment(endTime).format('YYYY-MM-DD HH:mm:ss')), - ], + reportTime: { $between: [moment(startTime).format('YYYY-MM-DD HH:mm:ss'), moment(endTime).format('YYYY-MM-DD HH:mm:ss')] } + // $and: [ + // sequelize.where(sequelize.fn('date', sequelize.col('report_time')), '>=', moment(startTime).format('YYYY-MM-DD HH:mm:ss')), + // sequelize.where(sequelize.fn('date', sequelize.col('report_time')), '<=', moment(endTime).format('YYYY-MM-DD HH:mm:ss')), + // ], }