git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@23885 d1611594-4594-4d17-8e1d-87c2c4800839
parent
2774d10076
commit
8d8d5b3892
|
@ -4,33 +4,11 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Categoria;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Moneda;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TarifaOficial;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.MonedaService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
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.RenderTarifaOficial;
|
||||
import com.trg.search.Filter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -43,6 +21,22 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Paging;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Moneda;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TarifaOficial;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.MonedaService;
|
||||
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.RenderTarifaOficial;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author rodrigo
|
||||
|
@ -148,11 +142,11 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
|||
this.tarifaList = tarifaList;
|
||||
}
|
||||
|
||||
public void onClick$btnPesquisa(Event ev) {
|
||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
public void onClick$btnRefresh(Event ev) {
|
||||
public void onClick$btnRefresh(Event ev) throws InterruptedException {
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
|
@ -200,7 +194,7 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
|||
Labels.getLabel("editarTarifaOficialController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
private void refreshLista() {
|
||||
private void refreshLista() throws InterruptedException {
|
||||
Moneda moneda = (Moneda) (cmbMoneda.getSelectedItem() != null ? cmbMoneda.getSelectedItem().getValue() : null);
|
||||
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
||||
ClaseServicio claseServicio = (ClaseServicio) (cmbClaseServicio.getSelectedItem() != null ? cmbClaseServicio.getSelectedItem().getValue() : null);
|
||||
|
@ -220,61 +214,45 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
if ((marca == null) && (!cmbMarca.getText().isEmpty())) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((claseServicio == null) && (!cmbClaseServicio.getText().isEmpty())) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((origem == null) && (!cmbOrigem.getText().isEmpty())) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((destino == null) && (!cmbDestino.getText().isEmpty())) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Destino.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Destino.",
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
HibernateSearchObject<TarifaOficial> tarifaBusqueda =
|
||||
new HibernateSearchObject<TarifaOficial>(TarifaOficial.class, pagingTarifaOficial.getPageSize());
|
||||
HibernateSearchObject<TarifaOficial> tarifaBusqueda =new HibernateSearchObject<TarifaOficial>(TarifaOficial.class, pagingTarifaOficial.getPageSize());
|
||||
|
||||
tarifaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
tarifaBusqueda.addFilterEqual("moneda", moneda);
|
||||
|
||||
if(marca != null){
|
||||
tarifaBusqueda.addFilterEqual("marca", marca);
|
||||
}else{
|
||||
|
@ -287,12 +265,7 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
|||
|
||||
plwTarifaOficial.init(tarifaBusqueda, tarifaList, pagingTarifaOficial);
|
||||
if (tarifaList.getData().length == 0) {
|
||||
try {
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),Labels.getLabel("editarTarifaOficialController.window.title"),Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# <controler>. <id>. <propiedade> = XXX
|
||||
|
||||
#Versao do VentaBoleto:
|
||||
versao = ADM_20130123_1RC98
|
||||
versao = ADM_20130125_1RC99
|
||||
|
||||
# MSG Defaut:
|
||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||
|
|
Loading…
Reference in New Issue