Merge branch 'ksh'
This commit is contained in:
@@ -468,8 +468,17 @@ export function RepeatScreenModalComponent({
|
||||
// 조인 조건 생성
|
||||
const filters: Record<string, any> = {};
|
||||
for (const condition of dataSourceConfig.joinConditions) {
|
||||
const refValue = representativeData[condition.referenceKey];
|
||||
let refValue = representativeData[condition.referenceKey];
|
||||
if (refValue !== undefined && refValue !== null) {
|
||||
// 숫자형 ID인 경우 숫자로 변환 (문자열 '189' → 숫자 189)
|
||||
// 백엔드에서 entity 타입 컬럼 검색 시 문자열이면 ILIKE 검색을 수행하므로
|
||||
// 정확한 ID 매칭을 위해 숫자로 변환해야 함
|
||||
if (condition.sourceKey.endsWith('_id') || condition.sourceKey === 'id') {
|
||||
const numValue = Number(refValue);
|
||||
if (!isNaN(numValue)) {
|
||||
refValue = numValue;
|
||||
}
|
||||
}
|
||||
filters[condition.sourceKey] = refValue;
|
||||
}
|
||||
}
|
||||
@@ -479,6 +488,14 @@ export function RepeatScreenModalComponent({
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(`[RepeatScreenModal] 외부 테이블 API 호출:`, {
|
||||
sourceTable: dataSourceConfig.sourceTable,
|
||||
filters,
|
||||
joinConditions: dataSourceConfig.joinConditions,
|
||||
representativeDataId: representativeData.id,
|
||||
representativeDataIdType: typeof representativeData.id,
|
||||
});
|
||||
|
||||
// API 호출 - 메인 테이블 데이터
|
||||
const response = await apiClient.post(
|
||||
`/table-management/tables/${dataSourceConfig.sourceTable}/data`,
|
||||
|
||||
Reference in New Issue
Block a user