diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java index 66ba17d2..f1388f6c 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthAuthorMgtMapper.java @@ -30,7 +30,7 @@ public interface AuthAuthorMgtMapper { /** *
메소드 설명: 권한관리 목록 조회
* - * @param vo + * @param paraMap * @param rowBounds * @return List 요청처리 후 응답객체 * @author: 박민규 @@ -38,7 +38,6 @@ public interface AuthAuthorMgtMapper { */ List selectAuthorInfos(final Map paraMap, final RowBounds rowBounds); List selectAuthorInfos(final Map paraMap); - /** *
메소드 설명: 권한관리 상세정보 조회
* @param vo diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuListMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuListMgtMapper.java index 5e3cb4ae..165682bc 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuListMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/MenuListMgtMapper.java @@ -44,12 +44,12 @@ public interface MenuListMgtMapper { /** *
메소드 설명: 메뉴목록관리 상세정보 조회
- * @param vo + * @param String * @return MenuListMngVO 요청처리 후 응답객체 * @author: 박민규 * @date: 2020. 3. 26. */ - public MenuListMngVO findMenuView(MenuListMngVO vo) throws SQLException; + public MenuListMngVO findMenuView(String progrmFileNm); /** *
메소드 설명: 메뉴정보 전체데이터 삭제
diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuListMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuListMgtService.java index 5fad637d..1beff7e6 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuListMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuListMgtService.java @@ -40,12 +40,12 @@ public interface MenuListMgtService { /** *
메소드 설명: 메뉴목록관리 상세정보 조회
- * @param vo + * @param String * @return MenuListMngVO 요청처리 후 응답객체 * @author: 박민규 * @date: 2020. 3. 26. */ - public MenuListMngVO findView(MenuListMngVO vo); + public MenuListMngVO findView(String menuNm); /** *
메소드 설명: 메뉴목록관리 등록
diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuListMngServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuListMngServiceImpl.java index 8f1ba15c..b539fed7 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuListMngServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/impl/MenuListMngServiceImpl.java @@ -66,13 +66,8 @@ public class MenuListMngServiceImpl implements MenuListMgtService { } @Override - public MenuListMngVO findView(MenuListMngVO vo) { - MenuListMngVO result = null; - try { - result = menuListMngMapper.findMenuView(vo); - } catch (SQLException e) { - throw new RuntimeException("메뉴목록관리 상세정보 조회 FAIL::", e); - } + public MenuListMngVO findView(String menuNm) { + MenuListMngVO result = menuListMngMapper.findMenuView(menuNm); return result; } diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuListMgtController.java b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuListMgtController.java index 4817b073..07c56210 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuListMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/web/MenuListMgtController.java @@ -14,6 +14,9 @@ import javax.servlet.http.HttpServletResponse; import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.Checks; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -47,19 +50,17 @@ import org.springframework.web.servlet.ModelAndView; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Controller -//@RequestMapping(value = "/_mng_/menu/list/") -@RequestMapping(value = "/framework/biz/mng/menu/") +@Slf4j +@AllArgsConstructor +@RequestMapping(value = "/framework/biz/mng/menu") public class MenuListMgtController { - private static final Logger logger = LoggerFactory.getLogger(MenuListMgtController.class); - - @Resource - private MenuListMgtService menuListMngService; + private final MenuListMgtService service; @Autowired private XitBeanValidator beanValidator; @Resource(name = "xitMessageSource") XitMessageSource xitMessageSource; - + /** *
메소드 설명: 메뉴목록관리 목록 페이지
@@ -70,6 +71,27 @@ public class MenuListMgtController { public void mngMenuMgtForm() { } + /** + * 메뉴목록 변경 / 추가를 위한 popup page + * @param menuNo : 변경시 필수 + * @return ModelAndView + */ + @RequestMapping(value = "/mngMenuMgtPopup") + public ModelAndView mngMenuMgtPopup(final String menuNo) { + ModelAndView mav = new ModelAndView(); + + if(Checks.isEmpty(menuNo)){ + mav.addObject("menuManageVO", new MenuListMngVO()); + mav.addObject("pageTitle", "메뉴목록 생성"); + } else { + mav.addObject("menuManageVO", service.findView(menuNo)); + mav.addObject("pageTitle", "프로그램 정보 변경"); + } + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuMgtPopup.popup"); + return mav; + } + + /** * 메소드 설명: 자료 검색 * Paging처리 : parameter로 Map 사용 @@ -81,47 +103,10 @@ public class MenuListMgtController { */ @RequestMapping(value = "findsMenu_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) public ModelAndView findsMenu(@RequestParam Map paraMap) { - - return ResultResponse.of(menuListMngService.findList(paraMap, MybatisUtils.getPagingInfo(paraMap))); + return ResultResponse.of(service.findList(paraMap, MybatisUtils.getPagingInfo(paraMap))); } - - - /** - *
메소드 설명: 요청 페이지로 이동 한다.
- * @param cmd - * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 3. 26. - */ - @RequestMapping(value = "MenuListMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String MenuListMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("menuManageVO") MenuListMngVO vo - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - case "inputs": //일괄등록 페이지 - break; - case "edit": //수정 페이지 - case "view": //상세 페이지 - MenuListMngVO menuListMngVO = menuListMngService.findView(vo); - model.addAttribute("menuManageVO", menuListMngVO); - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - if(!"".equals(tilesDef)) - tilesDef = "."+tilesDef; - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+tilesDef; - - } - /** *
메소드 설명: 요청 팝업 페이지 이동 한다.
* @param cmd @@ -141,7 +126,7 @@ public class MenuListMgtController { default: throw new RuntimeException("유효하지 않은 요청 입니다."); } - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); + return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+"_popup"+TILES_TYPE.FIMS_POPUP.getVal(); } /** @@ -181,7 +166,7 @@ public class MenuListMgtController { } //처리 try { - menuListMngService.addProc(vo); + service.addProc(vo); message = xitMessageSource.getMessage("success.common.insert"); } catch (RuntimeException e) { message = e.getMessage(); @@ -214,8 +199,8 @@ public class MenuListMgtController { if (!"".equals(fileVO.getFileName())) { // 2011.10.07 업로드 파일에 대한 확장자를 체크 if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { - if (menuListMngService.menuBndeAllDelete()) { - message = menuListMngService.addsProc(vo, fis); + if (service.menuBndeAllDelete()) { + message = service.addsProc(vo, fis); } else { message = xitMessageSource.getMessage("fail.common.msg"); vo.setTmp_Cmd("EgovMenuBndeRegist Error!!"); @@ -257,7 +242,7 @@ public class MenuListMgtController { fis.close(); } } catch (IOException ee) { - logger.debug("{}", ee); + log.debug("{}", ee); } } } @@ -277,7 +262,7 @@ public class MenuListMgtController { } //처리 try { - menuListMngService.modifyProc(vo); + service.modifyProc(vo); message = xitMessageSource.getMessage("success.common.update"); } catch (RuntimeException e) { message = e.getMessage(); @@ -291,7 +276,7 @@ public class MenuListMgtController { case "delete": //삭제 //처리 try { - menuListMngService.removeProc(vo); + service.removeProc(vo); message = xitMessageSource.getMessage("success.common.delete"); } catch (RuntimeException e) { message = e.getMessage(); @@ -305,7 +290,7 @@ public class MenuListMgtController { case "deletes": //다건 삭제 //처리 try { - menuListMngService.removesProc(checkedMenuNoForDel); + service.removesProc(checkedMenuNoForDel); message = xitMessageSource.getMessage("success.common.delete"); } catch (RuntimeException e) { message = e.getMessage(); diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java b/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java index 55917ad9..e60fa617 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/web/ProgramMgtController.java @@ -4,8 +4,12 @@ import java.util.Map; import javax.annotation.Resource; +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import kr.xit.framework.biz.mng.menu.model.ProgramMngSearchVO; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; @@ -36,6 +40,7 @@ import lombok.AllArgsConstructor; * @version 1.0 Copyright(c) XIT All rights reserved. */ @Controller +@Slf4j @AllArgsConstructor @RequestMapping(value = "/framework/biz/mng/menu") public class ProgramMgtController { @@ -51,6 +56,23 @@ public class ProgramMgtController { public void mngProgramMgtForm() { } + @RequestMapping(value = "/XitProgramMng_FileNmSearch_popup") + public ModelAndView XitProgramMng_FileNmSearch_popup(@RequestParam final Map paraMap,@ModelAttribute("searchVO") ProgramMngSearchVO searchVO, ModelMap model) { + log.info("didcall"); + + + + ModelAndView mav = new ModelAndView(); + mav.addObject("progrmMngVO", service.findPrograms(paraMap, MybatisUtils.getPagingInfo(paraMap))); + mav.addObject("pageTitle", "프로그램 정보 변경"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitProgramMng_FileNmSearch_popup.popup"); + + + + return mav; + } + + /** * 프로그램 변경 / 추가를 위한 popup page * @param progrmFileNm : 변경시 필수 diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthGrpMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthGrpMgtForm.jsp index 6054dc44..8c39142c 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthGrpMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthGrpMgtForm.jsp @@ -39,19 +39,6 @@
diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtForm.jsp index 894ec163..02117d0a 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtForm.jsp @@ -58,9 +58,104 @@ **************************************************************************/ let GRID = null; + + /* ******************************* - * Grid + * Biz function ******************************* */ + const fnBiz = { + search : function(){ + GRID.reloadData(); + }, + + add : function(){ + CmmPopup.open( + '' + , null + , { + width: 720 + , height: 655 + } + , '메뉴목록' + ) + }, + + modify : function(){ + }, + + remove : function(){ + if(!confirm("삭제 하시겠습니까?")) + return false; + + //Parameter Get + let arrKey = []; + GRID.getCheckedRows().forEach(function(row){ + arrKey.push(row.menuNo); + }); + //Call + document.frmSearch.checkedMenuNoForDel.value=arrKey.join(','); + document.frmSearch.action = ""; + document.frmSearch.submit(); + }, + + pagePopup: function(props){ + const rowData = props.grid.getRow(props.rowKey); + + CmmPopup.open( + '' + , { + progrmFileNm: rowData.progrmFileNm + } + , { + width: 720 + , height: 655 + } + , '프로그램 상세' + )}, + + fnClickMenuListBtn: function(props){ + + const rowData = props.grid.getRow(props.rowKey); + + CmmPopup.open( + '' + , { + menuNo: rowData.menuNo + } + , { + width: 720 + , height: 655 + } + , '프로그램 상세' + ) + } + } + + /************************************************************************** + * event + **************************************************************************/ + $(()=>{ + $('#btnSearch').on('click', () => { + fnBiz.search(); + }); + + $("#btnRegist").on('click', () => { + fnBiz.add(); + }); + + $("#btnRemove").on('click', () => { + fnBiz.removeData(); + }); + + $("#allRegist_btn").on('click', () => { + fnBiz.pagePopup(); + }); + }); + + + /* ******************************* + * Grid + ******************************* */ const initGrid = () => { const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등) { @@ -80,15 +175,11 @@ renderer: { type: CustomButtonRenderer, options: { - formatter: function (props) { - var rowData = props.grid.getRow(props.rowKey); - var obj = { - formatter: rowData.menuNm - , element: "text" - } - return obj; - } - , eventFunction: fnMenuMgt.fnClickMenuListBtn //function(){alert("1234")} + formatter : (props) => ({ + formatter : props.grid.getRow(props.rowKey).progrmFileNm + , element: "text" + }) + , eventFunction: fnBiz.fnClickMenuListBtn //function(){alert("1234")} , eventType: "click" } } @@ -139,104 +230,6 @@ }); } - /* ******************************* - * function - ******************************* */ - const fnMenuMgt = { - search : function(){ - GRID.reloadData(); - }, - - add : function(){ - }, - - modify : function(){ - }, - - remove : function(){ - if(!confirm("삭제 하시겠습니까?")) - return false; - - //Parameter Get - let arrKey = []; - GRID.getCheckedRows().forEach(function(row){ - arrKey.push(row.menuNo); - }); - //Call - document.frmSearch.checkedMenuNoForDel.value=arrKey.join(','); - document.frmSearch.action = ""; - document.frmSearch.submit(); - }, - - pageLink: function(flag, url, params){ - switch (flag) { - case "move": //페이지 이동 - document.frmSearch.searchKeyword.value = ""; - document.frmSearch.action = url; - document.frmSearch.submit(); - break; - case "popup": //팝업 OPEN - this.pagePopup(flag, url, params); - break; - default: - break; - } - }, - - pagePopup: function(flag, url, params){ - let popTitle; - let popOption; - switch (flag) { - case "detail": //상세 - popTitle = "메뉴 목록 상세"; - popOption = {height: 655, width:715} - break; - case "input": //등록 - popTitle = "메뉴 목록 등록"; - popOption = {height: 655, width:715} - break; - case "inputs": //일괄등록 - popTitle = "메뉴 목록 일괄등록"; - popOption = {height: 285, width:715} - break; - default: - break; - } - CmmPopup.open(url, params, popOption, popTitle); - }, - - fnClickMenuListBtn: function(props){ - const rowData = props.grid.getRow(props.rowKey); - fnMenuMgt.pagePopup( - 'detail', - "", - {tilesDef: 'popup', menuNo: rowData.menuNo} - ); - } - } - - /************************************************************************** - * event - **************************************************************************/ - $(()=>{ - $('#btnSearch').on('click', () => { - GRID.reloadData(); - GRID.refreshLayout(); - }); - - $("#btnRegist").click(function(){ - fnMenuMgt.pagePopup('input', ""); - }); - - $("#btnRemove").click(function(){ - fnMenuMgt.removeData(); - }); - - $("#allRegist_btn").click(function(){ - fnMenuMgt.pagePopup('inputs', ""); - }); - }); - /************************************************************************** * initialize **************************************************************************/ diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp index 63672db6..bf9f3ce2 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/menu/mngMenuMgtPopup.jsp @@ -13,7 +13,7 @@ - +