제어관리 데이터 저장기능
This commit is contained in:
@@ -617,18 +617,56 @@ export class MultiConnectionQueryService {
|
||||
`✅ 메인 DB 컬럼 조회 성공: ${columnsResult.columns.length}개`
|
||||
);
|
||||
|
||||
return columnsResult.columns.map((column) => ({
|
||||
// 디버깅: inputType이 'code'인 컬럼들 확인
|
||||
const codeColumns = columnsResult.columns.filter(
|
||||
(col) => col.inputType === "code"
|
||||
);
|
||||
console.log(
|
||||
"🔍 메인 DB 코드 타입 컬럼들:",
|
||||
codeColumns.map((col) => ({
|
||||
columnName: col.columnName,
|
||||
inputType: col.inputType,
|
||||
webType: col.webType,
|
||||
codeCategory: col.codeCategory,
|
||||
}))
|
||||
);
|
||||
|
||||
const mappedColumns = columnsResult.columns.map((column) => ({
|
||||
columnName: column.columnName,
|
||||
displayName: column.displayName || column.columnName, // 라벨이 있으면 라벨 사용, 없으면 컬럼명
|
||||
dataType: column.dataType,
|
||||
dbType: column.dataType, // dataType을 dbType으로 사용
|
||||
webType: column.webType || "text", // webType 사용, 기본값 text
|
||||
inputType: column.inputType || "direct", // column_labels의 input_type 추가
|
||||
codeCategory: column.codeCategory, // 코드 카테고리 정보 추가
|
||||
isNullable: column.isNullable === "Y",
|
||||
isPrimaryKey: column.isPrimaryKey || false,
|
||||
defaultValue: column.defaultValue,
|
||||
maxLength: column.maxLength,
|
||||
description: column.description,
|
||||
connectionId: 0, // 메인 DB 구분용
|
||||
}));
|
||||
|
||||
// 디버깅: 매핑된 컬럼 정보 확인
|
||||
console.log(
|
||||
"🔍 매핑된 컬럼 정보 샘플:",
|
||||
mappedColumns.slice(0, 3).map((col) => ({
|
||||
columnName: col.columnName,
|
||||
inputType: col.inputType,
|
||||
webType: col.webType,
|
||||
connectionId: col.connectionId,
|
||||
}))
|
||||
);
|
||||
|
||||
// status 컬럼 특별 확인
|
||||
const statusColumn = mappedColumns.find(
|
||||
(col) => col.columnName === "status"
|
||||
);
|
||||
if (statusColumn) {
|
||||
console.log("🔍 status 컬럼 상세 정보:", statusColumn);
|
||||
}
|
||||
|
||||
return mappedColumns;
|
||||
}
|
||||
|
||||
// 외부 DB 연결 정보 가져오기
|
||||
@@ -701,6 +739,7 @@ export class MultiConnectionQueryService {
|
||||
dataType: dataType,
|
||||
dbType: dataType,
|
||||
webType: this.mapDataTypeToWebType(dataType),
|
||||
inputType: "direct", // 외부 DB는 항상 direct (코드 타입 없음)
|
||||
isNullable:
|
||||
column.nullable === "YES" || // MSSQL (MSSQLConnector alias)
|
||||
column.is_nullable === "YES" || // PostgreSQL
|
||||
@@ -715,6 +754,7 @@ export class MultiConnectionQueryService {
|
||||
column.max_length || // MSSQL (MSSQLConnector alias)
|
||||
column.character_maximum_length || // PostgreSQL
|
||||
column.CHARACTER_MAXIMUM_LENGTH,
|
||||
connectionId: connectionId, // 외부 DB 구분용
|
||||
description: columnComment,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user