/**
   * Do consulta reporte conciliacion.
   *
   * @param mapping the mapping
   * @param actionForm the action form
   * @param request the request
   * @param response the response
   * @return the action forward
   * @throws Exception the exception
   */
  public final ActionForward doConsultaReporteConciliacion(
      final ActionMapping mapping,
      final ActionForm actionForm,
      final HttpServletRequest request,
      final HttpServletResponse response)
      throws Exception {

    PseudoResponse res = new PseudoResponse(request, response);
    ReporteConciliacionForm form;
    final Boolean repBoletas =
        (request.getParameter(REP_BOLETAS) == null)
            ? false
            : Boolean.parseBoolean(request.getParameter(REP_BOLETAS));

    if (actionForm instanceof ReporteConciliacionForm) {
      form = (ReporteConciliacionForm) actionForm;
    } else {
      form = new ReporteConciliacionForm();
    }

    final ReporteConciliacionService service =
        (ReporteConciliacionService)
            getWebApplicationContext().getBean(REPORTE_CONCILIACION_SERVICE);
    String errorFechas = validaFechas(form.getFechaIni(), form.getFehcaFin(), form.isHistorico());
    if ("".equals(errorFechas)) {
      form = service.consultaOperConciliacion(form, "paginaPrimera", 1, repBoletas);
      res.setResponseError(null);
      res.setResponseContent(jsonize(form));
    } else {
      res.setResponseError(errorFechas);
    }

    res.commit();

    return null;
  }