From 6fe9055209f23028e58ec041c4b68aef5359c7fa Mon Sep 17 00:00:00 2001 From: tolag3 Date: Wed, 15 Nov 2023 16:02:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A4=80=ED=98=B8=20=EC=A0=84?= =?UTF-8?q?=EC=9E=90=EC=A1=B0=EC=A0=80=EC=9D=B4=EC=8A=A4=ED=85=9C=20?= =?UTF-8?q?=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 속도개선 중 --- src/main/java/kcc/web/MainController.java | 185 +++--------------- .../sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml | 3 +- .../WEB-INF/jsp/main/inc/EgovIncLeftmenu.jsp | 13 ++ .../WEB-INF/jsp/web/com/webCommonFooter.jsp | 13 -- .../WEB-INF/jsp/web/com/webCommonNaviWrap.jsp | 141 ------------- 5 files changed, 38 insertions(+), 317 deletions(-) diff --git a/src/main/java/kcc/web/MainController.java b/src/main/java/kcc/web/MainController.java index 22e9b5ae..4f0aa74e 100644 --- a/src/main/java/kcc/web/MainController.java +++ b/src/main/java/kcc/web/MainController.java @@ -458,7 +458,7 @@ public class MainController { //로그인 권한정보 불러오기 LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; String userAuthority = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getAuthority()); - System.out.println(" ++ userAuthority : "+ userAuthority); + //권한별 메뉴표시 if(!userAuthority.equals("ROLE_ADMIN") && !userAuthority.equals("ROLE_ADR_ADMIN") @@ -471,70 +471,14 @@ public class MainController { menuManageVO.setAuthorCode("ROLE_ANONYMOUS"); } - System.out.println(" ++ menuManageVO.getAuthorCode() : "+ menuManageVO.getAuthorCode()); //대국민, 조정위원일 경우 원뎁스 메뉴에 대시보드 링크를 걸기위해 권한 넘겨줌 model.addAttribute("auth", menuManageVO.getAuthorCode()); menuManageVO.setMenuUserType(menuManageVO.getMenuUserType()); List menuResultList = menuCreateManageService.selectMenuListJtreeWeb(menuManageVO) ; - - List menuTwoExist = new ArrayList<>(); //2뎁스의 하위 매뉴가 있는것 조회 - HashSet underMenuEmpty = new HashSet(); //2뎁스의 하위매뉴 없는것 조회 - for(MenuManageJTreeVO menuManage : menuResultList){ - if(menuManage.getDepths().equals("3")){ - menuTwoExist.add(menuManage.getUpperMenuId()) ; - } - - if(menuManage.getDepths().equals("2")){ - underMenuEmpty.add(menuManage.getMenuNo()); - } - } - - HashSet underMenuExist = new HashSet(menuTwoExist); //하위매뉴가 있는것 - underMenuEmpty.removeAll(underMenuExist); //하위매뉴가 없는것 - - MenuManageJTreeVO menuManageTopVO = new MenuManageJTreeVO(); - menuManageTopVO.setUpperMenuId("#"); - menuManageTopVO.setMenuNo("0"); - - + model.addAttribute("menuResultList", menuResultList); - model.addAttribute("underMenuExist", underMenuExist); - model.addAttribute("underMenuEmpty", underMenuEmpty); - //자신의 위치 정보 - List menuCurrentResultList = new ArrayList(); //자신의 위치 - MenuManageVO resultVO = new MenuManageVO(); - MenuManageVO tempMenuManageVO = new MenuManageVO(); - tempMenuManageVO.setSearchCondition("Y"); - setViewMenu(request , commandMap , tempMenuManageVO , resultVO , menuManageVO ); - menuCurrentResultList = menuCreateManageService.selectMenuListCurrentJtreeWeb(menuManageVO) ; - Collections.reverse(menuCurrentResultList); //타이틀 역순을 위해 - model.addAttribute("menuCurrentResultList", menuCurrentResultList); - - //팝업존 > 전자조정 탑메뉴 위 팝업존 - /* 팝업 가져오기 */ - /*if(!isMobile(request)){ //PC인경우만 - PopupManageVO popupManageVO = new PopupManageVO(); - popupManageVO.setRecordCountPerPage(10); //10개만 - popupManageVO.setNtceAt("Y"); //사용만 - popupManageVO.setMainPageFlag("Y") ; //메인화면의 용도(시작일 종료일 사이 조회) - List popupList = egovPopupManageService.selectPopupMainList(popupManageVO); - model.addAttribute("popupList", popupList); - - PopupzoneVO popupzoneVo = new PopupzoneVO(); - popupzoneVo.setFirstIndex(0); - popupzoneVo.setRecordCountPerPage(20); - popupzoneVo.setSeCd("02"); - popupzoneVo.setUseYn("Y"); - popupzoneVo.setSearchSortCnd("SORT"); - popupzoneVo.setSearchSortOrd("ASC"); - List popupzoneList = egovPopupManageService.selectPopupzoneList(popupzoneVo); - model.addAttribute("popupzoneList", popupzoneList); - }*/ - - //샘플테마사용시 고정 이미지 가져오기 - SsoLoginVO ssoLoginVO = (SsoLoginVO)session.getAttribute("SSOLoginVO"); if(ssoLoginVO != null) { model.addAttribute("ssoLoginVO", ssoLoginVO); @@ -551,7 +495,6 @@ public class MainController { model.addAttribute("joinUrl", joinUrl); model.addAttribute("modifyUrl", modifyUrl); - return "web/com/webCommonHeader"; } @@ -702,7 +645,7 @@ public class MainController { //사용자 방문수 insert { - if(null == loginLogService.selectLoginUserLog(loginLog)){ //오늘날짜의 IP조회 +// if(null == loginLogService.selectLoginUserLog(loginLog)){ //오늘날짜의 IP조회 SimpleDateFormat mSimpleDateFormat = new SimpleDateFormat ( "yyyyMMdd", Locale.KOREA ); Date currentTime = new Date (); String mTime = mSimpleDateFormat.format ( currentTime ); @@ -738,15 +681,15 @@ public class MainController { //loginLogService.logInsertLoginLog(loginLog); loginLogService.logInsertLoginLogNewStep1(loginLog); - } +// } //오늘 접속 / 최종접속 - LoginLog footerLog = new LoginLog(); - footerLog = loginLogService.selectLogCnt(footerLog); - model.addAttribute("footerLog", footerLog); +// LoginLog footerLog = new LoginLog(); +// footerLog = loginLogService.selectLogCnt(footerLog); +// model.addAttribute("footerLog", footerLog); } - model.addAttribute("loginLog", loginLog); +// model.addAttribute("loginLog", loginLog); return "web/com/webCommonFooter"; } @@ -1411,7 +1354,6 @@ public class MainController { //자신의 위치 정보 List menuCurrentResultList = new ArrayList(); //자신의 위치 List menuLeftResultList = new ArrayList(); //자신이 속한 위치 - List menuUnderResultList = new ArrayList(); //한단계 하위 위치 MenuManageVO resultVO = new MenuManageVO(); MenuManageVO tempMenuManageVO = new MenuManageVO(); tempMenuManageVO.setSearchCondition("Y"); @@ -1420,13 +1362,10 @@ public class MainController { menuCurrentResultList = menuCreateManageService.selectMenuListCurrentJtreeWeb(menuManageVO) ; //최상단 매뉴 가져오기 : 상단 그림 변화 menuLeftResultList = menuCreateManageService.selectMenuLeftListJtreeWeb(menuManageVO) ; - menuUnderResultList = menuCreateManageService.selectMenuUnderListJtreeWeb(menuManageVO) ; List showOneDepthMenu = new ArrayList(); List showTwoDepthMenu = new ArrayList(); - List showThreeDepthMenu = new ArrayList(); - List showFourDepthMenu = new ArrayList(); for(MenuManageJTreeVO tempLeftMenu : menuLeftResultList){ if(tempLeftMenu.getDepths().equals("2")){ @@ -1437,21 +1376,6 @@ public class MainController { } } - if(tempLeftMenu.getDepths().equals("3")){ - for(MenuManageJTreeVO tempCurrentThreeMenu : menuCurrentResultList){ - if(tempLeftMenu.getUpperMenuId().equals(tempCurrentThreeMenu.getMenuNo())){ - showThreeDepthMenu.add(tempLeftMenu); - } - } - } - - if(tempLeftMenu.getDepths().equals("4")){ - for(MenuManageJTreeVO tempCurrentThreeMenu : menuCurrentResultList){ - if(tempLeftMenu.getUpperMenuId().equals(tempCurrentThreeMenu.getMenuNo())){ - showFourDepthMenu.add(tempLeftMenu); - } - } - } } menuManageVO.setAuthorCode(auth); @@ -1463,95 +1387,32 @@ public class MainController { } } - //매뉴구조도 텍스트 - String menuText = ""; - menuText += "
  •  
  • " ; - if(request.getRequestURI().contains("/eng")){ //영문사이트 - int i = 0; - for(MenuManageJTreeVO menuTextVo : menuCurrentResultList){ - if(i !=0){ - menuText += "
  •  > "+menuTextVo.getMenuNm()+"
  • " ; - } - i= i+1; - } - }else{ - for(MenuManageJTreeVO menuTextVo : menuCurrentResultList){ - menuText += "
  •  > "+menuTextVo.getMenuNm()+"
  • " ; - } - } +// model.addAttribute("topMenuId", topMenuId); +// model.addAttribute("subMenuFile", subMenuFile); +// model.addAttribute("pozNmText", pozNmText); +// +// model.addAttribute("menuText", menuText); - //메뉴별 비주얼 이미지가져오기 - PopupzoneVO popupzoneVo = new PopupzoneVO(); - popupzoneVo.setFirstIndex(0); - popupzoneVo.setRecordCountPerPage(10); //10개까지 - popupzoneVo.setSeCd("01"); //메뉴별 비주얼 - popupzoneVo.setUseYn("Y"); - popupzoneVo.setSearchSortCnd("SORT"); - List popupzoneList_01 = egovPopupManageService.selectPopupzoneList(popupzoneVo); - String topMenuId = "01" ; - String subMenuFile = "" ; - String pozNmText = "" ; - - int subMenuFileSize = popupzoneList_01.size() ; - - if(menuCurrentResultList.size()!=0){ - //1뎁스 매뉴에서 현제 매뉴의 몇번째인지를 가져온다. - int tempCurrentSub = 0; - for(MenuManageJTreeVO tempMenuManageJTreeVO : showOneDepthMenu){ - if(((MenuManageJTreeVO)menuCurrentResultList.get(0)).getMenuNo().equals(tempMenuManageJTreeVO.getMenuNo())){ - break; - }else { - tempCurrentSub = tempCurrentSub+1; - } - } - - //메인비주얼 맞는 순서를 가져온다. - if(subMenuFileSize > 0 ){ - if(tempCurrentSub > 5 ) { //안보이는 매뉴 - tempCurrentSub = 0; - } - try { - subMenuFile = (String)((EgovMap)popupzoneList_01.get(tempCurrentSub)).get("popupzoneImageFile") ; - pozNmText = (String)((EgovMap)popupzoneList_01.get(tempCurrentSub)).get("pozNm") ; - }catch(Exception e) { //이미지 등록 안되 있으면 에러 나서 에러의 경우 - subMenuFile = "FILE_000000000000000" ; //임의의 파일 - System.out.println("Exception Occured!!!"); - } - - topMenuId = (tempCurrentSub+1)+""; - } - } - - //샘플테마사용시 고정 이미지 가져오기 - SiteManagerVO siteManagerVO = new SiteManagerVO(); - siteManagerVO = egovSiteManagerService.selectSiteManagerVO(siteManagerVO) ; - if( !"".equals(siteManagerVO.getTheme()) && null != siteManagerVO.getTheme()){ - model.addAttribute("siteManagerVO", siteManagerVO); - } - - model.addAttribute("topMenuId", topMenuId); - model.addAttribute("subMenuFile", subMenuFile); - model.addAttribute("pozNmText", pozNmText); - - model.addAttribute("menuText", menuText); - model.addAttribute("showOneDepthMenu", showOneDepthMenu); model.addAttribute("showTwoDepthMenu", showTwoDepthMenu); - model.addAttribute("showThreeDepthMenu", showThreeDepthMenu); - model.addAttribute("showFourDepthMenu", showFourDepthMenu); - model.addAttribute("menuUnderResultList", menuUnderResultList); //하단매뉴 + + +// model.addAttribute("showThreeDepthMenu", showThreeDepthMenu); +// model.addAttribute("showFourDepthMenu", showFourDepthMenu); +// model.addAttribute("menuUnderResultList", menuUnderResultList); //하단매뉴 + + model.addAttribute("menuCurrentResultList", menuCurrentResultList); model.addAttribute("menuLeftResultList", menuLeftResultList); - model.addAttribute("menuResultList", menuResultList); + + +// model.addAttribute("menuResultList", menuResultList); // 아래 처리중 중간네비 메뉴 조회를 위해 with recurseive 중첩절을 쓰는 쿼리가 있음으로, 큐브리드 쿼리화 필요 // 전자조정 종료 - if(request.getRequestURI().contains("/eng/")){ - return "web/com/engWebCommonNaviWrap"; - } return "web/com/webCommonNaviWrap"; } diff --git a/src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml b/src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml index a1a92154..ac00d762 100644 --- a/src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml +++ b/src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml @@ -84,10 +84,11 @@ , B.SATIS_YN AS satisYn, A.EMPLYR_ID AS emplyrId , C.USER_NM AS emplyrIdTxt , - (SELECT LOC_NM FROM ITSM_LOC WHERE LOC_NO = C.PART_IDX) AS locNmTxt + D.LOC_NM AS locNmTxt FROM LETTNMENUINFO A LEFT JOIN LETTNMENUCREATDTLS B ON A.MENU_NO= B.MENU_NO LEFT JOIN LETTNEMPLYRINFO C ON A.EMPLYR_ID = C.EMPLYR_ID + LEFT JOIN ITSM_LOC D ON D.LOC_NO = C.PART_IDX WHERE 1=1 /* 이전 원래 쿼리 */ AND A.MENU_NO = #searchKeyword# diff --git a/src/main/webapp/WEB-INF/jsp/main/inc/EgovIncLeftmenu.jsp b/src/main/webapp/WEB-INF/jsp/main/inc/EgovIncLeftmenu.jsp index ffd1bb96..915eb573 100644 --- a/src/main/webapp/WEB-INF/jsp/main/inc/EgovIncLeftmenu.jsp +++ b/src/main/webapp/WEB-INF/jsp/main/inc/EgovIncLeftmenu.jsp @@ -82,6 +82,19 @@ $( document).ready(function() { +
  • + + +
  • diff --git a/src/main/webapp/WEB-INF/jsp/web/com/webCommonFooter.jsp b/src/main/webapp/WEB-INF/jsp/web/com/webCommonFooter.jsp index 7b855b68..eae87672 100644 --- a/src/main/webapp/WEB-INF/jsp/web/com/webCommonFooter.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/com/webCommonFooter.jsp @@ -3,12 +3,6 @@ -<%-- --%> - -<%-- 전자조정 HTML 시작 - -
    '); background-repeat:no-repeat;"> - -
    -

    - -

    -
    -
    - -
    -
    -
    -
      - - -
    • class="active"> - >외부링크 -
    • -
      -
      -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
      -
    • HOME
    • - -
    • -
      -
    -
    -
    -
      -
    • -
      -
        -
      • - -
      • -
      • - -
      • -
      • - -
      • -
      -
      -
    • -
    • - -
    -
    -
    -
    - //전자조정 HTML 종료 --%>
    @@ -205,16 +74,6 @@ function snsShare(snsName) {
    -