Ejemplo n.º 1
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";
  }
  /**
   * 설문템플릿를 등록한다. / 초기등록페이지
   *
   * @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 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 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";
  }
  /**
   * 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 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 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";
  }
Ejemplo n.º 8
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;
  }
  /**
   * 부서업무 정보를 수정한다.
   *
   * @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 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;
  }
Ejemplo n.º 12
0
  /**
   * 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 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;
  }
  /**
   * 신청된 휴가를 승인처리한다.
   *
   * @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";
    }
  }
Ejemplo n.º 15
0
  /**
   * 연계기관을 수정한다.
   *
   * @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";
  }
Ejemplo n.º 17
0
  /**
   * 연계기관을 등록한다.
   *
   * @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 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 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 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";
  }
  /**
   * 커뮤니티 관리자 및 동호회 운영자 권한을 확인한다.
   *
   * @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 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";
  }
Ejemplo n.º 23
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";
  }
  /**
   * 등록된 지식정보평가 정보를 조회 한다.
   *
   * @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";
  }
 /**
  * 부서업무함 정보를 삭제한다.
  *
  * @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";
 }
Ejemplo n.º 27
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);
  }
  /**
   * 설문템플릿를 등록 처리 한다. / 등록처리
   *
   * @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";
  }
  /**
   * 부서업무함 정보를 등록한다.
   *
   * @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;
  }
Ejemplo n.º 30
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"; // 업무화면의 상단메뉴 화면
    }
  }