fix: admin queue time
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

pull/115/head 1.2.7-alpha.5
shancheas 2024-11-20 17:51:47 +07:00
parent 5988a592ac
commit c05af5c16b
1 changed files with 18 additions and 0 deletions

View File

@ -35,6 +35,24 @@ export class QueueDataService extends BaseReadService<QueueModel> {
item_queue_id,
status: 'waiting',
},
order: {
time: 'ASC',
},
});
}
async doneQueue(item_queue_id: string) {
const start = moment().startOf('day').valueOf();
const end = moment().endOf('day').valueOf();
return this.repo.find({
where: {
time: Between(start, end),
item_queue_id,
status: In(['done', 'called']),
},
order: {
time: 'ASC',
},
});
}