コード例 #1
0
  /**
   * 부서업무함 정보에 대한 목록을 조회한다.
   *
   * @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;
  }