diff --git a/lib/performance-survey-report-sync.ts b/lib/performance-survey-report-sync.ts index 4f9aea41..e56e1c5a 100644 --- a/lib/performance-survey-report-sync.ts +++ b/lib/performance-survey-report-sync.ts @@ -1,5 +1,6 @@ import { randomUUID } from 'crypto' import { prisma } from '@/lib/prisma' +import mssql from 'mssql' type ReportEmployeeRow = { dingtalkUserId?: string | null @@ -556,8 +557,7 @@ function shouldRefreshProfile(profile: { syncedAt?: Date | null; departmentName? } async function getReportPool() { - const imported = await import('mssql') - const sql = (imported.default || imported) as typeof import('mssql') + const sql = mssql as typeof import('mssql') return { sql, pool: await sql.connect(getReportDbConfig() as any),