Trazer a Categoria Normal como default no pricing
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@22419 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d63b36f838
commit
31ff27d07b
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
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.ClaseServicio;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||||
|
@ -27,11 +28,13 @@ import com.rjconsultores.ventaboletos.entidad.PricingVigencia;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingAnticipacionService;
|
import com.rjconsultores.ventaboletos.service.PricingAnticipacionService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.PricingCategoriaService;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingClaseService;
|
import com.rjconsultores.ventaboletos.service.PricingClaseService;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingImporteService;
|
import com.rjconsultores.ventaboletos.service.PricingImporteService;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingMarcaService;
|
import com.rjconsultores.ventaboletos.service.PricingMarcaService;
|
||||||
|
@ -108,6 +111,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PricingRutaService pricingRutaService;
|
private PricingRutaService pricingRutaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private PricingCategoriaService pricingCategoriaService;
|
||||||
|
@Autowired
|
||||||
private PricingMercadoService pricingMercadoService;
|
private PricingMercadoService pricingMercadoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PricingImporteService pricingImporteService;
|
private PricingImporteService pricingImporteService;
|
||||||
|
@ -128,6 +133,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RutaService rutaService;
|
private RutaService rutaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private CategoriaService categoriaService;
|
||||||
|
@Autowired
|
||||||
private ParadaService paradaService;
|
private ParadaService paradaService;
|
||||||
private Pricing pricing;
|
private Pricing pricing;
|
||||||
private MyListbox pricingList;
|
private MyListbox pricingList;
|
||||||
|
@ -269,14 +276,14 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
//Categoria
|
//Categoria
|
||||||
pricingCategoriaList.setItemRenderer(new RenderPricingCategoria());
|
pricingCategoriaList.setItemRenderer(new RenderPricingCategoria());
|
||||||
lsPricingCategoria = new ArrayList<PricingCategoria>();
|
lsPricingCategoria = new ArrayList<PricingCategoria>();
|
||||||
pricingCategoriaList.addEventListener("onDoubleClick", new EventListener() {
|
// pricingCategoriaList.addEventListener("onDoubleClick", new EventListener() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onEvent(Event event) throws Exception {
|
// public void onEvent(Event event) throws Exception {
|
||||||
PricingCategoria pCategoria = (PricingCategoria) pricingCategoriaList.getSelected();
|
// PricingCategoria pCategoria = (PricingCategoria) pricingCategoriaList.getSelected();
|
||||||
verPricingCategoria(pCategoria);
|
// verPricingCategoria(pCategoria);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
//Mercado
|
//Mercado
|
||||||
pricingMercadoList.setItemRenderer(new RenderPricingMercado());
|
pricingMercadoList.setItemRenderer(new RenderPricingMercado());
|
||||||
|
@ -541,6 +548,21 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
||||||
pricingRutaList.setData(lsPricingRuta);
|
pricingRutaList.setData(lsPricingRuta);
|
||||||
pricingRutaService.suscribir(pr);
|
pricingRutaService.suscribir(pr);
|
||||||
}
|
}
|
||||||
|
//Tipo Pasajero - Categoria
|
||||||
|
PricingCategoria pc = new PricingCategoria();
|
||||||
|
Categoria categoria = categoriaService.obtenerID(1);
|
||||||
|
pricingCategoriaList.setDisabled(Boolean.TRUE);
|
||||||
|
if (categoria != null) {
|
||||||
|
pc.setCategoria(categoria);
|
||||||
|
pc.setPricing(pricing);
|
||||||
|
pc.setActivo(Boolean.TRUE);
|
||||||
|
pc.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
pc.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
lsPricingCategoria.add(pc);
|
||||||
|
pricingCategoriaList.setData(lsPricingCategoria);
|
||||||
|
pricingCategoriaService.suscribir(pc);
|
||||||
|
}
|
||||||
|
|
||||||
//Mercado
|
//Mercado
|
||||||
PricingMercado pme = new PricingMercado();
|
PricingMercado pme = new PricingMercado();
|
||||||
Parada p1 = paradaService.obtenerID(-1);
|
Parada p1 = paradaService.obtenerID(-1);
|
||||||
|
|
|
@ -309,12 +309,12 @@
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
<label value="${c:l('editarPricingController.categoria.value')}:" />
|
<label value="${c:l('editarPricingController.categoria.value')}:" />
|
||||||
<button id="btnNovoCategoria" image="/gui/img/add.png" width="35px"
|
<button id="btnNovoCategoria" image="/gui/img/add.png" width="35px"
|
||||||
tooltiptext="${c:l('editarPricingController.btnNovoCategoria.tooltiptext')}" />
|
tooltiptext="${c:l('editarPricingController.btnNovoCategoria.tooltiptext')}" disabled="true"/>
|
||||||
<button id="btnApagarCategoria" height="6"
|
<button id="btnApagarCategoria" height="6"
|
||||||
image="/gui/img/remove.png" width="35px"
|
image="/gui/img/remove.png" width="35px"
|
||||||
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}"/>
|
tooltiptext="${c:l('editarPricingController.btnApagarPricing.tooltiptext')}" disabled="true"/>
|
||||||
<button id="btnModificarCategoria"
|
<button id="btnModificarCategoria"
|
||||||
label="${c:l('editarPricingController.btnModificar.value')}"/>
|
label="${c:l('editarPricingController.btnModificar.value')}" disabled="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
<listbox id="pricingCategoriaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
<listbox id="pricingCategoriaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
|
Loading…
Reference in New Issue