refactor: 拆分考勤服务文件并通过 aislop 全项目扫描
Some checks failed
CI / check (pull_request) Failing after 5m24s

This commit is contained in:
2026-08-05 18:55:36 +08:00
parent 6ba7f4e3d0
commit b882411f42
10 changed files with 424 additions and 331 deletions

View File

@@ -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,