restapi 버튼 동작

This commit is contained in:
kjs
2025-09-29 12:17:10 +09:00
parent cedb5e3ec3
commit c9afdec09f
19 changed files with 1910 additions and 81 deletions

View File

@@ -727,3 +727,35 @@ function processDataflowInBackground(
}
}, 1000); // 1초 후 실행 시뮬레이션
}
/**
* 🔥 전체 관계 목록 조회 (버튼 제어용)
*/
export async function getAllRelationships(
req: AuthenticatedRequest,
res: Response
): Promise<void> {
try {
const companyCode = req.user?.companyCode || "*";
logger.info(`전체 관계 목록 조회 요청 - companyCode: ${companyCode}`);
// 모든 관계도에서 관계 목록을 가져옴
const allRelationships = await dataflowDiagramService.getAllRelationshipsForButtonControl(companyCode);
logger.info(`전체 관계 ${allRelationships.length}개 조회 완료`);
res.json({
success: true,
data: allRelationships,
message: `전체 관계 ${allRelationships.length}개 조회 완료`,
});
} catch (error) {
logger.error("전체 관계 목록 조회 실패:", error);
res.status(500).json({
success: false,
message: error instanceof Error ? error.message : "전체 관계 목록 조회 실패",
errorCode: "GET_ALL_RELATIONSHIPS_ERROR",
});
}
}