Ejemplo n.º 1
0
  public String goList() {
    String responseStr = null;
    String[] paramkeys = {"cCode", "listCnt", "curPage"};
    if (!ISParameter.isParameterOK(request, paramkeys)) {
      responseStr = xmlMgr.xmlBasic(2);
      logger.info("[_OPR_] 존 설정 리스트 조회 중 파라메타 에러");

    } else {
      int listCnt = 0;
      int curPage = 0;

      String strListCnt = request.getParameter("listCnt");
      String strCur = request.getParameter("curPage");

      try {
        listCnt = Integer.parseInt(strListCnt);
        curPage = Integer.parseInt(strCur);
      } catch (NumberFormatException e) {
        logger.info(
            ISLogger.oprStrS("숫자형 문자열이어야함 [listCnt:" + strListCnt + ", curPage:" + strCur + "]"));
        return xmlMgr.xmlBasic(2);
      }

      try {
        listCnt = Integer.parseInt(request.getParameter("listCnt"));
        curPage = Integer.parseInt(request.getParameter("curPage"));
      } catch (NumberFormatException e) {
        return xmlMgr.xmlBasic(2);
      }

      Vector<String> sqlBox = new Vector<String>();
      sqlBox.addElement(request.getParameter("cCode"));
      int totalCnt = sqlSetUp.getTotalCount(sqlBox);
      if (totalCnt == 0) return xmlMgr.xmlBasic(0);

      String m_SumStr = UTILmgr.setPaging(totalCnt, listCnt, curPage);

      String[] start_end_rows = m_SumStr.split(" ");

      sqlBox.clear();
      sqlBox.addElement(mcode);
      sqlBox.addElement(request.getParameter("cCode"));
      sqlBox.addElement(start_end_rows[0]);
      sqlBox.addElement(start_end_rows[1]);

      Vector<Properties> resultBox = new Vector<Properties>();
      sqlSetUp.getZoneInfo(sqlBox, resultBox);
      // int vSize = resultBox.size();

      responseStr = xmlMgr.xmlMulti(1, resultBox, totalCnt, request.getParameter("curPage"));
    }
    return responseStr;
  }