배치 시 company_code도 저장되도록

This commit is contained in:
dohyeons 2025-11-27 11:55:31 +09:00
parent 25c2ab3413
commit a7135b4c3c
1 changed files with 12 additions and 0 deletions

View File

@ -306,6 +306,18 @@ export class BatchSchedulerService {
mappedRow[mapping.to_column_name] = value;
}
}
// 멀티테넌시: TO가 DB일 때 company_code 자동 주입
// - 배치 설정에 company_code가 있고
// - 매핑에서 company_code를 명시적으로 다루지 않은 경우만
if (
firstMapping.to_connection_type !== "restapi" &&
config.company_code &&
mappedRow.company_code === undefined
) {
mappedRow.company_code = config.company_code;
}
return mappedRow;
});