/**
   * 휴가관리정보를 관리하기 위해 등록된 휴가관리 목록을 조회한다.
   *
   * @param vcatnManageVO - 휴가관리 VO
   * @return String - 리턴 Url
   */
  @IncludedInfo(name = "휴가관리", order = 900, gid = 50)
  @RequestMapping(value = "/uss/ion/vct/EgovVcatnManageList.do")
  public String selectVcatnManageList(
      @ModelAttribute("vcatnManageVO") VcatnManageVO vcatnManageVO, ModelMap model)
      throws Exception {

    java.util.Calendar cal = java.util.Calendar.getInstance();
    String[] yearList = new String[5];
    for (int x = 0; x < 5; x++) {
      yearList[x] = Integer.toString(cal.get(java.util.Calendar.YEAR) - x);
    }

    /** paging */
    PaginationInfo paginationInfo = new PaginationInfo();
    paginationInfo.setCurrentPageNo(vcatnManageVO.getPageIndex());
    paginationInfo.setRecordCountPerPage(vcatnManageVO.getPageUnit());
    paginationInfo.setPageSize(vcatnManageVO.getPageSize());

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

    LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
    vcatnManageVO.setApplcntId(user.getUniqId());
    vcatnManageVO.setVcatnManageList(egovVcatnManageService.selectVcatnManageList(vcatnManageVO));

    model.addAttribute("vcatnManageList", vcatnManageVO.getVcatnManageList());
    int totCnt = egovVcatnManageService.selectVcatnManageListTotCnt(vcatnManageVO);
    paginationInfo.setTotalRecordCount(totCnt);
    model.addAttribute("yearList", yearList);
    model.addAttribute("paginationInfo", paginationInfo);

    model.addAttribute("message", egovMessageSource.getMessage("success.common.select"));

    return "egovframework/com/uss/ion/vct/EgovVcatnManageList";
  }