diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTabelaPreco.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTabelaPreco.java index f790717f8..17ff1ae91 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTabelaPreco.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioTabelaPreco.java @@ -11,7 +11,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; public class RelatorioTabelaPreco extends Relatorio { - public RelatorioTabelaPreco(Map parametros, Connection conexao) throws Exception { + public RelatorioTabelaPreco(final Map parametros, Connection conexao) throws Exception { super(parametros, conexao); this.setCustomDataSource(new ArrayDataSource(this) { @@ -19,7 +19,6 @@ public class RelatorioTabelaPreco extends Relatorio { public void initDados() throws Exception { Connection conexao = this.relatorio.getConexao(); NamedParameterStatement stmt = new NamedParameterStatement(conexao, getSql()); - ResultSet rset = stmt.executeQuery(); while (rset.next()) { @@ -71,14 +70,21 @@ public class RelatorioTabelaPreco extends Relatorio { sql.append(" vt.FECINICIOVIGENCIA as dataVigenciaInicial, "); sql.append(" r.RUTA_ID as idLinha "); sql.append("FROM TARIFA t "); - sql.append("INNER JOIN PARADA pOrigem ON t.ORIGEN_ID = pOrigem.PARADA_ID "); - sql.append("INNER JOIN PARADA pDestino ON t.DESTINO_ID = pDestino.PARADA_ID "); - sql.append("INNER JOIN CLASE_SERVICIO cs ON cs.CLASESERVICIO_ID = t.CLASESERVICIO_ID "); - sql.append("INNER JOIN RUTA r ON r.RUTA_ID = t.RUTA_ID "); - sql.append("INNER JOIN MARCA m ON m.MARCA_ID = t.MARCA_ID "); - sql.append("INNER JOIN EMPRESA e ON e.EMPRESA_ID = m.EMPRESA_ID "); - sql.append("INNER JOIN VIGENCIA_TARIFA vt ON vt.VIGENCIATARIFA_ID = t.VIGENCIATARIFA_ID "); - sql.append("WHERE (1 = 1) "); + sql.append("INNER JOIN PARADA pOrigem ON t.ORIGEN_ID = pOrigem.PARADA_ID "); + sql.append("INNER JOIN PARADA pDestino ON t.DESTINO_ID = pDestino.PARADA_ID "); + sql.append("INNER JOIN CLASE_SERVICIO cs ON cs.CLASESERVICIO_ID = t.CLASESERVICIO_ID "); + sql.append("INNER JOIN RUTA r ON r.RUTA_ID = t.RUTA_ID "); + sql.append("INNER JOIN MARCA m ON m.MARCA_ID = t.MARCA_ID "); + sql.append("INNER JOIN EMPRESA e ON e.EMPRESA_ID = m.EMPRESA_ID "); + sql.append("INNER JOIN VIGENCIA_TARIFA vt ON vt.VIGENCIATARIFA_ID = t.VIGENCIATARIFA_ID "); + sql.append("INNER JOIN RUTA_COMBINACION rc ON rc.RUTA_ID = r.RUTA_ID "); + sql.append("INNER JOIN TRAMO tr ON tr.TRAMO_ID = rc.TRAMO_ID "); + sql.append("INNER JOIN ORGAO_CONCEDENTE o ON o.ORGAOCONCEDENTE_ID = r.ORGAOCONCEDENTE_ID "); + sql.append("WHERE rc.INDVENTA = 1 "); + sql.append("AND rc.ACTIVO = 1 "); + sql.append("AND tr.ACTIVO = 1 "); + sql.append("AND tr.ORIGEN_ID = t.ORIGEN_ID "); + sql.append("AND tr.DESTINO_ID = t.DESTINO_ID "); if(parametros.get("VIGENCIA_ID") != null){ sql.append(" AND vt.VIGENCIATARIFA_ID = " + parametros.get("VIGENCIA_ID")); @@ -88,8 +94,12 @@ public class RelatorioTabelaPreco extends Relatorio { sql.append(" AND e.empresa_id = " + parametros.get("EMPRESA_ID")); } - if (parametros.get("RUTA_ID") != null) { - sql.append(" AND r.RUTA_ID = " + parametros.get("RUTA_ID")); + if (parametros.get("LINHAS_ID") != null) { + sql.append(" AND r.RUTA_ID IN (" + parametros.get("LINHAS_ID") + ")"); + } + + if(parametros.get("ORGAO_CONCEDENTE_ID") != null){ + sql.append(" AND r.ORGAOCONCEDENTE_ID = " + parametros.get("ORGAO_CONCEDENTE_ID")); } sql.append( "ORDER BY r.RUTA_ID, vt.FECINICIOVIGENCIA "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_es.properties index b501a1968..b6c693ebd 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_es.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_es.properties @@ -11,6 +11,7 @@ cabecalho.pagina=P cabecalho.de=de cabecalho.filtros=Filtros: + #Labels header label.origem=Origem label.destino=Destino @@ -20,7 +21,8 @@ label.taxaEmbarque=Taxa label.seguro=Seguro label.outros=Outros label.tipoClasse=Classe -label.linha=Linha +label.linha=Linha(s) label.empresa=Empresa label.dataVigencia=Vig阯cia -label.total = Total \ No newline at end of file +label.total=Total +label.orgacaoConcedente=Org鉶 Concedente \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_pt_BR.properties index b501a1968..b6c693ebd 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_pt_BR.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioTabelaPreco_pt_BR.properties @@ -11,6 +11,7 @@ cabecalho.pagina=P cabecalho.de=de cabecalho.filtros=Filtros: + #Labels header label.origem=Origem label.destino=Destino @@ -20,7 +21,8 @@ label.taxaEmbarque=Taxa label.seguro=Seguro label.outros=Outros label.tipoClasse=Classe -label.linha=Linha +label.linha=Linha(s) label.empresa=Empresa label.dataVigencia=Vig阯cia -label.total = Total \ No newline at end of file +label.total=Total +label.orgacaoConcedente=Org鉶 Concedente \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jasper index ad6272611..9813c10c0 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jrxml index 55b9fe71e..bbf0a0c91 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioTabelaPreco.jrxml @@ -1,8 +1,8 @@ - + - + @@ -11,10 +11,12 @@ - + + + @@ -35,7 +37,7 @@ - + @@ -43,6 +45,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -75,7 +178,7 @@ - <band height="119"> + <band height="130"> <textField pattern="" isBlankWhenNull="false"> <reportElement uuid="136a5066-d141-4362-af36-0780f0d16542" mode="Transparent" x="0" y="0" width="457" height="35" forecolor="#000000" backcolor="#FFFFFF"/> <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none"> @@ -141,7 +244,7 @@ ($P{EMPRESA_ID}.toString() + " - " + $P{EMPRESA})]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> - <reportElement uuid="049832ef-f634-42f9-95b1-ac2e1fe23b10" x="0" y="75" width="102" height="18" isPrintWhenDetailOverflows="true"/> + <reportElement uuid="049832ef-f634-42f9-95b1-ac2e1fe23b10" x="0" y="112" width="102" height="18" isPrintWhenDetailOverflows="true"/> <box> <bottomPen lineWidth="0.0"/> </box> @@ -150,14 +253,13 @@ </textElement> <textFieldExpression><![CDATA[$R{label.linha} + ":"]]></textFieldExpression> </textField> - <textField> - <reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="102" y="75" width="586" height="18"/> + <textField isStretchWithOverflow="true"> + <reportElement uuid="df6b8946-988c-479c-8eeb-c8d40c94734b" x="102" y="112" width="586" height="18"/> <textElement/> - <textFieldExpression><![CDATA[$P{RUTA_ID} == null ? -"Todas" : $P{RUTA}]]></textFieldExpression> + <textFieldExpression><![CDATA[$P{LINHAS}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> - <reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="0" y="93" width="102" height="18" isPrintWhenDetailOverflows="true"/> + <reportElement uuid="2d048310-1ec5-4711-b402-75ef3d3500d4" x="0" y="76" width="102" height="18" isPrintWhenDetailOverflows="true"/> <box> <bottomPen lineWidth="0.0"/> </box> @@ -167,28 +269,28 @@ <textFieldExpression><![CDATA[$R{label.dataVigencia} + ":"]]></textFieldExpression> </textField> <textField pattern="dd/MM/yyyy"> - <reportElement uuid="40c47b73-ef86-4b76-a4bb-ec284d4e6f59" x="102" y="93" width="70" height="18"> + <reportElement uuid="40c47b73-ef86-4b76-a4bb-ec284d4e6f59" x="102" y="76" width="70" height="18"> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> </reportElement> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$P{VIGENCIA_INICIAL}]]></textFieldExpression> </textField> <textField pattern="dd/MM/yyyy"> - <reportElement uuid="12564f32-d986-46a6-a184-23b23ba50bcb" x="190" y="93" width="70" height="18"> + <reportElement uuid="12564f32-d986-46a6-a184-23b23ba50bcb" x="190" y="76" width="70" height="18"> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> </reportElement> <textElement/> <textFieldExpression><![CDATA[$P{VIGENCIA_FINAL}]]></textFieldExpression> </textField> <staticText> - <reportElement uuid="bdfc1a2c-9e77-418f-8169-50c67ad7f116" x="172" y="93" width="18" height="18"> + <reportElement uuid="bdfc1a2c-9e77-418f-8169-50c67ad7f116" x="172" y="76" width="18" height="18"> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} != null)]]></printWhenExpression> </reportElement> <textElement textAlignment="Center"/> <text><![CDATA[脿]]></text> </staticText> <staticText> - <reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="102" y="93" width="158" height="18"> + <reportElement uuid="1bba53bd-7d81-491b-b1de-11a0c570c5c7" x="102" y="76" width="158" height="18"> <printWhenExpression><![CDATA[new Boolean($P{VIGENCIA_ID} == null)]]></printWhenExpression> </reportElement> <textElement/> @@ -214,10 +316,26 @@ <textElement textAlignment="Center"/> <textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression> </textField> + <textField> + <reportElement uuid="0241b100-99d6-4e53-abd1-0154defc75bc" x="102" y="94" width="586" height="18"/> + <textElement/> + <textFieldExpression><![CDATA[$P{ORGAO_CONCEDENTE_ID} == null ? +"Todas" : $P{ORGAO_CONCEDENTE}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true"> + <reportElement uuid="afabe5dc-df90-4120-a42a-af1d3e6df583" x="0" y="94" width="102" height="18" isPrintWhenDetailOverflows="true"/> + <box> + <bottomPen lineWidth="0.0"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Top"> + <font size="10" isBold="true" pdfFontName="Helvetica-Bold"/> + </textElement> + <textFieldExpression><![CDATA[$R{label.orgacaoConcedente} + ":"]]></textFieldExpression> + </textField> </band> - + @@ -376,7 +494,7 @@ $F{outros}.doubleValue()]]> - + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoTransacaoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoTransacaoController.java index 77a46f7bd..843f600e4 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoTransacaoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioCancelamentoTransacaoController.java @@ -50,7 +50,7 @@ public class RelatorioCancelamentoTransacaoController extends MyGenericForwardCo public void doAfterCompose(Component comp) throws Exception { lsEmpresa = empresaService.obtenerTodos(); super.doAfterCompose(comp); - } + } /** * @throws Exception diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTabelaPrecoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTabelaPrecoController.java index 5a82aea0f..a2f4a2e66 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTabelaPrecoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioTabelaPrecoController.java @@ -1,5 +1,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -10,21 +12,31 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.zkoss.util.resource.Labels; +import org.zkoss.zhtml.Messagebox; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.Event; import org.zkoss.zul.Comboitem; +import org.zkoss.zul.Paging; import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente; import com.rjconsultores.ventaboletos.entidad.Ruta; import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTabelaPreco; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService; import com.rjconsultores.ventaboletos.service.RutaService; +import com.rjconsultores.ventaboletos.service.TarifaService; import com.rjconsultores.ventaboletos.service.VigenciaTarifaService; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderLinhaRelatorioTabelaPreco; @Controller("relatorioTabelaPrecoController") @Scope("prototype") @@ -36,8 +48,15 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer { private List lsVigencia; private MyComboboxEstandar cmbEmpresa; private List lsEmpresa; - private MyComboboxEstandar cmbRuta; - private List lsRuta; + private MyComboboxEstandar cmbOrgaoConcedente; + private List lsOrcaoConcedente; + @Autowired + private transient PagedListWrapper plwRuta; + + private Paging pagingLinha; + private MyTextbox txtLinha; + private MyListbox linhaList; + private MyListbox linhaSelList; @Autowired private VigenciaTarifaService vigenciaTarifaService; @@ -46,15 +65,22 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer { @Autowired private RutaService rutaService; @Autowired - private DataSource dataSourceRead; - + private OrgaoConcedenteService orgaocConcedenteService; + @Autowired + private TarifaService tarifaService; + + @Autowired + private DataSource dataSourceRead; + @Override public void doAfterCompose(Component comp) throws Exception { lsVigencia = vigenciaTarifaService.obtenerTodos(); lsEmpresa = empresaService.obtenerTodos(); - lsRuta = rutaService.obtenerTodos(); - super.doAfterCompose(comp); - } + lsOrcaoConcedente = orgaocConcedenteService.obtenerTodos(); + super.doAfterCompose(comp); + linhaList.setItemRenderer(new RenderLinhaRelatorioTabelaPreco()); + linhaSelList.setItemRenderer(new RenderLinhaRelatorioTabelaPreco()); + } /** * @throws Exception @@ -63,51 +89,110 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer { @SuppressWarnings({ "rawtypes", "unchecked" }) private void executarRelatorio() throws Exception { { - Relatorio relatorio; - - Map parametros = new HashMap(); - - parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioTabelaPrecoController.window.title")); - parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); - parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario()); - - Comboitem itemVigencia = cmbVigencia.getSelectedItem(); - if(itemVigencia != null){ - VigenciaTarifa vigencia = (VigenciaTarifa) itemVigencia.getValue(); - parametros.put("VIGENCIA_ID", vigencia.getVigenciatarifaId()); - parametros.put("VIGENCIA_INICIAL", vigencia.getFeciniciovigencia()); - parametros.put("VIGENCIA_FINAL", vigencia.getFecfinvigencia()); + Relatorio relatorio; + + Map parametros = new HashMap(); + + parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioTabelaPrecoController.window.title")); + parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString()); + parametros.put("USUARIO_NOME", UsuarioLogado.getUsuarioLogado().getNombusuario()); + + Comboitem itemVigencia = cmbVigencia.getSelectedItem(); + if (itemVigencia != null) { + VigenciaTarifa vigencia = (VigenciaTarifa) itemVigencia.getValue(); + parametros.put("VIGENCIA_ID", vigencia.getVigenciatarifaId()); + parametros.put("VIGENCIA_INICIAL", vigencia.getFeciniciovigencia()); + parametros.put("VIGENCIA_FINAL", vigencia.getFecfinvigencia()); + } + + Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); + if (itemEmpresa != null) { + Empresa empresa = (Empresa) itemEmpresa.getValue(); + parametros.put("EMPRESA_ID", empresa.getEmpresaId()); + parametros.put("EMPRESA", empresa.getNombempresa()); + } + + String rutaIds = ""; + String rutas = ""; + List lsLinhasSelecionadas = new ArrayList(Arrays.asList(linhaSelList.getData())); + if (lsLinhasSelecionadas.isEmpty()) { + rutas = "Todas"; + } else { + for (int i = 0; i < lsLinhasSelecionadas.size(); i++) { + Ruta ruta = lsLinhasSelecionadas.get(i); + rutas += ruta.getDescruta() + ", "; + rutaIds += ruta.getRutaId() + ","; } - - Comboitem itemEmpresa = cmbEmpresa.getSelectedItem(); - if (itemEmpresa != null) { - Empresa empresa = (Empresa) itemEmpresa.getValue(); - parametros.put("EMPRESA_ID", empresa.getEmpresaId()); - parametros.put("EMPRESA", empresa.getNombempresa()); - } - - Comboitem itemRuta = cmbRuta.getSelectedItem(); - if (itemRuta != null) { - Ruta ruta = (Ruta) itemRuta.getValue(); - parametros.put("RUTA_ID", ruta.getRutaId()); - parametros.put("RUTA", ruta.getDescruta()); - } - - relatorio = new RelatorioTabelaPreco(parametros, dataSourceRead.getConnection()); - - Map args = new HashMap(); - args.put("relatorio", relatorio); - - openWindow("/component/reportView.zul", - Labels.getLabel("relatorioTabelaPrecoController.window.title"), args, MODAL); - } - + // removendo ultima virgula + rutaIds = rutaIds.substring(0, rutaIds.length() - 1); + rutas = rutas.substring(0, rutas.length() - 2); + parametros.put("LINHAS_ID", rutaIds); + } + + parametros.put("LINHAS", rutas); + relatorio = new RelatorioTabelaPreco(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioTabelaPrecoController.window.title"), args, MODAL); + } + } - public void onClick$btnExecutarRelatorio(Event ev) throws Exception{ - executarRelatorio(); + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + List lsLinhasSelecionadas = new ArrayList(Arrays.asList(linhaSelList.getData())); + if (lsLinhasSelecionadas.isEmpty()) { + Messagebox.show(Labels.getLabel("relatorioTabelaPrecoController.msg.informarLinha"), + Labels.getLabel("relatorioTabelaPrecoController.window.title"), + Messagebox.OK, Messagebox.EXCLAMATION); + return; + } + if (cmbVigencia.getValue() != null + && cmbEmpresa.getValue() != null) { + executarRelatorio(); + } + } + + public void onClick$btnPesquisa(Event ev) { + executarPesquisa(); + } + + public void onClick$btnLimpar(Event ev) { + linhaList.setData(new ArrayList()); + txtLinha.setText(""); + } + + public void onDoubleClick$linhaSelList(Event ev) { + Ruta linha = (Ruta) linhaSelList.getSelected(); + linhaSelList.removeItem(linha); + } + + public void onDoubleClick$linhaList(Event ev) { + Ruta ruta = (Ruta) linhaList.getSelected(); + linhaSelList.addItemNovo(ruta); + } + + private void executarPesquisa() { + HibernateSearchObject rutaBusqueda = + new HibernateSearchObject(Ruta.class, pagingLinha.getPageSize()); + + rutaBusqueda.addFilterILike("descruta", "%" + txtLinha.getValue() + "%"); + rutaBusqueda.addFilterEqual("activo", Boolean.TRUE); + + plwRuta.init(rutaBusqueda, linhaList, pagingLinha); + + if (linhaList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("relatorioTabelaPrecoController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + } } - public List getLsEmpresa() { return lsEmpresa; @@ -125,22 +210,6 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer { this.cmbEmpresa = cmbEmpresa; } - public MyComboboxEstandar getCmbRuta() { - return cmbRuta; - } - - public void setCmbRuta(MyComboboxEstandar cmbRuta) { - this.cmbRuta = cmbRuta; - } - - public List getLsRuta() { - return lsRuta; - } - - public void setLsRuta(List lsRuta) { - this.lsRuta = lsRuta; - } - public MyComboboxEstandar getCmbVigencia() { return cmbVigencia; } @@ -155,8 +224,22 @@ public class RelatorioTabelaPrecoController extends MyGenericForwardComposer { public void setLsVigencia(List lsVigencia) { this.lsVigencia = lsVigencia; - } - - - + } + + public MyComboboxEstandar getCmbOrgaoConcedente() { + return cmbOrgaoConcedente; + } + + public void setCmbOrgaoConcedente(MyComboboxEstandar cmbOrgaoConcedente) { + this.cmbOrgaoConcedente = cmbOrgaoConcedente; + } + + public List getLsOrcaoConcedente() { + return lsOrcaoConcedente; + } + + public void setLsOrcaoConcedente(List lsOrcaoConcedente) { + this.lsOrcaoConcedente = lsOrcaoConcedente; + } + } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderLinhaRelatorioTabelaPreco.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderLinhaRelatorioTabelaPreco.java new file mode 100644 index 000000000..55064da12 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderLinhaRelatorioTabelaPreco.java @@ -0,0 +1,24 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.web.utilerias.render; + +import org.zkoss.zul.Listcell; +import org.zkoss.zul.Listitem; +import org.zkoss.zul.ListitemRenderer; + +import com.rjconsultores.ventaboletos.entidad.Ruta; + +public class RenderLinhaRelatorioTabelaPreco implements ListitemRenderer { + + @Override + public void render(Listitem lstm, Object o) throws Exception { + Ruta ruta = (Ruta) o; + + Listcell lc = new Listcell(ruta.getDescruta()); + lc.setParent(lstm); + + lstm.setAttribute("data", ruta); + } + +} diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index 8a27eaa7a..c87dae111 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -4193,8 +4193,10 @@ relatorioCancelamentoTransacaoController.lbBilheteiro.value = Bilheteiro #Relatorio de Tabela Preco relatorioTabelaPrecoController.window.title = Relat贸rio de Tabela de Pre莽os relatorioTabelaPrecoController.vigencia = Vig锚ncia +relatorioTabelaPrecoController.orgaoConcedente.value = Org茫o Concedente relatorioTabelaPrecoController.lbEmpresa.value = Empresa relatorioTabelaPrecoController.lbLinha.value = Linha +relatorioTabelaPrecoController.msg.informarLinha = 脡 obrigat贸rio informar pelo menos uma linha no filtro. # Editar Motivo cancelaci贸n equivalencia editarMotivoCancelacionEquivalenciaController.window.title = Equivalencia motivo de cancelaci贸n diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 7fbdce252..a7e5f8875 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -4255,8 +4255,10 @@ relatorioCancelamentoTransacaoController.lbBilheteiro.value = Bilheteiro #Relatorio de Tabela Preco relatorioTabelaPrecoController.window.title = Relat贸rio de Tabela de Pre莽os relatorioTabelaPrecoController.vigencia = Vig锚ncia +relatorioTabelaPrecoController.orgaoConcedente.value = Org茫o Concedente relatorioTabelaPrecoController.lbEmpresa.value = Empresa relatorioTabelaPrecoController.lbLinha.value = Linha +relatorioTabelaPrecoController.msg.informarLinha = 脡 obrigat贸rio informar pelo menos uma linha no filtro. # Editar Motivo cancelamento equivalencia editarMotivoCancelacionEquivalenciaController.window.title = Equivalencia Motivo de Cancelamento diff --git a/web/gui/relatorios/filtroRelatorioTabelaPreco.zul b/web/gui/relatorios/filtroRelatorioTabelaPreco.zul index a2b0b0da2..838518259 100644 --- a/web/gui/relatorios/filtroRelatorioTabelaPreco.zul +++ b/web/gui/relatorios/filtroRelatorioTabelaPreco.zul @@ -7,7 +7,7 @@ + height="312px" width="550px" border="normal"> @@ -23,9 +23,18 @@ buttonVisible="true" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" model="@{winFiltroRelatorioTabelaPreco$composer.lsVigencia}" + width="100%" + constraint="no empty" /> + + + -