Série para venda embarcada

bug#13748
dev:trevezani
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@91512 d1611594-4594-4d17-8e1d-87c2c4800839
master
alberto 2019-04-03 14:34:55 +00:00
parent a129b1e883
commit 6ace6bc67f
2 changed files with 46 additions and 12 deletions

View File

@ -70,10 +70,30 @@ public class BusquedaAutorizacaoUsoSerieEmbarcadaController extends MyGenericFor
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
this.lsEmpresa = UsuarioLogado.getUsuarioLogado().getEmpresa();
this.lsDescricao = dispositivoEmbarcadaDAO.buscarTodos();
this.lsEstado = estadoService.obtenerTodos();
Empresa todasEmpresas = new Empresa();
todasEmpresas.setEmpresaId(-1);
todasEmpresas.setNombempresa("TODAS");
this.lsEmpresa.add(todasEmpresas);
Estado todosEstados = new Estado();
todosEstados.setEstadoId(-1);
todosEstados.setCveestado("TODOS");
todosEstados.setNombestado("TODOS");
this.lsEstado.add(todosEstados);
DispositivoEmbarcada todasDescricoes = new DispositivoEmbarcada();
todasDescricoes.setDispositivoEmbarcadaId(-1l);
todasDescricoes.setDescricao("TODAS");
this.lsDescricao.add(todasDescricoes);
autorizacaoUsoSerieEmbarcadaList.setItemRenderer(new RenderAutorizacaoUsoSerieEmbarcada());
autorizacaoUsoSerieEmbarcadaList.addEventListener("onDoubleClick", new EventListener() {
@ -121,22 +141,34 @@ public class BusquedaAutorizacaoUsoSerieEmbarcadaController extends MyGenericFor
if (cmbEmpresa.getSelectedItem() != null) {
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("empresa.empresaId", e.getEmpresaId());
if (e.getEmpresaId().intValue() != -1) {
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("empresa.empresaId", e.getEmpresaId());
}
}
if (cmbPuntoVenta.getSelectedItem() != null) {
PuntoVenta p = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue();
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("puntoventa.puntoventaId", p.getPuntoventaId());
if (p.getPuntoventaId().intValue() != -1) {
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("puntoventa.puntoventaId", p.getPuntoventaId());
}
}
if (cmbDescricao.getSelectedItem() != null) {
DispositivoEmbarcada d = (DispositivoEmbarcada) cmbDescricao.getSelectedItem().getValue();
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("dispositivoEmbarcada.dispositivoEmbarcadaId", d.getDispositivoEmbarcadaId());
if (d.getDispositivoEmbarcadaId().intValue() != -1) {
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("dispositivoEmbarcada.dispositivoEmbarcadaId", d.getDispositivoEmbarcadaId());
}
}
if (cmbEstado.getSelectedItem() != null) {
Estado e = (Estado) cmbEstado.getSelectedItem().getValue();
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("estado.estadoId", e.getEstadoId());
if (e.getEstadoId().intValue() != -1) {
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("estado.estadoId", e.getEstadoId());
}
}
autorizacaoUsoSerieEmbarcadaBusqueda.addFilterEqual("activo", Boolean.TRUE);
@ -162,17 +194,17 @@ public class BusquedaAutorizacaoUsoSerieEmbarcadaController extends MyGenericFor
refreshLista();
}
public void onClick$btnExportar(Event ev) throws SQLException, Exception {
excutarRelatorios();
}
public void onClick$btnExportarPdf(Event ev) throws SQLException, Exception {
public void onClick$btnNovo(Event ev) {
editar(new CtrlSerieEmbarcada());
}
public void excutarRelatorios() throws SQLException, Exception {
public void onClick$btnExportarXls(Event ev) throws SQLException, Exception {
}
public void onClick$btnNovo(Event ev) {
editar(new CtrlSerieEmbarcada());
}
public Combobox getCmbEmpresa() {
return cmbEmpresa;

View File

@ -90,8 +90,10 @@
<paging id="pagingAutorizacaoUsoSerieEmbarcada" pageSize="20" />
<toolbar>
<button id="btnExportar"
label="${c:l('autorizacaoUsoSerieEmbarcadaController.btnExportar.label')}" />
<button id="btnExportarPdf" image="/gui/img/pdf.png"
label="${c:l('dispositivoVendaEmbarcadaController.btnExportarPdf.label')}" />
<button id="btnExportarXls" image="/gui/img/excel.png"
label="${c:l('dispositivoVendaEmbarcadaController.btnExportarXls.label')}" />
</toolbar>
<listbox id="autorizacaoUsoSerieEmbarcadaList"