/** * 연계기관을 수정한다. * * @param loginVO * @param cntcInstt * @param bindingResult * @param commandMap * @param model * @return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt" * @throws Exception */ @RequestMapping(value = "/ssi/syi/iis/updateCntcInstt.do") public String updateCntcInstt( @ModelAttribute("cntcInstt") CntcInstt cntcInstt, BindingResult bindingResult, @RequestParam Map<?, ?> commandMap, ModelMap model) throws Exception { String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("")) { CntcInstt vo = cntcInsttService.selectCntcInsttDetail(cntcInstt); model.addAttribute("cntcInstt", vo); return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt"; } else if (sCmd.equals("Modify")) { beanValidator.validate(cntcInstt, bindingResult); if (bindingResult.hasErrors()) { CntcInstt vo = cntcInsttService.selectCntcInsttDetail(cntcInstt); model.addAttribute("cntcInstt", vo); return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt"; } // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String uniqId = loginVO.getUniqId(); cntcInstt.setLastUpdusrId(uniqId); cntcInsttService.updateCntcInstt(cntcInstt); return "forward:/ssi/syi/iis/getCntcInsttList.do"; } else { return "forward:/ssi/syi/iis/getCntcInsttList.do"; } }
/** * 받은쪽지함관리 목록을 상세조회 조회한다. * * @param searchVO -검색정보가 담긴 Model * @param commandMap -Request Variable * @param noteRecptn -받은쪽지함관리 Model * @param model -Spring 제공하는 ModelMap * @return String -리턴 URL * @throws Exception */ @RequestMapping(value = "/uss/ion/ntr/detailNoteRecptn.do") public String EgovNoteRecptnDetail( @ModelAttribute("searchVO") NoteRecptn searchVO, Map commandMap, @ModelAttribute("noteRecptn") NoteRecptn noteRecptn, ModelMap model) throws Exception { String sLocationUrl = "egovframework/com/uss/ion/nts/EgovNoteTrnsmitDetail"; String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("del")) { egovNoteRecptnService.deleteNoteRecptn(searchVO); return "redirect:/uss/ion/ntr/listNoteRecptn.do"; } else { // 로그인 객체 선언/아이디설정 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); searchVO.setFrstRegisterId((String) loginVO.getUniqId()); searchVO.setLastUpdusrId((String) loginVO.getUniqId()); Map noteRecptnMap = egovNoteRecptnService.selectNoteRecptnDetail(searchVO); model.addAttribute("noteRecptn", noteRecptnMap); egovframework.com.uss.ion.nts.service.NoteTrnsmit noteTrnsmit = new egovframework.com.uss.ion.nts.service.NoteTrnsmit(); noteTrnsmit.setNoteId((String) commandMap.get("noteId")); List resultRecptnEmp = egovNoteTrnsmitService.selectNoteTrnsmitCnfirm(noteTrnsmit); model.addAttribute("resultRecptnEmp", resultRecptnEmp); } return "egovframework/com/uss/ion/ntr/EgovNoteRecptnDetail"; }
/** * 연계기관을 등록한다. * * @param loginVO * @param cntcInstt * @param bindingResult * @param model * @return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist" * @throws Exception */ @RequestMapping(value = "/ssi/syi/iis/addCntcInstt.do") public String insertCntcInstt( @ModelAttribute("cntcInstt") CntcInstt cntcInstt, BindingResult bindingResult, @RequestParam Map<?, ?> commandMap, ModelMap model) throws Exception { String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("")) { return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist"; } else if (sCmd.equals("Regist")) { beanValidator.validate(cntcInstt, bindingResult); if (bindingResult.hasErrors()) { return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist"; } // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String uniqId = loginVO.getUniqId(); cntcInstt.setFrstRegisterId(uniqId); // ID Generation String sInsttId = idgenService.getNextStringId(); cntcInstt.setInsttId(sInsttId); cntcInsttService.insertCntcInstt(cntcInstt); return "forward:/ssi/syi/iis/getCntcInsttList.do"; } else { return "forward:/ssi/syi/iis/getCntcInsttList.do"; } }
/** * 커뮤니티, 동호회에 사용되는 게시판 사용정보를 등록한다. * * @param bdUseVO * @param boardUseInf * @param status * @param model * @return * @throws Exception */ @RequestMapping("/cop/com/insertBBSUseInfByTrget.do") public String insertBBSUseInfByTrget( @ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf, @RequestParam Map<String, Object> commandMap, SessionStatus status, ModelMap model) throws Exception { checkAuthority(bdUseVO); // server-side 권한 확인 String paramTrgetId = (String) commandMap.get("param_trgetId"); String bbsId = (String) commandMap.get("bbsId"); LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (isAuthenticated) { boardUseInf.setUseAt("Y"); boardUseInf.setFrstRegisterId(user.getUniqId()); boardUseInf.setRegistSeCode("REGC07"); boardUseInf.setBbsId(bbsId); boardUseInf.setTrgetId(paramTrgetId); bbsUseService.insertBBSUseInf(boardUseInf); } return "forward:/cop/com/selectCmyBBSUseInfsByTrget.do"; }
/** * 신청된 휴가를 승인처리한다. * * @param vcatnManage - 휴가관리 model * @return String - 리턴 Url */ @RequestMapping(value = "/uss/ion/vct/updtVcatnConfm.do") public String updtVcatnManageConfm( @ModelAttribute("vcatnManageVO") VcatnManageVO vcatnManageVO, @ModelAttribute("vcatnManage") VcatnManage vcatnManage, BindingResult bindingResult, SessionStatus status, ModelMap model) throws Exception { vcatnManage.setBgnde(EgovStringUtil.removeMinusChar(vcatnManage.getBgnde())); vcatnManage.setEndde(EgovStringUtil.removeMinusChar(vcatnManage.getEndde())); beanValidator.validate(vcatnManage, bindingResult); // validation 수행 if (bindingResult.hasErrors()) { model.addAttribute("vcatnManageVO", vcatnManageVO); return "egovframework/com/uss/ion/vct/EgovVcatnConfm"; } else { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); vcatnManage.setSanctnerId(user.getUniqId()); vcatnManage.setLastUpdusrId(user.getUniqId()); egovVcatnManageService.updtVcatnManageConfm(vcatnManage); return "forward:/uss/ion/vct/EgovVcatnConfmList.do"; } }
/** * 기 등록 된 PROCESS모니터링 정보를 수정 한다. * * @param processNm - PROCESS모니터링 model * @return String - 리턴 Url * @param processNm */ @RequestMapping(value = "/utl/sys/prm/EgovComUtlProcessMonModify.do") public String updateProcessMon( @ModelAttribute("processMonVO") ProcessMonVO processMonVO, BindingResult bindingResult, Map commandMap, ModelMap model) throws Exception { // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("")) { ProcessMonVO vo = processMonService.selectProcessMon(processMonVO); model.addAttribute("processMonVO", vo); return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonModify"; } else if (sCmd.equals("Modify")) { beanValidator.validate(processMonVO, bindingResult); if (bindingResult.hasErrors()) { ProcessMonVO vo = processMonService.selectProcessMon(processMonVO); model.addAttribute("processMonVO", vo); return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonModify"; } // 아이디 설정 processMonVO.setFrstRegisterId((String) loginVO.getUniqId()); processMonVO.setLastUpdusrId((String) loginVO.getUniqId()); processMonService.updateProcessMon(processMonVO); return "forward:/utl/sys/prm/EgovComUtlProcessMonList.do"; } else { return "forward:/utl/sys/prm/EgovComUtlProcessMonList.do"; } }
/** * PROCESS모니터링 정보를 신규로 등록한다. * * @param processNm - PROCESS모니터링 model * @return String - 리턴 Url * @param processNm */ @RequestMapping(value = "/utl/sys/prm/EgovComUtlProcessMonRegist.do") public String insertProcessMon( @ModelAttribute("processMonVO") ProcessMonVO processMonVO, BindingResult bindingResult, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "egovframework/com/uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); if (processMonVO.getProcessNm() == null || processMonVO.getProcessNm().equals("")) { return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonRegist"; } // 서버 validate 체크 beanValidator.validate(processMonVO, bindingResult); if (bindingResult.hasErrors()) { return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonRegist"; } // 아이디 설정 processMonVO.setFrstRegisterId((String) loginVO.getUniqId()); processMonVO.setLastUpdusrId((String) loginVO.getUniqId()); processMonService.insertProcessMon(processMonVO); return "forward:/utl/sys/prm/EgovComUtlProcessMonList.do"; }
/** * 기 등록 된 지식정보평가 정보를 수정 한다. * * @param AppraisalknoAps - 지식정보평가 model * @return String - 리턴 Url * @param knoAps */ @RequestMapping(value = "/dam/app/EgovComDamAppraisalModify.do") public String updateKnoAppraisal( @ModelAttribute("knoId") KnoAppraisal knoAppraisal, BindingResult bindingResult, Map commandMap, ModelMap model) throws Exception { // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("")) { KnoAppraisal vo = knoAppraisalService.selectKnoAppraisal(knoAppraisal); model.addAttribute("knoAppraisal", vo); return "egovframework/com/dam/app/EgovComDamAppraisalModify"; } else if (sCmd.equals("Modify")) { beanValidator.validate(knoAppraisal, bindingResult); if (bindingResult.hasErrors()) { KnoAppraisal vo = knoAppraisalService.selectKnoAppraisal(knoAppraisal); model.addAttribute("knoAppraisal", vo); return "egovframework/com/dam/app/EgovComDamAppraisalModify"; } // 아이디 설정 // knoAppraisal.setFrstRegisterId((String)loginVO.getUniqId()); // knoAppraisal.setLastUpdusrId((String)loginVO.getUniqId()); knoAppraisal.setSpeId((String) loginVO.getUniqId()); knoAppraisalService.updateKnoAppraisal(knoAppraisal); return "forward:/dam/app/EgovComDamAppraisalList.do"; } else { return "forward:/dam/app/EgovComDamAppraisalList.do"; } }
/** * 등록된 PROCESS모니터링 정보를 조회 한다. * * @param processMonVO- PROCESS모니터링 VO * @return String - 리턴 Url * @param processMonVO */ @IncludedInfo(name = "프로세스모니터링", order = 2110, gid = 90) @RequestMapping("/utl/sys/prm/EgovComUtlProcessMonList.do") public String selectProcessMonList( @ModelAttribute("searchVO") ProcessMonVO processMonVO, ModelMap model) throws Exception { // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); processMonVO.setPageUnit(propertyService.getInt("pageUnit")); processMonVO.setPageSize(propertyService.getInt("pageSize")); PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(processMonVO.getPageIndex()); paginationInfo.setRecordCountPerPage(processMonVO.getPageUnit()); paginationInfo.setPageSize(processMonVO.getPageSize()); processMonVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); processMonVO.setLastIndex(paginationInfo.getLastRecordIndex()); processMonVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); List ProcessMonList = processMonService.selectProcessMonList(processMonVO); model.addAttribute("resultList", ProcessMonList); int totCnt = processMonService.selectProcessMonTotCnt(processMonVO); paginationInfo.setTotalRecordCount(totCnt); model.addAttribute("paginationInfo", paginationInfo); return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonList"; }
/** * Q&A정보를 등록하기 위한 전 처리(인증체크) * * @param searchVO * @param qnaManageVO * @param model * @return "/uss/olh/qna/EgovQnaCnRegist" * @throws Exception */ @RequestMapping("/uss/olh/qna/QnaCnRegistView.do") public String insertQnaCnView( @ModelAttribute("searchVO") QnaManageDefaultVO searchVO, QnaManageVO qnaManageVO, Model model) throws Exception { // 인증여부 체크 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); // isAuthenticated = false; if (!isAuthenticated) { model.addAttribute("result", qnaManageVO); model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "uat/uia/EgovLoginUsr"; // return "/uss/olh/qna/EgovQnaCnRegist"; } // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String wrterNm = loginVO.getName(); // 사용자명 String emailAdres = loginVO.getEmail(); // email 주소 qnaManageVO.setWrterNm(wrterNm); // 작성자명 qnaManageVO.setEmailAdres(emailAdres); // email 주소 model.addAttribute("result", qnaManageVO); model.addAttribute("qnaManageVO", qnaManageVO); return "/uss/olh/qna/EgovQnaCnRegist"; }
/** * Q&A정보를 수정처리한다. * * @param searchVO * @param qnaManageVO * @param bindingResult * @return "forward:/uss/olh/qna/QnaListInqire.do" * @throws Exception */ @RequestMapping("/uss/olh/qna/QnaCnUpdt.do") public String updateQnaCn( @ModelAttribute("searchVO") QnaManageDefaultVO searchVO, @ModelAttribute("qnaManageVO") QnaManageVO qnaManageVO, BindingResult bindingResult) throws Exception { // Validation beanValidator.validate(qnaManageVO, bindingResult); if (bindingResult.hasErrors()) { return "/uss/olh/qna/EgovQnaCnUpdt"; } // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String lastUpdusrId = loginVO.getUniqId(); qnaManageVO.setLastUpdusrId(lastUpdusrId); // 최종수정자ID // 작성비밀번호를 암호화 하기 위해서 Get String writngPassword = qnaManageVO.getWritngPassword(); // EgovFileScrty Util에 있는 암호화 모듈을 적용해서 암호화 한다. qnaManageVO.setWritngPassword(EgovFileScrty.encode(writngPassword)); qnaManageService.updateQnaCn(qnaManageVO); return "forward:/uss/olh/qna/QnaListInqire.do"; }
/** * 승인(탈퇴)요청 확인 처리를 위해 수정페이지로 이동한다. * * @param historyVO * @param status * @param model * @return * @throws Exception */ @SuppressWarnings("unchecked") @RequestMapping("/cop/com/forUpdateConfirmRequest.do") public String forUpdateConfirmRequest( @ModelAttribute("searchVO") ConfirmHistoryVO historyVO, SessionStatus status, ModelMap model) throws Exception { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); historyVO.setConfmerId(user.getUniqId()); if (isAuthenticated) { ConfirmHistoryVO vo = confmService.selectSingleConfirmRequest(historyVO); model.addAttribute("historyVO", vo); } ComDefaultCodeVO vo = new ComDefaultCodeVO(); vo.setCodeId("COM007"); List codeResult = cmmUseService.selectCmmCodeDetail(vo); model.addAttribute("typeList", codeResult); return "egovframework/com/cop/com/EgovConfmInfUpdt"; }
/** * 승인(탈퇴)요청에 대한 목록을 조회한다. * * @param historyvO * @param sessionVO * @param status * @param model * @return * @throws Exception */ @RequestMapping("/cop/com/selectConfirmRequest.do") public String selectConfirmRequest( @ModelAttribute("searchVO") ConfirmHistoryVO historyVO, SessionStatus status, ModelMap model) throws Exception { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); @SuppressWarnings("unused") Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); historyVO.setPageUnit(propertyService.getInt("pageUnit")); historyVO.setPageSize(propertyService.getInt("pageSize")); PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(historyVO.getPageIndex()); paginationInfo.setRecordCountPerPage(historyVO.getPageUnit()); paginationInfo.setPageSize(historyVO.getPageSize()); historyVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); historyVO.setLastIndex(paginationInfo.getLastRecordIndex()); historyVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); historyVO.setConfmerId(user.getUniqId()); Map<String, Object> map = confmService.selectConfirmRequest(historyVO); int totCnt = Integer.parseInt((String) map.get("resultCnt")); paginationInfo.setTotalRecordCount(totCnt); model.addAttribute("resultList", map.get("resultList")); model.addAttribute("resultCnt", map.get("resultCnt")); model.addAttribute("paginationInfo", paginationInfo); return "egovframework/com/cop/com/EgovConfirmList"; }
/** * 커뮤니티 관리자 및 동호회 운영자 권한을 확인한다. * * @param boardUseInf * @throws EgovBizException */ protected void checkAuthority(BoardUseInf boardUseInf) throws Exception { String targetId = boardUseInf.getTrgetId(); LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); if (user == null) { throw new EgovBizException("인증된 사용자 정보가 존재하지 않습니다."); } if (targetId.startsWith("CMMNTY_")) { CommunityUser cmmntyUser = new CommunityUser(); cmmntyUser.setCmmntyId(boardUseInf.getTrgetId()); cmmntyUser.setEmplyrId(user.getUniqId()); if (!cmmntyService.isManager(cmmntyUser)) { throw new EgovBizException("해당 커뮤니티 관리자만 사용하실 수 있습니다."); } } else if (targetId.startsWith("CLB_")) { ClubUser clubUser = new ClubUser(); clubUser.setClbId(boardUseInf.getTrgetId()); clubUser.setEmplyrId(user.getUniqId()); if (!clbService.isOperator(clubUser)) { throw new EgovBizException("해당 동호회 운영자만 사용하실 수 있습니다."); } } else { throw new EgovBizException("대상ID 정보가 정확하지 않습니다."); } }
/** * 설문템플릿를 등록한다. / 초기등록페이지 * * @param searchVO * @param commandMap * @param qustnrTmplatManageVO * @param model * @return "/uss/olp/qtm/EgovQustnrTmplatManageRegist" * @throws Exception */ @RequestMapping(value = "/uss/olp/qtm/EgovQustnrTmplatManageRegist.do") public String QustnrTmplatManageRegist( @ModelAttribute("searchVO") ComDefaultVO searchVO, Map commandMap, @ModelAttribute("qustnrTmplatManageVO") QustnrTmplatManageVO qustnrTmplatManageVO, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sLocationUrl = "/uss/olp/qtm/EgovQustnrTmplatManageRegist"; // String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd"); // log.info("cmd =>" + sCmd); // 아이디 설정 qustnrTmplatManageVO.setFrstRegisterId((String) loginVO.getUniqId()); qustnrTmplatManageVO.setLastUpdusrId((String) loginVO.getUniqId()); return sLocationUrl; }
/** * 설문문항 목록을 조회한다. * * @param searchVO * @param qustnrQestnManageVO * @param commandMap * @param model * @return "egovframework/com/uss/olp/qqm/EgovQustnrQestnManageList" * @throws Exception */ @IncludedInfo(name = "질문관리", order = 630, gid = 50) @RequestMapping(value = "/uss/olp/qqm/EgovQustnrQestnManageList.do") public String egovQustnrQestnManageList( @ModelAttribute("searchVO") ComDefaultVO searchVO, @ModelAttribute("qustnrQestnManageVO") QustnrQestnManageVO qustnrQestnManageVO, Map commandMap, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "egovframework/com/uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); String sSearchMode = commandMap.get("searchMode") == null ? "" : (String) commandMap.get("searchMode"); if (sCmd.equals("del")) { egovQustnrQestnManageService.deleteQustnrQestnManage(qustnrQestnManageVO); } // 설문지정보에서 넘어오면 자동검색 설정 if (sSearchMode.equals("Y")) { searchVO.setSearchCondition("QESTNR_ID"); searchVO.setSearchKeyword(qustnrQestnManageVO.getQestnrId()); } /** EgovPropertyService.sample */ searchVO.setPageUnit(propertiesService.getInt("pageUnit")); searchVO.setPageSize(propertiesService.getInt("pageSize")); /** pageing */ PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(searchVO.getPageIndex()); paginationInfo.setRecordCountPerPage(searchVO.getPageUnit()); paginationInfo.setPageSize(searchVO.getPageSize()); searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); List sampleList = egovQustnrQestnManageService.selectQustnrQestnManageList(searchVO); model.addAttribute("resultList", sampleList); int totCnt = (Integer) egovQustnrQestnManageService.selectQustnrQestnManageListCnt(searchVO); paginationInfo.setTotalRecordCount(totCnt); model.addAttribute("paginationInfo", paginationInfo); return "egovframework/com/uss/olp/qqm/EgovQustnrQestnManageList"; }
/** * 설문관리를 등록한다. * * @param searchVO * @param commandMap * @param qustnrManageVO * @param bindingResult * @param model * @return "egovframework/com/uss/olp/qmc/EgovQustnrManageRegist" * @throws Exception */ @RequestMapping(value = "/uss/olp/qmc/EgovQustnrManageRegist.do") public String qustnrManageRegist( @ModelAttribute("searchVO") ComDefaultVO searchVO, @CommandMap Map commandMap, @ModelAttribute("qustnrManageVO") QustnrManageVO qustnrManageVO, BindingResult bindingResult, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "egovframework/com/uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sLocationUrl = "egovframework/com/uss/olp/qmc/EgovQustnrManageRegist"; String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); LOGGER.info("cmd => {}", sCmd); // 공통코드 직업유형 조회 ComDefaultCodeVO voComCode = new ComDefaultCodeVO(); voComCode.setCodeId("COM034"); List listComCode = cmmUseService.selectCmmCodeDetail(voComCode); model.addAttribute("comCode034", listComCode); if (sCmd.equals("save")) { beanValidator.validate(qustnrManageVO, bindingResult); if (bindingResult.hasErrors()) { // 설문템플릿 정보 불러오기 List listQustnrTmplat = egovQustnrManageService.selectQustnrTmplatManageList(qustnrManageVO); model.addAttribute("listQustnrTmplat", listQustnrTmplat); return sLocationUrl; } // 아이디 설정 qustnrManageVO.setFrstRegisterId((String) loginVO.getUniqId()); qustnrManageVO.setLastUpdusrId((String) loginVO.getUniqId()); egovQustnrManageService.insertQustnrManage(qustnrManageVO); sLocationUrl = "redirect:/uss/olp/qmc/EgovQustnrManageList.do"; } else { // 설문템플릿 정보 불러오기 List listQustnrTmplat = egovQustnrManageService.selectQustnrTmplatManageList(qustnrManageVO); model.addAttribute("listQustnrTmplat", listQustnrTmplat); } return sLocationUrl; }
/** * 부서업무 정보를 수정한다. * * @param DeptJob * @return String * @param deptJob */ @RequestMapping("/cop/smt/djm/updateDeptJob.do") public String updateDeptJob( final MultipartHttpServletRequest multiRequest, Map commandMap, @ModelAttribute("deptJobVO") DeptJobVO deptJobVO, BindingResult bindingResult, ModelMap model) throws Exception { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); beanValidator.validate(deptJobVO, bindingResult); if (bindingResult.hasErrors()) { DeptJob deptJob = deptJobService.selectDeptJob(deptJobVO); model.addAttribute("deptJob", deptJob); return "egovframework/com/cop/smt/djm/EgovDeptJobUpdt"; } if (isAuthenticated) { /* ***************************************************************** // 첨부파일 관련 ID 생성 start.... ****************************************************************** */ String _atchFileId = deptJobVO.getAtchFileId(); final Map<String, MultipartFile> files = multiRequest.getFileMap(); if (!files.isEmpty()) { String atchFileAt = commandMap.get("atchFileAt") == null ? "" : (String) commandMap.get("atchFileAt"); if ("N".equals(atchFileAt)) { List<FileVO> _result = fileUtil.parseFileInf(files, "DSCH_", 0, _atchFileId, ""); _atchFileId = fileMngService.insertFileInfs(_result); // 첨부파일 ID 셋팅 deptJobVO.setAtchFileId(_atchFileId); // 첨부파일 ID } else { FileVO fvo = new FileVO(); fvo.setAtchFileId(_atchFileId); int _cnt = fileMngService.getMaxFileSN(fvo); List<FileVO> _result = fileUtil.parseFileInf(files, "DSCH_", _cnt, _atchFileId, ""); fileMngService.updateFileInfs(_result); } } deptJobVO.setLastUpdusrId(user.getUniqId()); deptJobService.updateDeptJob(deptJobVO); } return "forward:/cop/smt/djm/selectDeptJobList.do"; }
/** * 연계시스템을 등록한다. * * @param loginVO * @param cntcSystem * @param bindingResult * @param model * @return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist" * @throws Exception */ @RequestMapping(value = "/ssi/syi/iis/addCntcSystem.do") public String insertCntcSystem( @ModelAttribute("cntcSystem") CntcSystem cntcSystem, BindingResult bindingResult, @RequestParam Map<?, ?> commandMap, ModelMap model) throws Exception { String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd"); if (sCmd.equals("")) { // 연계기관 리스트박스 데이터 CntcInsttVO searchCntcInsttVO; searchCntcInsttVO = new CntcInsttVO(); searchCntcInsttVO.setRecordCountPerPage(999999); searchCntcInsttVO.setFirstIndex(0); searchCntcInsttVO.setSearchCondition("CodeList"); List<?> cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO); model.addAttribute("cntcInsttList", cntcInsttList); return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist"; } else if (sCmd.equals("Regist")) { beanValidator.validate(cntcSystem, bindingResult); if (bindingResult.hasErrors()) { // 연계기관 리스트박스 데이터 CntcInsttVO searchCntcInsttVO; searchCntcInsttVO = new CntcInsttVO(); searchCntcInsttVO.setRecordCountPerPage(999999); searchCntcInsttVO.setFirstIndex(0); searchCntcInsttVO.setSearchCondition("CodeList"); List<?> cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO); model.addAttribute("cntcInsttList", cntcInsttList); return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist"; } // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String uniqId = loginVO.getUniqId(); cntcSystem.setFrstRegisterId(uniqId); // ID Generation String sSysId = idgenServiceSys.getNextStringId(); cntcSystem.setSysId(sSysId); cntcInsttService.insertCntcSystem(cntcSystem); return "forward:/ssi/syi/iis/getCntcInsttDetail.do"; } else { return "forward:/ssi/syi/iis/getCntcInsttDetail.do"; } }
/** * 설문템플릿를 수정처리 한다. * * @param multiRequest * @param searchVO * @param commandMap * @param qustnrTmplatManageVO * @param bindingResult * @param model * @return "/uss/olp/qtm/EgovQustnrTmplatManageModifyActor" * @throws Exception */ @RequestMapping(value = "/uss/olp/qtm/EgovQustnrTmplatManageModifyActor.do") public String QustnrTmplatManageModifyActor( final MultipartHttpServletRequest multiRequest, @ModelAttribute("searchVO") ComDefaultVO searchVO, Map commandMap, @ModelAttribute("qustnrTmplatManageVO") QustnrTmplatManageVO qustnrTmplatManageVO, BindingResult bindingResult, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); // 서버 validate 체크 beanValidator.validate(qustnrTmplatManageVO, bindingResult); if (bindingResult.hasErrors()) { model.addAttribute( "resultList", egovQustnrTmplatManageService.selectQustnrTmplatManageDetail(qustnrTmplatManageVO)); return "/uss/olp/qtm/EgovQustnrTmplatManageModify"; } // 아이디 설정 qustnrTmplatManageVO.setFrstRegisterId((String) loginVO.getUniqId()); qustnrTmplatManageVO.setLastUpdusrId((String) loginVO.getUniqId()); final Map<String, MultipartFile> files = multiRequest.getFileMap(); if (!files.isEmpty()) { for (MultipartFile file : files.values()) { System.out.println("getName =>" + file.getName()); System.out.println("getOriginalFilename =>" + file.getOriginalFilename()); // log.info("getOriginalFilename =>" + file.getOriginalFilename() ); if (file.getName().equals("qestnrTmplatImage") && !file.getOriginalFilename().equals("")) { qustnrTmplatManageVO.setQestnrTmplatImagepathnm(file.getBytes()); } } } egovQustnrTmplatManageService.updateQustnrTmplatManage(qustnrTmplatManageVO); return "redirect:/uss/olp/qtm/EgovQustnrTmplatManageList.do"; }
/** * 부서업무 정보를 등록한다. * * @param DeptJob * @return String * @param deptJob */ @RequestMapping("/cop/smt/djm/insertDeptJob.do") public String insertDeptJob( final MultipartHttpServletRequest multiRequest, @ModelAttribute("deptJobVO") DeptJobVO deptJobVO, BindingResult bindingResult, ModelMap model) throws Exception { // 0. Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "egovframework/com/uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobRegist"; // 서버 validate 체크 beanValidator.validate(deptJobVO, bindingResult); if (bindingResult.hasErrors()) { return sLocationUrl; } // 첨부파일 관련 첨부파일ID 생성 List<FileVO> _result = null; String _atchFileId = ""; final Map<String, MultipartFile> files = multiRequest.getFileMap(); if (!files.isEmpty()) { _result = fileUtil.parseFileInf(files, "DSCH_", 0, "", ""); _atchFileId = fileMngService.insertFileInfs(_result); // 파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다. } // 리턴받은 첨부파일ID를 셋팅한다.. deptJobVO.setAtchFileId(_atchFileId); // 첨부파일 ID // 아이디 설정 deptJobVO.setFrstRegisterId((String) loginVO.getUniqId()); deptJobVO.setLastUpdusrId((String) loginVO.getUniqId()); deptJobService.insertDeptJob(deptJobVO); sLocationUrl = "forward:/cop/smt/djm/selectDeptJobList.do"; return sLocationUrl; }
/** * Q&A답변정보를 수정처리한다. * * @param qnaManageVO * @param searchVO * @return "forward:/uss/olh/qnm/QnaAnswerListInqire.do" * @throws Exception */ @RequestMapping("/uss/olh/qnm/QnaCnAnswerUpdt.do") public String updateQnaCnAnswer( QnaManageVO qnaManageVO, @ModelAttribute("searchVO") QnaManageDefaultVO searchVO) throws Exception { // 로그인VO에서 사용자 정보 가져오기 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); String lastUpdusrId = loginVO.getUniqId(); qnaManageVO.setLastUpdusrId(lastUpdusrId); // 최종수정자ID qnaManageService.updateQnaCnAnswer(qnaManageVO); return "forward:/uss/olh/qnm/QnaAnswerListInqire.do"; }
/** * 프로세스 모니터링로그 정보에 대한 목록을 조회한다. * * @param ProcessMonVO - 프로세스 모니터링로그 VO * @return String - 리턴 URL * @param processMonVO */ @RequestMapping("/utl/sys/prm/EgovComUtlProcessMonLogList.do") public String selectProcessMonLogList( @ModelAttribute("searchVO") ProcessMonLogVO processMonLogVO, ModelMap model) throws Exception { // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); processMonLogVO.setPageUnit(propertyService.getInt("pageUnit")); processMonLogVO.setPageSize(propertyService.getInt("pageSize")); PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(processMonLogVO.getPageIndex()); paginationInfo.setRecordCountPerPage(processMonLogVO.getPageUnit()); paginationInfo.setPageSize(processMonLogVO.getPageSize()); processMonLogVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); processMonLogVO.setLastIndex(paginationInfo.getLastRecordIndex()); processMonLogVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); // 조회기간설정 if (processMonLogVO.getSearchBgnDe() != null && processMonLogVO.getSearchEndDe() != null) { if (!processMonLogVO.getSearchBgnDe().equals("") && !processMonLogVO.getSearchEndDe().equals("")) { processMonLogVO.setSearchBgnDt( processMonLogVO.getSearchBgnDe() + " " + processMonLogVO.getSearchBgnHour()); processMonLogVO.setSearchEndDt( processMonLogVO.getSearchEndDe() + " " + processMonLogVO.getSearchEndHour()); } } Map<String, Object> map = processMonService.selectProcessMonLogList(processMonLogVO); int totCnt = Integer.parseInt((String) map.get("resultCnt")); paginationInfo.setTotalRecordCount(totCnt); // 조회시작시 model.addAttribute("searchBgnHour", (List<ComDefaultCodeVO>) getTimeHH()); // 조회종료시 model.addAttribute("searchEndHour", (List<ComDefaultCodeVO>) getTimeHH()); model.addAttribute("resultList", map.get("resultList")); model.addAttribute("resultCnt", map.get("resultCnt")); model.addAttribute("paginationInfo", paginationInfo); return "egovframework/com/utl/sys/prm/EgovComUtlProcessMonLogList"; }
/** 세션에 계정정보(LoginVO)가 있는지 여부로 인증 여부를 체크한다. 계정정보(LoginVO)가 없다면, 로그인 페이지로 이동한다. */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { boolean isPermittedURL = false; LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); if (loginVO != null) { return true; } else if (!isPermittedURL) { ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do"); throw new ModelAndViewDefiningException(modelAndView); } else { return true; } }
/** * 부서업무함 정보의 표시순서를 수정한다. * * @param DeptJobBx * @return String * @param deptJobBx */ @RequestMapping("/cop/smt/djm/updateDeptJobBxOrdr.do") public String updateDeptJobBxOrdr( @ModelAttribute("searchVO") DeptJobBxVO deptJobBxVO, ModelMap model) throws Exception { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); boolean changed = false; if (isAuthenticated) { deptJobBxVO.setLastUpdusrId(user.getUniqId()); changed = deptJobService.updateDeptJobBxOrdr(deptJobBxVO); } if (!changed) { model.addAttribute("indictOrdrChanged", "false"); } return "forward:/cop/smt/djm/selectDeptJobBxList.do"; }
/** * 좌측메뉴를 조회한다. * * @param menuManageVO MenuManageVO * @param vStartP String * @return 출력페이지정보 "main_left" * @exception Exception */ @RequestMapping(value = "/sym/mms/EgovMainMenuLeft.do") public String selectMainMenuLeft(ModelMap model) throws Exception { LoginVO user = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; // LoginVO user = // (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser(); if (EgovUserDetailsHelper.isAuthenticated()) { // 인증된 경우 처리할 사항 추가 ... model.addAttribute("lastLogoutDateTime", "로그아웃 타임: 2011-11-10 11:30"); // 최근 로그아웃 시간 등에 대한 확보 후 메인 컨텐츠로 활용 } return "main/inc/EgovIncLeftmenu"; }
/** * 등록된 지식정보평가 정보를 조회 한다. * * @param KnoAppraisalVO -app 지식정보평가 VO * @return String - 리턴 Url * @param KnoAppraisalVO */ @IncludedInfo( name = "지식평가관리", listUrl = "/dam/app/EgovComDamAppraisalList.do", order = 1290, gid = 80) @RequestMapping(value = "/dam/app/EgovComDamAppraisalList.do") public String selectKnoAppraisalList( @ModelAttribute("searchVO") KnoAppraisalVO searchVO, ModelMap model) throws Exception { // Spring Security 사용자권한 처리 Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (!isAuthenticated) { model.addAttribute("message", egovMessageSource.getMessage("fail.common.login")); return "egovframework/com/uat/uia/EgovLoginUsr"; } // 로그인 객체 선언 LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); /** EgovPropertyService.mapMaterial */ searchVO.setPageUnit(propertiesService.getInt("pageUnit")); searchVO.setPageSize(propertiesService.getInt("pageSize")); /** paging */ PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(searchVO.getPageIndex()); paginationInfo.setRecordCountPerPage(searchVO.getPageUnit()); paginationInfo.setPageSize(searchVO.getPageSize()); searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); searchVO.setEmplyrId((String) loginVO.getUniqId()); List KnoAppraisalList = knoAppraisalService.selectKnoAppraisalList(searchVO); model.addAttribute("resultList", KnoAppraisalList); int totCnt = knoAppraisalService.selectKnoAppraisalTotCnt(searchVO); paginationInfo.setTotalRecordCount(totCnt); model.addAttribute("paginationInfo", paginationInfo); return "egovframework/com/dam/app/EgovComDamAppraisalList"; }
/** * 게시판 사용정보를 등록한다. * * @param bdUseVO * @param bdUseInf * @param sessionVO * @param status * @param model * @return * @throws Exception */ @RequestMapping("/cop/com/insertBBSUseInf.do") public String insertBBSUseInf( @ModelAttribute("searchVO") BoardUseInfVO bdUseVO, @ModelAttribute("boardUseInf") BoardUseInf boardUseInf, BindingResult bindingResult, Map<String, Object> commandMap, SessionStatus status, ModelMap model) throws Exception { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); beanValidator.validate(boardUseInf, bindingResult); if (bindingResult.hasErrors()) { return "egovframework/com/cop/com/EgovBoardUseInfRegist"; } String trgetType = (String) commandMap.get("param_trgetType"); String registSeCode = ""; // CMMNTY 06/CLUB 05/SYSTEM(REGC01) if ("CMMNTY".equals(trgetType)) { registSeCode = "REGC06"; } else if ("CLUB".equals(trgetType)) { registSeCode = "REGC05"; } else { registSeCode = "REGC01"; } boardUseInf.setUseAt("Y"); boardUseInf.setFrstRegisterId(user.getUniqId()); boardUseInf.setRegistSeCode(registSeCode); if (isAuthenticated) { bbsUseService.insertBBSUseInf(boardUseInf); } return "forward:/cop/com/selectBBSUseInfs.do"; }
/** * 로그아웃 로그정보를 생성한다. EgovLoginController.actionLogout Method * * @param * @return void * @throws Exception */ public void logLogout() throws Throwable { String uniqId = ""; String ip = ""; /* Authenticated */ Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); if (isAuthenticated.booleanValue()) { LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); uniqId = user.getUniqId(); ip = user.getIp(); } LoginLog loginLog = new LoginLog(); loginLog.setLoginId(uniqId); loginLog.setLoginIp(ip); loginLog.setLoginMthd("O"); // 로그인:I, 로그아웃:O loginLog.setErrOccrrAt("N"); loginLog.setErrorCode(""); loginLogService.logInsertLoginLog(loginLog); }
/** * 휴가관리정보 승인 처리를 위해 신청된 휴가관리 목록을 조회한다. * * @param vcatnManageVO - 휴가관리 VO * @return String - 리턴 Url */ @IncludedInfo(name = "휴가승인관리", order = 901, gid = 50) @RequestMapping(value = "/uss/ion/vct/EgovVcatnConfmList.do") public String selectVcatnManageConfmList( @ModelAttribute("vcatnManageVO") VcatnManageVO vcatnManageVO, ModelMap model) throws Exception { java.util.Calendar cal = java.util.Calendar.getInstance(); String[] yearList = new String[5]; for (int x = 0; x < 5; x++) { yearList[x] = Integer.toString(cal.get(java.util.Calendar.YEAR) - x); } /** paging */ PaginationInfo paginationInfo = new PaginationInfo(); paginationInfo.setCurrentPageNo(vcatnManageVO.getPageIndex()); paginationInfo.setRecordCountPerPage(vcatnManageVO.getPageUnit()); paginationInfo.setPageSize(vcatnManageVO.getPageSize()); vcatnManageVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); vcatnManageVO.setLastIndex(paginationInfo.getLastRecordIndex()); vcatnManageVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); vcatnManageVO.setSanctnerId(user.getUniqId()); // 사용자가 승인권자인지 조건값 setting vcatnManageVO.setSearchKeyword(vcatnManageVO.getSearchYear() + vcatnManageVO.getSearchMonth()); vcatnManageVO.setVcatnManageList( egovVcatnManageService.selectVcatnManageConfmList(vcatnManageVO)); model.addAttribute("vcatnManageList", vcatnManageVO.getVcatnManageList()); int totCnt = egovVcatnManageService.selectVcatnManageConfmListTotCnt(vcatnManageVO); paginationInfo.setTotalRecordCount(totCnt); model.addAttribute("yearList", yearList); model.addAttribute("paginationInfo", paginationInfo); model.addAttribute("message", egovMessageSource.getMessage("success.common.select")); return "egovframework/com/uss/ion/vct/EgovVcatnConfmList"; }