fixes bug#6221
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@43358 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
53c0d65002
commit
a69c961eaa
|
@ -39,7 +39,7 @@ public class RelatorioAcompanhamentoEquivalentesController extends MyGenericForw
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -84,7 +84,7 @@ public class RelatorioAcompanhamentoEquivalentesController extends MyGenericForw
|
|||
if (rdGroupServico.getSelectedItem() != null && !rdGroupServico.getSelectedItem().getValue().equals("-1"))
|
||||
parametros.put("TIPOSERVICIO_ID", Integer.parseInt(rdGroupServico.getSelectedItem().getValue()));
|
||||
|
||||
relatorio = new RelatorioAcompanhamentoEquivalentes(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioAcompanhamentoEquivalentes(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Relatorio> args = new HashMap<String, Relatorio>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class RelatorioAgenciaFechamentoController extends MyGenericForwardCompos
|
|||
private static Logger log = Logger.getLogger(RelatorioAgenciaFechamentoController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class RelatorioAgenciaFechamentoController extends MyGenericForwardCompos
|
|||
parametros.put("NUMPUNTOVENTA", puntoVentaIds);
|
||||
}
|
||||
|
||||
Relatorio relatorio = new RelatorioAgenciaFechamento(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioAgenciaFechamento(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
|
|||
private Paging pagingCorrida;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private transient PagedListWrapper<Corrida> plwCorrida;
|
||||
|
@ -230,7 +230,7 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer
|
|||
parametros.put("DATA", DateUtil.getStringDate((java.util.Date) this.fecCorrida.getValue())); // Utilizada para exibição no cabeçalho
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioAproveitamentoController.window.title"));
|
||||
|
||||
Relatorio relatorio = new RelatorioAproveitamento(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioAproveitamento(parametros, dataSourceRead.getConnection());
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class RelatorioCorridasController extends MyGenericForwardComposer {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class RelatorioCorridasController extends MyGenericForwardComposer {
|
|||
|
||||
parametros.put("CORRIDA_ID", txtCorridaId.getValue());
|
||||
|
||||
Relatorio relatorio = new RelatorioCorridas(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioCorridas(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class RelatorioDemandasController extends MyGenericForwardComposer {
|
|||
private static Logger log = Logger.getLogger(RelatorioDemandasController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -238,11 +238,11 @@ public class RelatorioDemandasController extends MyGenericForwardComposer {
|
|||
|
||||
|
||||
if (detalhado.isChecked()) {
|
||||
relatorio = new RelatorioDemandasDetalhado(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioDemandasDetalhado(parametros, dataSourceRead.getConnection());
|
||||
} else if (diario.isChecked()) {
|
||||
relatorio = new RelatorioDemandasDiario(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioDemandasDiario(parametros, dataSourceRead.getConnection());
|
||||
} else {
|
||||
relatorio = new RelatorioDemandasConsolidado(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioDemandasConsolidado(parametros, dataSourceRead.getConnection());
|
||||
}
|
||||
|
||||
Map args = new HashMap();
|
||||
|
|
|
@ -14,10 +14,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.ListModelList;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
|
@ -27,7 +24,6 @@ import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
|||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
@ -39,7 +35,7 @@ public class RelatorioGratuidadeController extends MyGenericForwardComposer {
|
|||
private static Logger log = Logger.getLogger(RelatorioGratuidadeController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -79,7 +75,7 @@ public class RelatorioGratuidadeController extends MyGenericForwardComposer {
|
|||
|
||||
parametros.put("TITULO", Labels.getLabel("relatorioGratuidadeController.window.title"));
|
||||
|
||||
Relatorio relatorio = new RelatorioGratuidade(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioGratuidade(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -47,7 +47,7 @@ public class RelatorioLinhaOperacionalController extends MyGenericForwardCompose
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private transient PagedListWrapper<Ruta> plwRuta;
|
||||
@Autowired
|
||||
|
@ -208,7 +208,7 @@ public class RelatorioLinhaOperacionalController extends MyGenericForwardCompose
|
|||
Boolean desconsiderarBilhetesDevolvidos = chkBilhetesDevolvidos.isChecked();
|
||||
parametros.put("desconsiderarBilhetesDevolvidos", desconsiderarBilhetesDevolvidos);
|
||||
|
||||
Relatorio relatorio = new RelatorioLinhaOperacional(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioLinhaOperacional(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
private static Logger log = Logger.getLogger(RelatorioLinhasHorarioController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -152,7 +152,7 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
parametros.put("lsNumLinha", lsNumLinha);
|
||||
parametros.put("lsNumServico", lsNumServico);
|
||||
|
||||
Relatorio relatorio = new RelatorioLinhasHorario(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioLinhasHorario(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -30,7 +30,7 @@ public class RelatorioOCDController extends MyGenericForwardComposer {
|
|||
private static Logger log = Logger.getLogger(RelatorioOCDController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -53,7 +53,7 @@ public class RelatorioOCDController extends MyGenericForwardComposer {
|
|||
}
|
||||
parametros.put("TITULO", Labels.getLabel("relatorioOCDController.window.title"));
|
||||
|
||||
Relatorio relatorio = new RelatorioOCDNaoResgatadaEmpresa(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioOCDNaoResgatadaEmpresa(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class RelatorioOrigemDestinoController extends MyGenericForwardComposer {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
|
@ -240,7 +240,7 @@ public class RelatorioOrigemDestinoController extends MyGenericForwardComposer {
|
|||
}
|
||||
parametros.put("CORRIDAS_SELECIONADAS", corridaIds.substring(1, corridaIds.length()));
|
||||
|
||||
Relatorio relatorio = new RelatorioOrigemDestino(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioOrigemDestino(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
@ -13,7 +12,6 @@ import java.util.Map;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -29,7 +27,6 @@ import org.zkoss.zul.Textbox;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioPassageirosViajar;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
|
@ -55,7 +52,7 @@ public class RelatorioPassageirosViajarController extends MyGenericForwardCompos
|
|||
@Autowired
|
||||
private CategoriaService categoriaService;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private ArrayList<Categoria> lsNumCategoria = new ArrayList<Categoria>();
|
||||
@Autowired
|
||||
|
@ -243,7 +240,7 @@ public class RelatorioPassageirosViajarController extends MyGenericForwardCompos
|
|||
parametros.put("LS_CATEGORIA", sbCategoria.toString());
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
Relatorio relatorio = new RelatorioPassageirosViajar(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioPassageirosViajar(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -65,7 +65,7 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
|||
@Autowired
|
||||
private TipoPuntoVentaService tipoPuntoVentaService;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
private List<Estado> lsEstado;
|
||||
private List<Empresa> lsEmpresa;
|
||||
|
@ -340,7 +340,7 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
|||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
|
||||
Relatorio relatorio = new RelatorioReceitaDiariaAgencia(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioReceitaDiariaAgencia(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.zkoss.zul.Datebox;
|
|||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||
import com.rjconsultores.ventaboletos.entidad.GrupoRuta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioResumoLinhas;
|
||||
|
@ -29,9 +28,7 @@ import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioResumoLinhasAnali
|
|||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.GrupoRutaService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
@ -45,7 +42,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
|||
public class RelatorioResumoLinhasController extends MyGenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
@Autowired
|
||||
|
@ -117,9 +114,9 @@ public class RelatorioResumoLinhasController extends MyGenericForwardComposer {
|
|||
parametros.put("FILTROS", filtro.toString());
|
||||
|
||||
if (rd1.isChecked())
|
||||
relatorio = new RelatorioResumoLinhas(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioResumoLinhas(parametros, dataSourceRead.getConnection());
|
||||
else
|
||||
relatorio = new RelatorioResumoLinhasAnalitico(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioResumoLinhasAnalitico(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -57,7 +57,7 @@ public class RelatorioTaxasLinhaController extends MyGenericForwardComposer {
|
|||
@Autowired
|
||||
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
private List<Empresa> lsEmpresa;
|
||||
|
@ -228,7 +228,7 @@ public class RelatorioTaxasLinhaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
relatorio = new RelatorioTaxasLinha(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioTaxasLinha(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class RelatorioTrechoVendidoController extends MyGenericForwardComposer {
|
|||
private static Logger log = Logger.getLogger(RelatorioTrechoVendidoController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -145,7 +145,7 @@ public class RelatorioTrechoVendidoController extends MyGenericForwardComposer {
|
|||
Date now = new Date();
|
||||
parametros.put("NOW", now);
|
||||
|
||||
Relatorio relatorio = new RelatorioTrechoVendido(parametros, dataSource.getConnection());
|
||||
Relatorio relatorio = new RelatorioTrechoVendido(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
@ -224,11 +224,11 @@ public class RelatorioTrechoVendidoController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
public DataSource getDataSource() {
|
||||
return dataSource;
|
||||
return dataSourceRead;
|
||||
}
|
||||
|
||||
public void setDataSource(DataSource dataSource) {
|
||||
this.dataSource = dataSource;
|
||||
this.dataSourceRead = dataSource;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class RelatorioVendasBilheteiroController extends MyGenericForwardCompose
|
|||
private static Logger log = Logger.getLogger(RelatorioVendasBilheteiroController.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
@ -196,7 +196,7 @@ public class RelatorioVendasBilheteiroController extends MyGenericForwardCompose
|
|||
}
|
||||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
relatorio = new RelatorioVendasBilheteiro(parametros, dataSource.getConnection());
|
||||
relatorio = new RelatorioVendasBilheteiro(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
|
|
@ -398,6 +398,11 @@
|
|||
<property name="resourceRef" value="true" />
|
||||
<property name="jndiName" value="${database.jndi.name}" />
|
||||
</bean>
|
||||
|
||||
<bean id="dataSourceRead" class="org.springframework.jndi.JndiObjectFactoryBean">
|
||||
<property name="resourceRef" value="true" />
|
||||
<property name="jndiName" value="${database.read.jndi.name}" />
|
||||
</bean>
|
||||
|
||||
<!-- <bean id="dataSource" -->
|
||||
<!-- class="org.springframework.jdbc.datasource.DriverManagerDataSource"> -->
|
||||
|
|
Loading…
Reference in New Issue