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;
|
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.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
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.Combobox;
|
||||||
import org.zkoss.zul.Paging;
|
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
|
* @author rodrigo
|
||||||
|
@ -148,11 +142,11 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
||||||
this.tarifaList = tarifaList;
|
this.tarifaList = tarifaList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnPesquisa(Event ev) {
|
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRefresh(Event ev) {
|
public void onClick$btnRefresh(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +194,7 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"), args, MODAL);
|
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);
|
Moneda moneda = (Moneda) (cmbMoneda.getSelectedItem() != null ? cmbMoneda.getSelectedItem().getValue() : null);
|
||||||
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
Marca marca = (Marca) (cmbMarca.getSelectedItem() != null ? cmbMarca.getSelectedItem().getValue() : null);
|
||||||
ClaseServicio claseServicio = (ClaseServicio) (cmbClaseServicio.getSelectedItem() != null ? cmbClaseServicio.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())) {
|
if ((marca == null) && (!cmbMarca.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Marca.",
|
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((claseServicio == null) && (!cmbClaseServicio.getText().isEmpty())) {
|
if ((claseServicio == null) && (!cmbClaseServicio.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Clase servicio.",
|
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ((origem == null) && (!cmbOrigem.getText().isEmpty())) {
|
if ((origem == null) && (!cmbOrigem.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Origen.",
|
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((destino == null) && (!cmbDestino.getText().isEmpty())) {
|
if ((destino == null) && (!cmbDestino.getText().isEmpty())) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Destino.",
|
||||||
Messagebox.show(Labels.getLabel("MSG.SELECCIONE.VALOR.CORRECTO") + " Destino.",
|
Labels.getLabel("editarTarifaOficialController.window.title"),
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (Exception ex) {
|
|
||||||
log.error(ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HibernateSearchObject<TarifaOficial> tarifaBusqueda =
|
HibernateSearchObject<TarifaOficial> tarifaBusqueda =new HibernateSearchObject<TarifaOficial>(TarifaOficial.class, pagingTarifaOficial.getPageSize());
|
||||||
new HibernateSearchObject<TarifaOficial>(TarifaOficial.class, pagingTarifaOficial.getPageSize());
|
|
||||||
tarifaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
tarifaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
tarifaBusqueda.addFilterEqual("moneda", moneda);
|
tarifaBusqueda.addFilterEqual("moneda", moneda);
|
||||||
|
|
||||||
if(marca != null){
|
if(marca != null){
|
||||||
tarifaBusqueda.addFilterEqual("marca", marca);
|
tarifaBusqueda.addFilterEqual("marca", marca);
|
||||||
}else{
|
}else{
|
||||||
|
@ -287,12 +265,7 @@ public class BusquedaTarifaOficialController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
plwTarifaOficial.init(tarifaBusqueda, tarifaList, pagingTarifaOficial);
|
plwTarifaOficial.init(tarifaBusqueda, tarifaList, pagingTarifaOficial);
|
||||||
if (tarifaList.getData().length == 0) {
|
if (tarifaList.getData().length == 0) {
|
||||||
try {
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),Labels.getLabel("editarTarifaOficialController.window.title"),Messagebox.OK, Messagebox.INFORMATION);
|
||||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
|
||||||
Labels.getLabel("editarTarifaOficialController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20130123_1RC98
|
versao = ADM_20130125_1RC99
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
|
Loading…
Reference in New Issue