コード例 #1
0
  /**
   * 우편번호 찾기 목록을 조회한다.
   *
   * @param searchVO
   * @param model
   * @return "egovframework/com/sym/ccm/zip/EgovCcmZipSearchList"
   * @throws Exception
   */
  @RequestMapping(value = "/sym/ccm/zip/EgovCcmZipSearchList.do")
  public String selectZipSearchList(@ModelAttribute("searchVO") ZipVO searchVO, ModelMap model)
      throws Exception {
    /** 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());

    String sList = "";

    if (searchVO.getSearchList() != null && searchVO.getSearchList() != "") {
      sList = searchVO.getSearchList().substring(0, 1);
    }
    model.addAttribute("searchList", sList);

    if (sList.equals("1")) {
      List<?> CmmnCodeList = zipManageService.selectZipList(searchVO);
      model.addAttribute("resultList", CmmnCodeList);

      int totCnt = zipManageService.selectZipListTotCnt(searchVO);
      paginationInfo.setTotalRecordCount(totCnt);
      model.addAttribute("paginationInfo", paginationInfo);
    } else {
      List<?> CmmnCodeList = rdnmadZipService.selectZipList(searchVO);
      model.addAttribute("resultList", CmmnCodeList);

      int totCnt = rdnmadZipService.selectZipListTotCnt(searchVO);
      paginationInfo.setTotalRecordCount(totCnt);
      model.addAttribute("paginationInfo", paginationInfo);
    }

    return "egovframework/com/sym/ccm/zip/EgovCcmZipSearchList";
  }
コード例 #2
0
  /**
   * 우편번호 목록을 조회한다.
   *
   * @param loginVO
   * @param searchVO
   * @param model
   * @return "egovframework/com/sym/ccm/zip/EgovCcmZipList"
   * @throws Exception
   */
  @IncludedInfo(name = "우편번호관리", listUrl = "/sym/ccm/zip/EgovCcmZipList.do", order = 1000, gid = 60)
  @RequestMapping(value = "/sym/ccm/zip/EgovCcmZipList.do")
  public String selectZipList(
      @ModelAttribute("loginVO") LoginVO loginVO,
      @ModelAttribute("searchVO") ZipVO searchVO,
      ModelMap model)
      throws Exception {
    /** 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());

    if (!searchVO.getSearchList().equals("2")) {
      List<?> CmmnCodeList = zipManageService.selectZipList(searchVO);
      model.addAttribute("resultList", CmmnCodeList);

      int totCnt = zipManageService.selectZipListTotCnt(searchVO);
      paginationInfo.setTotalRecordCount(totCnt);
      model.addAttribute("paginationInfo", paginationInfo);
    } else {
      List<?> CmmnCodeList = rdnmadZipService.selectZipList(searchVO);
      model.addAttribute("resultList", CmmnCodeList);

      int totCnt = rdnmadZipService.selectZipListTotCnt(searchVO);
      paginationInfo.setTotalRecordCount(totCnt);
      model.addAttribute("paginationInfo", paginationInfo);
    }

    return "egovframework/com/sym/ccm/zip/EgovCcmZipList";
  }