feat: Enhance menu and screen synchronization services with new fields

- Added `menu_icon` and `screen_group_id` fields to the `Menu` interface in `menuCopyService.ts` to support additional menu attributes.
- Updated the SQL insert statements in both `menuCopyService.ts` and `menuScreenSyncService.ts` to include the new fields, ensuring that menu icons and screen group IDs are properly handled during menu creation and synchronization.
- These enhancements improve the flexibility and functionality of the menu management system, allowing for richer menu configurations.
This commit is contained in:
DDD1542 2026-03-04 22:46:02 +09:00
parent 3a3e4e8926
commit d31568b1bd
3 changed files with 20 additions and 9 deletions

View File

@ -56,6 +56,8 @@ interface Menu {
lang_key_desc: string | null; lang_key_desc: string | null;
screen_code: string | null; screen_code: string | null;
menu_code: string | null; menu_code: string | null;
menu_icon: string | null;
screen_group_id: number | null;
} }
/** /**
@ -2106,26 +2108,28 @@ export class MenuCopyService {
objid, menu_type, parent_obj_id, menu_name_kor, menu_name_eng, objid, menu_type, parent_obj_id, menu_name_kor, menu_name_eng,
seq, menu_url, menu_desc, writer, status, system_name, seq, menu_url, menu_desc, writer, status, system_name,
company_code, lang_key, lang_key_desc, screen_code, menu_code, company_code, lang_key, lang_key_desc, screen_code, menu_code,
source_menu_objid source_menu_objid, menu_icon, screen_group_id
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)`, ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)`,
[ [
newObjId, newObjId,
menu.menu_type, menu.menu_type,
newParentObjId, // 재매핑 newParentObjId,
menu.menu_name_kor, menu.menu_name_kor,
menu.menu_name_eng, menu.menu_name_eng,
menu.seq, menu.seq,
menu.menu_url, menu.menu_url,
menu.menu_desc, menu.menu_desc,
userId, userId,
'active', // 복제된 메뉴는 항상 활성화 상태 'active',
menu.system_name, menu.system_name,
targetCompanyCode, // 새 회사 코드 targetCompanyCode,
menu.lang_key, menu.lang_key,
menu.lang_key_desc, menu.lang_key_desc,
menu.screen_code, // 그대로 유지 menu.screen_code,
menu.menu_code, menu.menu_code,
sourceMenuObjid, // 원본 메뉴 ID (최상위만) sourceMenuObjid,
menu.menu_icon,
menu.screen_group_id,
] ]
); );

View File

@ -334,8 +334,8 @@ export async function syncScreenGroupsToMenu(
INSERT INTO menu_info ( INSERT INTO menu_info (
objid, parent_obj_id, menu_name_kor, menu_name_eng, objid, parent_obj_id, menu_name_kor, menu_name_eng,
seq, menu_type, company_code, writer, regdate, status, screen_group_id, menu_desc, seq, menu_type, company_code, writer, regdate, status, screen_group_id, menu_desc,
menu_url, screen_code menu_url, screen_code, menu_icon
) VALUES ($1, $2, $3, $4, $5, 1, $6, $7, NOW(), 'active', $8, $9, $10, $11) ) VALUES ($1, $2, $3, $4, $5, 1, $6, $7, NOW(), 'active', $8, $9, $10, $11, $12)
RETURNING objid RETURNING objid
`; `;
await client.query(insertMenuQuery, [ await client.query(insertMenuQuery, [
@ -350,6 +350,7 @@ export async function syncScreenGroupsToMenu(
group.description || null, group.description || null,
menuUrl, menuUrl,
screenCode, screenCode,
group.icon || null,
]); ]);
// screen_groups에 menu_objid 업데이트 // screen_groups에 menu_objid 업데이트

View File

@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists