public void queryKey() throws ServletException, IOException {
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    SortInfo si = gridServerHandler.getSingleSortInfo();
    if (si != null) {
      String order = si.getSortOrder();
      if ("defaultsort".equals(order)) {
        page.setOrder("desc");
        page.setOrderBy("fullDate");
      } else {
        page.setOrder(order);
        page.setOrderBy(MantoEyeUtils.getSortField(si.getFieldName()));
      }
      // 默认排序方式
    } else {
      page.setOrderBy("fullDate");
      page.setOrder("desc");
    }

    page.setPageSize(gridServerHandler.getPageSize());
    page.setPageNo(gridServerHandler.getPageInfo().getPageNum());
    page = keywordsTacticsImpl.queryKey(page, id, startTime, endTime);

    int totalRowNum = gridServerHandler.getTotalRowNum();
    if (totalRowNum < 1) {
      totalRowNum = page.getTotalCount();
      gridServerHandler.setTotalRowNum(totalRowNum);
    }
    gridServerHandler.setData(page.getResult(), KeywordsDetail.class);
    Struts2Utils.renderJson(gridServerHandler.getLoadResponseText());
  }
 public void query() throws ServletException, IOException {
   HttpServletRequest request = Struts2Utils.getRequest();
   List<TbBaseUserInfo> list = null;
   List<PropertyFilter> filters =
       HibernateWebUtils.buildPropertyFilters(Struts2Utils.getRequest());
   GridServerHandler gridServerHandler =
       new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
   // 角色查询
   String vcRoleNo = request.getParameter("role_search");
   if (vcRoleNo != null && !vcRoleNo.equals("")) {
     String vcUserNos = baseUserInfoManager.getUserIdByRoleId(vcRoleNo);
     String[] vun = vcUserNos.split(",");
     filters.add(new PropertyFilter("id", vun, MatchType.IN));
   }
   page.setOrderBy("id");
   page.setOrder("desc");
   page.setPageSize(gridServerHandler.getPageSize());
   page.setPageNo(gridServerHandler.getPageInfo().getPageNum());
   page = baseUserInfoManager.search(page, filters);
   int totalRowNum = gridServerHandler.getTotalRowNum();
   if (totalRowNum < 1) {
     totalRowNum = page.getTotalCount();
     gridServerHandler.setTotalRowNum(totalRowNum);
   }
   list = page.getResult();
   gridServerHandler.setData(this.formatViewData(list));
   Struts2Utils.renderJson(gridServerHandler.getLoadResponseText());
 }
  /** 数据导出 */
  public void export() throws ServletException, IOException {
    logger.info("businessName:" + businessName);
    logger.info("businessName:" + Common.convertToUTF8(businessName));
    List<CommonFlush> list =
        spaceDistributeBusinessManager.listData(
            Common.StringToInt(dataType_search),
            Integer.parseInt(spaceLevel_search),
            Common.convertToUTF8(businessName),
            Integer.parseInt(timeLevel_search),
            time_search);
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());

    String exportmsg =
        ExportMsg.EXPORT_FLUSH_BUSINESS_SPACE
            + Common.getTimeLevelCH(timeLevel_search)
            + "("
            + Common.convertToUTF8(businessName)
            + "|"
            + time_search
            + ")";
    commonManagerImpl.log(Struts2Utils.getRequest(), exportmsg);

    gridServerHandler.exportXLS(list, CommonFlush.class);
  }
  /** 数据导出 */
  public void exportKey() throws ServletException, IOException {

    List<KeywordsDetail> list = keywordsTacticsImpl.listData(id, startTime, endTime);
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    String exportmsg = "策略结果列表(" + startTime + "~" + endTime + ")";
    // commonManagerImpl.log(this.getServletRequest(), exportmsg);
    if (list != null && list.size() > 0) {
      gridServerHandler.exportCSV(list, KeywordsDetail.class);
    }
  }
 /** 导出 */
 public void export() throws ServletException, IOException {
   if (this.searchdate == null) {
     this.searchdate = CommonUtils.getSYestoday();
   }
   List<TopStat> list = null;
   GridServerHandler gridServerHandler =
       new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
   list = topFlushAndImsiManager.findTopStatImsi(raittype, stattype, searchdate);
   String exportmsg = ExportMsg.EXPORT_FLUSH_TOPUSER + "(" + searchdate + ")";
   commonManagerImpl.log(Struts2Utils.getRequest(), exportmsg);
   gridServerHandler.exportXLS(list, TopStat.class);
 }
  /** 查询策略任务表 */
  public void query() {
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    List<KeywordsTacticsDTO> list = keywordsTacticsImpl.queryTacticsList();
    List<JSONObject> jsonList = new ArrayList<JSONObject>();
    for (KeywordsTacticsDTO dto : list) {
      jsonList.add(JSONObject.fromObject(dto));
    }
    // JSONArray jArray = JSONArray.fromObject(list);
    gridServerHandler.setData(jsonList);

    Struts2Utils.renderJson(gridServerHandler.getLoadResponseJSON().toString());
  }
  /** 查询详细信息 */
  public void showDialect() {
    HttpServletRequest request = ServletActionContext.getRequest();
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    String nmDataGetterTaskId = ReqUtils.getReqString(request, "id");
    List<DialectKeywordsDTO> list = keywordsTacticsImpl.showDialect(nmDataGetterTaskId);
    List<JSONObject> jsonList = new ArrayList<JSONObject>();
    for (DialectKeywordsDTO dto : list) {
      jsonList.add(JSONObject.fromObject(dto));
    }
    gridServerHandler.setData(jsonList);

    Struts2Utils.renderJson(gridServerHandler.getLoadResponseJSON().toString());
  }
  /** 查询数据 */
  public void query() throws ServletException, IOException {
    HttpServletRequest request = Struts2Utils.getRequest();
    List<TopStat> list = null;
    if (this.searchdate == null) {
      this.searchdate = CommonUtils.getSYestoday();
    }
    logger.info("stattype:" + stattype + "--searchdate:" + searchdate + "--raittype:" + raittype);
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    try {
      list = topFlushAndImsiManager.findTopStatImsi(raittype, stattype, searchdate);

    } catch (Exception e) {
      logger.error(e.getMessage());
    }
    gridServerHandler.setData(list, TopStat.class);
    Struts2Utils.renderJson(gridServerHandler.getLoadResponseText());
  }
  /** 查询数据 */
  public void query() throws ServletException, IOException {
    List<CommonFlush> list = null;
    GridServerHandler gridServerHandler =
        new GridServerHandler(Struts2Utils.getRequest(), Struts2Utils.getResponse());
    SortInfo si = gridServerHandler.getSingleSortInfo();
    if (si != null) {
      String order = si.getSortOrder();
      if ("defaultsort".equals(order)) {
        page.setOrder("desc");
        page.setOrderBy("nmFlush");
      } else {
        page.setOrder(order);
        page.setOrderBy(MantoEyeUtils.getSortField(si.getFieldName()));
      }
      // 默认排序方式
    } else {
      page.setOrderBy("nmFlush");
      page.setOrder("desc");
    }
    page.setPageSize(gridServerHandler.getPageSize());
    page.setPageNo(gridServerHandler.getPageInfo().getPageNum());

    page =
        spaceDistributeBusinessManager.query(
            page,
            Integer.parseInt(dataType_search),
            Common.StringToInt(spaceLevel_search),
            businessName,
            Integer.parseInt(timeLevel_search),
            time_search);

    int totalRowNum = gridServerHandler.getTotalRowNum();
    if (totalRowNum < 1) {
      totalRowNum = page.getTotalCount();
      gridServerHandler.setTotalRowNum(totalRowNum);
    }
    list = page.getResult();
    gridServerHandler.setData(list, CommonFlush.class);
    Struts2Utils.renderJson(gridServerHandler.getLoadResponseText());
  }