valdevir 2017-01-05 16:08:18 +00:00
parent 1926600c0d
commit 6e08b978e4
2 changed files with 7 additions and 11 deletions

View File

@ -12,10 +12,6 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.apache.commons.lang.StringUtils;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.AproveitamentoBean; import com.rjconsultores.ventaboletos.relatorios.utilitarios.AproveitamentoBean;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
@ -25,6 +21,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.CurrencyUtil;
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext; import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
/** /**
* @author Bruno H. G. Gouvêa <bruno@rjconsultores.com.br> * @author Bruno H. G. Gouvêa <bruno@rjconsultores.com.br>
* *
@ -211,7 +209,7 @@ public class RelatorioAproveitamento extends Relatorio {
sql.append(" AND ( BO.MOTIVOCANCELACION_ID IS NULL "); sql.append(" AND ( BO.MOTIVOCANCELACION_ID IS NULL ");
sql.append(" OR BO.MOTIVOCANCELACION_ID = 0 ) "); sql.append(" OR BO.MOTIVOCANCELACION_ID = 0 ) ");
sql.append(" AND ROWNUM = 1) OCUPADO, "); sql.append(" AND ROWNUM = 1) OCUPADO, ");
sql.append(" (SELECT DECODE(AE.VENDIBLE, 1, 1, "); sql.append(" (SELECT DISTINCT DECODE(AE.VENDIBLE, 1, 1, ");
sql.append(" 0, 2) "); sql.append(" 0, 2) ");
sql.append(" FROM ASIENTO_EXCLUSIVO AE, "); sql.append(" FROM ASIENTO_EXCLUSIVO AE, ");
sql.append(" CORRIDA_TRAMO CTD, "); sql.append(" CORRIDA_TRAMO CTD, ");

View File

@ -4,7 +4,6 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.sql.SQLException;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -38,7 +37,6 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParadaCve;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCorridaAproveitamento; import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCorridaAproveitamento;
/** /**
@ -68,8 +66,6 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
@Autowired @Autowired
private DataSource dataSourceRead; private DataSource dataSourceRead;
@Autowired
private transient PagedListWrapper<Corrida> plwCorrida;
public Datebox getFecCorrida() { public Datebox getFecCorrida() {
return fecCorrida; return fecCorrida;
@ -171,6 +167,7 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
btnExecutarRelatorio.setDisabled(false); btnExecutarRelatorio.setDisabled(false);
} }
@SuppressWarnings("deprecation")
private void refreshLista() { private void refreshLista() {
btnExecutarRelatorio.setDisabled(true); btnExecutarRelatorio.setDisabled(true);
@ -201,9 +198,9 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
List<Corrida> ls = null; List<Corrida> ls = null;
try { try {
ls = corridaService.buscarCorridaRelatorio(dataSourceRead.getConnection(), ls = corridaService.buscarCorridaRelAproveitamento(
origem, destino, data, corridaId); origem, destino, data, corridaId);
} catch (SQLException e) { } catch (Exception e) {
log.error("", e); log.error("", e);
} }
@ -230,6 +227,7 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
* @throws Exception * @throws Exception
* *
*/ */
@SuppressWarnings({ "rawtypes", "unchecked" })
private void executarRelatorio() throws Exception { private void executarRelatorio() throws Exception {
Map<String, Object> parametros = new HashMap<String, Object>(); Map<String, Object> parametros = new HashMap<String, Object>();