feat: 데이터 흐름 조회 기능 개선 및 프리뷰 모드 추가
- 데이터 흐름 조회 API에 source_screen_id 파라미터 추가하여 특정 화면에서 시작하는 데이터 흐름만 조회 가능 - 화면 관리 페이지에서 선택된 그룹에 company_code 필드 추가하여 회사 코드 정보 포함 - 프리뷰 모드에서 URL 쿼리로 company_code를 받아와 데이터 조회 시 우선 사용하도록 로직 개선 - 화면 관계 흐름 및 서브 테이블 정보에서 company_code를 활용하여 필터링 및 시각화 개선
This commit is contained in:
@@ -603,7 +603,7 @@ export const deleteFieldJoin = async (req: Request, res: Response) => {
|
||||
export const getDataFlows = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const companyCode = (req.user as any).companyCode;
|
||||
const { group_id } = req.query;
|
||||
const { group_id, source_screen_id } = req.query;
|
||||
|
||||
let query = `
|
||||
SELECT sdf.*,
|
||||
@@ -631,6 +631,13 @@ export const getDataFlows = async (req: Request, res: Response) => {
|
||||
paramIndex++;
|
||||
}
|
||||
|
||||
// 특정 화면에서 시작하는 데이터 흐름만 조회
|
||||
if (source_screen_id) {
|
||||
query += ` AND sdf.source_screen_id = $${paramIndex}`;
|
||||
params.push(source_screen_id);
|
||||
paramIndex++;
|
||||
}
|
||||
|
||||
query += " ORDER BY sdf.id ASC";
|
||||
|
||||
const result = await pool.query(query, params);
|
||||
|
||||
Reference in New Issue
Block a user