fix: F12 P2 follow-up — batch imports set departmentId, optimize getDescendantIds, enforce campus root invariant

This commit is contained in:
2026-07-06 01:06:11 +08:00
parent 6b0a21d266
commit 3bcb7d41c0
7 changed files with 36 additions and 11 deletions

View File

@@ -246,6 +246,7 @@ export class RoomsService {
rentalCategory?: string;
monthlyRate?: number;
}[],
departmentId?: number,
) {
let imported = 0;
let skipped = 0;
@@ -270,6 +271,7 @@ export class RoomsService {
roomType: row.roomType || parsed.roomType || undefined,
rentalCategory: row.rentalCategory || undefined,
monthlyRate: row.monthlyRate ?? undefined,
departmentId: departmentId ?? undefined,
}),
);
imported++;