shjung před 2 roky
rodič
revize
e664b8c9bb

+ 7 - 1
src/main/java/com/its/op/service/its/oper/TbUserGropMenuAthrService.java

@@ -36,6 +36,9 @@ public class TbUserGropMenuAthrService {
         // 메뉴 중에 최상위 메뉴 선택
         HashMap<String, String> systMenuMap = new HashMap<>();
         for (TbOperSystMenu systMenu : systMenus) {
+            if (!"ITSOP".equals(systMenu.getOperSystId())) {
+                continue;
+            }
             if (("N").equals(systMenu.getDelYn()) & systMenu.getMenuLevl() == 1) {
                 // 레벨이 1 인 것이 최상위 메뉴이다, OPERSYST_MENU_ID, OPER_SYST_ID 는 NULL 로 들어가 있다.
                 systMenuMap.put(systMenu.getMenuId(), systMenu.getMenuName());
@@ -56,13 +59,16 @@ public class TbUserGropMenuAthrService {
 
             // 모든 메뉴에 대해서
             for (TbOperSystMenu systMenu : systMenus) {
+                if (!"ITSOP".equals(systMenu.getOperSystId())) {
+                    continue;
+                }
                 if (("Y").equals(systMenu.getDelYn()) || systMenu.getMenuLevl() == 1) {
                     // 메뉴레벨이 1인 최상위 메뉴는 제외한다.
                     continue;
                 }
 
                 // 최상위 메뉴명을 업데이트
-                systMenu.setOperSystNm(systMenuMap.get(systMenu.getOperSystId()));
+                systMenu.setOperSystNm(systMenuMap.get(systMenu.getParentMenuId()));
                 // 메뉴권한 등록
                 TbUserGropMenuAthrDto menuAthr = TbUserGropMenuAthr.toDtoByMenu(userGrop, systMenu);
                 TbUserGropMenuAthr auth = authMap.get(userGrop.getGropId() + "*" + systMenu.getMenuId());