From 82d1329c391789d3e884b250a2d5b4b9a741110e Mon Sep 17 00:00:00 2001 From: rodrigo Date: Thu, 2 May 2013 14:21:54 +0000 Subject: [PATCH] git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@26110 d1611594-4594-4d17-8e1d-87c2c4800839 --- ...quedaConfiguracionCategoriaController.java | 17 +- ...ditarConfiguracionCategoriaController.java | 32 +-- .../seguridad/BusquedaMenuController.java | 225 +++++++++--------- .../seguridad/EditarEstacionController.java | 81 ++++++- .../web/utilerias/MyComboboxEstandar.java | 36 ++- .../ventaboletos/web/utilerias/MyListbox.java | 1 + .../ItemMenuConfiguracionCategorias.java | 4 +- .../RenderConfiguracionCategoriaDecuento.java | 49 ++-- .../web/utilerias/render/RenderEstacion.java | 6 - .../render/RenderEstacionImpresora.java | 31 +++ src/java/rebel.xml | 19 -- src/java/spring-config.xml | 2 + web/WEB-INF/i3-label_pt_BR.label | 4 +- .../busquedaConfiguracionCategorias.zul | 106 +++++---- .../editarConfiguracionCategorias.zul | 164 ++++++++----- web/gui/seguridad/busquedaEstacion.zul | 8 - web/gui/seguridad/editarEstacion.zul | 75 ++++-- 17 files changed, 515 insertions(+), 345 deletions(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacionImpresora.java delete mode 100644 src/java/rebel.xml diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/BusquedaConfiguracionCategoriaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/BusquedaConfiguracionCategoriaController.java index 36e09eb90..135358318 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/BusquedaConfiguracionCategoriaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/BusquedaConfiguracionCategoriaController.java @@ -4,16 +4,9 @@ */ package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales; -import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl; -import com.rjconsultores.ventaboletos.entidad.Empresa; -import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; -import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; -import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; -import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; -import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; -import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoriaDescuento; import java.util.HashMap; import java.util.Map; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; @@ -25,6 +18,14 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zul.Paging; import org.zkoss.zul.Textbox; +import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl; +import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; +import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject; +import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderCategoriaDescuento; + /** * * @author rodrigo diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConfiguracionCategoriaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConfiguracionCategoriaController.java index 29a72556c..0674c4c9f 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConfiguracionCategoriaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/configuracioneccomerciales/EditarConfiguracionCategoriaController.java @@ -135,11 +135,14 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp private Radio radioImp; private Radio radioImprimePassagem; private Radio rdCuotaSi; + private Radio radioNaoImprimePassagem; + private Radio rdVendaAntecipadaSi; + private Radio rdVendaAntecipadaNo; + private Radio rdVendeAbertoSim; private Row rowTrecho;; private Row rowTiempo;; private Radio rdTrecho; private Timebox timeTempoPermitir; - private Radio radioNaoImprimePassagem; private Tab tabEmpresa; private Tab tabDesconto; private Tab tabMarca; @@ -152,9 +155,6 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp private Label lblMsgTiempo; private Spinner spnHora; private Spinner spnMinuto; - private Radio rdVendaAntecipadaSi; - private Radio rdVendaAntecipadaNo; - public List getLsCategorias() { return lsCategorias; @@ -433,8 +433,7 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp } /* - * Nao deixa editar periodos para novos tipo de pasajero Desa forma nao - * traslapa os periodos. + * Nao deixa editar periodos para novos tipo de pasajero Desa forma nao traslapa os periodos. */ if (categoriaCtrl.getCategoriactrlId() == null) { Messagebox.show(Labels.getLabel("editarConfiguracionCategoriaController.MSG.editarPeriodo"), @@ -601,18 +600,18 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp cmbCategorias.focus(); return; } - - if (rdVendaAntecipadaSi.isChecked()){ - int hora = (spnHora.getValue() == null)?0:spnHora.getValue(); - int minuto = (spnMinuto.getValue() == null)?0:spnMinuto.getValue(); - if ( (hora + minuto) == 0){ + + if (rdVendaAntecipadaSi.isChecked()) { + int hora = (spnHora.getValue() == null) ? 0 : spnHora.getValue(); + int minuto = (spnMinuto.getValue() == null) ? 0 : spnMinuto.getValue(); + if ((hora + minuto) == 0) { Messagebox.show( Labels.getLabel("editarConfiguracionCategoriaController.msg.validacaoVentaAntecipada"), Labels.getLabel("editarConfiguracionCategoriaController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION); spnHora.focus(); - + return; } } @@ -643,13 +642,14 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp cDescuento.setIndImportePedagio(chkPrecoPedagio.isChecked()); cDescuento.setIndImporteSeguro(chkPrecoSeguro.isChecked()); cDescuento.setIndImporteTxEmbarque(chkPrecoTxEmbarque.isChecked()); + cDescuento.setIndVentaAbierto(rdVendeAbertoSim.isSelected()); - if (rdVendaAntecipadaSi.isChecked()){ + if (rdVendaAntecipadaSi.isChecked()) { cDescuento.setTiempoDesactivar(spnHora.getValue(), spnMinuto.getValue()); - }else{ + } else { cDescuento.setTiempoActivar(spnHora.getValue(), spnMinuto.getValue()); } - + if (cmbIndGeneraFeriado.getSelectedItem() != null) { cDescuento.setIndAplicaFeriado((String) cmbIndGeneraFeriado.getSelectedItem().getValue()); } @@ -1204,11 +1204,13 @@ public class EditarConfiguracionCategoriaController extends MyGenericForwardComp spnMinuto.setValue(0); lblMsgTiempo.setValue(Labels.getLabel("editarConfiguracionCategoriaController.lblVentaAntecipadaTempoDesactivar.value")); } + public void onClick$rdVendaAntecipadaNo(Event ev) { spnHora.setValue(0); spnMinuto.setValue(0); lblMsgTiempo.setValue(Labels.getLabel("editarConfiguracionCategoriaController.lblVentaAntecipadaTempoActivar.value")); } + public void onClick$rdCuotaSi(Event ev) { mudarCamposCuota(true); } diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaMenuController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaMenuController.java index 0a128e0fd..f77970526 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaMenuController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaMenuController.java @@ -30,154 +30,155 @@ import org.zkoss.zul.Paging; import org.zkoss.zul.Textbox; /** - * + * * @author rodrigo */ @Controller("busquedaMenuController") @Scope("prototype") public class BusquedaMenuController extends MyGenericForwardComposer { - @Autowired - private transient PagedListWrapper plwMenu; - @Autowired - private SistemaService sistemaService; - private MyListbox menuList; - private Paging pagingMenu; - private Textbox txtNombFuncion; - private Textbox txtDescRuta; - private Combobox cmbSistema; - private Intbox txtID; - private List lsSistema; + private static final long serialVersionUID = 1L; + @Autowired + private transient PagedListWrapper plwMenu; + @Autowired + private SistemaService sistemaService; + private MyListbox menuList; + private Paging pagingMenu; + private Textbox txtNombFuncion; + private Textbox txtDescRuta; + private Combobox cmbSistema; + private Intbox txtID; + private List lsSistema; - public Combobox getCmbSistema() { - return cmbSistema; - } + public Combobox getCmbSistema() { + return cmbSistema; + } - public void setCmbSistema(Combobox cmbSistema) { - this.cmbSistema = cmbSistema; - } + public void setCmbSistema(Combobox cmbSistema) { + this.cmbSistema = cmbSistema; + } - public MyListbox getMenuList() { - return menuList; - } + public MyListbox getMenuList() { + return menuList; + } - public void setMenuList(MyListbox menuList) { - this.menuList = menuList; - } + public void setMenuList(MyListbox menuList) { + this.menuList = menuList; + } - public Textbox getTxtDescRuta() { - return txtDescRuta; - } + public Textbox getTxtDescRuta() { + return txtDescRuta; + } - public void setTxtDescRuta(Textbox txtDescRuta) { - this.txtDescRuta = txtDescRuta; - } + public void setTxtDescRuta(Textbox txtDescRuta) { + this.txtDescRuta = txtDescRuta; + } - public Intbox getTxtID() { - return txtID; - } + public Intbox getTxtID() { + return txtID; + } - public void setTxtID(Intbox txtID) { - this.txtID = txtID; - } + public void setTxtID(Intbox txtID) { + this.txtID = txtID; + } - public Textbox getTxtNombFuncion() { - return txtNombFuncion; - } + public Textbox getTxtNombFuncion() { + return txtNombFuncion; + } - public void setTxtNombFuncion(Textbox txtNombFuncion) { - this.txtNombFuncion = txtNombFuncion; - } + public void setTxtNombFuncion(Textbox txtNombFuncion) { + this.txtNombFuncion = txtNombFuncion; + } - public List getLsSistema() { - return lsSistema; - } + public List getLsSistema() { + return lsSistema; + } - public void setLsSistema(List lsSistema) { - this.lsSistema = lsSistema; - } + public void setLsSistema(List lsSistema) { + this.lsSistema = lsSistema; + } - @Override - public void doAfterCompose(Component comp) throws Exception { - super.doAfterCompose(comp); + @Override + public void doAfterCompose(Component comp) throws Exception { + super.doAfterCompose(comp); - lsSistema = sistemaService.obtenerTodos(); + lsSistema = sistemaService.obtenerTodos(); - menuList.setItemRenderer(new RenderMenu()); - menuList.addEventListener("onDoubleClick", new EventListener() { + menuList.setItemRenderer(new RenderMenu()); + menuList.addEventListener("onDoubleClick", new EventListener() { - @Override - public void onEvent(Event event) throws Exception { - FuncionSistema s = (FuncionSistema) menuList.getSelected(); - verMenu(s); - } - }); + @Override + public void onEvent(Event event) throws Exception { + FuncionSistema s = (FuncionSistema) menuList.getSelected(); + verMenu(s); + } + }); - refreshLista(); + refreshLista(); - txtNombFuncion.focus(); - } + txtNombFuncion.focus(); + } - private void verMenu(FuncionSistema fs) { - if (fs == null) { - return; - } + private void verMenu(FuncionSistema fs) { + if (fs == null) { + return; + } - Map args = new HashMap(); - args.put("menu", fs); - args.put("menuList", menuList); + Map args = new HashMap(); + args.put("menu", fs); + args.put("menuList", menuList); - openWindow("/gui/seguridad/editarMenu.zul", - Labels.getLabel("editarMenuController.window.title"), args, MODAL); - } + openWindow("/gui/seguridad/editarMenu.zul", + Labels.getLabel("editarMenuController.window.title"), args, MODAL); + } - private void refreshLista() { - HibernateSearchObject menuBusqueda = - new HibernateSearchObject(FuncionSistema.class, - pagingMenu.getPageSize()); + private void refreshLista() { + HibernateSearchObject menuBusqueda = + new HibernateSearchObject(FuncionSistema.class, + pagingMenu.getPageSize()); - String nombFuncion = txtNombFuncion.getText(); - if (nombFuncion != null) { - menuBusqueda.addFilterLike("nombfuncion", "%" + nombFuncion.trim().concat("%")); - } + String nombFuncion = txtNombFuncion.getText(); + if (nombFuncion != null) { + menuBusqueda.addFilterLike("nombfuncion", "%" + nombFuncion.trim().concat("%")); + } - String descRuta = txtDescRuta.getText(); - if (descRuta != null) { - menuBusqueda.addFilterLike("descruta", "%" + descRuta.trim().concat("%")); - } + String descRuta = txtDescRuta.getText(); + if (descRuta != null) { + menuBusqueda.addFilterLike("descruta", "%" + descRuta.trim().concat("%")); + } - Comboitem itemSistema = cmbSistema.getSelectedItem(); - if (itemSistema != null) { - Sistema sistema = (Sistema) itemSistema.getValue(); - menuBusqueda.addFilterEqual("sistema", sistema); - } + Comboitem itemSistema = cmbSistema.getSelectedItem(); + if (itemSistema != null) { + Sistema sistema = (Sistema) itemSistema.getValue(); + menuBusqueda.addFilterEqual("sistema", sistema); + } - menuBusqueda.addFilterEqual("funcionsistemaId", txtID.getValue()); + menuBusqueda.addFilterEqual("funcionsistemaId", txtID.getValue()); - menuBusqueda.addSortAsc("nombfuncion"); - menuBusqueda.addFilterEqual("activo", Boolean.TRUE); + menuBusqueda.addSortAsc("nombfuncion"); + menuBusqueda.addFilterEqual("activo", Boolean.TRUE); - plwMenu.init(menuBusqueda, menuList, pagingMenu); + plwMenu.init(menuBusqueda, menuList, pagingMenu); - if (menuList.getData().length == 0) { - try { - Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), - Labels.getLabel("busquedaMenuController.window.title"), - Messagebox.OK, Messagebox.INFORMATION); - } catch (InterruptedException ex) { - } - } - } + if (menuList.getData().length == 0) { + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("busquedaMenuController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + } + } + } - public void onClick$btnPesquisa(Event ev) { - refreshLista(); - } + public void onClick$btnPesquisa(Event ev) { + refreshLista(); + } - public void onClick$btnRefresh(Event ev) { - refreshLista(); - } + public void onClick$btnRefresh(Event ev) { + refreshLista(); + } - public void onClick$btnNovo(Event ev) { - verMenu(new FuncionSistema()); - } + public void onClick$btnNovo(Event ev) { + verMenu(new FuncionSistema()); + } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java index 95c5ea357..b53bdc4d7 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java @@ -24,9 +24,11 @@ import org.zkoss.zul.Combobox; import org.zkoss.zul.Intbox; import org.zkoss.zul.Longbox; import org.zkoss.zul.Textbox; +import org.zkoss.zul.api.Comboitem; import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Estacion; +import com.rjconsultores.ventaboletos.entidad.EstacionImpresora; import com.rjconsultores.ventaboletos.entidad.EstacionSitef; import com.rjconsultores.ventaboletos.exception.BusinessException; import com.rjconsultores.ventaboletos.service.EstacionService; @@ -35,6 +37,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyListbox; import com.rjconsultores.ventaboletos.web.utilerias.render.EstacionSitefRender; +import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacionImpresora; /** * @@ -49,7 +52,9 @@ public class EditarEstacionController extends MyGenericForwardComposer { private EstacionService estacionService; private MyListbox estacionList; private MyListbox estacionSitefList; + private MyListbox estacionImpresoraList; private Combobox cmbEmpresa; + private Combobox cmbEmpresaImpressora; private Button btnApagar; private Textbox txtDescEstacion; private Textbox txtDescMac; @@ -62,7 +67,10 @@ public class EditarEstacionController extends MyGenericForwardComposer { private Intbox txtNumPdv; private List lsEmpresa; private List lsEstacionSitef; + private List lsEstacionImpresora; private static Logger log = Logger.getLogger(EditarEstacionController.class); + private Textbox txtNomImpressoara; + private Textbox txtNomeArquivoLayout; public Estacion getEstacion() { return estacion; @@ -85,6 +93,7 @@ public class EditarEstacionController extends MyGenericForwardComposer { estacion = (Estacion) Executions.getCurrent().getArg().get("estacion"); estacionList = (MyListbox) Executions.getCurrent().getArg().get("estacionList"); estacionSitefList.setItemRenderer(new EstacionSitefRender()); + estacionImpresoraList.setItemRenderer(new RenderEstacionImpresora()); if (estacion.getEstacionId() == null) { btnApagar.setVisible(Boolean.FALSE); @@ -103,14 +112,19 @@ public class EditarEstacionController extends MyGenericForwardComposer { txtDescMac.setText(descMac.toUpperCase()); } + estacion = estacionService.obtenerID(estacion.getEstacionId()); + lsEstacionSitef = estacion.getEstacionSitefList(); estacionSitefList.setData(lsEstacionSitef); + lsEstacionImpresora = estacion.getLsEstacionImpresora(); + estacionImpresoraList.setData(lsEstacionImpresora); } txtDescEstacion.focus(); } + @SuppressWarnings("unchecked") public void onClick$btnSalvar(Event ev) throws InterruptedException { cmbPuntoVenta.getValue(true); txtNumEmpresa.getValue(); @@ -128,6 +142,8 @@ public class EditarEstacionController extends MyGenericForwardComposer { try { estacion.setEstacionSitefList(estacionSitefList.getListData()); + estacion.setLsEstacionImpresora(estacionImpresoraList.getListData()); + estacionService.suscribirActualizar(estacion); Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"), Labels.getLabel("editarEstacionController.window.title"), @@ -168,7 +184,6 @@ public class EditarEstacionController extends MyGenericForwardComposer { } public void onClick$btnAddConfSitef(Event e) { - if ((cmbEmpresa.getSelectedItem() == null) || (txtNumEmpresa.getValue() == null) || (txtNumFilial.getValue() == null) || (txtNumPdv.getValue() == null) || (txtIpServidor.getValue() == null)) { Clients.alert(Labels.getLabel("editarEstacionController.MSG.sitef"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION); @@ -206,11 +221,10 @@ public class EditarEstacionController extends MyGenericForwardComposer { es.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); es.setIpServidor(txtIpServidor.getValue()); - estacionSitefList.addItem(es); + estacionSitefList.addItemNovo(es); } public void onClick$btnRemConfSitef(Event e) { - if (estacionSitefList.getSelected() == null) { return; } @@ -226,6 +240,67 @@ public class EditarEstacionController extends MyGenericForwardComposer { estacionSitefList.addItemNovo(es); } + } + public void onClick$btnAddEstacionImpresora(Event ev) { + Comboitem cbiEmpresa = cmbEmpresaImpressora.getSelectedItem(); + if (cbiEmpresa != null) { + Empresa empresa = (Empresa) cbiEmpresa.getValue(); + + + + final Integer empresaId = empresa.getEmpresaId(); + + boolean empresaExiste = CollectionUtils.exists(estacionImpresoraList.getListData(), new Predicate() { + + @Override + public boolean evaluate(Object obj) { + + EstacionImpresora e = (EstacionImpresora) obj; + + return (e.getActivo() && e.getEmpresa().getEmpresaId().equals(empresaId)); + + } + }); + + if (empresaExiste) { + Clients.alert(Labels.getLabel("editarEstacionController.MSG.empresaYaExiste"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION); + + return; + } + + + String nomeImpresora = txtNomImpressoara.getValue(); + String nomeArquivoLayout = txtNomeArquivoLayout.getValue(); + + EstacionImpresora estacionImpresora = new EstacionImpresora(); + estacionImpresora.setEmpresa(empresa); + estacionImpresora.setEstacion(estacion); + estacionImpresora.setNombImpresora(nomeImpresora); + estacionImpresora.setNombArchivoLayout(nomeArquivoLayout); + estacionImpresora.setActivo(Boolean.TRUE); + estacionImpresora.setFecmodif(Calendar.getInstance().getTime()); + estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + + estacionImpresoraList.addItemNovo(estacionImpresora); + } + } + + public void onClick$btnRemEstacionImpresora(Event ev) { + if (estacionImpresoraList.getSelected() == null) { + return; + } + + EstacionImpresora ei = (EstacionImpresora) estacionImpresoraList.getSelected(); + + estacionImpresoraList.removeSelectedItem(); + + if (ei.getEstacionImpresoraId() != null) { + ei.setFecmodif(Calendar.getInstance().getTime()); + ei.setActivo(Boolean.FALSE); + ei.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId()); + + estacionImpresoraList.addItemNovo(ei); + } } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyComboboxEstandar.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyComboboxEstandar.java index 565888c27..b777d30fa 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyComboboxEstandar.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyComboboxEstandar.java @@ -9,32 +9,28 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zul.Combobox; /** - * + * * @author gleimar */ public class MyComboboxEstandar extends Combobox { - public MyComboboxEstandar() { - super(); + private static final long serialVersionUID = 1L; - this.setAutodrop(true); - this.setAutocomplete(true); - this.setReadonly(true); - this.setCtrlKeys("#del"); + public MyComboboxEstandar() { + super(); - this.addEventListener("onCtrlKey", new EventListener() { + this.setAutodrop(true); + this.setAutocomplete(true); + this.setReadonly(true); + this.setCtrlKeys("#del"); - @Override - public void onEvent(Event event) throws Exception { - MyComboboxEstandar.this.setSelectedItem(null); - MyComboboxEstandar.this.close(); - } - }); - - - - } - + this.addEventListener("onCtrlKey", new EventListener() { - + @Override + public void onEvent(Event event) throws Exception { + MyComboboxEstandar.this.setSelectedItem(null); + MyComboboxEstandar.this.close(); + } + }); + } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyListbox.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyListbox.java index 89baf443d..a8090f0ac 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyListbox.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/MyListbox.java @@ -16,6 +16,7 @@ import org.zkoss.zul.Listbox; */ public class MyListbox extends Listbox { + private static final long serialVersionUID = 1L; private Object selected = null; private ListModelList modelList = new ListModelList(); diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/confcomerciales/ItemMenuConfiguracionCategorias.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/confcomerciales/ItemMenuConfiguracionCategorias.java index 60cc7ec49..0c927d6ed 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/confcomerciales/ItemMenuConfiguracionCategorias.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/confcomerciales/ItemMenuConfiguracionCategorias.java @@ -19,8 +19,6 @@ public class ItemMenuConfiguracionCategorias extends DefaultItemMenuSistema { @Override public void ejecutar() { PantallaUtileria.openWindow("/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul", - Labels.getLabel("busquedaConfiguracionCategoriaController.window.title"), null,desktop); - + Labels.getLabel("busquedaConfiguracionCategoriaController.window.title"), null, desktop); } - } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderConfiguracionCategoriaDecuento.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderConfiguracionCategoriaDecuento.java index 010414ae3..422097fa0 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderConfiguracionCategoriaDecuento.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderConfiguracionCategoriaDecuento.java @@ -38,6 +38,9 @@ public class RenderConfiguracionCategoriaDecuento implements ListitemRenderer { lc = new Listcell(categoria.getIndCuota() != null ? (categoria.getIndCuota() ? "Sim" : "Não") : "Não"); lc.setParent(lstm); + lc = new Listcell(categoria.getIndVentaAbierto() != null ? (categoria.getIndVentaAbierto() ? "Sim" : "Não") : "Não"); + lc.setParent(lstm); + lc = new Listcell(categoria.getDescuentoporc() != null ? categoria.getDescuentoporc().toString() : "0"); lc.setParent(lstm); @@ -72,45 +75,41 @@ public class RenderConfiguracionCategoriaDecuento implements ListitemRenderer { } lc = new Listcell(aplicaFeriado); lc.setParent(lstm); - - + StringBuilder sb = new StringBuilder(" "); - - if (categoria.getIndImporteTxEmbarque()){ + + if (categoria.getIndImporteTxEmbarque()) { sb.append("TX,"); } - if (categoria.getIndImportePedagio()){ + if (categoria.getIndImportePedagio()) { sb.append("P,"); } - if (categoria.getIndImporteSeguro()){ + if (categoria.getIndImporteSeguro()) { sb.append("S,"); } - if (categoria.getIndImporteOutros()){ + if (categoria.getIndImporteOutros()) { sb.append("O,"); } - - lc = new Listcell(sb.substring(0, sb.length()-1)); + + lc = new Listcell(sb.substring(0, sb.length() - 1)); lc.setParent(lstm); - - - lc = new Listcell( (categoria.getTiempoDesactivar() != null)?"Sim":"Não" ); + + lc = new Listcell((categoria.getTiempoDesactivar() != null) ? "Sim" : "Não"); lc.setParent(lstm); - - - Integer tiempo = (categoria.getTiempoDesactivar() != null)?categoria.getTiempoDesactivar() :categoria.getTiempoActivar(); - + + Integer tiempo = (categoria.getTiempoDesactivar() != null) ? categoria.getTiempoDesactivar() : categoria.getTiempoActivar(); + String horaMinuto = "-"; - if (tiempo != null){ - int hora = tiempo/60; - int minuto = tiempo%60; - - horaMinuto = hora +":" + minuto; + if (tiempo != null) { + int hora = tiempo / 60; + int minuto = tiempo % 60; + + horaMinuto = hora + ":" + minuto; } - - lc = new Listcell( horaMinuto); + + lc = new Listcell(horaMinuto); lc.setParent(lstm); - - + lstm.setAttribute("data", categoria); } } diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacion.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacion.java index 97a78293f..d681e236d 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacion.java +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacion.java @@ -57,12 +57,6 @@ public class RenderEstacion implements ListitemRenderer { lc = new Listcell(estacion.getNomeImpressora()); lc.setParent(lstm); - lc = new Listcell(estacion.getNomeArquivoLayout()); - lc.setParent(lstm); - - lc = new Listcell(estacion.getNomeImpressoraRelatorio()); - lc.setParent(lstm); - PuntoVenta pv = estacion.getPuntoVenta(); if (pv != null) { lc = new Listcell(pv.getNombpuntoventa()); diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacionImpresora.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacionImpresora.java new file mode 100644 index 000000000..81c310b86 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/render/RenderEstacionImpresora.java @@ -0,0 +1,31 @@ +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.EstacionImpresora; + +public class RenderEstacionImpresora implements ListitemRenderer { + + public void render(Listitem lstm, Object o) throws Exception { + EstacionImpresora estacionImpresora = (EstacionImpresora) o; + + if (!estacionImpresora.getActivo()) { + return; + } + + Listcell lc = new Listcell(); + + lc = new Listcell(estacionImpresora.getEmpresa().getNombempresa()); + lc.setParent(lstm); + + lc = new Listcell(estacionImpresora.getNombImpresora()); + lc.setParent(lstm); + + lc = new Listcell(estacionImpresora.getNombArchivoLayout()); + lc.setParent(lstm); + + lstm.setAttribute("data", estacionImpresora); + } +} diff --git a/src/java/rebel.xml b/src/java/rebel.xml deleted file mode 100644 index 0aaf5551b..000000000 --- a/src/java/rebel.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/java/spring-config.xml b/src/java/spring-config.xml index b8b8d0abf..28cc3d663 100644 --- a/src/java/spring-config.xml +++ b/src/java/spring-config.xml @@ -22,6 +22,8 @@ + com.rjconsultores.ventaboletos.entidad.EstacionImpresora + com.rjconsultores.ventaboletos.entidad.AlertaCtrl com.rjconsultores.ventaboletos.entidad.ConfRestricaoExcecao diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 44d2a370d..1b58f4154 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -7,7 +7,7 @@ # . . = XXX #Versao do VentaBoleto: -versao = ADM_20130418_1RC144 +versao = ADM_20130426_1RC145 # MSG Defaut: MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100 @@ -898,6 +898,7 @@ busquedaConfiguracionCategoriaController.lhTipoPassagem.label = Tipo de Passagem # Pantalla Editar Configuração Categorí­a editarConfiguracionCategoriaController.window.title = Tipo de Configuração de Passageiro editarConfiguracionCategoriaController.lblImprimePassagem.value = Sim +editarConfiguracionCategoriaController.lblVendaAberto.value = Vende Aberto editarConfiguracionCategoriaController.lblNaoImprimePassagem.value = Não editarConfiguracionCategoriaController.MSG.noEsPermitidoTodosMarca = Para incluir a Marca TODAS, deve de Eliminar a(s) Marca(s) que já existe(n) editarConfiguracionCategoriaController.MSG.noEsPermitidoMarcaTodosExiste = Para incluir a Marca deseada, deve de Eliminar a Marca TODAS @@ -2662,6 +2663,7 @@ editarEstacionController.MSG.empresaYaExiste= A empresa informada já está cada editarEstacionController.lbNumEmpresa.value = Código da Empresa editarEstacionController.lbNumFilial.value = Código da Filial editarEstacionController.lbNumPdv.value = Númedo PDV +editarEstacionController.tab.label.impresora = Impressoras # Pesquisa Exceção Ida e Volta busquedaExceptionRedondoController.window.title = Exceção Viagem Ida e Volta diff --git a/web/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul b/web/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul index d303f104e..33b80a7fc 100644 --- a/web/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul +++ b/web/gui/configuraciones_comerciales/busquedaConfiguracionCategorias.zul @@ -5,57 +5,63 @@ - - -