rodrigo 2013-06-21 21:56:18 +00:00
parent ec256b5b90
commit bb03c4f02f
6 changed files with 1271 additions and 1111 deletions

View File

@ -47,6 +47,7 @@ import org.zkoss.zul.Textbox;
@Scope("prototype") @Scope("prototype")
public class BusquedaPricingEspecificoController extends MyGenericForwardComposer { public class BusquedaPricingEspecificoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired @Autowired
private MarcaService marcaService; private MarcaService marcaService;
@Autowired @Autowired
@ -203,7 +204,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param lsMarca the lsMarca to set * @param lsMarca
* the lsMarca to set
*/ */
public void setLsMarca(List<Marca> lsMarca) { public void setLsMarca(List<Marca> lsMarca) {
this.lsMarca = lsMarca; this.lsMarca = lsMarca;
@ -217,7 +219,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param lsMoneda the lsMoneda to set * @param lsMoneda
* the lsMoneda to set
*/ */
public void setLsMoneda(List<Moneda> lsMoneda) { public void setLsMoneda(List<Moneda> lsMoneda) {
this.lsMoneda = lsMoneda; this.lsMoneda = lsMoneda;
@ -231,7 +234,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param pricingList the pricingList to set * @param pricingList
* the pricingList to set
*/ */
public void setPricingList(MyListbox pricingList) { public void setPricingList(MyListbox pricingList) {
this.pricingList = pricingList; this.pricingList = pricingList;
@ -245,7 +249,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param pagingPricing the pagingPricing to set * @param pagingPricing
* the pagingPricing to set
*/ */
public void setPagingPricing(Paging pagingPricing) { public void setPagingPricing(Paging pagingPricing) {
this.pagingPricing = pagingPricing; this.pagingPricing = pagingPricing;
@ -259,7 +264,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param marcaService the marcaService to set * @param marcaService
* the marcaService to set
*/ */
public void setMarcaService(MarcaService marcaService) { public void setMarcaService(MarcaService marcaService) {
this.marcaService = marcaService; this.marcaService = marcaService;
@ -273,7 +279,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param monedaService the monedaService to set * @param monedaService
* the monedaService to set
*/ */
public void setMonedaService(MonedaService monedaService) { public void setMonedaService(MonedaService monedaService) {
this.monedaService = monedaService; this.monedaService = monedaService;
@ -287,7 +294,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param plwPricingEspecifico the plwPricingEspecifico to set * @param plwPricingEspecifico
* the plwPricingEspecifico to set
*/ */
public void setPlwPricingEspecifico(PagedListWrapper<PricingEspecifico> plwPricingEspecifico) { public void setPlwPricingEspecifico(PagedListWrapper<PricingEspecifico> plwPricingEspecifico) {
this.plwPricingEspecifico = plwPricingEspecifico; this.plwPricingEspecifico = plwPricingEspecifico;
@ -301,7 +309,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param lsCategoria the lsCategoria to set * @param lsCategoria
* the lsCategoria to set
*/ */
public void setLsCategoria(List<Categoria> lsCategoria) { public void setLsCategoria(List<Categoria> lsCategoria) {
this.lsCategoria = lsCategoria; this.lsCategoria = lsCategoria;
@ -315,7 +324,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param lsClaseServicio the lsClaseServicio to set * @param lsClaseServicio
* the lsClaseServicio to set
*/ */
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) { public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
this.lsClaseServicio = lsClaseServicio; this.lsClaseServicio = lsClaseServicio;
@ -329,7 +339,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param categoriaService the categoriaService to set * @param categoriaService
* the categoriaService to set
*/ */
public void setCategoriaService(CategoriaService categoriaService) { public void setCategoriaService(CategoriaService categoriaService) {
this.categoriaService = categoriaService; this.categoriaService = categoriaService;
@ -343,7 +354,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param claseServicioService the claseServicioService to set * @param claseServicioService
* the claseServicioService to set
*/ */
public void setClaseServicioService(ClaseServicioService claseServicioService) { public void setClaseServicioService(ClaseServicioService claseServicioService) {
this.claseServicioService = claseServicioService; this.claseServicioService = claseServicioService;
@ -357,7 +369,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbMarca the cmbMarca to set * @param cmbMarca
* the cmbMarca to set
*/ */
public void setCmbMarca(Combobox cmbMarca) { public void setCmbMarca(Combobox cmbMarca) {
this.cmbMarca = cmbMarca; this.cmbMarca = cmbMarca;
@ -371,7 +384,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbMoneda the cmbMoneda to set * @param cmbMoneda
* the cmbMoneda to set
*/ */
public void setCmbMoneda(Combobox cmbMoneda) { public void setCmbMoneda(Combobox cmbMoneda) {
this.cmbMoneda = cmbMoneda; this.cmbMoneda = cmbMoneda;
@ -385,7 +399,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbTipoPassageiro the cmbTipoPassageiro to set * @param cmbTipoPassageiro
* the cmbTipoPassageiro to set
*/ */
public void setCmbTipoPassageiro(Combobox cmbTipoPassageiro) { public void setCmbTipoPassageiro(Combobox cmbTipoPassageiro) {
this.cmbTipoPassageiro = cmbTipoPassageiro; this.cmbTipoPassageiro = cmbTipoPassageiro;
@ -399,7 +414,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbTipoServicio the cmbTipoServicio to set * @param cmbTipoServicio
* the cmbTipoServicio to set
*/ */
public void setCmbTipoServicio(Combobox cmbTipoServicio) { public void setCmbTipoServicio(Combobox cmbTipoServicio) {
this.cmbTipoServicio = cmbTipoServicio; this.cmbTipoServicio = cmbTipoServicio;
@ -413,7 +429,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param paradaService the paradaService to set * @param paradaService
* the paradaService to set
*/ */
public void setParadaService(ParadaService paradaService) { public void setParadaService(ParadaService paradaService) {
this.paradaService = paradaService; this.paradaService = paradaService;
@ -427,7 +444,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param lsPtovata the lsPtovata to set * @param lsPtovata
* the lsPtovata to set
*/ */
public void setLsPtovata(List<TipoPuntoVenta> lsPtovata) { public void setLsPtovata(List<TipoPuntoVenta> lsPtovata) {
this.lsPtovata = lsPtovata; this.lsPtovata = lsPtovata;
@ -441,7 +459,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param puntoVentaService the puntoVentaService to set * @param puntoVentaService
* the puntoVentaService to set
*/ */
public void setPuntoVentaService(TipoPuntoVentaService puntoVentaService) { public void setPuntoVentaService(TipoPuntoVentaService puntoVentaService) {
this.puntoVentaService = puntoVentaService; this.puntoVentaService = puntoVentaService;
@ -455,7 +474,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbPtovta the cmbPtovta to set * @param cmbPtovta
* the cmbPtovta to set
*/ */
public void setCmbPtovta(Combobox cmbPtovta) { public void setCmbPtovta(Combobox cmbPtovta) {
this.cmbPtovta = cmbPtovta; this.cmbPtovta = cmbPtovta;
@ -469,7 +489,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbOrigem the cmbOrigem to set * @param cmbOrigem
* the cmbOrigem to set
*/ */
public void setCmbOrigem(Combobox cmbOrigem) { public void setCmbOrigem(Combobox cmbOrigem) {
this.cmbOrigem = cmbOrigem; this.cmbOrigem = cmbOrigem;
@ -483,7 +504,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param cmbDestino the cmbDestino to set * @param cmbDestino
* the cmbDestino to set
*/ */
public void setCmbDestino(Combobox cmbDestino) { public void setCmbDestino(Combobox cmbDestino) {
this.cmbDestino = cmbDestino; this.cmbDestino = cmbDestino;
@ -497,7 +519,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param fechaInicio the fechaInicio to set * @param fechaInicio
* the fechaInicio to set
*/ */
public void setFechaInicio(Datebox fechaInicio) { public void setFechaInicio(Datebox fechaInicio) {
this.fechaInicio = fechaInicio; this.fechaInicio = fechaInicio;
@ -511,7 +534,8 @@ public class BusquedaPricingEspecificoController extends MyGenericForwardCompose
} }
/** /**
* @param fechaFin the fechaFin to set * @param fechaFin
* the fechaFin to set
*/ */
public void setFechaFin(Datebox fechaFin) { public void setFechaFin(Datebox fechaFin) {
this.fechaFin = fechaFin; this.fechaFin = fechaFin;

View File

@ -4,24 +4,8 @@
*/ */
package com.rjconsultores.ventaboletos.web.gui.controladores.pricing; package com.rjconsultores.ventaboletos.web.gui.controladores.pricing;
import com.rjconsultores.ventaboletos.entidad.Categoria;
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.Moneda;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.PricingEspecifico;
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
import com.rjconsultores.ventaboletos.service.CategoriaService;
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PricingEspecificoService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import java.util.List; import java.util.List;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
@ -36,6 +20,26 @@ import org.zkoss.zul.Combobox;
import org.zkoss.zul.Datebox; import org.zkoss.zul.Datebox;
import org.zkoss.zul.Textbox; import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Categoria;
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
import com.rjconsultores.ventaboletos.entidad.CorridaCtrl;
import com.rjconsultores.ventaboletos.entidad.Marca;
import com.rjconsultores.ventaboletos.entidad.Moneda;
import com.rjconsultores.ventaboletos.entidad.Parada;
import com.rjconsultores.ventaboletos.entidad.PricingEspecifico;
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
import com.rjconsultores.ventaboletos.service.CategoriaService;
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
import com.rjconsultores.ventaboletos.service.CorridaCtrlService;
import com.rjconsultores.ventaboletos.service.MarcaService;
import com.rjconsultores.ventaboletos.service.MonedaService;
import com.rjconsultores.ventaboletos.service.ParadaService;
import com.rjconsultores.ventaboletos.service.PricingEspecificoService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
/** /**
* *
* @author Cássio Rocha * @author Cássio Rocha
@ -44,6 +48,7 @@ import org.zkoss.zul.Textbox;
@Scope("prototype") @Scope("prototype")
public class EditarPricingEspecificoController extends MyGenericForwardComposer { public class EditarPricingEspecificoController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired @Autowired
private PricingEspecificoService pricingEspecificoService; private PricingEspecificoService pricingEspecificoService;
@Autowired @Autowired
@ -58,6 +63,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
private ParadaService paradaService; private ParadaService paradaService;
@Autowired @Autowired
private MonedaService monedaService; private MonedaService monedaService;
@Autowired
private CorridaCtrlService corridaCtrlService;
private PricingEspecifico pricingEspecifico; private PricingEspecifico pricingEspecifico;
private MyListbox pricingList; private MyListbox pricingList;
private Combobox cmbPtovta; private Combobox cmbPtovta;
@ -161,35 +168,93 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
Messagebox.show(Labels.getLabel("editarPricingController.MSG.tipoPtoVta"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.tipoPtoVta"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getCategoria() == null) {
return;
}
if (pricingEspecifico.getCategoria() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.categoria"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.categoria"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getClaseServicio() == null) {
return;
}
if (pricingEspecifico.getClaseServicio() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.claseServicio"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.claseServicio"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getMarca() == null) {
return;
}
if (pricingEspecifico.getMarca() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.marca"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.marca"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getParada() == null) {
return;
}
if (pricingEspecifico.getParada() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.origen"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.origen"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getParada1() == null) {
return;
}
if (pricingEspecifico.getParada1() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.destino"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.destino"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getMoneda() == null) {
return;
}
if (pricingEspecifico.getMoneda() == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.moneda"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.moneda"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} else if (pricingEspecifico.getFechorinicio().after(pricingEspecifico.getFechorfin())) {
return;
}
if (pricingEspecifico.getFechorinicio().after(pricingEspecifico.getFechorfin())) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.datasFecha"), Messagebox.show(Labels.getLabel("editarPricingController.MSG.datasFecha"),
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
if (pricingEspecifico.getCorridaId() != null) {
CorridaCtrl corridaCtrlId = corridaCtrlService.obtenerID(pricingEspecifico.getCorridaId());
if (corridaCtrlId == null) {
Messagebox.show(Labels.getLabel("editarPricingController.MSG.corridaId").replace("<1>", pricingEspecifico.getCorridaId().toString()),
Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return;
} else { } else {
CorridaCtrl corridaCtrlFinal = corridaCtrlService.buscar(
pricingEspecifico.getCorridaId(),
pricingEspecifico.getParada(),
pricingEspecifico.getParada1(),
pricingEspecifico.getClaseServicio(),
pricingEspecifico.getMarca());
if (corridaCtrlFinal == null) {
Integer opcao = Messagebox.show(Labels.getLabel("editarPricingController.MSG.corridaIdFinalNaoExiste").replace("<1>", pricingEspecifico.getCorridaId().toString()),
Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
if (opcao.equals(Messagebox.NO)) {
return;
}
}
}
}
List<PricingEspecifico> lsPricing = pricingEspecificoService.buscarPorNome(pricingEspecifico); List<PricingEspecifico> lsPricing = pricingEspecificoService.buscarPorNome(pricingEspecifico);
boolean podeSalvar = false; boolean podeSalvar = false;
@ -204,10 +269,9 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
if (podeSalvar) { if (podeSalvar) {
if (pricingEspecifico.getPricingespecificoId() == null) { if (pricingEspecifico.getPricingespecificoId() == null) {
pricingEspecificoService.suscribir(pricingEspecifico); pricingEspecificoService.suscribir(pricingEspecifico);
pricingList.addItem(pricingEspecifico); pricingList.addItemNovo(pricingEspecifico);
} else { } else {
pricingEspecificoService.actualizacion(pricingEspecifico); pricingEspecificoService.actualizacion(pricingEspecifico);
pricingList.updateItem(pricingEspecifico); pricingList.updateItem(pricingEspecifico);
@ -224,7 +288,6 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
Labels.getLabel("busquedaPricingEspecificoController.window.title"), Labels.getLabel("busquedaPricingEspecificoController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION); Messagebox.OK, Messagebox.EXCLAMATION);
} }
}
} catch (Exception ex) { } catch (Exception ex) {
log.error(ex); log.error(ex);
Messagebox.show( Messagebox.show(
@ -243,7 +306,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param pricingEspecificoService the pricingEspecificoService to set * @param pricingEspecificoService
* the pricingEspecificoService to set
*/ */
public void setPricingEspecificoService(PricingEspecificoService pricingEspecificoService) { public void setPricingEspecificoService(PricingEspecificoService pricingEspecificoService) {
this.pricingEspecificoService = pricingEspecificoService; this.pricingEspecificoService = pricingEspecificoService;
@ -257,7 +321,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param pricingEspecifico the pricingEspecifico to set * @param pricingEspecifico
* the pricingEspecifico to set
*/ */
public void setPricingEspecifico(PricingEspecifico pricingEspecifico) { public void setPricingEspecifico(PricingEspecifico pricingEspecifico) {
this.pricingEspecifico = pricingEspecifico; this.pricingEspecifico = pricingEspecifico;
@ -271,7 +336,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param pricingList the pricingList to set * @param pricingList
* the pricingList to set
*/ */
public void setPricingList(MyListbox pricingList) { public void setPricingList(MyListbox pricingList) {
this.pricingList = pricingList; this.pricingList = pricingList;
@ -285,7 +351,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbPtovta the cmbPtovta to set * @param cmbPtovta
* the cmbPtovta to set
*/ */
public void setCmbPtovta(Combobox cmbPtovta) { public void setCmbPtovta(Combobox cmbPtovta) {
this.cmbPtovta = cmbPtovta; this.cmbPtovta = cmbPtovta;
@ -299,7 +366,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbCategoria the cmbCategoria to set * @param cmbCategoria
* the cmbCategoria to set
*/ */
public void setCmbCategoria(Combobox cmbCategoria) { public void setCmbCategoria(Combobox cmbCategoria) {
this.cmbCategoria = cmbCategoria; this.cmbCategoria = cmbCategoria;
@ -313,7 +381,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbServicio the cmbServicio to set * @param cmbServicio
* the cmbServicio to set
*/ */
public void setCmbServicio(Combobox cmbServicio) { public void setCmbServicio(Combobox cmbServicio) {
this.cmbServicio = cmbServicio; this.cmbServicio = cmbServicio;
@ -327,7 +396,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbMarca the cmbMarca to set * @param cmbMarca
* the cmbMarca to set
*/ */
public void setCmbMarca(Combobox cmbMarca) { public void setCmbMarca(Combobox cmbMarca) {
this.cmbMarca = cmbMarca; this.cmbMarca = cmbMarca;
@ -341,7 +411,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbOrigem the cmbOrigem to set * @param cmbOrigem
* the cmbOrigem to set
*/ */
public void setCmbOrigem(Combobox cmbOrigem) { public void setCmbOrigem(Combobox cmbOrigem) {
this.cmbOrigem = cmbOrigem; this.cmbOrigem = cmbOrigem;
@ -355,7 +426,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbMoneda the cmbMoneda to set * @param cmbMoneda
* the cmbMoneda to set
*/ */
public void setCmbMoneda(Combobox cmbMoneda) { public void setCmbMoneda(Combobox cmbMoneda) {
this.cmbMoneda = cmbMoneda; this.cmbMoneda = cmbMoneda;
@ -369,7 +441,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param cmbDestino the cmbDestino to set * @param cmbDestino
* the cmbDestino to set
*/ */
public void setCmbDestino(Combobox cmbDestino) { public void setCmbDestino(Combobox cmbDestino) {
this.cmbDestino = cmbDestino; this.cmbDestino = cmbDestino;
@ -383,7 +456,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param lsPtovata the lsPtovata to set * @param lsPtovata
* the lsPtovata to set
*/ */
public void setLsPtovata(List<TipoPuntoVenta> lsPtovata) { public void setLsPtovata(List<TipoPuntoVenta> lsPtovata) {
this.lsPtovata = lsPtovata; this.lsPtovata = lsPtovata;
@ -397,7 +471,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param lsCategoria the lsCategoria to set * @param lsCategoria
* the lsCategoria to set
*/ */
public void setLsCategoria(List<Categoria> lsCategoria) { public void setLsCategoria(List<Categoria> lsCategoria) {
this.lsCategoria = lsCategoria; this.lsCategoria = lsCategoria;
@ -411,7 +486,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param lsclaseServicio the lsclaseServicio to set * @param lsclaseServicio
* the lsclaseServicio to set
*/ */
public void setLsclaseServicio(List<ClaseServicio> lsclaseServicio) { public void setLsclaseServicio(List<ClaseServicio> lsclaseServicio) {
this.lsclaseServicio = lsclaseServicio; this.lsclaseServicio = lsclaseServicio;
@ -425,7 +501,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param lsMarca the lsMarca to set * @param lsMarca
* the lsMarca to set
*/ */
public void setLsMarca(List<Marca> lsMarca) { public void setLsMarca(List<Marca> lsMarca) {
this.lsMarca = lsMarca; this.lsMarca = lsMarca;
@ -439,7 +516,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param lsMoneda the lsMoneda to set * @param lsMoneda
* the lsMoneda to set
*/ */
public void setLsMoneda(List<Moneda> lsMoneda) { public void setLsMoneda(List<Moneda> lsMoneda) {
this.lsMoneda = lsMoneda; this.lsMoneda = lsMoneda;
@ -453,7 +531,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param puntoVentaService the puntoVentaService to set * @param puntoVentaService
* the puntoVentaService to set
*/ */
public void setPuntoVentaService(TipoPuntoVentaService puntoVentaService) { public void setPuntoVentaService(TipoPuntoVentaService puntoVentaService) {
this.puntoVentaService = puntoVentaService; this.puntoVentaService = puntoVentaService;
@ -467,7 +546,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param categoriaService the categoriaService to set * @param categoriaService
* the categoriaService to set
*/ */
public void setCategoriaService(CategoriaService categoriaService) { public void setCategoriaService(CategoriaService categoriaService) {
this.categoriaService = categoriaService; this.categoriaService = categoriaService;
@ -481,7 +561,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param claseServicioService the claseServicioService to set * @param claseServicioService
* the claseServicioService to set
*/ */
public void setClaseServicioService(ClaseServicioService claseServicioService) { public void setClaseServicioService(ClaseServicioService claseServicioService) {
this.claseServicioService = claseServicioService; this.claseServicioService = claseServicioService;
@ -495,7 +576,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param marcaService the marcaService to set * @param marcaService
* the marcaService to set
*/ */
public void setMarcaService(MarcaService marcaService) { public void setMarcaService(MarcaService marcaService) {
this.marcaService = marcaService; this.marcaService = marcaService;
@ -509,7 +591,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param paradaService the paradaService to set * @param paradaService
* the paradaService to set
*/ */
public void setParadaService(ParadaService paradaService) { public void setParadaService(ParadaService paradaService) {
this.paradaService = paradaService; this.paradaService = paradaService;
@ -523,7 +606,8 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
} }
/** /**
* @param monedaService the monedaService to set * @param monedaService
* the monedaService to set
*/ */
public void setMonedaService(MonedaService monedaService) { public void setMonedaService(MonedaService monedaService) {
this.monedaService = monedaService; this.monedaService = monedaService;

View File

@ -44,5 +44,14 @@ public class RenderPricingEspecifico implements ListitemRenderer {
lc = new Listcell(DateUtil.getStringDate(pe.getFechorfin(), "dd/MM/yyyy HH:mm")); lc = new Listcell(DateUtil.getStringDate(pe.getFechorfin(), "dd/MM/yyyy HH:mm"));
lc.setParent(lstm); lc.setParent(lstm);
Integer corridaId = pe.getCorridaId();
if (corridaId != null) {
lc = new Listcell(corridaId.toString());
} else {
lc = new Listcell("");
}
lc.setParent(lstm);
lstm.setAttribute("data", pe);
} }
} }

View File

@ -1746,6 +1746,9 @@ busquedaPricingController.btnRefresh.tooltiptext = Atualizar
busquedaPricingController.btnCerrar.tooltiptext = Fechar busquedaPricingController.btnCerrar.tooltiptext = Fechar
#Pricing - busquedaPricingController #Pricing - busquedaPricingController
editarPricingController.lhCorridaId.labelLH = Serviço
editarPricingController.MSG.corridaId = O serviço <1> não existe.
editarPricingController.MSG.corridaIdFinalNaoExiste = O serviço <1> nâo existe com esses dados de origem, destino, marca e classe de serviço. Deseja salva-lo assim mesmo?
editarPricingController.MSG.porcentajeCero = Quando se informa o pricing por poltrona ou ocupação, a porcentagem principal tem que ser zero editarPricingController.MSG.porcentajeCero = Quando se informa o pricing por poltrona ou ocupação, a porcentagem principal tem que ser zero
editarPricingController.window.title = Pricing editarPricingController.window.title = Pricing
editarPricingController.windowEspecifico.title = Pricing Específico editarPricingController.windowEspecifico.title = Pricing Específico

View File

@ -7,7 +7,7 @@
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winBusquedaPricingEspecifico" border="normal" <window id="winBusquedaPricingEspecifico" border="normal"
apply="${busquedaPricingEspecificoController}" apply="${busquedaPricingEspecificoController}"
height="450px" width="850px" contentStyle="overflow:auto" height="450px" width="950px" contentStyle="overflow:auto"
title="${c:l('busquedaPricingEspecificoController.window.title')}"> title="${c:l('busquedaPricingEspecificoController.window.title')}">
<toolbar> <toolbar>
@ -101,6 +101,9 @@
label="${c:l('editarPricingController.lhFechaHoraInicioLH.label')}"/> label="${c:l('editarPricingController.lhFechaHoraInicioLH.label')}"/>
<listheader image="/gui/img/create_doc.gif" sort="auto(claseServicio.descclase)" <listheader image="/gui/img/create_doc.gif" sort="auto(claseServicio.descclase)"
label="${c:l('editarPricingController.lhFechaHoraFin.labelLH')}"/> label="${c:l('editarPricingController.lhFechaHoraFin.labelLH')}"/>
<listheader image="/gui/img/create_doc.gif" sort="auto(corridaId)"
label="${c:l('editarPricingController.lhCorridaId.labelLH')}"/>
</listhead> </listhead>
</listbox> </listbox>
</window> </window>

View File

@ -7,8 +7,8 @@
<zk xmlns="http://www.zkoss.org/2005/zul"> <zk xmlns="http://www.zkoss.org/2005/zul">
<window id="winEditarPricingEspecifico" border="normal" <window id="winEditarPricingEspecifico" border="normal"
apply="${editarPricingEspecificoController}" apply="${editarPricingEspecificoController}" width="600px"
height="440px" width="600px" contentStyle="overflow:auto" contentStyle="overflow:auto"
title="${c:l('editarPricingController.window.title')}"> title="${c:l('editarPricingController.window.title')}">
<toolbar> <toolbar>
@ -19,7 +19,8 @@
<button id="btnSalvar" height="20" <button id="btnSalvar" height="20"
image="/gui/img/save.png" width="35px" image="/gui/img/save.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnSalvar.tooltiptext')}" /> tooltiptext="${c:l('editarPricingController.btnSalvar.tooltiptext')}" />
<button id="btnFechar" onClick="winEditarPricingEspecifico.detach()" height="20" <button id="btnFechar"
onClick="winEditarPricingEspecifico.detach()" height="20"
image="/gui/img/exit.png" width="35px" image="/gui/img/exit.png" width="35px"
tooltiptext="${c:l('editarPricingController.btnFechar.tooltiptext')}" /> tooltiptext="${c:l('editarPricingController.btnFechar.tooltiptext')}" />
</hbox> </hbox>
@ -32,76 +33,112 @@
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${c:l('editarPricingController.nombrePricingEsp.label')}"/> <label
<textbox id="nombrePricing" constraint="no empty" maxlength="20" value="${c:l('editarPricingController.nombrePricingEsp.label')}" />
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.nombPricing}" width="50%" <textbox id="nombrePricing" constraint="no empty"
maxlength="20"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.nombPricing}"
width="50%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.lhFechaHoraInicio.label')}"/> <label
<datebox width="200px" id="fechaInicio" lenient="false" value="${c:l('editarPricingController.lhFechaHoraInicio.label')}" />
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.fechorinicio}" format="dd/MM/yyyy HH:mm" mold="rounded"/> <datebox width="200px" id="fechaInicio"
lenient="false"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.fechorinicio}"
format="dd/MM/yyyy HH:mm" mold="rounded" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.lhFechaHoraFin.label')}"/> <label
value="${c:l('editarPricingController.lhFechaHoraFin.label')}" />
<datebox width="200px" id="fechaFin" lenient="false" <datebox width="200px" id="fechaFin" lenient="false"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.fechorfin}" format="dd/MM/yyyy HH:mm" mold="rounded"/> value="@{winEditarPricingEspecifico$composer.pricingEspecifico.fechorfin}"
format="dd/MM/yyyy HH:mm" mold="rounded" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.ptovta.value')}"/> <label
<combobox id="cmbPtovta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarPricingController.lhCorridaId.labelLH')}" />
<intbox id="txtCorridaId" mold="rounded"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.corridaId}" />
</row>
<row>
<label
value="${c:l('editarPricingController.ptovta.value')}" />
<combobox id="cmbPtovta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
model="@{winEditarPricingEspecifico$composer.lsPtovata}" model="@{winEditarPricingEspecifico$composer.lsPtovata}"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.tipoPtovta}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.tipoPtovta}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.windowCategoria.title')}"/> <label
<combobox id="cmbCategoria" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarPricingController.windowCategoria.title')}" />
<combobox id="cmbCategoria"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
model="@{winEditarPricingEspecifico$composer.lsCategoria}" model="@{winEditarPricingEspecifico$composer.lsCategoria}"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.categoria}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.categoria}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.windowTipoServicio.title')}"/> <label
<combobox id="cmbServicio" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarPricingController.windowTipoServicio.title')}" />
<combobox id="cmbServicio"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
model="@{winEditarPricingEspecifico$composer.lsclaseServicio}" model="@{winEditarPricingEspecifico$composer.lsclaseServicio}"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.claseServicio}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.claseServicio}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.marca.value')}"/> <label
<combobox id="cmbMarca" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarPricingController.marca.value')}" />
<combobox id="cmbMarca"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
model="@{winEditarPricingEspecifico$composer.lsMarca}" model="@{winEditarPricingEspecifico$composer.lsMarca}"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.marca}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.marca}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.origem.label')}"/> <label
<combobox id="cmbOrigem" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" value="${c:l('editarPricingController.origem.label')}" />
<combobox id="cmbOrigem"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.parada}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.parada}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.destino.label')}"/> <label
<combobox id="cmbDestino" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada" value="${c:l('editarPricingController.destino.label')}" />
<combobox id="cmbDestino"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.parada1}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.parada1}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.impMon.value')}"/> <label
<combobox id="cmbMoneda" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" value="${c:l('editarPricingController.impMon.value')}" />
<combobox id="cmbMoneda"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="90%" mold="rounded" buttonVisible="true" width="90%"
model="@{winEditarPricingEspecifico$composer.lsMoneda}" model="@{winEditarPricingEspecifico$composer.lsMoneda}"
selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.moneda}" /> selectedItem="@{winEditarPricingEspecifico$composer.pricingEspecifico.moneda}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.tarifia.label')}"/> <label
<textbox id="tarifa" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="7" scale="2" constraint="no empty" value="${c:l('editarPricingController.tarifia.label')}" />
<textbox id="tarifa"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="7" scale="2" constraint="no empty"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.tarifa,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" /> value="@{winEditarPricingEspecifico$composer.pricingEspecifico.tarifa,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
</row> </row>
<row> <row>
<label value="${c:l('editarPricingController.tarifiaredondoabierto.label')}"/> <label
<textbox id="tarifaAbierto" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="7" scale="2" constraint="no empty" value="${c:l('editarPricingController.tarifiaredondoabierto.label')}" />
<textbox id="tarifaAbierto"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="7" scale="2" constraint="no empty"
value="@{winEditarPricingEspecifico$composer.pricingEspecifico.tarifaredabierto,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" /> value="@{winEditarPricingEspecifico$composer.pricingEspecifico.tarifaredabierto,converter=com.rjconsultores.ventaboletos.web.utilerias.StringDecimalToDecimalConverter}" />
</row> </row>
</rows> </rows>