/**
   * 부서업무함 정보에 대한 목록을 조회한다.
   *
   * @param DeptJobBxVO
   * @return String
   * @param deptJobBxVO
   */
  @IncludedInfo(name = "부서업무함관리", order = 400, gid = 40)
  @RequestMapping("/cop/smt/djm/selectDeptJobBxList.do")
  public String selectDeptJobBxList(
      @ModelAttribute("searchVO") DeptJobBxVO deptJobBxVO, ModelMap model) throws Exception {
    // LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
    String sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobBxList";

    if (deptJobBxVO.getPopupCnd() != null && !deptJobBxVO.getPopupCnd().equals(""))
      sLocationUrl = "egovframework/com/cop/smt/djm/EgovDeptJobBxListS";

    deptJobBxVO.setPageUnit(propertyService.getInt("pageUnit"));
    deptJobBxVO.setPageSize(propertyService.getInt("pageSize"));

    PaginationInfo paginationInfo = new PaginationInfo();
    paginationInfo.setCurrentPageNo(deptJobBxVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(deptJobBxVO.getPageUnit());
    paginationInfo.setPageSize(deptJobBxVO.getPageSize());

    deptJobBxVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
    deptJobBxVO.setLastIndex(paginationInfo.getLastRecordIndex());
    deptJobBxVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());

    Map<String, Object> map = deptJobService.selectDeptJobBxList(deptJobBxVO);
    int totCnt = Integer.parseInt((String) map.get("resultCnt"));
    paginationInfo.setTotalRecordCount(totCnt);

    List<DeptJobBxVO> list = (List<DeptJobBxVO>) map.get("resultList");

    model.addAttribute("resultList", map.get("resultList"));
    model.addAttribute("resultCnt", map.get("resultCnt"));
    model.addAttribute("resultNum", list.size());
    model.addAttribute("paginationInfo", paginationInfo);

    return sLocationUrl;
  }
  /**
   * 부서업무함 정보의 수정화면으로 이동한다.
   *
   * @param DeptJobBx
   * @return String
   * @param DeptJobBx
   */
  @RequestMapping("/cop/smt/djm/modifyDeptJobBx.do")
  public String modifyDeptJobBx(
      @ModelAttribute("deptJobBxVO") DeptJobBxVO deptJobBxVO, 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";
    }

    DeptJobBxVO resultVO = deptJobService.selectDeptJobBx(deptJobBxVO);
    resultVO.setSearchCnd(deptJobBxVO.getSearchCnd());
    resultVO.setSearchWrd(deptJobBxVO.getSearchWrd());
    resultVO.setPageIndex(deptJobBxVO.getPageIndex());

    model.addAttribute("indictOrdrValue", resultVO.getIndictOrdr());
    model.addAttribute("deptJobBxVO", resultVO);

    return "egovframework/com/cop/smt/djm/EgovDeptJobBxUpdt";
  }