コード例 #1
0
  /**
   * 설문템플릿를 등록한다. / 초기등록페이지
   *
   * @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;
  }
  /**
   * 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";
  }
コード例 #3
0
  /**
   * 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";
  }
コード例 #4
0
  /**
   * 커뮤니티, 동호회에 사용되는 게시판 사용정보를 등록한다.
   *
   * @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";
  }
コード例 #5
0
  /**
   * 승인(탈퇴)요청 확인 처리를 위해 수정페이지로 이동한다.
   *
   * @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";
  }
コード例 #6
0
  /**
   * 승인(탈퇴)요청에 대한 목록을 조회한다.
   *
   * @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";
  }
コード例 #7
0
  /**
   * 부서업무함 등록시 표시순서를 조회한다.
   *
   * @param DeptJobBx
   * @return String
   * @param DeptJobBx
   */
  @RequestMapping("/cop/smt/djm/getDeptJobBxOrdr.do")
  public String getDeptJobBxOrdr(
      final HttpServletRequest request,
      @ModelAttribute("deptJobBxVO") DeptJobBxVO deptJobBxVO,
      ModelMap model)
      throws Exception {

    String sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobBxRegist";

    if (request.getHeader("Referer").indexOf("addDeptJobBx.do") < 0) {
      sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobBxUpdt";
    }

    // 0. Spring Security 사용자권한 처리
    Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
    if (!isAuthenticated) {
      model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
      return "egovframework/com/uat/uia/EgovLoginUsr";
    }

    // System.out.println(deptJobService.selectDeptJobBxOrdr(deptJobBxVO.getDeptId()));
    // deptJobBxVO.setIndictOrdr(deptJobService.selectDeptJobBxOrdr(deptJobBxVO.getDeptId()) + 1);

    model.addAttribute(
        "indictOrdrValue", deptJobService.selectDeptJobBxOrdr(deptJobBxVO.getDeptId()) + 1);
    return sLocationUrl;
  }
コード例 #8
0
  /**
   * 좌측메뉴를 조회한다.
   *
   * @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";
  }
コード例 #9
0
  /**
   * 설문문항 목록을 조회한다.
   *
   * @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";
  }
コード例 #10
0
  /**
   * 설문관리를 등록한다.
   *
   * @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;
  }
コード例 #11
0
 /**
  * 부서업무함 정보를 삭제한다.
  *
  * @param DeptJobBx
  * @return String
  * @param DeptJobBx
  */
 @RequestMapping("/cop/smt/djm/deleteDeptJobBx.do")
 public String deleteDeptJobBx(@ModelAttribute("deptJobBxVO") DeptJobBx deptJobBx, 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";
   }
   deptJobService.deleteDeptJobBx(deptJobBx);
   return "forward:/cop/smt/djm/selectDeptJobBxList.do";
 }
コード例 #12
0
  /**
   * 부서업무 정보를 수정한다.
   *
   * @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";
  }
コード例 #13
0
  /**
   * Head메뉴를 조회한다.
   *
   * @param menuManageVO MenuManageVO
   * @return 출력페이지정보 "main_headG", "main_head"
   * @exception Exception
   */
  @RequestMapping(value = "/sym/mms/EgovMainMenuHead.do")
  public String selectMainMenuHead(
      // @ModelAttribute("menuManageVO") MenuManageVO menuManageVO,
      @RequestParam(value = "flag", required = false) String flag, ModelMap model)
      throws Exception {

    MenuManageVO menuManageVO = new MenuManageVO();

    LoginVO user =
        EgovUserDetailsHelper.isAuthenticated()
            ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser()
            : null;
    if (EgovUserDetailsHelper.isAuthenticated() && user != null) {
      menuManageVO.setTmp_Id(user.getId());
      menuManageVO.setTmp_Password(user.getPassword());
      menuManageVO.setTmp_UserSe(user.getUserSe());
      menuManageVO.setTmp_Name(user.getName());
      menuManageVO.setTmp_Email(user.getEmail());
      menuManageVO.setTmp_OrgnztId(user.getOrgnztId());
      menuManageVO.setTmp_UniqId(user.getUniqId());
      model.addAttribute("list_headmenu", menuManageService.selectMainMenuHead(menuManageVO));
      model.addAttribute("list_menulist", menuManageService.selectMainMenuLeft(menuManageVO));
    } else {
      menuManageVO.setAuthorCode("ROLE_ANONYMOUS");
      model.addAttribute(
          "list_headmenu", menuManageService.selectMainMenuHeadByAuthor(menuManageVO));
      model.addAttribute(
          "list_menulist", menuManageService.selectMainMenuLeftByAuthor(menuManageVO));
    }

    if (flag == null) {
      return "main/inc/EgovIncSubHeader"; // 업무화면의 상단메뉴 화면
    } else if (flag.equals("MAIN")) {
      return "main/inc/EgovIncHeader"; // 메인화면의 상단메뉴 화면
    } else {
      return "main/inc/EgovIncSubHeader"; // 업무화면의 상단메뉴 화면
    }
  }
コード例 #14
0
  /**
   * 부서업무함 정보의 등록화면으로 이동한다.
   *
   * @param DeptJobBx
   * @return String
   * @param DeptJobBx
   */
  @RequestMapping("/cop/smt/djm/addDeptJobBx.do")
  public String addDeptJobBx(@ModelAttribute("deptJobBxVO") DeptJobBxVO deptJobBxVO, ModelMap model)
      throws Exception {
    String sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobBxRegist";

    // 0. Spring Security 사용자권한 처리
    Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
    if (!isAuthenticated) {
      model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
      return "egovframework/com/uat/uia/EgovLoginUsr";
    }

    return sLocationUrl;
  }
  /**
   * 기 등록된 PROCESS모니터링 정보를 삭제한다.
   *
   * @param processNm - PROCESS모니터링 model
   * @return String - 리턴 Url
   * @param processNm
   */
  @RequestMapping(value = "/utl/sys/prm/EgovComUtlProcessMonRemove.do")
  public String deleteProcessMon(
      @ModelAttribute("processMonVO") ProcessMonVO processMonVO, 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";
    }

    processMonService.deleteProcessMon(processMonVO);
    return "forward:/utl/sys/prm/EgovComUtlProcessMonList.do";
  }
コード例 #16
0
  /**
   * 설문템플릿를 수정처리 한다.
   *
   * @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";
  }
コード例 #17
0
  /**
   * 부서업무 정보를 등록한다.
   *
   * @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;
  }
コード例 #18
0
  /**
   * 게시판 사용 정보를 삭제한다.
   *
   * @param bdUseVO
   * @param bdUseInf
   * @param sessionVO
   * @param status
   * @param model
   * @return
   * @throws Exception
   */
  @RequestMapping("/cop/com/deleteBBSUseInf.do")
  public String deleteBBSUseInf(
      @ModelAttribute("searchVO") BoardUseInfVO bdUseVO,
      @ModelAttribute("bdUseInf") BoardUseInf bdUseInf,
      SessionStatus status,
      ModelMap model)
      throws Exception {

    // LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
    Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();

    if (isAuthenticated) {
      bbsUseService.deleteBBSUseInf(bdUseInf);
    }

    return "forward:/cop/com/selectBBSUseInfs.do";
  }
コード例 #19
0
  /**
   * 부서업무함 정보의 표시순서를 수정한다.
   *
   * @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 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";
  }
コード例 #21
0
  /**
   * 부서업무 정보의 수정화면으로 이동한다.
   *
   * @param DeptJob
   * @return String
   * @param deptJob
   */
  @RequestMapping("/cop/smt/djm/modifyDeptJob.do")
  public String modifyDeptJob(@ModelAttribute("deptJobVO") DeptJobVO deptJobVO, 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";
    }

    DeptJobVO resultVO = deptJobService.selectDeptJob(deptJobVO);
    resultVO.setSearchCnd(deptJobVO.getSearchCnd());
    resultVO.setSearchWrd(deptJobVO.getSearchWrd());
    resultVO.setSearchDeptId(deptJobVO.getSearchDeptId());
    resultVO.setSearchDeptJobBxId(deptJobVO.getSearchDeptJobBxId());
    resultVO.setPageIndex(deptJobVO.getPageIndex());
    model.addAttribute("deptJobVO", resultVO);

    return "egovframework/com/cop/smt/djm/EgovDeptJobUpdt";
  }
コード例 #22
0
  /**
   * 게시판 사용정보를 등록한다.
   *
   * @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";
  }
コード例 #23
0
  /**
   * 로그아웃 로그정보를 생성한다. 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);
  }
コード例 #24
0
  /**
   * Q&A정보 목록을 조회한다. (pageing)
   *
   * @param searchVO
   * @param model
   * @return "/uss/olh/qna/EgovQnaListInqire"
   * @throws Exception
   */
  @RequestMapping(value = "/uss/olh/qna/QnaListInqire.do")
  public String selectQnaList(
      @ModelAttribute("searchVO") QnaManageDefaultVO searchVO, ModelMap model) throws Exception {

    /** EgovPropertyService.SiteList */
    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());

    model.addAttribute("resultList", qnaManageService.selectQnaList(searchVO));

    // 인증여부 체크
    Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();

    // isAuthenticated = false;

    if (!isAuthenticated) {

      model.addAttribute("certificationAt", "N");

    } else {

      model.addAttribute("certificationAt", "Y");
    }

    int totCnt = qnaManageService.selectQnaListTotCnt(searchVO);
    paginationInfo.setTotalRecordCount(totCnt);
    model.addAttribute("paginationInfo", paginationInfo);

    return "/uss/olh/qna/EgovQnaListInqire";
  }
コード例 #25
0
  /**
   * 설문템플릿를 등록 처리 한다. / 등록처리
   *
   * @param multiRequest
   * @param searchVO
   * @param qustnrTmplatManageVO
   * @param model
   * @return "/uss/olp/qtm/EgovQustnrTmplatManageRegistActor"
   * @throws Exception
   */
  @RequestMapping(value = "/uss/olp/qtm/EgovQustnrTmplatManageRegistActor.do")
  public String QustnrTmplatManageRegistActor(
      final MultipartHttpServletRequest multiRequest,
      @ModelAttribute("searchVO") ComDefaultVO searchVO,
      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();

    // 아이디 설정
    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()) {
        // log.info("getName =>" + file.getName() );
        // log.info("getOriginalFilename =>" + file.getOriginalFilename() );
        if (file.getName().equals("qestnrTmplatImage")) {
          qustnrTmplatManageVO.setQestnrTmplatImagepathnm(file.getBytes());
        }
      }
    }

    // log.info("qestnrTmplatImagepathnm =>" + qustnrTmplatManageVO.getQestnrTmplatImagepathnm() );

    egovQustnrTmplatManageService.insertQustnrTmplatManage(qustnrTmplatManageVO);

    return "redirect:/uss/olp/qtm/EgovQustnrTmplatManageList.do";
  }
コード例 #26
0
  /**
   * 부서업무함 정보를 등록한다.
   *
   * @param DeptJobBxVO
   * @return String
   * @param deptJobBxVO
   */
  @RequestMapping("/cop/smt/djm/insertDeptJobBx.do")
  public String insertDeptJobBx(
      @ModelAttribute("deptJobBxVO") DeptJobBxVO deptJobBxVO,
      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/EgovDeptJobBxRegist";

    // 서버  validate 체크
    beanValidator.validate(deptJobBxVO, bindingResult);
    if (bindingResult.hasErrors()) {
      return sLocationUrl;
    }

    // 아이디 설정
    deptJobBxVO.setFrstRegisterId((String) loginVO.getUniqId());
    deptJobBxVO.setLastUpdusrId((String) loginVO.getUniqId());

    // 부서내 부서업무함명 중복체크
    if (deptJobService.selectDeptJobBxCheck(deptJobBxVO) > 0) {
      model.addAttribute("deptJobBxNmDuplicated", "true");
      sLocationUrl = "forward:/cop/smt/djm/addDeptJobBx.do";
    } else {
      deptJobService.insertDeptJobBx(deptJobBxVO);
      sLocationUrl = "forward:/cop/smt/djm/selectDeptJobBxList.do";
    }
    return sLocationUrl;
  }
コード例 #27
0
  /**
   * 부서업무함 정보를 수정한다.
   *
   * @param DeptJobBxVO
   * @return String
   * @param deptJobBxVO
   */
  @RequestMapping("/cop/smt/djm/updateDeptJobBx.do")
  public String updateDeptJobBx(
      @ModelAttribute("deptJobBxVO") DeptJobBxVO deptJobBxVO,
      BindingResult bindingResult,
      ModelMap model)
      throws Exception {
    LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
    Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();

    beanValidator.validate(deptJobBxVO, bindingResult);
    if (bindingResult.hasErrors()) {
      // DeptJobBx result = deptJobService.selectDeptJobBx(deptJobBxVO);
      // model.addAttribute("deptJobBx", result);
      return "egovframework/com/cop/smt/djm/EgovDeptJobBxUpdt";
    }

    if (isAuthenticated) {
      deptJobBxVO.setLastUpdusrId(user.getUniqId());
      deptJobService.updateDeptJobBx(deptJobBxVO);
    }

    return "forward:/cop/smt/djm/selectDeptJobBxList.do";
  }
コード例 #28
0
  /**
   * 부서업무 정보를 삭제한다.
   *
   * @param DeptJob
   * @return String
   * @param deptJob
   */
  @RequestMapping("/cop/smt/djm/deleteDeptJob.do")
  public String deleteDeptJob(@ModelAttribute("deptJobVO") DeptJob deptJob, 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";
    }

    // 첨부파일 삭제를 위한 ID 생성 start....
    String _atchFileId = deptJob.getAtchFileId();

    // 첨부파일을 삭제하기 위한  Vo
    FileVO fvo = new FileVO();
    fvo.setAtchFileId(_atchFileId);

    fileMngService.deleteAllFileInf(fvo);
    // 첨부파일 삭제 End.............

    deptJobService.deleteDeptJob(deptJob);
    return "forward:/cop/smt/djm/selectDeptJobList.do";
  }
  /**
   * 받은쪽지함관리 목록을 조회한다.
   *
   * @param request -HttpServletRequest 객체
   * @param response -HttpServletResponse 객체
   * @param searchVO -검색정보가 담긴 Model
   * @param commandMap -Request Variable
   * @param noteRecptn -받은쪽지함관리 Model
   * @param model -Spring 제공하는 ModelMap
   * @return String -리턴 URL
   * @throws Exception
   */
  @IncludedInfo(name = "받은쪽지함관리", order = 850, gid = 50)
  @RequestMapping(value = "/uss/ion/ntr/listNoteRecptn.do")
  public String EgovNoteRecptnList(
      HttpServletRequest request,
      HttpServletResponse response,
      @ModelAttribute("searchVO") NoteRecptn searchVO,
      Map commandMap,
      @ModelAttribute("noteRecptn") NoteRecptn noteRecptn,
      ModelMap model)
      throws Exception {

    // 변수 설정
    String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd");

    // 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 (sCmd.equals("del")) {
      // 한개의 값으로 삭제가 넘어올때 처리
      if (commandMap.get("checkList") instanceof String) {
        String sCheckList = (String) commandMap.get("checkList");

        String[] sArrCheckListValue = sCheckList.split(",");

        log.debug("==================================EgovNoteRecptnList");
        log.debug("checkList" + sCheckList);
        log.debug("sArrCheckListValue[0]>" + sArrCheckListValue[0]);
        log.debug("sArrCheckListValue[1]>" + sArrCheckListValue[1]);

        noteRecptn.setFrstRegisterId((String) loginVO.getUniqId());
        noteRecptn.setLastUpdusrId((String) loginVO.getUniqId());
        noteRecptn.setNoteId(sArrCheckListValue[0]);
        noteRecptn.setNoteTrnsmitId(sArrCheckListValue[1]);
        noteRecptn.setNoteRecptnId(sArrCheckListValue[2]);

        egovNoteRecptnService.deleteNoteRecptn(noteRecptn);
      }

      // 여러개의 값으로 삭제가 넘어올때 처리
      if (commandMap.get("checkList") instanceof String[]) {
        String[] sArrCheckList = (String[]) commandMap.get("checkList");
        // log.debug("sArrCheckList" + sArrCheckList);

        for (int i = 0; i < sArrCheckList.length; i++) {
          String[] sArrCheckListValue = sArrCheckList[i].split(",");

          noteRecptn.setFrstRegisterId((String) loginVO.getUniqId());
          noteRecptn.setLastUpdusrId((String) loginVO.getUniqId());
          noteRecptn.setNoteId(sArrCheckListValue[0]);
          noteRecptn.setNoteTrnsmitId(sArrCheckListValue[1]);
          noteRecptn.setNoteRecptnId(sArrCheckListValue[2]);

          egovNoteRecptnService.deleteNoteRecptn(noteRecptn);
        }
      }
      // 삭제후 페이지 인덱스 설정
      searchVO.setPageIndex(1);
    }

    /** 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());
    // 수신자설정
    searchVO.setRcverId((String) loginVO.getUniqId());

    List reusltList = egovNoteRecptnService.selectNoteRecptnList(searchVO);
    model.addAttribute("resultList", reusltList);

    model.addAttribute(
        "searchKeyword",
        commandMap.get("searchKeyword") == null ? "" : (String) commandMap.get("searchKeyword"));
    model.addAttribute(
        "searchCondition",
        commandMap.get("searchCondition") == null
            ? ""
            : (String) commandMap.get("searchCondition"));

    int totCnt = (Integer) egovNoteRecptnService.selectNoteRecptnListCnt(searchVO);
    paginationInfo.setTotalRecordCount(totCnt);
    model.addAttribute("paginationInfo", paginationInfo);

    return "egovframework/com/uss/ion/ntr/EgovNoteRecptnList";
  }
コード例 #30
0
  /**
   * 설문문항를 등록한다.
   *
   * @param searchVO
   * @param commandMap
   * @param qustnrQestnManageVO
   * @param bindingResult
   * @param model
   * @return "egovframework/com/uss/olp/qqm/EgovQustnrQestnManageRegist"
   * @throws Exception
   */
  @RequestMapping(value = "/uss/olp/qqm/EgovQustnrQestnManageRegist.do")
  public String qustnrQestnManageRegist(
      @ModelAttribute("searchVO") ComDefaultVO searchVO,
      Map commandMap,
      @ModelAttribute("qustnrQestnManageVO") QustnrQestnManageVO qustnrQestnManageVO,
      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/qqm/EgovQustnrQestnManageRegist";

    String sCmd = commandMap.get("cmd") == null ? "" : (String) commandMap.get("cmd");
    log.info("cmd =>" + sCmd);

    // 공통코드 질문유형 조회
    ComDefaultCodeVO voComCode = new ComDefaultCodeVO();
    voComCode.setCodeId("COM018");
    List listComCode = cmmUseService.selectCmmCodeDetail(voComCode);
    model.addAttribute("cmmCode018", listComCode);

    if (sCmd.equals("save")) {

      // 서버  validate 체크
      beanValidator.validate(qustnrQestnManageVO, bindingResult);
      if (bindingResult.hasErrors()) {
        // 설문제목가져오기
        String sQestnrId =
            commandMap.get("qestnrId") == null ? "" : (String) commandMap.get("qestnrId");
        String sQestnrTmplatId =
            commandMap.get("qestnrTmplatId") == null
                ? ""
                : (String) commandMap.get("qestnrTmplatId");

        log.info("sQestnrId =>" + sQestnrId);
        log.info("sQestnrTmplatId =>" + sQestnrTmplatId);
        if (!sQestnrId.equals("") && !sQestnrTmplatId.equals("")) {

          Map mapQustnrManage = new HashMap();
          mapQustnrManage.put("qestnrId", sQestnrId);
          mapQustnrManage.put("qestnrTmplatId", sQestnrTmplatId);

          model.addAttribute(
              "qestnrInfo",
              (Map) egovQustnrQestnManageService.selectQustnrManageQestnrSj(mapQustnrManage));
        }

        return "egovframework/com/uss/olp/qqm/EgovQustnrQestnManageRegist";
      }

      // 아이디 설정
      qustnrQestnManageVO.setFrstRegisterId((String) loginVO.getUniqId());
      qustnrQestnManageVO.setLastUpdusrId((String) loginVO.getUniqId());
      /** 목록으로갈때 검색조건 유지 */
      egovQustnrQestnManageService.insertQustnrQestnManage(qustnrQestnManageVO);
      sLocationUrl = "redirect:/uss/olp/qqm/EgovQustnrQestnManageList.do?";
      sLocationUrl = sLocationUrl + "searchMode=" + qustnrQestnManageVO.getSearchMode();
      sLocationUrl = sLocationUrl + "&qestnrId=" + qustnrQestnManageVO.getQestnrId();
      sLocationUrl = sLocationUrl + "&qestnrTmplatId=" + qustnrQestnManageVO.getQestnrTmplatId();

    } else {

      // 설문제목가져오기
      String sQestnrId =
          commandMap.get("qestnrId") == null ? "" : (String) commandMap.get("qestnrId");
      String sQestnrTmplatId =
          commandMap.get("qestnrTmplatId") == null ? "" : (String) commandMap.get("qestnrTmplatId");

      log.info("sQestnrId =>" + sQestnrId);
      log.info("sQestnrTmplatId =>" + sQestnrTmplatId);
      if (!sQestnrId.equals("") && !sQestnrTmplatId.equals("")) {

        Map mapQustnrManage = new HashMap();
        mapQustnrManage.put("qestnrId", sQestnrId);
        mapQustnrManage.put("qestnrTmplatId", sQestnrTmplatId);

        model.addAttribute(
            "qestnrInfo",
            (Map) egovQustnrQestnManageService.selectQustnrManageQestnrSj(mapQustnrManage));
      }
    }

    return sLocationUrl;
  }