forked from wangziqi/gongxue-base
feat: refine deposit room type workflows
This commit is contained in:
@@ -88,7 +88,7 @@ export class AttendanceService {
|
||||
const devicesBySn = new Map<string, AttendanceDevice>();
|
||||
if (sns.length > 0) {
|
||||
const devices = await this.attendanceDeviceRepo.find({
|
||||
where: { deviceSn: In(sns), status: 'active' },
|
||||
where: { deviceSn: In(sns) },
|
||||
relations: ['classroom'],
|
||||
});
|
||||
for (const device of devices) devicesBySn.set(device.deviceSn, device);
|
||||
@@ -907,7 +907,7 @@ export class AttendanceService {
|
||||
qb.skip((page - 1) * pageSize).take(pageSize);
|
||||
|
||||
const [list, total] = await qb.getManyAndCount();
|
||||
return { list, total, page, pageSize };
|
||||
return { list: await this.attachAttendanceDeviceMappings(list), total, page, pageSize };
|
||||
}
|
||||
|
||||
// ── Get distinct classes with attendance records ──
|
||||
@@ -1053,7 +1053,8 @@ export class AttendanceService {
|
||||
|
||||
qb.orderBy('ar.attendanceDate', 'DESC').addOrderBy('ar.createdAt', 'DESC');
|
||||
|
||||
return qb.getMany();
|
||||
const records = await qb.getMany();
|
||||
return this.attachAttendanceDeviceMappings(records);
|
||||
}
|
||||
|
||||
async findAttendanceRecord(id: number) {
|
||||
|
||||
Reference in New Issue
Block a user