fixes bug#20983
qua: dev:Valdevir git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@104947 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e80faa13f4
commit
0e32a2dba8
|
@ -84,7 +84,7 @@ public class RelatorioLinhasHorarioSimplificado extends Relatorio {
|
||||||
|
|
||||||
Integer tipoServico = (Integer) parametros.get("TIPOSERVICIO_ID");
|
Integer tipoServico = (Integer) parametros.get("TIPOSERVICIO_ID");
|
||||||
|
|
||||||
String sql = getSql(lsNumLinha, lsNumServico, empresa, tipoServico, grupoRuta);
|
String sql = getSql(lsNumLinha, lsNumServico, empresa, tipoServico, grupoRuta, (Boolean)parametros.get("ISSENTIDOIDA"), (Boolean)parametros.get("ISSENTIDOVOLTA"));
|
||||||
|
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql);
|
||||||
ResultSet rset = null;
|
ResultSet rset = null;
|
||||||
|
@ -413,7 +413,7 @@ public class RelatorioLinhasHorarioSimplificado extends Relatorio {
|
||||||
protected void processaParametros() throws Exception {
|
protected void processaParametros() throws Exception {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSql(ArrayList<Ruta> lsNumLinha, ArrayList<Corrida> lsNumServico, Empresa empresa, Integer tipoServico, GrupoRuta grupoRuta) {
|
private String getSql(ArrayList<Ruta> lsNumLinha, ArrayList<Corrida> lsNumServico, Empresa empresa, Integer tipoServico, GrupoRuta grupoRuta, Boolean isSentidoIda, Boolean isSentidoVolta) {
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer();
|
StringBuffer sql = new StringBuffer();
|
||||||
sql.append(" SELECT ");
|
sql.append(" SELECT ");
|
||||||
|
@ -623,6 +623,14 @@ public class RelatorioLinhasHorarioSimplificado extends Relatorio {
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.append(tipoServico > 0 ? " AND C.TIPOSERVICIO_ID = " + tipoServico + " " : "");
|
sql.append(tipoServico > 0 ? " AND C.TIPOSERVICIO_ID = " + tipoServico + " " : "");
|
||||||
|
|
||||||
|
if(Boolean.TRUE.equals(isSentidoIda)) {
|
||||||
|
sql.append(" AND R.INDSENTIDOIDA =1 ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Boolean.TRUE.equals(isSentidoVolta)) {
|
||||||
|
sql.append(" AND R.INDSENTIDOIDA = 0 ");
|
||||||
|
}
|
||||||
|
|
||||||
sql.append(" AND C.ACTIVO <> 0 AND ORIGEM.ACTIVO = 1 AND DESTINO.ACTIVO = 1 AND TB2.ORIGEM = ORIGEM.CVEPARADA AND TB2.DESTINO = DESTINO.CVEPARADA ");
|
sql.append(" AND C.ACTIVO <> 0 AND ORIGEM.ACTIVO = 1 AND DESTINO.ACTIVO = 1 AND TB2.ORIGEM = ORIGEM.CVEPARADA AND TB2.DESTINO = DESTINO.CVEPARADA ");
|
||||||
sql.append("AND R.ACTIVO = 1 AND RO.ACTIVO = 1 AND DA.ACTIVO = 1 AND CS.ACTIVO = 1 ");
|
sql.append("AND R.ACTIVO = 1 AND RO.ACTIVO = 1 AND DA.ACTIVO = 1 AND CS.ACTIVO = 1 ");
|
||||||
|
|
|
@ -91,6 +91,8 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
||||||
private Checkbox chkSimplificado;
|
private Checkbox chkSimplificado;
|
||||||
private Timebox horaInicial;
|
private Timebox horaInicial;
|
||||||
private Timebox horaFinal;
|
private Timebox horaFinal;
|
||||||
|
private Checkbox chkIndSentidoIda;
|
||||||
|
private Checkbox chkIndSentidoVolta;
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
private void executarRelatorio() throws Exception {
|
private void executarRelatorio() throws Exception {
|
||||||
|
@ -167,6 +169,8 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
||||||
if(horaFinal.getValue()!= null){
|
if(horaFinal.getValue()!= null){
|
||||||
parametros.put("HORA_FINAL", horaFinal.getValue());
|
parametros.put("HORA_FINAL", horaFinal.getValue());
|
||||||
}
|
}
|
||||||
|
parametros.put("ISSENTIDOIDA", chkIndSentidoIda.isChecked());
|
||||||
|
parametros.put("ISSENTIDOVOLTA", chkIndSentidoVolta.isChecked() );
|
||||||
relatorio = new RelatorioLinhasHorarioSimplificado(parametros, dataSourceRead.getConnection());
|
relatorio = new RelatorioLinhasHorarioSimplificado(parametros, dataSourceRead.getConnection());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,6 +646,8 @@ relatorioLinhasHorarioController.rdTodos.label = Todos
|
||||||
relatorioLinhasHorarioController.lblSimplificado.value = Emite relatório Simplificado
|
relatorioLinhasHorarioController.lblSimplificado.value = Emite relatório Simplificado
|
||||||
relatorioLinhasHorarioController.lbHoraSaidaInicial.value = Hora Saída
|
relatorioLinhasHorarioController.lbHoraSaidaInicial.value = Hora Saída
|
||||||
relatorioLinhasHorarioController.lbHoraSaidaFinal.value = à
|
relatorioLinhasHorarioController.lbHoraSaidaFinal.value = à
|
||||||
|
relatorioLinhasHorarioController.chKIda.value = Linha Ida
|
||||||
|
relatorioLinhasHorarioController.chKVolta.value = Linha Volta
|
||||||
|
|
||||||
#Relatorio Trecho Vendido
|
#Relatorio Trecho Vendido
|
||||||
relatorioTrechoVendidoController.lbDataIni.value = Data Inicial
|
relatorioTrechoVendidoController.lbDataIni.value = Data Inicial
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
|
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="13%" />
|
<column width="12%" />
|
||||||
<column width="37%" />
|
<column width="38%" />
|
||||||
<column width="13%" />
|
<column width="12%" />
|
||||||
<column width="37%" />
|
<column width="38%" />
|
||||||
</columns>
|
</columns>
|
||||||
|
|
||||||
<rows>
|
<rows>
|
||||||
|
@ -46,6 +46,22 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
</timebox>
|
</timebox>
|
||||||
</row>
|
</row>
|
||||||
|
<row height="30px" >
|
||||||
|
<cell colspan="4">
|
||||||
|
<checkbox id="chkIndSentidoIda"
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.chKIda.value')}" width="100px" >
|
||||||
|
<attribute name="onFocus">
|
||||||
|
chkIndSentidoVolta.setChecked(false);
|
||||||
|
</attribute>
|
||||||
|
</checkbox>
|
||||||
|
<checkbox id="chkIndSentidoVolta"
|
||||||
|
label="${c:l('relatorioLinhasHorarioController.chKVolta.value')}" width="100px" >
|
||||||
|
<attribute name="onFocus">
|
||||||
|
chkIndSentidoIda.setChecked(false);
|
||||||
|
</attribute>
|
||||||
|
</checkbox>
|
||||||
|
</cell>
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue