This commit is contained in:
@@ -3,6 +3,7 @@ import { Cron } from '@nestjs/schedule';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { In, LessThan, LessThanOrEqual, MoreThanOrEqual, Repository } from 'typeorm';
|
||||
import { AttendanceSession, ClassSchedule, ScheduleType } from '../entities';
|
||||
import { AttendanceLeaveSyncService } from './attendance-leave-sync.service';
|
||||
import { AttendanceImportService } from './attendance-import.service';
|
||||
import { AttendanceService } from './attendance.service';
|
||||
|
||||
@@ -19,6 +20,7 @@ export class AttendanceSettlementService {
|
||||
private readonly sessionRepo: Repository<AttendanceSession>,
|
||||
private readonly attendanceService: AttendanceService,
|
||||
private readonly importService: AttendanceImportService,
|
||||
private readonly leaveSyncService: AttendanceLeaveSyncService,
|
||||
) {}
|
||||
|
||||
@Cron('* * * * *')
|
||||
@@ -130,7 +132,7 @@ export class AttendanceSettlementService {
|
||||
throw new Error(imported.errors.join('; ') || '钉钉考勤拉取失败');
|
||||
}
|
||||
try {
|
||||
await this.importService.syncLeaveStatusForLesson({
|
||||
await this.leaveSyncService.syncLeaveStatusForLesson({
|
||||
...importRange,
|
||||
userIds,
|
||||
autoMatch: true,
|
||||
|
||||
Reference in New Issue
Block a user