feat: Enhance entity join functionality with company code support

- Updated the EntityJoinController to log the company code during entity join configuration retrieval.
- Modified the entityJoinService to accept company code as a parameter, allowing for company-specific entity join detection.
- Enhanced the TableManagementService to pass the company code when detecting entity joins and retrieving reference table columns.
- Implemented a helper function in the SplitPanelLayoutComponent to extract additional join columns based on the entity join configuration.
- Improved the SplitPanelLayoutConfigPanel to display entity join columns dynamically, enhancing user experience and functionality.
This commit is contained in:
DDD1542
2026-02-10 10:51:23 +09:00
parent 9e1a54c738
commit 3c8c2ebcf4
5 changed files with 392 additions and 374 deletions

View File

@@ -193,10 +193,11 @@ export class EntityJoinController {
async getEntityJoinConfigs(req: Request, res: Response): Promise<void> {
try {
const { tableName } = req.params;
const companyCode = (req as any).user?.companyCode;
logger.info(`Entity 조인 설정 조회: ${tableName}`);
logger.info(`Entity 조인 설정 조회: ${tableName} (companyCode: ${companyCode})`);
const joinConfigs = await entityJoinService.detectEntityJoins(tableName);
const joinConfigs = await entityJoinService.detectEntityJoins(tableName, undefined, companyCode);
res.status(200).json({
success: true,
@@ -224,11 +225,12 @@ export class EntityJoinController {
async getReferenceTableColumns(req: Request, res: Response): Promise<void> {
try {
const { tableName } = req.params;
const companyCode = (req as any).user?.companyCode;
logger.info(`참조 테이블 컬럼 조회: ${tableName}`);
logger.info(`참조 테이블 컬럼 조회: ${tableName} (companyCode: ${companyCode})`);
const columns =
await tableManagementService.getReferenceTableColumns(tableName);
await tableManagementService.getReferenceTableColumns(tableName, companyCode);
res.status(200).json({
success: true,
@@ -408,11 +410,12 @@ export class EntityJoinController {
async getEntityJoinColumns(req: Request, res: Response): Promise<void> {
try {
const { tableName } = req.params;
const companyCode = (req as any).user?.companyCode;
logger.info(`Entity 조인 컬럼 조회: ${tableName}`);
logger.info(`Entity 조인 컬럼 조회: ${tableName} (companyCode: ${companyCode})`);
// 1. 현재 테이블의 Entity 조인 설정 조회
const allJoinConfigs = await entityJoinService.detectEntityJoins(tableName);
const allJoinConfigs = await entityJoinService.detectEntityJoins(tableName, undefined, companyCode);
// 🆕 화면 디자이너용: table_column_category_values는 카테고리 드롭다운용이므로 제외
// 카테고리 값은 엔티티 조인 컬럼이 아니라 셀렉트박스 옵션으로 사용됨
@@ -439,7 +442,7 @@ export class EntityJoinController {
try {
const columns =
await tableManagementService.getReferenceTableColumns(
config.referenceTable
config.referenceTable, companyCode
);
// 현재 display_column 정보 (참고용으로만 사용, 필터링하지 않음)