From db36005bbccfafffd8d92de9b9516f0582c1f3bf Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 2 Nov 2022 18:04:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=97=85=EB=AC=B4=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9E=90=EA=B4=80=EB=A6=AC=20=EB=B0=98=EC=98=81=20=20=20=20=20?= =?UTF-8?q?=20=20popup=20=EC=98=A4=ED=94=88=EC=8B=9C=20post=20=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/FimsTotalPopupController.java | 2 +- .../xit/fims/biz/ec/web/Ec0100Controler.java | 2 +- .../mng/menu/web/ProgramMgtController.java | 2 +- .../biz/mng/user/mapper/UserMgtMapper.java | 9 + .../biz/mng/user/service/UserMgtService.java | 10 +- .../user/service/impl/UserMgtServiceImpl.java | 88 ++---- .../biz/mng/user/web/UserMgtController.java | 41 ++- .../spring/service/context-security.xml | 2 +- .../sqlmapper/biz/rt/rt0200-mysql-mapper.xml | 3 + .../mng/menu/program-mysql-mapper.xml | 5 +- .../framework/mng/usr/user-mysql-mapper.xml | 93 ++++-- .../WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp | 9 +- .../jsp/framework/biz/login/XitLoginUsr.jsp | 2 +- .../framework/biz/mng/usr/mngUserMgtForm.jsp | 50 +--- .../framework/biz/mng/usr/mngUserMgtPopup.jsp | 44 +-- .../framework/layouts/tiles/biz/header.jsp | 19 +- .../resources/framework/js/cmm/XitCmmnUtil.js | 267 ------------------ .../resources/framework/js/cmm/cmmDateUtil.js | 266 +++++++++++++++++ .../resources/framework/js/cmm/cmmUtil.js | 10 +- 19 files changed, 437 insertions(+), 487 deletions(-) diff --git a/src/main/java/kr/xit/fims/biz/cmm/fimsTotalPopup/web/FimsTotalPopupController.java b/src/main/java/kr/xit/fims/biz/cmm/fimsTotalPopup/web/FimsTotalPopupController.java index 568a6dd1..0b373afe 100644 --- a/src/main/java/kr/xit/fims/biz/cmm/fimsTotalPopup/web/FimsTotalPopupController.java +++ b/src/main/java/kr/xit/fims/biz/cmm/fimsTotalPopup/web/FimsTotalPopupController.java @@ -45,7 +45,7 @@ public class FimsTotalPopupController { * @author: 최정민 * @date: 2022. 9. 20. */ - @GetMapping(value = "/fimsTotalPopup") + @RequestMapping(value = "/fimsTotalPopup") public String popup(@RequestParam String selectedId, FimsTotalPopupVO vo, Model model){ vo.setRegltId(selectedId); diff --git a/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java b/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java index cd8ba3ee..3bc2147c 100644 --- a/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java +++ b/src/main/java/kr/xit/fims/biz/ec/web/Ec0100Controler.java @@ -31,7 +31,7 @@ public class Ec0100Controler { } - @GetMapping(value = "/ec0100Popup") + @RequestMapping(value = "/ec0100Popup") public ModelAndView ec0100Popup(@RequestParam(required = false) String keyField) { ModelAndView mav = new ModelAndView(); 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 c3c68e43..58106cef 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 @@ -61,7 +61,7 @@ public class ProgramMgtController { * @param progrmFileNm : 변경시 필수 * @return ModelAndView */ - @GetMapping(value = "/mngProgramMgtPopup") + @RequestMapping(value = "/mngProgramMgtPopup") public ModelAndView mngProgramMgtPopup(final String progrmFileNm) { ModelAndView mav = new ModelAndView(); diff --git a/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java index 1a6a604a..6aca8a08 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/mapper/UserMgtMapper.java @@ -35,6 +35,9 @@ public interface UserMgtMapper { Map selectCheckUserInfo(final String userId); int insertUserInfo(final XitUserInfoVO vo); int updateUserInfo(final XitUserInfoVO vo); + int deleteUserInfo(final String userId); + int deleteGnrlMber(String userId); + int deleteEntrprsMber(String userId); @@ -47,12 +50,18 @@ public interface UserMgtMapper { XitUserScrtySetupVO selectUserScrtySetup(final String scrtySetupTrgetId); int insertUserScrtySetup(final XitUserScrtySetupVO vo); int updateUserScrtySetup(final XitUserScrtySetupVO vo); + int deleteUserScrtySetup(String scrtySetupTrgetId); + + + + int insertUserEtcOption(final XitUserEtcOptionVO vo); int insertUserInfoChangeDtls(final String userId); + int deleteUserInfoChangeDtlsList(final String userId); } diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java b/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java index 95e015b4..2c8d3ade 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/UserMgtService.java @@ -32,17 +32,17 @@ public interface UserMgtService { List findUsers(final Map paraMap, final RowBounds rowBounds); XitUserInfoVO findUser(final String uniqId); - int addUser(final XitUserInfoVO userInfoVO); - int modifyUser(final XitUserInfoVO userInfoVO); - int removeUser(final String uniqId); + void addUser(final XitUserInfoVO userInfoVO); + void modifyUser(final XitUserInfoVO userInfoVO); + void removeUser(final String userTy, final String uniqId); String getDefaultAuthorCode(final String groupId); Map findAuthorGroupInfo(final String groupId); - int addUserScrtySetup(XitUserScrtySetupVO vo); - int addXitUserEtcOption(XitUserEtcOptionVO vo); + int addUserScrtySetup(final XitUserScrtySetupVO vo); + int addXitUserEtcOption(final XitUserEtcOptionVO vo); diff --git a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java index 2217c96f..c472c104 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/service/impl/UserMgtServiceImpl.java @@ -63,7 +63,7 @@ public class UserMgtServiceImpl implements UserMgtService { @Override - public int addUser(final XitUserInfoVO vo) { + public void addUser(final XitUserInfoVO vo) { try { vo.setUniqId(idgenService.getNextStringId()); } catch (FdlException e) { @@ -91,11 +91,11 @@ public class UserMgtServiceImpl implements UserMgtService { userEtcOptionVO.setUserId(vo.getUserId()); userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한 userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한 - return mapper.insertUserEtcOption(userEtcOptionVO); + mapper.insertUserEtcOption(userEtcOptionVO); } @Override - public int modifyUser(final XitUserInfoVO vo) { + public void modifyUser(final XitUserInfoVO vo) { // TODO : 적용 체크 //if(!this.isUserModifyAuth(vo.getUniqId())) @@ -126,82 +126,32 @@ public class UserMgtServiceImpl implements UserMgtService { mapper.updateUserScrtySetup(userScrtySetupVO); } } - return 1; //mapper.updateUser(userManageVO); } - @Override - public int removeUser(String uniqId) { -/* - - String [] delId = userIds.split(","); - if (delId == null || (delId.length == 0)) { - throw new RuntimeException(xitMessageSource.getMessage("fail.common.delete")); - } - - - String [] arrUserId = userIds.split(","); - for (int i=0; i userInfoCheckMap = mapper.selectCheckUserInfo(userId); + String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("esntl_id")); //사용자보안설정 삭제 - try { - XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); - userScrtySetupVO.setScrtySetupTrgetId(xitFrameCrudService.findXitUserInfo(xitUserInfoVO).getEsntlId()); - if(XitCmmnUtil.notEmpty(xitFrameCrudService.findXitUserScrtySetup(userScrtySetupVO))) - xitFrameCrudService.removeXitUserScrtySetup(userScrtySetupVO); - } catch (Exception e) { + if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) { + mapper.deleteUserScrtySetup(scrtySetupTrgetId); } //사용자정보변경내역 전체 삭제 - XitUserInfoChangeDtlsVO xitUserInfoChangeDtlsVO = new XitUserInfoChangeDtlsVO(); - xitUserInfoChangeDtlsVO.setUser_id(userId); - xitFrameCrudService.removeXitUserInfoChangeDtlss(xitUserInfoChangeDtlsVO); + mapper.deleteUserInfoChangeDtlsList(userId); //업무사용자(직원)삭제 - xitFrameCrudService.removeXitUserInfo(xitUserInfoVO); + mapper.deleteUserInfo(userId); - }else if(userTy.equals("USR01")){ //일반회원 삭제 - //필수값 설정 - XitGnrlMberVO gnrlMberVO = new XitGnrlMberVO(); - gnrlMberVO.setMberId(userId); - - //일반회원 삭제 - xitFrameCrudService.removeXitGnrlMber(gnrlMberVO); + //일반회원 삭제 + }else if(userTy.equals("USR01")){ + mapper.deleteGnrlMber(userId); + //기업회원 삭제 }else if(userTy.equals("USR02")){ //기업회원 삭제 - //필수값 설정 - XitEntrprsMberVO entrprsMberVO = new XitEntrprsMberVO(); - entrprsMberVO.setEntrprsMberId(userId); - - //기업회원 삭제 - xitFrameCrudService.removeXitEntrprsMber(entrprsMberVO); + mapper.deleteEntrprsMber(userId); } -*/ - - - - return 0; //mapper.deleteUser(uniqId); } /** @@ -244,12 +194,12 @@ public class UserMgtServiceImpl implements UserMgtService { @Override - public int addUserScrtySetup(XitUserScrtySetupVO vo) { + public int addUserScrtySetup(final XitUserScrtySetupVO vo) { return mapper.insertUserScrtySetup(vo); } @Override - public int addXitUserEtcOption(XitUserEtcOptionVO vo) { + public int addXitUserEtcOption(final XitUserEtcOptionVO vo) { return mapper.insertUserEtcOption(vo); } diff --git a/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java b/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java index 26553d4e..a4e1add6 100644 --- a/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/user/web/UserMgtController.java @@ -74,18 +74,34 @@ public class UserMgtController { public void mngUserMgtForm() { } - @GetMapping(value = "/mngUserMgtPopup") - public ModelAndView mngUserMgtPopup(final String uniqId) { + /** + * 회원가입 및 사용자 등록에서 함께 사용하기 위해 등록 및 변경 url 구분 + * @return + */ + @RequestMapping(value = "/addUserPopup") + public ModelAndView addUserPopup() { ModelAndView mav = new ModelAndView(); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup"); - if (Checks.isEmpty(uniqId)) { - mav.addObject("userInfoVO", new XitUserInfoVO()); - mav.addObject("pageTitle", "사용자 정보 등록"); - } else { - mav.addObject("userInfoVO", service.findUser(uniqId)); - mav.addObject("pageTitle", "사용자 정보 변정"); - } + mav.addObject("userInfoVO", new XitUserInfoVO()); + mav.addObject("pageTitle", "사용자 정보 등록"); + + return mav; + } + + /** + * 회원가입 및 사용자 등록에서 함께 사용하기 위해 등록 및 변경 url 구분 + * @param uniqId + * @return + */ + @RequestMapping(value = "/modifyUserPopup") + public ModelAndView modifyUserPopup(final String uniqId) { + ModelAndView mav = new ModelAndView(); + + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/usr/mngUserMgtPopup.popup"); + mav.addObject("userInfoVO", service.findUser(uniqId)); + mav.addObject("pageTitle", "사용자 정보 변정"); + return mav; } @@ -120,18 +136,19 @@ public class UserMgtController { ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ValidationError.of("userInfoVO", vo, bindingResult); - service.modifyUser(vo); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; } @PostMapping(value = "/removeUser") - public ModelAndView removeUser(final String uniqId){ + public ModelAndView removeUser(@RequestParam final String userTy, @RequestParam final String userId){ ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - service.removeUser(uniqId); + service.removeUser(userTy, userId); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); + return mav; } diff --git a/src/main/resources/spring/service/context-security.xml b/src/main/resources/spring/service/context-security.xml index 41ff7201..5e215524 100644 --- a/src/main/resources/spring/service/context-security.xml +++ b/src/main/resources/spring/service/context-security.xml @@ -19,7 +19,7 @@ - + diff --git a/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml b/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml index 7966a51d..2f19cb18 100644 --- a/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/biz/rt/rt0200-mysql-mapper.xml @@ -3,6 +3,9 @@ + /* program-mysql-mapper|selectPrograms-프로그램 목록 조회|julim */ SELECT progrm_file_nm @@ -33,8 +36,6 @@ WHERE progrm_file_nm = #{progrmFileNm} - - /* program-mysql-mapper|insertProgram-프로그램 등록|julim */ INSERT diff --git a/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml index b461af8d..69828c21 100644 --- a/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/usr/user-mysql-mapper.xml @@ -2,6 +2,9 @@ + - @@ -183,23 +184,50 @@ WHERE xui.user_id = #{userId} + + + + + /* user-mysql-mapper|deleteGnrlMber-일반사용자정보 삭제|julim */ + DELETE + FROM xit_gnrl_mber + WHERE mber_id = #{userId} + + + + + + + /* user-mysql-mapper|delectEntrprsMber-기업사용자정보 삭제|julim */ + DELETE + FROM xit_entrprs_mber + WHERE entrprs_mber_id = #{userId} + + + /* user-mysql-mapper|selectUserScrtySetups-사용자보안설정 목록 조회|julim */ SELECT scrty_setup_trget_id @@ -274,6 +302,9 @@ + /* user-mysql-mapper|selectUserEtcOption-사용자기타옵션 조회|julim */ - /** 사용자기타옵션 조회 */ SELECT user_id , job_data_author , user_manage_author @@ -349,8 +379,13 @@ WHERE user_id = #{userId} + + + - /* user-mysql-mapper|insertUserInfoChangeDtls-사용자정보변경내역 등록|julim */ + /* user-mysql-mapper|insertUserInfoChangeDtls-사용자정보변경이력내역 등록|julim */ INSERT INTO xit_user_info_change_dtls ( user_id @@ -397,6 +432,12 @@ WHERE user_id = #{userId} + + /* user-mysql-mapper|deleteUserInfoChangeDtlsList-사용자정보변경이력 내역 목록 삭제|julim */ + DELETE + FROM xit_user_info_change_dtls + WHERE user_id = #{userId} + @@ -533,11 +574,5 @@ AND USER_ID = #{user_id } AND CHANGE_DE = #{change_de} - - /** removeXitUserInfoChangeDtls */ - /** 사용자정보변경내역 목록 삭제 */ - DELETE FROM XIT_USER_INFO_CHANGE_DTLS - WHERE 1=1 - AND USER_ID = #{user_id } - + diff --git a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp index e8acb7fe..d0df62c3 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/biz/rt/rt0200Sel.jsp @@ -402,19 +402,12 @@ * initialize **************************************************************************/ $(document).ready(function() { - //$('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-365).date); + $('#sch_date_from').datepicker('setDate', DateUtil.getDateDay(-364).date); $('#sch_date_to').datepicker('setDate', new Date()); $('#totCnt span').text(ARR_TOTCNT[CUR_TAB_SEQ]); $("#tabs").tabs({active : CUR_TAB_SEQ}); initGrid(); - $.datepicker._gotoToday("#sch_date_from"); - - $.datepicker._gotoToday = function(id) { - $(id).datepicker('setDate', new Date()); - $(".ui-datepicker").hide().blur(); - }; - }); diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/login/XitLoginUsr.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/login/XitLoginUsr.jsp index f5910d3b..4be7ef01 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/login/XitLoginUsr.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/login/XitLoginUsr.jsp @@ -165,7 +165,7 @@ * 회원가입 팝업 */ function fnReg(){ - CmmPopup.open("", {}, {width: 1100, height:570}, '사용자 등록'); + CmmPopup.open("", {}, {width: 1100, height:570}, '사용자 등록'); } /** diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/usr/mngUserMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/usr/mngUserMgtForm.jsp index 6c87aaec..f47b29a3 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/usr/mngUserMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/usr/mngUserMgtForm.jsp @@ -2,11 +2,6 @@ <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
- - - - -