merge com uruguay

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32395 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2013-12-03 20:54:05 +00:00
parent a8e9120d98
commit bd490a47fd
31 changed files with 2091 additions and 684 deletions

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
setting.zk_facet_install_history=<history>\n</history>\n
visualeditor.custom_web_content_path=/ventaboletosadm/web
visualeditor.custom_zk_package=zkee-bin-eval-6.0.0
visualeditor.custom_zk_package=zkee-bin-eval-6.5.2
visualeditor.is_use_zks_lib=true

View File

@ -4,158 +4,162 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.catalogos;
import java.util.Calendar;
import java.util.List;
import org.apache.log4j.Logger;
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.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.service.TipoServicioService;
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.MyTextbox;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.util.Calendar;
import java.util.List;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Button;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Textbox;
/**
*
*
* @author Rafius
*/
@Controller("editarTipoServicioController")
@Scope("prototype")
public class EditarTipoServicioController extends MyGenericForwardComposer {
@Autowired
private TipoServicioService tipoServicioService;
private TipoServicio tipoServicio;
private MyListbox tipoServicioList;
private static Logger log = Logger.getLogger(EditarTipoServicioController.class);
private MyTextbox txtNome;
private Button btnApagar;
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarTipoServicioController.class);
public Button getBtnApagar() {
return btnApagar;
}
@Autowired
private TipoServicioService tipoServicioService;
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
private TipoServicio tipoServicio;
private MyListbox tipoServicioList;
private MyTextbox txtNome;
private Button btnApagar;
public MyTextbox getTxtNome() {
return txtNome;
}
public Button getBtnApagar() {
return btnApagar;
}
public void setTxtNome(MyTextbox txtNome) {
this.txtNome = txtNome;
}
public void setBtnApagar(Button btnApagar) {
this.btnApagar = btnApagar;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
public MyTextbox getTxtNome() {
return txtNome;
}
tipoServicio = (TipoServicio) Executions.getCurrent().getArg().get("tipoServicio");
tipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("tipoServicioList");
public void setTxtNome(MyTextbox txtNome) {
this.txtNome = txtNome;
}
if (tipoServicio.getTiposervicioId() == null) {
btnApagar.setVisible(Boolean.FALSE);
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
txtNome.focus();
}
tipoServicio = (TipoServicio) Executions.getCurrent().getArg().get("tipoServicio");
tipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("tipoServicioList");
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
try {
if (tipoServicio.getTiposervicioId() == null) {
btnApagar.setVisible(Boolean.FALSE);
}
tipoServicio.setActivo(Boolean.TRUE);
tipoServicio.setFecmodif(Calendar.getInstance().getTime());
tipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
txtNome.focus();
}
List<TipoServicio> lsTipoServicio = tipoServicioService.buscar(tipoServicio.getDescservicio());
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
try {
if (!lsTipoServicio.isEmpty() && tipoServicio.getTiposervicioId() == null) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (tipoServicio.getTiposervicioId() == null) {
tipoServicioService.suscribir(tipoServicio);
tipoServicioList.addItem(tipoServicio);
} else {
tipoServicioService.actualizacion(tipoServicio);
tipoServicioList.updateItem(tipoServicio);
}
tipoServicio.setActivo(Boolean.TRUE);
tipoServicio.setFecmodif(Calendar.getInstance().getTime());
tipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.suscribirOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
List<TipoServicio> lsTipoServicio = tipoServicioService.buscar(tipoServicio.getDescservicio());
closeWindow();
}
} catch (Exception ex) {
log.error("Exception ao suscribir TipoServicio: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
if (!lsTipoServicio.isEmpty() && tipoServicio.getTiposervicioId() == null) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (tipoServicio.getTiposervicioId() == null) {
tipoServicioService.suscribir(tipoServicio);
tipoServicioList.addItem(tipoServicio);
} else {
tipoServicioService.actualizacion(tipoServicio);
tipoServicioList.updateItem(tipoServicio);
}
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.borrarPergunta"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.suscribirOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
if (resp == Messagebox.YES) {
closeWindow();
}
} catch (Exception ex) {
log.error("Exception ao suscribir TipoServicio: " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.ERROR);
}
}
tipoServicioService.borrar(tipoServicio);
public void onClick$btnApagar(Event ev) {
try {
int resp = Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.borrarPergunta"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.borrarOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
if (resp == Messagebox.YES) {
tipoServicioList.removeItem(tipoServicio);
tipoServicioService.borrar(tipoServicio);
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
Messagebox.show(
Labels.getLabel("editarTipoServicioController.MSG.borrarOK"),
Labels.getLabel("editarTipoServicioController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
public TipoServicio getTipoServicio() {
return tipoServicio;
}
tipoServicioList.removeItem(tipoServicio);
public void setTipoServicio(TipoServicio tipoServicio) {
this.tipoServicio = tipoServicio;
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
public MyListbox getTipoServicioList() {
return tipoServicioList;
}
public TipoServicio getTipoServicio() {
return tipoServicio;
}
public void setTipoServicioList(MyListbox tipoServicioList) {
this.tipoServicioList = tipoServicioList;
}
public void setTipoServicio(TipoServicio tipoServicio) {
this.tipoServicio = tipoServicio;
}
public TipoServicioService getTipoServicioService() {
return tipoServicioService;
}
public MyListbox getTipoServicioList() {
return tipoServicioList;
}
public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService;
}
public void setTipoServicioList(MyListbox tipoServicioList) {
this.tipoServicioList = tipoServicioList;
}
public TipoServicioService getTipoServicioService() {
return tipoServicioService;
}
public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService;
}
}

View File

@ -286,9 +286,6 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
marca = (Marca) cbiMarca.getValue();
busquedaCorrita.addFilterEqual("marca", marca);
}
// else {
// busquedaCorrita.addFilterIn("marca", lsMarca);
// }
Comboitem cbiRuta = cmbRuta.getSelectedItem();
Ruta ruta = null;

View File

@ -515,8 +515,11 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
if (!achou) {
RutaEmpresa rutaEmpresa = new RutaEmpresa();
rutaEmpresa.setActivo(Boolean.TRUE);
rutaEmpresa.setEmpresa(empresa);
rutaEmpresa.setRutaEmpresaId(empresa.getEmpresaId());
rutaEmpresa.setRuta(ruta);
rutaEmpresa.setEmpresa(empresa);
rutaEmpresa.setActivo(Boolean.TRUE);
rutaEmpresa.setFecmodif(Calendar.getInstance().getTime());
rutaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());

View File

@ -42,6 +42,7 @@ import com.rjconsultores.ventaboletos.entidad.PricingCategoria;
import com.rjconsultores.ventaboletos.entidad.PricingClase;
import com.rjconsultores.ventaboletos.entidad.PricingCorrida;
import com.rjconsultores.ventaboletos.entidad.PricingDia;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
import com.rjconsultores.ventaboletos.entidad.PricingImporte;
import com.rjconsultores.ventaboletos.entidad.PricingMarca;
import com.rjconsultores.ventaboletos.entidad.PricingMercado;
@ -61,6 +62,7 @@ import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PricingCategoriaService;
import com.rjconsultores.ventaboletos.service.PricingClaseService;
import com.rjconsultores.ventaboletos.service.PricingFormapagoService;
import com.rjconsultores.ventaboletos.service.PricingImporteService;
import com.rjconsultores.ventaboletos.service.PricingMarcaService;
import com.rjconsultores.ventaboletos.service.PricingMercadoService;
@ -80,6 +82,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCategori
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingClase;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingCorrida;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingDia;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingFormaPago;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingImporte;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMarca;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingMercado;
@ -99,6 +102,8 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPricingVigencia
public class EditarPricingController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarPricingController.class);
@Autowired
private PricingService pricingService;
@Autowired
@ -118,6 +123,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
@Autowired
private PricingImporteService pricingImporteService;
@Autowired
private PricingFormapagoService pricingFormapagoService;
@Autowired
private EmpresaService empresaService;
@Autowired
private MarcaService marcaService;
@ -133,6 +140,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private CategoriaService categoriaService;
@Autowired
private ParadaService paradaService;
private Pricing pricing;
private MyListbox pricingList;
private MyListbox pricingVigenciaList;
@ -149,6 +157,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private MyListbox pricingAsientoList;
private MyListbox pricingTipoServicioList;
private MyListbox pricingOcupaAntecipaList;
private MyListbox pricingFormapagoList;
private List<Empresa> lsEmpresa;
private List<PricingVigencia> lsPricingVigencia;
private List<PricingImporte> lsPricingImporte;
@ -164,7 +173,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
private List<PricingOcupaAntecipa> lsPricingOcupaAntecipa;
private List<PricingRuta> lsPricingRuta;
private List<PricingTipoServicio> lsPricingTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingController.class);
private List<PricingFormapago> lsPricingFormapago;
private Combobox cmbEmpresa;
private Radio rdTransSi;
private Radio rdTransNo;
@ -218,6 +227,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
private Button btnNovoTipoServicio;
private Button btnApagarTipoServicio;
private Button btnModificarTipoServicio;
private Button btnNovoFormapago;
private Button btnApagarFormapago;
private Button btnModificarFormapago;
private boolean salvo = false;
private Boolean gravarNovo = Boolean.TRUE;
private Textbox nombrePricing;
@ -419,6 +431,18 @@ public class EditarPricingController extends MyGenericForwardComposer {
}
});
// FormaPago
pricingFormapagoList.setItemRenderer(new RenderPricingFormaPago());
lsPricingFormapago = new ArrayList<PricingFormapago>();
pricingFormapagoList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
verPricingFormapago(pFormapago);
}
});
if (pricing.getPricingId() != null) {
pricing = pricingService.obtenerID(pricing.getPricingId());
@ -458,6 +482,12 @@ public class EditarPricingController extends MyGenericForwardComposer {
pricingTipoServicioList.setSelectedIndex(0);
}
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
if (lsPricingFormapago.size() > 0) {
pricingFormapagoList.setSelectedIndex(0);
}
lsPricingPuntoVenta = pricing.getPricingPuntoventaList();
pricingPuntoVentaList.setData(lsPricingPuntoVenta);
if (lsPricingPuntoVenta.size() > 0) {
@ -500,6 +530,9 @@ public class EditarPricingController extends MyGenericForwardComposer {
lsPricingTipoServicio = pricing.getPricingTipoServicioList();
pricingTipoServicioList.setData(lsPricingTipoServicio);
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
if (pricing.getIndtransferible() == Boolean.FALSE) {
rdTransNo.setChecked(true);
}
@ -1929,13 +1962,87 @@ public class EditarPricingController extends MyGenericForwardComposer {
verPricingTipoServicio(pTipoServicio);
} else {
try {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"), Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
} catch (InterruptedException ex) {
log.error(ex.getMessage());
}
}
}
public void onClick$btnApagarFormaPago(Event ev) throws Exception {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
if (pFormapago != null) {
int resp = Messagebox.show(
Labels.getLabel("editarPricingController.MSG.borrarPerguntaFormaPago"),
Labels.getLabel("editarPricingController.windowFormaPago.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
lsPricingFormapago.remove(pFormapago);
pFormapago.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
pFormapago.setFecmodif(Calendar.getInstance().getTime());
pFormapago.setActivo(Pricing.EXCLUIDO);
lsPricingFormapago.add(pFormapago);
pricingFormapagoList.removeItem(pFormapago);
pricingFormapagoList.clearSelection();
pricing.setPricingFormapagoList(lsPricingFormapago);
pricingService.actualizacion(pricing);
lsPricingFormapago = pricing.getPricingFormapagoList();
pricingFormapagoList.setData(lsPricingFormapago);
}
} else {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnNovoFormaPago(Event ev) throws InterruptedException {
if (!validarNome()) {
return;
}
PricingFormapago pFormapago = new PricingFormapago();
pFormapago.setPricing(pricing);
verPricingFormapago(pFormapago);
}
public void onClick$btnModificarFormaPago(Event ev) {
PricingFormapago pFormapago = (PricingFormapago) pricingFormapagoList.getSelected();
if (pFormapago != null) {
verPricingFormapago(pFormapago);
} else {
try {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.window.title"), Messagebox.OK, Messagebox.EXCLAMATION);
} catch (InterruptedException ex) {
java.util.logging.Logger.getLogger(EditarPricingController.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private void verPricingFormapago(PricingFormapago pFormapago) {
if (pricing.getPricingId() == null) {
pricingService.suscribir(pricing);
}
Map args = new HashMap();
args.put("pricingFormapago", pFormapago);
args.put("pricingFormapagoList", pricingFormapagoList);
openWindow("/gui/pricing/editarPricingFormapago.zul",
Labels.getLabel("editarPricingController.windowFormaPago.title"), args, MODAL);
}
public void onClick$btnInativar(Event ev) throws InterruptedException {
try {
int resp = Messagebox.show(
@ -2005,6 +2112,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
pricingAsientoList.setDisabled(desativar);
pricingOcupaAntecipaList.setDisabled(desativar);
pricingTipoServicioList.setDisabled(desativar);
pricingFormapagoList.setDisabled(desativar);
btnNovoVigencia.setDisabled(desativar);
btnApagarVigencia.setDisabled(desativar);
btnModificarVigencia.setDisabled(desativar);
@ -2042,7 +2150,10 @@ public class EditarPricingController extends MyGenericForwardComposer {
btnNovoTipoServicio.setDisabled(desativar);
btnApagarTipoServicio.setDisabled(desativar);
btnModificarTipoServicio.setDisabled(desativar);
btnNovoFormapago.setDisabled(desativar);
btnApagarFormapago.setDisabled(desativar);
btnModificarFormapago.setDisabled(desativar);
btnCopiar.setDisabled(desativar);
btnSalvar.setDisabled(desativar);
}
@ -2286,4 +2397,5 @@ public class EditarPricingController extends MyGenericForwardComposer {
public void setRadioPor(Radio radioPor) {
this.radioPor = radioPor;
}
}

View File

@ -0,0 +1,121 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
import java.util.List;
import org.apache.log4j.Logger;
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.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Radio;
import com.rjconsultores.ventaboletos.entidad.FormaPago;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
import com.rjconsultores.ventaboletos.service.FormaPagoService;
import com.rjconsultores.ventaboletos.service.PricingFormapagoService;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@Controller("editarPricingFormapagoController")
@Scope("prototype")
public class EditarPricingFormapagoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarPricingFormapagoController.class);
@Autowired
private FormaPagoService formaPagoService;
@Autowired
private PricingFormapagoService pricingFormapagoService;
private List<FormaPago> lsFormaPago;
private PricingFormapago pricingFormapago;
private MyListbox pricingFormapagoList;
private Radio si;
private Radio no;
@Override
public void doAfterCompose(Component comp) throws Exception {
this.setPricingFormapago((PricingFormapago) Executions.getCurrent().getArg().get("pricingFormapago"));
this.setPricingFormapagoList((MyListbox) Executions.getCurrent().getArg().get("pricingFormapagoList"));
this.setLsFormaPago(formaPagoService.obtenerTodos());
super.doAfterCompose(comp);
if (pricingFormapago.getPricingformapagoId() != null) {
if (pricingFormapago.getIndexcepcion()) {
si.setChecked(true);
} else {
no.setChecked(true);
}
} else {
no.setChecked(true);
}
}
public void onClick$btnAdicionarFormaPago(Event ev) throws InterruptedException {
try {
if (pricingFormapago.getFormaPago() == null) {
Messagebox.show(
Labels.getLabel("MSG.Error.combobox"),
Labels.getLabel("editarPricingController.windowFormaPago.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (no.isChecked()) {
pricingFormapago.setIndexcepcion(Boolean.FALSE);
} else if (si.isChecked()) {
pricingFormapago.setIndexcepcion(Boolean.TRUE);
}
if (pricingFormapago.getPricingformapagoId() != null) {
pricingFormapagoService.actualizacion(pricingFormapago);
pricingFormapagoList.updateItem(pricingFormapago);
pricingFormapagoList.setData(pricingFormapago.getPricing().getPricingFormapagoList());
} else {
pricingFormapagoService.suscribir(pricingFormapago);
pricingFormapagoList.addItem(pricingFormapago);
}
closeWindow();
}
} catch (Exception ex) {
log.error(ex);
}
}
public List<FormaPago> getLsFormaPago() {
return lsFormaPago;
}
public void setLsFormaPago(List<FormaPago> lsFormaPago) {
this.lsFormaPago = lsFormaPago;
}
public PricingFormapago getPricingFormapago() {
return pricingFormapago;
}
public void setPricingFormapago(PricingFormapago pricingFormapago) {
this.pricingFormapago = pricingFormapago;
}
public MyListbox getPricingFormapagoList() {
return pricingFormapagoList;
}
public void setPricingFormapagoList(MyListbox pricingFormapagoList) {
this.pricingFormapagoList = pricingFormapagoList;
}
}

View File

@ -15,7 +15,6 @@ import org.zkoss.zul.Intbox;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingOcupaAntecipa;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.PricingOcupaAntecipaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.ConstraintPorcentagem;
@ -54,16 +53,16 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
}
public void onClick$btnAdicionarOcupaAntecipa(Event ev) throws Exception {
if ((cantasientosmin.getValue() != null || cantasientosmax.getValue() != null)
&& (ocupacioninicial.getValue() != null || ocupacionfinal.getValue() != null)){
&& (ocupacioninicial.getValue() != null || ocupacionfinal.getValue() != null)) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoPorCant"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() == null)
&& (cantasientosmin.getValue() == null && cantasientosmax.getValue() == null)
&& (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() == null)
@ -73,16 +72,16 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.ocAnt"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if ((cantasientosmin.getValue() == null && cantasientosmax.getValue() != null)
|| (cantasientosmin.getValue() != null && cantasientosmax.getValue() == null)
|| (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() != null)
|| (ocupacioninicial.getValue() != null && ocupacionfinal.getValue() == null)
|| (cantdiasmin.getValue() == null && cantdiasmax.getValue() != null)
|| (cantdiasmin.getValue() != null && cantdiasmax.getValue() == null)) {
|| (cantasientosmin.getValue() != null && cantasientosmax.getValue() == null)
|| (ocupacioninicial.getValue() == null && ocupacionfinal.getValue() != null)
|| (ocupacioninicial.getValue() != null && ocupacionfinal.getValue() == null)
|| (cantdiasmin.getValue() == null && cantdiasmax.getValue() != null)
|| (cantdiasmin.getValue() != null && cantdiasmax.getValue() == null)) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.MinMax"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
@ -90,34 +89,34 @@ public class EditarPricingOcupaAntecipaController extends MyGenericForwardCompos
return;
}
if (porcentaje.getValueDecimal() != null && importe.getValueDecimal() != null) {
if (porcentaje.getValueDecimal() != null && importe.getValueDecimal() != null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (porcentaje.getValueDecimal() == null && importe.getValueDecimal() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (porcentaje.getValueDecimal() == null && importe.getValueDecimal() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.ocupacionErrada.centoDin"),
try {
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
} else {
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
}
closeWindow();
} catch (Exception e) {
Messagebox.show(e.getLocalizedMessage(),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
try {
if (pricingOcupaAntecipa.getPricingocupaantecipaId() != null) {
pricingOcupaAntecipaService.actualizacion(pricingOcupaAntecipa);
pricingOcupaAntecipaList.updateItem(pricingOcupaAntecipa);
} else {
pricingOcupaAntecipaService.suscribir(pricingOcupaAntecipa);
pricingOcupaAntecipaList.addItemNovo(pricingOcupaAntecipa);
}
closeWindow();
} catch (BusinessException e) {
Messagebox.show(e.getLocalizedMessage(),
Labels.getLabel("editarPricingController.windowOcupacion.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
}
}
}
public void onClick$btnRemoverOcupaAntecipa(Event ev) {

View File

@ -4,20 +4,13 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
import com.rjconsultores.ventaboletos.service.TipoServicioService;
import com.rjconsultores.ventaboletos.service.PricingTipoServicioService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.Calendar;
import java.util.List;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.util.List;
import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
@ -25,147 +18,157 @@ import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Combobox;
import com.rjconsultores.ventaboletos.entidad.Pricing;
import com.rjconsultores.ventaboletos.entidad.PricingTipoServicio;
import com.rjconsultores.ventaboletos.entidad.TipoServicio;
import com.rjconsultores.ventaboletos.service.PricingTipoServicioService;
import com.rjconsultores.ventaboletos.service.TipoServicioService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
/**
*
*
* @author Rafius
*/
@Controller("editarPricingTipoServicioController")
@Scope("prototype")
public class EditarPricingTipoServicioController extends MyGenericForwardComposer {
@Autowired
private PricingTipoServicioService pricingTipoServicioService;
@Autowired
private TipoServicioService tipoServicioService;
private List<TipoServicio> lsTipoServicio;
private PricingTipoServicio pricingTipoServicio;
private MyListbox pricingTipoServicioList;
private Combobox cmbTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingTipoServicioController.class);
private static final long serialVersionUID = 1L;
@Override
public void doAfterCompose(Component comp) throws Exception {
@Autowired
private PricingTipoServicioService pricingTipoServicioService;
@Autowired
private TipoServicioService tipoServicioService;
private List<TipoServicio> lsTipoServicio;
private PricingTipoServicio pricingTipoServicio;
private MyListbox pricingTipoServicioList;
private Combobox cmbTipoServicio;
private static Logger log = Logger.getLogger(EditarPricingTipoServicioController.class);
lsTipoServicio = tipoServicioService.obtenerTodos();
@Override
public void doAfterCompose(Component comp) throws Exception {
pricingTipoServicio = (PricingTipoServicio) Executions.getCurrent().getArg().get("pricingTipoServicio");
pricingTipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoServicioList");
lsTipoServicio = tipoServicioService.obtenerTodos();
super.doAfterCompose(comp);
pricingTipoServicio = (PricingTipoServicio) Executions.getCurrent().getArg().get("pricingTipoServicio");
pricingTipoServicioList = (MyListbox) Executions.getCurrent().getArg().get("pricingTipoServicioList");
super.doAfterCompose(comp);
cmbTipoServicio.focus();
}
cmbTipoServicio.focus();
}
public void onClick$btnAdicionarTipoServicio(Event ev) throws Exception {
cmbTipoServicio.getValue();
public void onClick$btnAdicionarTipoServicio(Event ev) throws Exception {
cmbTipoServicio.getValue();
try {
try {
if (pricingTipoServicio.getTipoServicio() == null) {
Messagebox.show(
Labels.getLabel("MSG.Error.combobox"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (pricingTipoServicio.getTipoServicio() == null) {
Messagebox.show(
Labels.getLabel("MSG.Error.combobox"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
Boolean existe = pricingTipoServicioService.obtenerPricingTipoServicio(pricingTipoServicio.getPricing(), (TipoServicio) cmbTipoServicio.getSelectedItem().getValue());
if (existe) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (pricingTipoServicio.getPricingtiposervicioId() != null) {
pricingTipoServicioService.actualizacion(pricingTipoServicio);
pricingTipoServicioList.updateItem(pricingTipoServicio);
} else {
pricingTipoServicioService.suscribir(pricingTipoServicio);
pricingTipoServicioList.addItem(pricingTipoServicio);
}
closeWindow();
}
}
} catch (Exception ex) {
log.error(ex);
}
}
Boolean existe = pricingTipoServicioService.obtenerPricingTipoServicio(pricingTipoServicio.getPricing(), (TipoServicio) cmbTipoServicio.getSelectedItem().getValue());
if (existe) {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
} else {
if (pricingTipoServicio.getPricingtiposervicioId() != null) {
pricingTipoServicioService.actualizacion(pricingTipoServicio);
pricingTipoServicioList.updateItem(pricingTipoServicio);
} else {
pricingTipoServicioService.suscribir(pricingTipoServicio);
pricingTipoServicioList.addItem(pricingTipoServicio);
}
closeWindow();
}
}
} catch (Exception ex) {
log.error(ex);
}
}
public void onClick$btnRemoverTipoServicio(Event ev) {
try {
PricingTipoServicio pTipoServicio = (PricingTipoServicio) pricingTipoServicioList.getSelected();
if (pTipoServicio != null) {
int resp = Messagebox.show(
Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoServicio"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
public void onClick$btnRemoverTipoServicio(Event ev) {
try {
PricingTipoServicio pTipoServicio = (PricingTipoServicio) pricingTipoServicioList.getSelected();
if (pTipoServicio != null) {
int resp = Messagebox.show(
Labels.getLabel("editarPricingController.MSG.borrarPerguntaTipoServicio"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
pricingTipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
pricingTipoServicio.setFecmodif(Calendar.getInstance().getTime());
pricingTipoServicio.setActivo(Pricing.EXCLUIDO);
if (resp == Messagebox.YES) {
pricingTipoServicio.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
pricingTipoServicio.setFecmodif(Calendar.getInstance().getTime());
pricingTipoServicio.setActivo(Pricing.EXCLUIDO);
pricingTipoServicioList.removeItem(pricingTipoServicio);
pricingTipoServicioService.borrar(pricingTipoServicio);
closeWindow();
}
} else {
Messagebox.show(
Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} catch (Exception ex) {
log.error(ex);
}
pricingTipoServicioList.removeItem(pricingTipoServicio);
pricingTipoServicioService.borrar(pricingTipoServicio);
closeWindow();
}
} else {
Messagebox.show(
Labels.getLabel("editarPricingController.MSG.selectItem"),
Labels.getLabel("editarPricingController.windowTipoServicio.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
} catch (Exception ex) {
log.error(ex);
}
}
}
public PricingTipoServicio getPricingTipoServicio() {
return pricingTipoServicio;
}
public PricingTipoServicio getPricingTipoServicio() {
return pricingTipoServicio;
}
public void setPricingTipoServicio(PricingTipoServicio pricingTipoServicio) {
this.pricingTipoServicio = pricingTipoServicio;
}
public void setPricingTipoServicio(PricingTipoServicio pricingTipoServicio) {
this.pricingTipoServicio = pricingTipoServicio;
}
public MyListbox getPricingTipoServicioList() {
return pricingTipoServicioList;
}
public MyListbox getPricingTipoServicioList() {
return pricingTipoServicioList;
}
public void setPricingTipoServicioList(MyListbox pricingTipoServicioList) {
this.pricingTipoServicioList = pricingTipoServicioList;
}
public void setPricingTipoServicioList(MyListbox pricingTipoServicioList) {
this.pricingTipoServicioList = pricingTipoServicioList;
}
public PricingTipoServicioService getPricingTipoServicioService() {
return pricingTipoServicioService;
}
public PricingTipoServicioService getPricingTipoServicioService() {
return pricingTipoServicioService;
}
public void setPricingTipoServicioService(PricingTipoServicioService pricingTipoServicioService) {
this.pricingTipoServicioService = pricingTipoServicioService;
}
public void setPricingTipoServicioService(PricingTipoServicioService pricingTipoServicioService) {
this.pricingTipoServicioService = pricingTipoServicioService;
}
public TipoServicioService getTipoServicioService() {
return tipoServicioService;
}
public TipoServicioService getTipoServicioService() {
return tipoServicioService;
}
public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService;
}
public void setTipoServicioService(TipoServicioService tipoServicioService) {
this.tipoServicioService = tipoServicioService;
}
public static Logger getLog() {
return log;
}
public static Logger getLog() {
return log;
}
public static void setLog(Logger log) {
EditarPricingTipoServicioController.log = log;
}
public static void setLog(Logger log) {
EditarPricingTipoServicioController.log = log;
}
public List<TipoServicio> getLsTipoServicio() {
return lsTipoServicio;
}
public List<TipoServicio> getLsTipoServicio() {
return lsTipoServicio;
}
public void setLsTipoServicio(List<TipoServicio> lsTipoServicio) {
this.lsTipoServicio = lsTipoServicio;
}
public void setLsTipoServicio(List<TipoServicio> lsTipoServicio) {
this.lsTipoServicio = lsTipoServicio;
}
}

View File

@ -48,8 +48,10 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEstacionImpreso
public class EditarEstacionController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired
private EstacionService estacionService;
private MyListbox estacionList;
private MyListbox estacionSitefList;
private MyListbox estacionImpresoraList;
@ -145,16 +147,17 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacion.setLsEstacionImpresora(estacionImpresoraList.getListData());
estacionService.suscribirActualizar(estacion);
Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
estacionList.updateItem(estacion);
closeWindow();
} catch (BusinessException e) {
Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
@ -280,6 +283,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresora.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacionImpresoraList.addItemNovo(estacionImpresora);
}
}
@ -293,6 +297,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresoraList.removeSelectedItem();
if (ei.getEstacionImpresoraId() != null) {
ei.setFecmodif(Calendar.getInstance().getTime());
ei.setActivo(Boolean.FALSE);
ei.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
@ -300,4 +305,5 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionImpresoraList.addItemNovo(ei);
}
}
}

View File

@ -0,0 +1,240 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
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;
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.zk.ui.event.EventListener;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Paging;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TaxaEmbLevanteCtrlService;
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.RenderTaxaEmbLevanteCtrl;
@Controller("busquedaTaxaEmbLevanteController")
@Scope("prototype")
public class BusquedaTaxaEmbLevanteController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(BusquedaTaxaEmbLevanteController.class);
@Autowired
private TaxaEmbLevanteCtrlService taxaEmbLevanteCtrlService;
@Autowired
private RutaService rutaService;
@Autowired
private transient PagedListWrapper<TaxaEmbLevanteCtrl> plwTaxaEmbLevanteCtrl;
private MyListbox taxaEmbLevanteCtrlList;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private Paging pagingTaxaEmbLevanteCtrl;
private List<Ruta> lsRuta;
private Combobox cmbRuta;
private Combobox cmbParadaOrigem;
private List<Parada> lsParadaOrigem;
private Combobox cmbParadaDestino;
private List<Parada> lsParadaDestino;
@Override
public void doAfterCompose(Component comp) throws Exception {
lsRuta = rutaService.obtenerTodos();
lsParadaOrigem = new ArrayList<Parada>();
lsParadaDestino = new ArrayList<Parada>();
super.doAfterCompose(comp);
taxaEmbLevanteCtrlList.setItemRenderer(new RenderTaxaEmbLevanteCtrl());
taxaEmbLevanteCtrlList.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) taxaEmbLevanteCtrlList.getSelected();
}
});
taxaEmbLevanteCtrlList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) taxaEmbLevanteCtrlList.getSelected();
itemSelecionado(taxaEmbLevanteCtrl);
}
});
refreshLista();
}
public void onSelect$cmbRuta(Event ev) {
Ruta ruta = (Ruta) cmbRuta.getSelectedItem().getValue();
ruta = rutaService.obtenerID(ruta.getRutaId());
for (RutaSecuencia rutaSecuencia : ruta.getRutaSecuenciaList()) {
lsParadaOrigem.add(rutaSecuencia.getTramo().getOrigem());
lsParadaDestino.add(rutaSecuencia.getTramo().getDestino());
}
BindingListModel listModelParadaOrigem = new BindingListModelList(lsParadaOrigem, true);
cmbParadaOrigem.setModel(listModelParadaOrigem);
BindingListModel listModelParadaDestino = new BindingListModelList(lsParadaDestino, true);
cmbParadaDestino.setModel(listModelParadaDestino);
}
public void onClick$btnNovo(Event ev) {
itemSelecionado(new TaxaEmbLevanteCtrl());
}
public void itemSelecionado(TaxaEmbLevanteCtrl taxa) {
Map args = new HashMap();
args.put("taxaEmbLevanteCtrl", taxa);
args.put("taxaEmbLevanteCtrlList", taxaEmbLevanteCtrlList);
openWindow("/gui/tarifas/editarTaxaEmbLevante.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.editar.window.title"), args, MODAL);
}
public void onClick$btnApagar(Event ev) throws InterruptedException {
try {
int resp = Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarPergunta"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
taxaEmbLevanteCtrlService.borrar(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
taxaEmbLevanteCtrlList.removeItem(taxaEmbLevanteCtrl);
}
} catch (Exception ex) {
log.error("Erro apagar pricing : " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
refreshLista();
}
public void onClick$btnRefresh(Event ev) {
refreshLista();
}
public void refreshLista() {
HibernateSearchObject<TaxaEmbLevanteCtrl> busquedaTaxaEmbLevanteCtrl =
new HibernateSearchObject<TaxaEmbLevanteCtrl>(TaxaEmbLevanteCtrl.class,
pagingTaxaEmbLevanteCtrl.getPageSize());
Comboitem rutaItem = cmbRuta.getSelectedItem();
if (rutaItem != null){
Ruta ruta = (Ruta) rutaItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("ruta", ruta);
}
Comboitem origenItem = cmbParadaOrigem.getSelectedItem();
if (origenItem != null){
Parada origen = (Parada) origenItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("origem", origen);
}
Comboitem destinoItem = cmbParadaDestino.getSelectedItem();
if (origenItem != null){
Parada destino = (Parada) destinoItem.getValue();
busquedaTaxaEmbLevanteCtrl.addFilterEqual("destino", destino);
}
busquedaTaxaEmbLevanteCtrl.addFilterEqual("activo", Boolean.TRUE);
busquedaTaxaEmbLevanteCtrl.addSortAsc("ruta.descruta");
plwTaxaEmbLevanteCtrl.init(busquedaTaxaEmbLevanteCtrl, taxaEmbLevanteCtrlList, pagingTaxaEmbLevanteCtrl);
if (taxaEmbLevanteCtrlList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
public MyListbox getTaxaEmbLevanteCtrlList() {
return taxaEmbLevanteCtrlList;
}
public void setTaxaEmbLevanteCtrlList(MyListbox taxaEmbLevanteCtrlList) {
this.taxaEmbLevanteCtrlList = taxaEmbLevanteCtrlList;
}
public Paging getPagingTaxaEmbLevanteCtrl() {
return pagingTaxaEmbLevanteCtrl;
}
public void setPagingTaxaEmbLevanteCtrl(Paging pagingTaxaEmbLevanteCtrl) {
this.pagingTaxaEmbLevanteCtrl = pagingTaxaEmbLevanteCtrl;
}
public List<Ruta> getLsRuta() {
return lsRuta;
}
public void setLsRuta(List<Ruta> lsRuta) {
this.lsRuta = lsRuta;
}
public List<Parada> getLsParadaOrigem() {
return lsParadaOrigem;
}
public void setLsParadaOrigem(List<Parada> lsParadaOrigem) {
this.lsParadaOrigem = lsParadaOrigem;
}
public List<Parada> getLsParadaDestino() {
return lsParadaDestino;
}
public void setLsParadaDestino(List<Parada> lsParadaDestino) {
this.lsParadaDestino = lsParadaDestino;
}
public PagedListWrapper<TaxaEmbLevanteCtrl> getPlwTaxaEmbLevanteCtrl() {
return plwTaxaEmbLevanteCtrl;
}
public void setPlwTaxaEmbLevanteCtrl(PagedListWrapper<TaxaEmbLevanteCtrl> plwTaxaEmbLevanteCtrl) {
this.plwTaxaEmbLevanteCtrl = plwTaxaEmbLevanteCtrl;
}
}

View File

@ -4,15 +4,9 @@
*/
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm;
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.RenderTaxaEmbarqueOrgao;
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;
@ -24,125 +18,134 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm;
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.RenderTaxaEmbarqueOrgao;
/**
*
*
* @author Administrador
*/
@Controller("busquedaTaxaEmbarqueKmController")
@Scope("prototype")
public class BusquedaTaxaEmbarqueKmController extends MyGenericForwardComposer {
@Autowired
private transient PagedListWrapper<OrgaoConcedente> plwOrgao;
private MyListbox taxaEmbarqueKmList;
private Paging pagingTaxaEmbarqueKm;
private Textbox txtOrgao;
private static final long serialVersionUID = 1L;
@Autowired
private transient PagedListWrapper<OrgaoConcedente> plwOrgao;
private MyListbox taxaEmbarqueKmList;
private Paging pagingTaxaEmbarqueKm;
private Textbox txtOrgao;
public Paging getPagingTaxaEmbarqueKm() {
return pagingTaxaEmbarqueKm;
}
public Paging getPagingTaxaEmbarqueKm() {
return pagingTaxaEmbarqueKm;
}
public void setPagingTaxaEmbarqueKm(Paging pagingTaxaEmbarqueKm) {
this.pagingTaxaEmbarqueKm = pagingTaxaEmbarqueKm;
}
public void setPagingTaxaEmbarqueKm(Paging pagingTaxaEmbarqueKm) {
this.pagingTaxaEmbarqueKm = pagingTaxaEmbarqueKm;
}
public PagedListWrapper<OrgaoConcedente> getPlwOrgao() {
return plwOrgao;
}
public PagedListWrapper<OrgaoConcedente> getPlwOrgao() {
return plwOrgao;
}
public void setPlwOrgao(PagedListWrapper<OrgaoConcedente> plwOrgao) {
this.plwOrgao = plwOrgao;
}
public void setPlwOrgao(PagedListWrapper<OrgaoConcedente> plwOrgao) {
this.plwOrgao = plwOrgao;
}
public MyListbox getTaxaEmbarqueKmList() {
return taxaEmbarqueKmList;
}
public MyListbox getTaxaEmbarqueKmList() {
return taxaEmbarqueKmList;
}
public void setTaxaEmbarqueKmList(MyListbox taxaEmbarqueKmList) {
this.taxaEmbarqueKmList = taxaEmbarqueKmList;
}
public void setTaxaEmbarqueKmList(MyListbox taxaEmbarqueKmList) {
this.taxaEmbarqueKmList = taxaEmbarqueKmList;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
taxaEmbarqueKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao());
taxaEmbarqueKmList.addEventListener("onDoubleClick", new EventListener() {
taxaEmbarqueKmList.setItemRenderer(new RenderTaxaEmbarqueOrgao());
taxaEmbarqueKmList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
OrgaoConcedente c = (OrgaoConcedente) taxaEmbarqueKmList.getSelected();
verTaxaEmbarqueKm(c);
}
});
@Override
public void onEvent(Event event) throws Exception {
OrgaoConcedente c = (OrgaoConcedente) taxaEmbarqueKmList.getSelected();
verTaxaEmbarqueKm(c);
}
});
refreshLista();
refreshLista();
txtOrgao.focus();
}
txtOrgao.focus();
}
private void verTaxaEmbarqueKm(OrgaoConcedente o) {
if (o == null) {
return;
}
private void verTaxaEmbarqueKm(OrgaoConcedente o) {
if (o == null) {
return;
}
Map args = new HashMap();
args.put("orgao", o);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
Map args = new HashMap();
args.put("orgao", o);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL);
}
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL);
}
private void refreshLista() {
private void refreshLista() {
HibernateSearchObject<OrgaoConcedente> taxaEmbarqueKmBusqueda =new HibernateSearchObject<OrgaoConcedente>(OrgaoConcedente.class,pagingTaxaEmbarqueKm.getPageSize());
HibernateSearchObject<OrgaoConcedente> taxaEmbarqueKmBusqueda = new HibernateSearchObject<OrgaoConcedente>(OrgaoConcedente.class, pagingTaxaEmbarqueKm.getPageSize());
taxaEmbarqueKmBusqueda.addFilterEqual("activo", Boolean.TRUE);
taxaEmbarqueKmBusqueda.addFilterEqual("activo", Boolean.TRUE);
if (!txtOrgao.getValue().equals("")) {
taxaEmbarqueKmBusqueda.addFilterLike("descOrgao","%" + txtOrgao.getText().trim().concat("%"));
}
if (!txtOrgao.getValue().equals("")) {
taxaEmbarqueKmBusqueda.addFilterLike("descOrgao", "%" + txtOrgao.getText().trim().concat("%"));
}
taxaEmbarqueKmBusqueda.addSortAsc("descOrgao");
taxaEmbarqueKmBusqueda.addSortAsc("descOrgao");
plwOrgao.init(taxaEmbarqueKmBusqueda, taxaEmbarqueKmList, pagingTaxaEmbarqueKm);
plwOrgao.init(taxaEmbarqueKmBusqueda, taxaEmbarqueKmList, pagingTaxaEmbarqueKm);
if (taxaEmbarqueKmList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) {
}
}
}
if (taxaEmbarqueKmList.getData().length == 0) {
try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
Labels.getLabel("busquedaTaxaEmbarqueKmController.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) {
verTaxaEmbarqueKm(new TaxaEmbarqueKm());
}
public void onClick$btnNovo(Event ev) {
verTaxaEmbarqueKm(new TaxaEmbarqueKm());
}
private void verTaxaEmbarqueKm(TaxaEmbarqueKm tx) {
if (tx == null) {
return;
}
private void verTaxaEmbarqueKm(TaxaEmbarqueKm tx) {
if (tx == null) {
return;
}
Map args = new HashMap();
args.put("orgao", null);
args.put("taxaEmbarqueKm", tx);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
Map args = new HashMap();
args.put("orgao", null);
args.put("taxaEmbarqueKm", tx);
args.put("taxaEmbarqueKmList", taxaEmbarqueKmList);
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL);
}
openWindow("/gui/tarifas/editarTaxaEmbarqueKm.zul",
Labels.getLabel("busquedaTaxaEmbarqueKmController.window.title"),
args, MODAL);
}
}

View File

@ -0,0 +1,300 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import java.util.ArrayList;
import java.util.Calendar;
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;
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.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.Ruta;
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.RutaService;
import com.rjconsultores.ventaboletos.service.TaxaEmbLevanteCtrlService;
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.render.RenderTaxaEmbLevante;
@Controller("editarTaxaEmbLevanteController")
@Scope("prototype")
public class EditarTaxaEmbLevanteController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(EditarTaxaEmbLevanteController.class);
@Autowired
private TaxaEmbLevanteCtrlService taxaEmbLevanteCtrlService;
@Autowired
private RutaService rutaService;
@Autowired
private ParadaService paradaService;
private TaxaEmbLevante taxaEmbLevante;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private MyListbox taxaEmbLevanteCtrlList;
private MyListbox taxaEmbLevanteList;
private List<Ruta> lsRuta;
private Combobox cmbRuta;
private Combobox cmbParadaOrigem;
private List<Parada> lsParadaOrigem;
private Combobox cmbParadaDestino;
private List<Parada> lsParadaDestino;
private List<TaxaEmbLevante> listTaxaLevante;
@Override
public void doAfterCompose(Component comp) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrl");
taxaEmbLevanteCtrlList = (MyListbox) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrlList");
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null)
taxaEmbLevanteCtrl = taxaEmbLevanteCtrlService.obtenerID(taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId());
listTaxaLevante = taxaEmbLevanteCtrl.getTaxaEmbLevanteList();
super.doAfterCompose(comp);
taxaEmbLevanteList.setItemRenderer(new RenderTaxaEmbLevante());
taxaEmbLevanteList.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevante = (TaxaEmbLevante) taxaEmbLevanteList.getSelected();
}
});
taxaEmbLevanteList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
taxaEmbLevante = (TaxaEmbLevante) taxaEmbLevanteList.getSelected();
itemSelecionado(taxaEmbLevante);
}
});
lsRuta = rutaService.obtenerTodos();
lsParadaOrigem = new ArrayList<Parada>();
lsParadaDestino = new ArrayList<Parada>();
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null) {
Comboitem ci = new Comboitem(taxaEmbLevanteCtrl.getRuta().toString());
ci.setAttribute("value", taxaEmbLevanteCtrl.getRuta());
ci.setValue(taxaEmbLevanteCtrl.getRuta());
ci.setParent(cmbRuta);
cmbRuta.setSelectedItem(ci);
this.selectRuta();
ci = new Comboitem(taxaEmbLevanteCtrl.getOrigem().getDescparada());
ci.setAttribute("value", taxaEmbLevanteCtrl.getOrigem());
ci.setValue(taxaEmbLevanteCtrl.getOrigem());
ci.setParent(cmbParadaOrigem);
cmbParadaOrigem.setSelectedItem(ci);
ci = new Comboitem(taxaEmbLevanteCtrl.getDestino().getDescparada());
ci.setAttribute("value", taxaEmbLevanteCtrl.getDestino());
ci.setValue(taxaEmbLevanteCtrl.getDestino());
ci.setParent(cmbParadaDestino);
cmbParadaDestino.setSelectedItem(ci);
taxaEmbLevanteCtrl = taxaEmbLevanteCtrlService.obtenerID(taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId());
List<TaxaEmbLevante> list = taxaEmbLevanteCtrl.getTaxaEmbLevanteList();
taxaEmbLevanteList.setData(list);
} else {
taxaEmbLevanteList.setData(new ArrayList<TaxaEmbLevante>());
}
}
public void itemSelecionado(TaxaEmbLevante taxa) {
Map args = new HashMap();
args.put("taxaEmbLevante", taxa);
args.put("taxaEmbLevanteList", taxaEmbLevanteList);
args.put("taxaEmbLevanteCtrl", taxaEmbLevanteCtrl);
args.put("listTaxaLevante", listTaxaLevante);
openWindow("/gui/tarifas/editarTaxaEmbLevanteParada.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.editar.window.title"), args, MODAL);
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
if (cmbRuta.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setRuta((Ruta) cmbRuta.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (cmbParadaOrigem.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setOrigem((Parada) cmbParadaOrigem.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (cmbParadaDestino.getSelectedItem().getValue() != null) {
taxaEmbLevanteCtrl.setDestino((Parada) cmbParadaDestino.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
taxaEmbLevanteCtrl.setTaxaEmbLevanteList(listTaxaLevante);
if (taxaEmbLevanteCtrl.getTaxaEmbLevanteCtrlId() != null) {
taxaEmbLevanteCtrlList.removeItem(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlService.actualizacion(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlList.updateItem(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteControllerMSG.suscribirOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} else {
taxaEmbLevanteCtrlService.suscribir(taxaEmbLevanteCtrl);
taxaEmbLevanteCtrlList.addItemNovo(taxaEmbLevanteCtrl);
Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteControllerMSG.suscribirOK"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
}
}
public void onClick$btnApagar(Event ev) throws InterruptedException {
try {
int resp = Messagebox.show(
Labels.getLabel("busquedaTaxaEmbLevanteController.MSG.borrarPergunta"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (resp == Messagebox.YES) {
taxaEmbLevante.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
taxaEmbLevante.setFecmodif(Calendar.getInstance().getTime());
taxaEmbLevante.setActivo(Boolean.FALSE);
int index = listTaxaLevante.indexOf(taxaEmbLevante);
listTaxaLevante.set(index, taxaEmbLevante);
taxaEmbLevanteList.removeItem(taxaEmbLevante);
}
} catch (Exception ex) {
log.error("Erro apagar pricing : " + ex);
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
public void onClick$btnNovo(Event ev) {
this.itemSelecionado(new TaxaEmbLevante());
}
public void onSelect$cmbRuta(Event ev) {
this.selectRuta();
}
public void selectRuta() {
Ruta ruta = (Ruta) cmbRuta.getSelectedItem().getValue();
ruta = rutaService.obtenerID(ruta.getRutaId());
for (RutaSecuencia rutaSecuencia : ruta.getRutaSecuenciaList()) {
lsParadaOrigem.add(rutaSecuencia.getTramo().getOrigem());
lsParadaDestino.add(rutaSecuencia.getTramo().getDestino());
}
lsParadaDestino.add(paradaService.obtenerID(Parada.ID_PARADA_TODOS));
BindingListModel listModelParadaOrigem = new BindingListModelList(lsParadaOrigem, true);
cmbParadaOrigem.setModel(listModelParadaOrigem);
BindingListModel listModelParadaDestino = new BindingListModelList(lsParadaDestino, true);
cmbParadaDestino.setModel(listModelParadaDestino);
}
public List<Ruta> getLsRuta() {
return lsRuta;
}
public void setLsRuta(List<Ruta> lsRuta) {
this.lsRuta = lsRuta;
}
public List<Parada> getLsParadaOrigem() {
return lsParadaOrigem;
}
public void setLsParadaOrigem(List<Parada> lsParadaOrigem) {
this.lsParadaOrigem = lsParadaOrigem;
}
public List<Parada> getLsParadaDestino() {
return lsParadaDestino;
}
public void setLsParadaDestino(List<Parada> lsParadaDestino) {
this.lsParadaDestino = lsParadaDestino;
}
public TaxaEmbLevanteCtrl getTaxaEmbLevanteCtrl() {
return taxaEmbLevanteCtrl;
}
public void setTaxaEmbLevanteCtrl(TaxaEmbLevanteCtrl taxaEmbLevanteCtrl) {
this.taxaEmbLevanteCtrl = taxaEmbLevanteCtrl;
}
public MyListbox getTaxaEmbLevanteCtrlList() {
return taxaEmbLevanteCtrlList;
}
public void setTaxaEmbLevanteCtrlList(MyListbox taxaEmbLevanteCtrlList) {
this.taxaEmbLevanteCtrlList = taxaEmbLevanteCtrlList;
}
public TaxaEmbLevante getTaxaEmbLevante() {
return taxaEmbLevante;
}
public void setTaxaEmbLevante(TaxaEmbLevante taxaEmbLevante) {
this.taxaEmbLevante = taxaEmbLevante;
}
}

View File

@ -0,0 +1,138 @@
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
import java.util.Calendar;
import java.util.List;
import org.apache.commons.lang.math.NumberUtils;
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.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Comboitem;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
@Controller("editarTaxaEmbLevanteParadaController")
@Scope("prototype")
public class EditarTaxaEmbLevanteParadaController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
private MyComboboxParada cmbParada;
private MyTextboxDecimal txImporte;
private TaxaEmbLevanteCtrl taxaEmbLevanteCtrl;
private TaxaEmbLevante taxaEmbLevante;
private MyListbox taxaEmbLevanteList;
private List<TaxaEmbLevante> listTaxaLevante;
@Override
public void doAfterCompose(Component comp) throws Exception {
taxaEmbLevanteCtrl = (TaxaEmbLevanteCtrl) Executions.getCurrent().getArg().get("taxaEmbLevanteCtrl");
taxaEmbLevante = (TaxaEmbLevante) Executions.getCurrent().getArg().get("taxaEmbLevante");
taxaEmbLevanteList = (MyListbox) Executions.getCurrent().getArg().get("taxaEmbLevanteList");
listTaxaLevante = ((List<TaxaEmbLevante>) Executions.getCurrent().getArg().get("listTaxaLevante"));
super.doAfterCompose(comp);
if (taxaEmbLevante.getTaxaEmbLevanteId() != null) {
Comboitem ci = new Comboitem(taxaEmbLevante.getParada().toString());
ci.setAttribute("value", taxaEmbLevante.getParada());
ci.setValue(taxaEmbLevante.getParada());
ci.setParent(cmbParada);
cmbParada.setSelectedItem(ci);
txImporte.setValue(taxaEmbLevante.getImporte().toString());
} else {
txImporte.setValue("0");
}
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
if (cmbParada.getSelectedItem().getValue() != null) {
taxaEmbLevante.setParada((Parada) cmbParada.getSelectedItem().getValue());
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
if (txImporte.getValue() != null) {
taxaEmbLevante.setImporte(NumberUtils.createBigDecimal(txImporte.getValue().replace(",", ".")));
} else {
Messagebox.show(
Labels.getLabel("MSG.Error"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
taxaEmbLevante.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
taxaEmbLevante.setFecmodif(Calendar.getInstance().getTime());
taxaEmbLevante.setActivo(Boolean.TRUE);
if (taxaEmbLevante.getTaxaEmbLevanteId() != null) {
taxaEmbLevanteList.removeItem(taxaEmbLevante);
int index = listTaxaLevante.indexOf(taxaEmbLevante);
listTaxaLevante.set(index, taxaEmbLevante);
taxaEmbLevanteList.updateItem(taxaEmbLevante);
} else {
boolean existeParada = false;
for (TaxaEmbLevante taxa : listTaxaLevante) {
if (taxa.getParada().equals(taxaEmbLevante.getParada()))
existeParada = true;
}
if (!existeParada) {
taxaEmbLevante.setTaxaEmbLevanteCtrl(taxaEmbLevanteCtrl);
listTaxaLevante.add(taxaEmbLevante);
taxaEmbLevanteList.addItemNovo(taxaEmbLevante);
} else {
Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
closeWindow();
}
public TaxaEmbLevante getTaxaEmbLevante() {
return taxaEmbLevante;
}
public void setTaxaEmbLevante(TaxaEmbLevante taxaEmbLevante) {
this.taxaEmbLevante = taxaEmbLevante;
}
public MyListbox getTaxaEmbLevanteList() {
return taxaEmbLevanteList;
}
public void setTaxaEmbLevanteList(MyListbox taxaEmbLevanteList) {
this.taxaEmbLevanteList = taxaEmbLevanteList;
}
public TaxaEmbLevanteCtrl getTaxaEmbLevanteCtrl() {
return taxaEmbLevanteCtrl;
}
public void setTaxaEmbLevanteCtrl(TaxaEmbLevanteCtrl taxaEmbLevanteCtrl) {
this.taxaEmbLevanteCtrl = taxaEmbLevanteCtrl;
}
}

View File

@ -4,10 +4,9 @@
*/
package com.rjconsultores.ventaboletos.web.utilerias;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.service.ParadaService;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.WrongValueException;
@ -19,126 +18,138 @@ import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zkplus.spring.SpringUtil;
import org.zkoss.zul.Combobox;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.service.ParadaService;
/**
*
*
* @author Administrador
*/
public class MyComboboxParada extends Combobox {
private static Logger log = Logger.getLogger(MyComboboxParada.class);
public final static int minLength = 2;
private ParadaService paradaService;
private List<Parada> lsParadas;
private Parada initialValue;
private Integer indiceSelected = null;
private boolean sinTodos = false;
private Integer ID_TODOS = -1;
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(MyComboboxParada.class);
public final static int minLength = 2;
private ParadaService paradaService;
private List<Parada> lsParadas;
private Parada initialValue;
private Integer indiceSelected = null;
private boolean sinTodos = false;
private Integer ID_TODOS = -1;
public MyComboboxParada() {
super();
paradaService = (ParadaService) SpringUtil.getBean("paradaService");
lsParadas = new ArrayList<Parada>();
public MyComboboxParada() {
super();
this.setAutodrop(false);
this.setAutocomplete(false);
paradaService = (ParadaService) SpringUtil.getBean("paradaService");
lsParadas = new ArrayList<Parada>();
this.addEventListener("onOK", new EventListener() {
this.setAutodrop(false);
this.setAutocomplete(false);
@Override
public void onEvent(Event event) throws Exception {
String strParada = MyComboboxParada.this.getText().toUpperCase();
if (strParada.length() < MyComboboxParada.minLength) {
return;
}
if (!strParada.isEmpty()) {
lsParadas = paradaService.buscaLike(strParada);
this.addEventListener("onOK", new EventListener() {
if (sinTodos) {
log.debug("Sin todos");
Parada p = paradaService.obtenerID(ID_TODOS);
lsParadas.remove(p);
}
@Override
public void onEvent(Event event) throws Exception {
String strParada = MyComboboxParada.this.getText().toUpperCase();
if (strParada.length() < MyComboboxParada.minLength) {
return;
}
if (!strParada.isEmpty()) {
lsParadas = paradaService.buscaLike(strParada);
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
indiceSelected = null;
if (!lsParadas.isEmpty()) {
indiceSelected = 0;
}
if (sinTodos) {
log.debug("Sin todos");
Parada p = paradaService.obtenerID(ID_TODOS);
lsParadas.remove(p);
}
MyComboboxParada.this.open();
} else {
lsParadas.clear();
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
setIndiceSelected(null);
if (!lsParadas.isEmpty()) {
setIndiceSelected(0);
}
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
}
}
});
MyComboboxParada.this.open();
} else {
lsParadas.clear();
this.addEventListener("onChanging", new EventListener() {
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
}
}
});
@Override
public void onEvent(Event event) throws Exception {
InputEvent ev = (InputEvent) event;
String strParada = ev.getValue();
if (strParada.length() < 2) {
lsParadas.clear();
this.addEventListener("onChanging", new EventListener() {
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
@Override
public void onEvent(Event event) throws Exception {
InputEvent ev = (InputEvent) event;
String strParada = ev.getValue();
if (strParada.length() < 2) {
lsParadas.clear();
MyComboboxParada.this.close();
}
}
});
}
BindingListModel listModelParada = new BindingListModelList(lsParadas, true);
MyComboboxParada.this.setModel(listModelParada);
public Parada getInitialValue() {
return initialValue;
}
MyComboboxParada.this.close();
}
}
});
}
public void setInitialValue(Parada initialValue) {
if (initialValue == null) {
return;
}
List<Parada> ls = new ArrayList<Parada>();
ls.add(initialValue);
public Parada getInitialValue() {
return initialValue;
}
this.setModel(new BindingListModelList(ls, false));
this.setText(initialValue.getDescparada());
}
public void setInitialValue(Parada initialValue) {
if (initialValue == null) {
return;
}
List<Parada> ls = new ArrayList<Parada>();
ls.add(initialValue);
/**
*
* @param checaBusqueda
* @throws WrongValueException
*/
public String getValue(boolean checaBusqueda) throws WrongValueException {
if (checaBusqueda) {
if (this.getSelectedItem() == null) {
throw new WrongValueException(this, Labels.getLabel("MSG.Error.combobox.hacerBusqueda"));
}
}
return super.getValue();
}
this.setModel(new BindingListModelList(ls, false));
this.setText(initialValue.getDescparada());
}
public boolean isSinTodos() {
return sinTodos;
}
/**
*
* @param checaBusqueda
* @throws WrongValueException
*/
public String getValue(boolean checaBusqueda) throws WrongValueException {
if (checaBusqueda) {
if (this.getSelectedItem() == null) {
throw new WrongValueException(this, Labels.getLabel("MSG.Error.combobox.hacerBusqueda"));
}
}
public void setSinTodos(boolean sinTodos) {
this.sinTodos = sinTodos;
}
public void setComboItemByParada(Parada parada) {
List<Parada> ls = new ArrayList<Parada>();
ls.add(parada);
return super.getValue();
}
this.setModel(new BindingListModelList(ls, false));
this.setText(parada.getDescparada());
}
public boolean isSinTodos() {
return sinTodos;
}
public void setSinTodos(boolean sinTodos) {
this.sinTodos = sinTodos;
}
public void setComboItemByParada(Parada parada) {
List<Parada> ls = new ArrayList<Parada>();
ls.add(parada);
this.setModel(new BindingListModelList(ls, false));
this.setText(parada.getDescparada());
}
public Integer getIndiceSelected() {
return indiceSelected;
}
public void setIndiceSelected(Integer indiceSelected) {
this.indiceSelected = indiceSelected;
}
}

View File

@ -5,11 +5,9 @@
package com.rjconsultores.ventaboletos.web.utilerias;
import java.util.Map;
import org.apache.log4j.Logger;
import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Path;
import org.zkoss.zk.ui.UiException;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Window;
@ -20,6 +18,7 @@ import org.zkoss.zul.Window;
*/
public class MyGenericForwardComposer extends GenericForwardComposer {
private static final long serialVersionUID = 1L;
public static int OVERLAPPED = PantallaUtileria.OVERLAPPED;
public static int MODAL = PantallaUtileria.MODAL;
private static Logger log = Logger.getLogger(MyGenericForwardComposer.class);
@ -52,17 +51,18 @@ public class MyGenericForwardComposer extends GenericForwardComposer {
@Override
public boolean doCatch(Throwable ex) throws Exception {
if (ex instanceof WrongValueException){
throw (WrongValueException)ex;
if (ex instanceof WrongValueException) {
throw (WrongValueException) ex;
}
log.error("Erro ao abrir a janela", ex);
alert(Labels.getLabel("MSG.Error.Open.Windows"));
this.closeWindow();
return true;
}
}

View File

@ -0,0 +1,25 @@
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial;
import org.zkoss.util.resource.Labels;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
public class ItemMenuTarifasTaxaEmbLevante extends DefaultItemMenuSistema {
public ItemMenuTarifasTaxaEmbLevante() {
super("busquedaTaxaEmbLevanteController.window.title");
}
@Override
public String getClaveMenu() {
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.TAXAEMBLEVANTE";
}
@Override
public void ejecutar() {
PantallaUtileria.openWindow("/gui/tarifas/busquedaTaxaEmbLevante.zul",
Labels.getLabel("busquedaTaxaEmbLevanteController.window.title"), null, desktop);
}
}

View File

@ -27,17 +27,17 @@ import org.zkoss.zul.event.PagingEvent;
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
* Helper class for getting a paged record list that can be sorted by DB. <br>
* <br>
*
*
* All not used Listheaders must me declared as: <br>
* listheader.setSortAscending(""); <br>
* listheader.setSortDescending(""); <br>
*
*
* <br>
* zkoss 3.6.0 or greater (by using FieldComparator) <br>
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
*
*
* @changes 07/24/2009: sge changes for clustering.<br>
*
*
* @author bbruhns
* @author sgerth
*/
@ -45,212 +45,200 @@ import org.zkoss.zul.event.PagingEvent;
@Scope("prototype")
public class PagedListWrapper<E> implements Serializable {
private static final long serialVersionUID = -7399762307122148637L;
static final Logger logger = Logger.getLogger(PagedListWrapper.class);
// Service that calls the DAO methods
@Autowired
private PagedListService pagedListService;
// param. The listboxes paging component
private Paging paging;
// param. The SearchObject
private HibernateSearchObject<E> hibernateSearchObject;
// not used yet. so it's init to 'true'.
private final boolean supportPaging = true;
private MyListbox listBox;
private static final long serialVersionUID = -7399762307122148637L;
static final Logger logger = Logger.getLogger(PagedListWrapper.class);
// Service that calls the DAO methods
@Autowired
private PagedListService pagedListService;
// param. The listboxes paging component
private Paging paging;
// param. The SearchObject
private HibernateSearchObject<E> hibernateSearchObject;
// not used yet. so it's init to 'true'.
private final boolean supportPaging = true;
private MyListbox listBox;
/**
* default constructor.<br>
*/
public PagedListWrapper() {
super();
}
/**
* default constructor.<br>
*/
public PagedListWrapper() {
super();
}
public void init(HibernateSearchObject<E> hibernateSearchObject1, MyListbox listBox, Paging paging1) {
this.listBox = listBox;
setPaging(paging1);
setListeners();
public void init(HibernateSearchObject<E> hibernateSearchObject1, MyListbox listBox, Paging paging1) {
this.listBox = listBox;
setPaging(paging1);
setListeners();
setSearchObject(hibernateSearchObject1);
}
setSearchObject(hibernateSearchObject1);
}
private void initModel() {
getSearchObject().setFirstResult(0);
getSearchObject().setMaxResults(getPageSize());
private void initModel() {
getSearchObject().setFirstResult(0);
getSearchObject().setMaxResults(getPageSize());
SearchResult<E> searchResult = getPagedListService().getSRBySearchObject(getSearchObject());
getPaging().setTotalSize(searchResult.getTotalCount());
listBox.setData(searchResult.getResult());
}
/**
* Refreshes the list by calling the DAO methode with the modified search object. <br>
*
* @param so
* SearchObject, holds the entity and properties to search. <br>
* @param start
* Row to start. <br>
* @param pageSize
* Count rows to fetch. <br>
*/
void refreshModel(int start) {
getSearchObject().setFirstResult(start);
getSearchObject().setMaxResults(getPageSize());
SearchResult<E> searchResult = getPagedListService().getSRBySearchObject(getSearchObject());
getPaging().setTotalSize(searchResult.getTotalCount());
listBox.setData(searchResult.getResult());
}
listBox.setData(getPagedListService().getBySearchObject(getSearchObject()));
}
/**
* Refreshes the list by calling the DAO methode with the modified search
* object. <br>
*
* @param so
* SearchObject, holds the entity and properties to search. <br>
* @param start
* Row to start. <br>
* @param pageSize
* Count rows to fetch. <br>
*/
void refreshModel(int start) {
getSearchObject().setFirstResult(start);
getSearchObject().setMaxResults(getPageSize());
boolean isSupportPagging() {
return supportPaging;
}
public void clearFilters() {
getSearchObject().clearFilters();
initModel();
}
listBox.setData(getPagedListService().getBySearchObject(getSearchObject()));
}
/**
* Sets the listeners. <br>
* <br>
* 1. "onPaging" for the paging component. <br>
* 2. "onSort" for all listheaders that have a sortDirection declared. <br>
* All not used Listheaders must me declared as: listheader.setSortAscending(""); listheader.setSortDescending(""); <br>
*/
private void setListeners() {
boolean isSupportPagging() {
return supportPaging;
}
// Add 'onPaging' listener to the paging component
getPaging().addEventListener("onPaging", new OnPagingEventListener());
public void clearFilters() {
getSearchObject().clearFilters();
initModel();
}
Listhead listhead = listBox.getListhead();
List<?> list = listhead.getChildren();
/**
* Sets the listeners. <br>
* <br>
* 1. "onPaging" for the paging component. <br>
* 2. "onSort" for all listheaders that have a sortDirection declared. <br>
* All not used Listheaders must me declared as:
* listheader.setSortAscending(""); listheader.setSortDescending(""); <br>
*/
private void setListeners() {
OnSortEventListener onSortEventListener = new OnSortEventListener();
for (Object object : list) {
if (object instanceof Listheader) {
Listheader lheader = (Listheader) object;
// Add 'onPaging' listener to the paging component
getPaging().addEventListener("onPaging", new OnPagingEventListener());
if (lheader.getSortAscending() != null || lheader.getSortDescending() != null) {
lheader.addEventListener("onSort", onSortEventListener);
}
}
}
}
Listhead listhead = listBox.getListhead();
List<?> list = listhead.getChildren();
/**
* "onPaging" eventlistener for the paging component. <br>
* <br>
* Calculates the next page by currentPage and pageSize values. <br>
* Calls the methode for refreshing the data with the new rowStart and pageSize. <br>
*/
public final class OnPagingEventListener implements EventListener {
OnSortEventListener onSortEventListener = new OnSortEventListener();
for (Object object : list) {
if (object instanceof Listheader) {
Listheader lheader = (Listheader) object;
@Override
public void onEvent(Event event) throws Exception {
if (lheader.getSortAscending() != null || lheader.getSortDescending() != null) {
PagingEvent pe = (PagingEvent) event;
int pageNo = pe.getActivePage();
int start = pageNo * getPageSize();
// if (logger.isDebugEnabled()) {
// logger.debug("--> : " + lheader.getId());
// }
lheader.addEventListener("onSort", onSortEventListener);
}
}
}
}
// if (logger.isDebugEnabled()) {
// logger.debug("--> : " + start + "/" + getPageSize());
// }
/**
* "onPaging" eventlistener for the paging component. <br>
* <br>
* Calculates the next page by currentPage and pageSize values. <br>
* Calls the methode for refreshing the data with the new rowStart and
* pageSize. <br>
*/
public final class OnPagingEventListener implements EventListener {
// refresh the list
refreshModel(start);
}
}
@Override
public void onEvent(Event event) throws Exception {
/**
* "onSort" eventlistener for the listheader components. <br>
* <br>
* Checks wich listheader is clicked and checks which orderDirection must be set. <br>
*
* Calls the methode for refreshing the data with the new ordering. and the remembered rowStart and pageSize. <br>
*/
public final class OnSortEventListener implements EventListener, Serializable {
PagingEvent pe = (PagingEvent) event;
int pageNo = pe.getActivePage();
int start = pageNo * getPageSize();
private static final long serialVersionUID = 1L;
// if (logger.isDebugEnabled()) {
// logger.debug("--> : " + start + "/" + getPageSize());
// }
@Override
public void onEvent(Event event) throws Exception {
final Listheader lh = (Listheader) event.getTarget();
final String sortDirection = lh.getSortDirection();
// refresh the list
refreshModel(start);
}
}
if ("ascending".equals(sortDirection)) {
final Comparator<?> cmpr = lh.getSortDescending();
if (cmpr instanceof FieldComparator) {
String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "DESC").trim();
/**
* "onSort" eventlistener for the listheader components. <br>
* <br>
* Checks wich listheader is clicked and checks which orderDirection must be
* set. <br>
*
* Calls the methode for refreshing the data with the new ordering. and the
* remembered rowStart and pageSize. <br>
*/
public final class OnSortEventListener implements EventListener, Serializable {
// update SearchObject with orderBy
getSearchObject().clearSorts();
getSearchObject().addSort(orderBy, true);
}
} else if ("descending".equals(sortDirection) || "natural".equals(sortDirection) || Strings.isBlank(sortDirection)) {
final Comparator<?> cmpr = lh.getSortAscending();
if (cmpr instanceof FieldComparator) {
String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "ASC").trim();
private static final long serialVersionUID = 1L;
// update SearchObject with orderBy
getSearchObject().clearSorts();
getSearchObject().addSort(orderBy, false);
}
}
@Override
public void onEvent(Event event) throws Exception {
final Listheader lh = (Listheader) event.getTarget();
final String sortDirection = lh.getSortDirection();
// if (logger.isDebugEnabled()) {
// logger.debug("--> : " + lh.getId() + "/" + sortDirection);
// logger.debug("--> added getSorts() : " + getSearchObject().getSorts().toString());
// }
if ("ascending".equals(sortDirection)) {
final Comparator<?> cmpr = lh.getSortDescending();
if (cmpr instanceof FieldComparator) {
String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "DESC").trim();
if (isSupportPagging()) {
// refresh the list
getPaging().setActivePage(0);
refreshModel(0);
}
}
}
// update SearchObject with orderBy
getSearchObject().clearSorts();
getSearchObject().addSort(orderBy, true);
}
} else if ("descending".equals(sortDirection) || "natural".equals(sortDirection) || Strings.isBlank(sortDirection)) {
final Comparator<?> cmpr = lh.getSortAscending();
if (cmpr instanceof FieldComparator) {
String orderBy = ((FieldComparator) cmpr).getOrderBy();
orderBy = StringUtils.substringBefore(orderBy, "ASC").trim();
public PagedListService getPagedListService() {
return pagedListService;
}
// update SearchObject with orderBy
getSearchObject().clearSorts();
getSearchObject().addSort(orderBy, false);
}
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// ++++++++++++++++++ getter / setter +++++++++++++++++++//
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
HibernateSearchObject<E> getSearchObject() {
return hibernateSearchObject;
}
// if (logger.isDebugEnabled()) {
// logger.debug("--> : " + lh.getId() + "/" + sortDirection);
// logger.debug("--> added getSorts() : " + getSearchObject().getSorts().toString());
// }
public int getPageSize() {
return getPaging().getPageSize();
}
if (isSupportPagging()) {
// refresh the list
getPaging().setActivePage(0);
refreshModel(0);
}
}
}
Paging getPaging() {
return paging;
}
public PagedListService getPagedListService() {
return pagedListService;
}
public void setPagedListService(PagedListService pagedListService) {
this.pagedListService = pagedListService;
}
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// ++++++++++++++++++ getter / setter +++++++++++++++++++//
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++//
HibernateSearchObject<E> getSearchObject() {
return hibernateSearchObject;
}
private void setPaging(Paging paging) {
this.paging = paging;
}
public int getPageSize() {
return getPaging().getPageSize();
}
Paging getPaging() {
return paging;
}
public void setPagedListService(PagedListService pagedListService) {
this.pagedListService = pagedListService;
}
private void setPaging(Paging paging) {
this.paging = paging;
}
public void setSearchObject(HibernateSearchObject<E> hibernateSearchObject1) {
this.hibernateSearchObject = hibernateSearchObject1;
initModel();
}
public void setSearchObject(HibernateSearchObject<E> hibernateSearchObject1) {
this.hibernateSearchObject = hibernateSearchObject1;
initModel();
}
}

View File

@ -0,0 +1,34 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.PricingFormapago;
public class RenderPricingFormaPago implements ListitemRenderer {
@Override
public void render(Listitem lstm, Object o) throws Exception {
PricingFormapago ppg = (PricingFormapago) o;
Listcell lc = new Listcell();
lc = new Listcell(ppg.getFormaPago().getDescpago());
lc.setParent(lstm);
Checkbox ckbIndexcepcion = new Checkbox();
if (ppg.getIndexcepcion()) {
ckbIndexcepcion.setChecked(true);
} else {
ckbIndexcepcion.setChecked(false);
}
ckbIndexcepcion.setDisabled(true);
lc = new Listcell();
ckbIndexcepcion.setParent(lc);
lc.setParent(lstm);
lstm.setAttribute("data", ppg);
}
}

View File

@ -0,0 +1,26 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import java.text.DecimalFormat;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante;
public class RenderTaxaEmbLevante implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
TaxaEmbLevante t = (TaxaEmbLevante) o;
Listcell lc = new Listcell(t.getParada().getDescparada());
lc.setParent(lstm);
DecimalFormat fmt = new DecimalFormat("#,##00.00");
lc = new Listcell(fmt.format(t.getImporte()) != null ? fmt.format(t.getImporte()) : "");
lc.setParent(lstm);
lstm.setAttribute("data", t);
}
}

View File

@ -0,0 +1,30 @@
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.TaxaEmbLevanteCtrl;
public class RenderTaxaEmbLevanteCtrl implements ListitemRenderer {
public void render(Listitem lstm, Object o) throws Exception {
TaxaEmbLevanteCtrl t = (TaxaEmbLevanteCtrl) o;
Listcell lc = new Listcell(t.getTaxaEmbLevanteCtrlId().toString());
lc.setParent(lstm);
lc = new Listcell(t.getRuta().getDescruta());
lc.setParent(lstm);
lc = new Listcell(t.getOrigem().getDescparada());
lc.setParent(lstm);
lc = new Listcell(t.getDestino().getDescparada());
lc.setParent(lstm);
lstm.setAttribute("data", t);
}
}

View File

@ -22,6 +22,14 @@
<property name="annotatedClasses">
<list>
<value>com.rjconsultores.ventaboletos.entidad.AbastoBoleto</value>
<value>com.rjconsultores.ventaboletos.entidad.Clasificacion</value>
<value>com.rjconsultores.ventaboletos.entidad.DetAbastoBoleto
</value>
<value>com.rjconsultores.ventaboletos.entidad.FolioPreimpreso
</value>
<value>com.rjconsultores.ventaboletos.entidad.RequisicionBoleto
</value>
<value>com.rjconsultores.ventaboletos.entidad.ClienteFidelidad
</value>
<value>com.rjconsultores.ventaboletos.entidad.EstacionImpresora
@ -164,6 +172,8 @@
</value>
<value>com.rjconsultores.ventaboletos.entidad.Plaza</value>
<value>com.rjconsultores.ventaboletos.entidad.Pricing</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingFormapago
</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingImporte</value>
<value>com.rjconsultores.ventaboletos.entidad.PricingVigencia
</value>
@ -244,6 +254,9 @@
<value>com.rjconsultores.ventaboletos.entidad.SeguroTarifa</value>
<value>com.rjconsultores.ventaboletos.entidad.Sistema</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueKm</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbLevante</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbLevanteCtrl
</value>
<value>com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada
</value>
<value>com.rjconsultores.ventaboletos.entidad.TarjetaFidelidad

View File

@ -1 +1,2 @@
ADM_20131202_1RC269
ADM_20131030_1RC260
ADM_20131202_1RC274

View File

@ -1,4 +1,4 @@
# V. 1.4
]# V. 1.4
# Para alterar esta planilha, seleccione Ferramentas | Planilhas
# E abrir a planilha no editor.
@ -203,7 +203,7 @@ indexController.mniPtovtaEmpresa.label = Punto de venta empresa
indexController.mniConfRestricaoCanalVenta.label = Bloqueo de tramos por canal de venta
indexController.mniSelecionarServicosGerar.label = Seleccionar corridas a generar
indexController.mniOrgaoConcedente.label = Instituición concedente
indexController.mniCoeficienteTarifa.label = Índice tarifario
indexController.mniCoeficienteTarifa.label = Ã?ndice tarifario
indexController.mniGenerarTarifaOrgao.label= Generar/Actualizar tarifa oficial
indexController.mniCopiarTarifaOficial.label= Copiar tarifa oficial
indexController.mniConfigLayoutImpressaoBoleto.label = Config layout impresión pasaje
@ -1397,11 +1397,11 @@ editarTramosController.btnApagarExcepcioneKm.tooltiptext = Eliminar
editarTramosController.btnSalvarExceptioneKm.tooltiptext = Guardar tramo Km
editarTramosController.MSG.selecioneTramoKm = Seleccione una excepción de Km
editarTramosController.MSG.borrarTramoKm = Elimina excepción de Km?
editarTramosController.labelCoeficiente1.value = Índice 1
editarTramosController.labelCoeficiente1.value = Ã?ndice 1
editarTramosController.labelKMCoeficiente1.value = KM 1
editarTramosController.labelCoeficiente2.value = Índice 2
editarTramosController.labelCoeficiente2.value = Ã?ndice 2
editarTramosController.labelKMCoeficiente2.value = KM 2
editarTramosController.labelCoeficiente3.value = Índice 3
editarTramosController.labelCoeficiente3.value = Ã?ndice 3
editarTramosController.labelKMCoeficiente3.value = KM 3
editarTramosController.labelOrgaoConcedente.value = Instituición concedente
editarTramosController.labelClase.value = Clase de servicio
@ -1509,6 +1509,7 @@ editarConfiguracionCorridaController.MSG.Clase = Necesitas informar un tipo de c
editarConfiguracionCorridaController.MSG.Clase2 = Necesitas informar un tipo de clase para piso extra
editarConfiguracionCorridaController.MSG.Marca = Necesitas informar una marca
editarConfiguracionCorridaController.MSG.Ruta = Necesitas informar una linea
editarConfiguracionCorridaController.cmbId.value = Id
editarConfiguracionCorridaController.MSG.Empresa = Necesitas informar una empresa servicio
editarConfiguracionCorridaController.MSG.Empresa1 = Necesitas informar una empresa ingresso
editarConfiguracionCorridaController.MSG.Rol = Necesitas informar un rol operativo
@ -1952,6 +1953,7 @@ editarPricingController.windowImporte.title = Valor
editarPricingController.windowMarca.title = Marca
editarPricingController.windowClase.title = Tipo clase
editarPricingController.windowTipoServicio.title = Tipo clase
editarPricingController.windowFormaPago.title = Forma de Pago
editarPricingController.windowPuntoVenta.title = Punto de venta
editarPricingController.windowTipoPtoVta.title = Canal venta
editarPricingController.windowCategoria.title = Tipo pasajero
@ -1981,7 +1983,7 @@ editarPricingController.tabCor.label = Corridas
editarPricingController.tabAsi.label = Asientos
editarPricingController.tabOcu.label = Ocupación
editarPricingController.tabAnti.label = Anticipación
editarPricingController.tabTipo.label = Tipo Servicio
editarPricingController.tabTipo.label = Tipo Servicio/Forma de Pago
editarPricingController.lhEmpresa.label = Empresa
editarPricingController.lhNome.label = Nombre Pricing
editarPricingController.lhCantidad.label = Cantidad asientos por servicio
@ -2055,6 +2057,7 @@ editarPricingController.MSG.borrarPerguntaOcupacion = Deseas eliminar la ocupaci
editarPricingController.MSG.borrarPerguntaAsiento = Deseas eliminar el asiento?
editarPricingController.MSG.borrarPerguntaAnticipacion = Deseas eliminar anticipación?
editarPricingController.MSG.borrarPerguntaTipoServicio = Deseas eliminar tipo servicio?
editarPricingController.MSG.borrarPerguntaFormaPago = Deseas eliminar forma de pago?
editarPricingController.MSG.categoriaExiste = Registro duplicado
editarPricingController.MSG.rutaExiste = Registro duplicado
editarPricingController.MSG.mercadoExiste = Registro duplicado
@ -2135,8 +2138,10 @@ editarPricingController.MSG.traslapa = Hora informada se traslapa con otra ya ex
editarPricingController.anticipacionMin.value = Cantidad dias mínimo
editarPricingController.anticipacionMax.value = Cantidad dias máximo
editarPricingController.tipoServicio.value = Tipo Servicio
editarPricingController.formaPago.value = Forma de Pago
editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica feriado fecha venta
editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica feriado fecha viaje
editarPricingFormapagoController.lblIndexcepcion = Se Excluye
# Búsqueda Sistema
busquedaSistemaController.window.title = Sistema
@ -3688,8 +3693,8 @@ gridRutaSecuencia.paradaExisteException.msg=la parada {0} ya existe
gridRutaSecuencia.msg.eliminarPaso=Eliminar parada
gridRutaSecuencia.msg.agregarDespues=Incluir después
gridRutaSecuencia.columnNumLinha.label = Nº linea
gridRutaSecuencia.columnCoeficiente1.label = Índice 1
gridRutaSecuencia.columnCoeficiente2.label = Índice 2
gridRutaSecuencia.columnCoeficiente1.label = Ã?ndice 1
gridRutaSecuencia.columnCoeficiente2.label = Ã?ndice 2
gridRutaSecuencia.columnKmCoeficiente2.label = Km 2
gridRutaSecuencia.columnKmCoeficiente1.label = Km 1
#TramoRutaServiceImpl
@ -3983,30 +3988,26 @@ editarOrgaoConcedenteController.MSG.borrarPergunta = Deseas eliminar instituici
editarOrgaoConcedenteController.MSG.borrarOK = Instituición concedente se eliminó existosamente
# Busqueda Índice Tarifa
busquedaCoeficienteTarifaController.window.title = Índice tarifario
# Busqueda Ã?ndice Tarifa
busquedaCoeficienteTarifaController.window.title = Ã?ndice tarifario
busquedaCoeficienteTarifaController.btnRefresh.tooltiptext = Actualizar
busquedaCoeficienteTarifaController.btnNovo.tooltiptext = Nuevo
busquedaCoeficienteTarifaController.btnCerrar.tooltiptext = Cerrar
busquedaCoeficienteTarifaController.nome.label = Nombre
busquedaCoeficienteTarifaController.btnPesquisa.label = Buscar
busquedaCoeficienteTarifaController.coeficien.label = Índice
busquedaCoeficienteTarifaController.coeficien.label = Ã?ndice
<<<<<<< .mine
# Editar Ã<>ndice Tarifa
editarCoeficienteTarifaController.window.title = Índice tarifario
=======
# Editar Índice Tarifa
editarCoeficienteTarifaController.window.title = Índice tarifario
>>>>>>> .r31878
# Editar Ã?ndice Tarifa
editarCoeficienteTarifaController.window.title = Ã?ndice tarifario
editarCoeficienteTarifaController.btnApagar.tooltiptext = Eliminar
editarCoeficienteTarifaController.coeficiente.value = Índice
editarCoeficienteTarifaController.coeficiente.value = Ã?ndice
editarCoeficienteTarifaController.btnSalvar.tooltiptext = Guardar
editarCoeficienteTarifaController.btnFechar.tooltiptext = Cerrar
editarCoeficienteTarifaController.lbNome.value = Nombre
editarCoeficienteTarifaController.MSG.suscribirOK = Índice tarifario se registró existosamente
editarCoeficienteTarifaController.MSG.suscribirOK = �ndice tarifario se registró existosamente
editarCoeficienteTarifaController.MSG.borrarPergunta = Deseas elminar índice tarifario?
editarCoeficienteTarifaController.MSG.borrarOK = Índice tarifario se eliminó existosamente
editarCoeficienteTarifaController.MSG.borrarOK = �ndice tarifario se eliminó existosamente
#Generar Tarifa
generarTarifaOrgaoController.MSG.suscribirOK=Operación se realizó existosamente
@ -4035,6 +4036,16 @@ busquedaTaxaEmbarqueKmController.btnCerrar.tooltiptext = Cerrar
busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descripción
busquedaTaxaEmbarqueKmController.orgao = Instituición
# Búsqueda TaxaEmbLevante
busquedaTaxaEmbLevanteController.window.title = Tasa por levante de embarque
busquedaTaxaEmbLevanteController.labelParada.value = Levante de embarque
busquedaTaxaEmbLevanteController.labelImporte.value = Importe
busquedaTaxaEmbLevanteController.editar.window.title = Editar Tasa por levante de embarque
busquedaTaxaEmbLevanteController.btnNovo.tooltiptext = Incluir nuevo levante de embarque
busquedaTaxaEmbLevanteControllerMSG.suscribirOK = Configuração de Taxa Por Local de Embarque Registrada com Sucesso.
busquedaTaxaEmbLevanteController.MSG.borrarPergunta = Deseja Eliminar configuração de Taxa de Local de Embarque?
busquedaTaxaEmbLevanteController.MSG.borrarOK = Configuração de Taxa Por Local de Embarque Excluida com Sucesso.
# Editar TaxaEmbarqueKm
editarTaxaEmbarqueKmController.window.title = Tasa de embarque por KM
editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar

View File

@ -1508,6 +1508,7 @@ editarConfiguracionCorridaController.cmbClase2.value = Tipo classe Doble Piso
editarConfiguracionCorridaController.doblePiso.value = Doble Piso
editarConfiguracionCorridaController.cmbMarca.value = Marca
editarConfiguracionCorridaController.cmbRuta.value = Linha
editarConfiguracionCorridaController.cmbId.value = Id
editarConfiguracionCorridaController.cmbEmpresaCorrida.value = Empresa Serviço
editarConfiguracionCorridaController.cmbEmpresaIngresso.value = Empresa Ingresso
editarConfiguracionCorridaController.cmbEmpresaRolOperativo.value = Rol Operativo
@ -1984,6 +1985,7 @@ editarPricingController.windowImporte.title = Valor
editarPricingController.windowMarca.title = Marca
editarPricingController.windowClase.title = Tipo Classe
editarPricingController.windowTipoServicio.title = Tipo Classe
editarPricingController.windowFormaPago.title = Forma de Pagamento
editarPricingController.windowPuntoVenta.title = Ponto Venda
editarPricingController.windowTipoPtoVta.title = Canal Venda
editarPricingController.windowCategoria.title = Tipo passageiro
@ -2014,7 +2016,7 @@ editarPricingController.tabCor.label = Serviços
editarPricingController.tabAsi.label = Poltronas
editarPricingController.tabOcu.label = Ocupação/Antecipação
editarPricingController.tabAnti.label = Antecipação
editarPricingController.tabTipo.label = Tipo Corrida
editarPricingController.tabTipo.label = Tipo Corrida/Forma de Pagamento
editarPricingController.lhEmpresa.label = Empresa
editarPricingController.lhNome.label = Nome Pricing
editarPricingController.lhCantidad.label = Quantidade poltronas por serviço
@ -2092,6 +2094,7 @@ editarPricingController.MSG.borrarPerguntaOcupacion = Deseja Eliminar a Ocupaç
editarPricingController.MSG.borrarPerguntaAsiento = Deseja Eliminar a Poltrona?
editarPricingController.MSG.borrarPerguntaAnticipacion = Deseja Eliminar Antecipação?
editarPricingController.MSG.borrarPerguntaTipoServicio = Deseja Eliminar Tipo corrida?
editarPricingController.MSG.borrarPerguntaFormaPago = Deseja Eliminar Forma de Pagamento?
editarPricingController.MSG.categoriaExiste = Registro Duplicado.
editarPricingController.MSG.rutaExiste = Registro Duplicado.
editarPricingController.MSG.mercadoExiste = Registro Duplicado.
@ -2182,8 +2185,10 @@ editarPricingController.MSG.traslapa = Hora informada se sobrepõe com outra já
editarPricingController.anticipacionMin.value = Qtd. dias mínimo
editarPricingController.anticipacionMax.value = Qtd. dias máximo
editarPricingController.tipoServicio.value = Tipo Corrida
editarPricingController.formaPago.value = Forma de Pagamento
editarPricingController.cmbIndGeneraFeriadoFechaVenta.value = Aplica Feriado Data Venda
editarPricingController.cmbIndGeneraFeriadoFechaViaje.value = Aplica Feriado Data Viagem
editarPricingFormapagoController.lblIndexcepcion = Se Remove
# Pesquisa Sistema
busquedaSistemaController.window.title = Sistema
@ -3520,7 +3525,7 @@ editarConfiguracionCategoriaDatosCategoriaController.title=Editar dados Tipo de
#Editar pricing dia
EditarPricingDiaController.MSG.obligatorioDia=Deve de seleccionar um dia da semana
EditarPricingDiaController.MSG.obligatorioData=Deve de seleccionar um dos filtros de datas, data de venda ou data de viagem
EditarPricingDiaController.MSG.obligatorioData=Deve de seleccionar um dos filtros de datas, data de venda ou data de viagem
#Editar Estado
editarEstadoController.lbl.difHoras=Diferença em Horas do Fuso Horário
@ -4077,6 +4082,16 @@ busquedaTaxaEmbarqueKmController.btnCerrar.tooltiptext = Fechar
busquedaTaxaEmbarqueKmController.DescTaxaEmbarqueKm.label = Descrição
busquedaTaxaEmbarqueKmController.orgao = Orgão
# Pesquisa TaxaEmbLevante
busquedaTaxaEmbLevanteController.window.title = Taxa Por Local de Embarque
busquedaTaxaEmbLevanteController.labelParada.value = Local de Embarque
busquedaTaxaEmbLevanteController.labelImporte.value = Valor
busquedaTaxaEmbLevanteController.editar.window.title = Editar Taxa Por Local de Embarque
busquedaTaxaEmbLevanteController.btnNovo.tooltiptext = Incluir Novo Local de Embarque
busquedaTaxaEmbLevanteControllerMSG.suscribirOK = Configuração de Taxa Por Local de Embarque Registrada com Sucesso.
busquedaTaxaEmbLevanteController.MSG.borrarPergunta = Deseja Eliminar configuração de Taxa de Local de Embarque?
busquedaTaxaEmbLevanteController.MSG.borrarOK = Configuração de Taxa Por Local de Embarque Excluida com Sucesso.
# Editar TaxaEmbarqueKm
editarTaxaEmbarqueKmController.window.title = Taxa de Embarque Km
editarTaxaEmbarqueKmController.btnApagar.tooltiptext = Eliminar

View File

@ -20,7 +20,7 @@
<row spans="2,1">
<label
<label
value="${c:l('atualizarCorridaFecHusoFecVeranoController.window.text')}" />
</row>
<row>
@ -40,7 +40,8 @@
model="@{winAtualizaCorridaHusoVerano$composer.lsEstados}" />
</row>
<row>
<label value="${c:l('atualizaCorridaFecHusoFecVerano.numcorrida')}" />
<label
value="${c:l('atualizaCorridaFecHusoFecVerano.numcorrida')}" />
<intbox id="ibxCorridaId" />
</row>
</rows>

View File

@ -752,7 +752,7 @@
</grid>
</tabpanel>
<!-- TipoServicio -->
<!-- TipoServicio Formapago -->
<tabpanel>
<grid fixedLayout="false">
<columns>
@ -782,7 +782,7 @@
<listbox
id="pricingTipoServicioList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" height="370px">
multiple="false" height="170px">
<listhead sizable="true">
<listheader
image="/gui/img/create_doc.gif" sort="auto(tipoServicio)"
@ -791,10 +791,49 @@
</listhead>
</listbox>
</vbox>
</row>
<row valign="top">
<vbox height="150px" width="100%">
<toolbar>
<hbox spacing="5px"
style="padding:1px" align="right">
<label
value="Forma de Pagamento: " />
<button
id="btnNovoFormaPago" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnNovoTipoServicio.tooltiptext')}" />
<button
id="btnApagarFormaPago" height="6"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
<button
id="btnModificarFormaPago"
label="${c:l('editarPricingController.btnModificar.value')}" />
</hbox>
</toolbar>
<listbox id="pricingFormapagoList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" height="170px">
<listhead sizable="true">
<listheader
image="/gui/img/create_doc.gif" sort="auto(formaPago)"
align="left"
label="${c:l('editarPricingController.formaPago.value')}" />
<listheader
image="/gui/img/create_doc.gif" sort="auto(indexcepcion)"
label="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
</listhead>
</listbox>
</vbox>
</row>
</rows>
</grid>
</tabpanel>
</tabpanels>
</tabbox>
</window>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPricingFormapago"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarPricingFormapago" border="normal" width="550px"
contentStyle="overflow:auto"
apply="${editarPricingFormapagoController}">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnAdicionarFormaPago" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarPricingFormapago.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="50%" />
<column width="50%" />
</columns>
<rows>
<row>
<label id="lblIndexcepcion"
value="${c:l('editarPricingFormapagoController.lblIndexcepcion')}" />
<radiogroup id="radioIndexcepcion">
<hbox>
<radio id="si"
label="${c:l('editarConfiguracionGeneralController.RadSi.value')}" />
<radio id="no"
label="${c:l('editarConfiguracionGeneralController.RadNo.value')}" />
</hbox>
</radiogroup>
</row>
<row>
<label id="lblFormaPago"
value="${c:l('busquedaRestriccionFormaPagoController.FormaPago')}" />
<combobox id="cmbFormaPago" width="90%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" mold="rounded" buttonVisible="true"
model="@{winEditarPricingFormapago$composer.lsFormaPago}"
selectedItem="@{winEditarPricingFormapago$composer.pricingFormapago.formaPago}" />
</row>
</rows>
</grid>
</window>
</zk>

View File

@ -193,7 +193,7 @@
<label
value="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<textbox id="txtNomImpressoara"
width="90%" maxlength="20" />
width="90%" maxlength="40" />
</row>
<row>
<label

View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winBusquedaTaxaEmbLevante"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaTaxaEmbLevante"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${busquedaTaxaEmbLevanteController}"
contentStyle="overflow:auto" width="700px" height="355px"
border="normal">
<toolbar>
<button id="btnRefresh" image="/gui/img/refresh.png"
width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnRefresh.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnNovo" image="/gui/img/add.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnNovo.tooltiptext')}" />
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
<separator orient="vertical" />
<button id="btnCerrar"
onClick="winBusquedaTaxaEmbLevante.detach()"
image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('busquedaConfiguracionCorridaController.btnCerrar.tooltiptext')}" />
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
<combobox id="cmbRuta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsRuta}" />
</row>
<row>
<label
value="${c:l('editarTramosController.labelOrigen.value')}" />
<combobox id="cmbParadaOrigem"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsParadaOrigem}" />
<label
value="${c:l('editarTramosController.labelDestino.value')}" />
<combobox id="cmbParadaDestino"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winBusquedaTaxaEmbLevante$composer.lsParadaDestino}" />
</row>
</rows>
</grid>
<toolbar>
<button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('busquedaConfiguracionCorridaController.btnPesquisa.label')}" />
</toolbar>
<paging id="pagingTaxaEmbLevanteCtrl" pageSize="20" />
<listbox id="taxaEmbLevanteCtrlList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" vflex="true" height="50%">
<listhead sizable="true">
<listheader width="10%" image="/gui/img/builder.gif"
label="${c:l('editarConfiguracionCorridaController.cmbId.value')}"
sort="auto(taxaEmbLevanteCtrlId)" />
<listheader width="45%" image="/gui/img/builder.gif"
label="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}"
sort="auto(ruta.descruta)" />
<listheader width="25%" image="/gui/img/builder.gif"
label="${c:l('editarTramosController.labelOrigen.value')}"
sort="auto(origem.descparada)" />
<listheader width="25%" image="/gui/img/builder.gif"
label="${c:l('editarTramosController.labelDestino.value')}"
sort="auto(destino.descparada)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarTaxaEmbLevante"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarTaxaEmbLevante"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${editarTaxaEmbLevanteController}" contentStyle="overflow:auto"
width="700px" height="350px" border="normal">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnSalvar" height="20"
autodisable="btnSalvar" image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<separator orient="vertical" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarTaxaEmbLevante.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="1,3">
<label
value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
<combobox id="cmbRuta" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsRuta}" />
</row>
<row>
<label
value="${c:l('editarTramosController.labelOrigen.value')}" />
<combobox id="cmbParadaOrigem" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsParadaOrigem}" />
<label
value="${c:l('editarTramosController.labelDestino.value')}" />
<combobox id="cmbParadaDestino"
constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%"
model="@{winEditarTaxaEmbLevante$composer.lsParadaDestino}" />
</row>
</rows>
</grid>
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnNovo" image="/gui/img/add.png"
width="35px"
tooltiptext="${c:l('busquedaTaxaEmbLevanteController.btnNovo.tooltiptext')}" />
<button id="btnApagar" height="20"
image="/gui/img/remove.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" />
</hbox>
</toolbar>
<paging id="pagingTaxaEmbLevante" pageSize="20" />
<listbox id="taxaEmbLevanteList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
multiple="false" vflex="true" height="50%">
<listhead sizable="true">
<listheader width="70%" image="/gui/img/builder.gif"
label="${c:l('busquedaTaxaEmbLevanteController.labelParada.value')}"
sort="auto(parada.descparada)" />
<listheader width="30%" image="/gui/img/builder.gif"
label="${c:l('busquedaTaxaEmbLevanteController.labelImporte.value')}"
sort="auto(importe)" />
</listhead>
</listbox>
</window>
</zk>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarTaxaEmbLevanteParada"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarTaxaEmbLevanteParada"
title="${c:l('busquedaTaxaEmbLevanteController.window.title')}"
apply="${editarTaxaEmbLevanteParadaController}"
contentStyle="overflow:auto" width="550px" border="normal">
<toolbar>
<hbox spacing="5px" style="padding:1px" align="right">
<button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingDiaController.btnSalvar.tooltiptext')}" />
<separator orient="vertical" />
<button height="20" image="/gui/img/exit.png"
width="35px" onClick="winEditarTaxaEmbLevanteParada.detach()"
tooltiptext="${c:l('editarPricingDiaController.btnFechar.tooltiptext')}" />
</hbox>
</toolbar>
<grid fixedLayout="true">
<columns>
<column width="30%" />
<column width="70%" />
<column width="30%" />
<column width="70%" />
</columns>
<rows>
<row spans="2,2">
<label
value="${c:l('busquedaTaxaEmbLevanteController.labelParada.value')}" />
<combobox id="cmbParada" constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
mold="rounded" buttonVisible="true" width="100%" />
</row>
<row spans="2,2">
<label
value="${c:l('busquedaTaxaEmbLevanteController.labelImporte.value')}" />
<textbox id="txImporte"
allowZero="true" defaultZero="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="5" scale="2" />
</row>
</rows>
</grid>
</window>
</zk>