/**
   * 物理读
   *
   * @param dbId
   * @param beginTime
   * @param endTime
   * @param sqlId
   * @param request
   * @param response
   * @return
   */
  @RequestMapping(
      value = "/data/diskread/{dbId}/{beginTime}/{endTime}/{sqlId}",
      method = RequestMethod.GET)
  public @ResponseBody MultipleGeneralReportDataBO diskRead(
      @PathVariable("dbId") String dbId,
      @PathVariable("beginTime") String beginTime,
      @PathVariable("endTime") String endTime,
      @PathVariable("sqlId") String sqlId,
      HttpServletRequest request,
      HttpServletResponse response) {

    DbConfigDomain dbConfigDomain = dbConfigDAO.getDataBaseConfig(dbId);

    MultipleGeneralReportDataBO dto =
        oracleHisSQLStatManager.listSQLStatReportData(
            beginTime,
            endTime,
            new String[] {
              SQLStatTypeEnum.disk_reads_total.getKey(), SQLStatTypeEnum.disk_reads_seconds.getKey()
            },
            dbConfigDomain.getOraDataBaseId(),
            dbConfigDomain.getOraInstanceId(),
            sqlId);

    dto.setReportName(
        String.format("%s[%s],物理读", dbConfigDomain.getDbName(), dbConfigDomain.getIpAddr()));

    return dto;
  }
  @RequestMapping(value = "/view", method = RequestMethod.GET)
  public ModelAndView mysqlQuota(HttpServletRequest request, HttpServletResponse response) {

    ModelAndView model = new ModelAndView();
    String dbId = request.getParameter("dbId");
    String sqlID = request.getParameter("sqlid");
    String sampleTime = request.getParameter("sampletime");

    if (StringUtils.isNotBlank(dbId)
        && StringUtils.isNotBlank(sqlID)
        && StringUtils.isNotBlank(sampleTime)) {
      model.addObject("sqlId", sqlID);
      model.addObject("dbId", dbId);

      String beginTime =
          DateUtils.addDate(DateUtils.StringToDate(sampleTime, "yyyy-MM-dd HH:mm:ss"), -1);
      String endTime =
          DateUtils.addDate(DateUtils.StringToDate(sampleTime, "yyyy-MM-dd HH:mm:ss"), 1);

      String now = DateUtils.getCurrentDateTime();
      if (DateUtils.compareDate(endTime, now) > 0) {
        endTime = now;
      }

      DbConfigDomain dbConfigDomain = dbConfigDAO.getDataBaseConfig(dbId);
      Long dataBaseId = dbConfigDomain.getOraDataBaseId();
      Long instanceId = dbConfigDomain.getOraInstanceId();

      if (dataBaseId != null && instanceId != null) {
        String sqlText = oraclePerformanceStatManager.getSqlText(sqlID, dataBaseId, instanceId);
        model.addObject("sqlText", sqlText);
      }

      model.addObject("beginTime", beginTime);
      model.addObject("endTime", endTime);
    }

    model.setViewName(QUOTA_REPORT_VIEWS);
    return model;
  }