mantis #6716
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@49064 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
999580968b
commit
52438b46a1
|
@ -1,7 +1,7 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ import org.zkoss.zul.Intbox;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeaje;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ExcepcionPeajeVigencia;
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.service.ExcepcionPeajeService;
|
import com.rjconsultores.ventaboletos.service.ExcepcionPeajeService;
|
||||||
|
@ -81,24 +80,8 @@ public class BusquedaExcepcionPeajeController extends MyGenericForwardComposer
|
||||||
|
|
||||||
excepcionPeajeList.setItemRenderer(new RenderExcepcionPeaje());
|
excepcionPeajeList.setItemRenderer(new RenderExcepcionPeaje());
|
||||||
|
|
||||||
// Iterator iterator = collection.iterator();
|
|
||||||
// while (iterator.hasNext()) {
|
|
||||||
// Item item = (Item) iterator.next();
|
|
||||||
// if (item.satisfiesCondition()) {
|
|
||||||
// collection.remove(item);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
||||||
for(ExcepcionPeaje e : ls ){
|
Collections.sort(ls);
|
||||||
|
|
||||||
Iterator iterator = e.getLsExcepcionPeajeVigencia().iterator();
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
ExcepcionPeajeVigencia it = (ExcepcionPeajeVigencia)iterator.next();
|
|
||||||
if(it.getActivo() == false){
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
excepcionPeajeList.setData(ls);
|
excepcionPeajeList.setData(ls);
|
||||||
|
|
||||||
excepcionPeajeList.addEventListener("onDoubleClick", new EventListener() {
|
excepcionPeajeList.addEventListener("onDoubleClick", new EventListener() {
|
||||||
|
@ -166,12 +149,10 @@ public class BusquedaExcepcionPeajeController extends MyGenericForwardComposer
|
||||||
|
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
args.put("excepcionPeaje", ep);
|
args.put("excepcionPeaje", ep);
|
||||||
// args.put("busquedaCorridaController", this);
|
|
||||||
args.put("excepcionPeajeList", excepcionPeajeList);
|
args.put("excepcionPeajeList", excepcionPeajeList);
|
||||||
|
|
||||||
openWindow("/gui/configuraciones_comerciales/editarExcepcionPeaje.zul",
|
openWindow("/gui/configuraciones_comerciales/editarExcepcionPeaje.zul",
|
||||||
Labels.getLabel("editarExcepcionPeajeController.window.title"), args, MODAL);
|
Labels.getLabel("editarExcepcionPeajeController.window.title"), args, MODAL);
|
||||||
// refreshLista();
|
|
||||||
}
|
}
|
||||||
public void onClick$btnNovo(Event ev) {
|
public void onClick$btnNovo(Event ev) {
|
||||||
verExcepcionPeaje(new ExcepcionPeaje());
|
verExcepcionPeaje(new ExcepcionPeaje());
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccome
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -58,7 +59,6 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
private RutaService rutaService;
|
private RutaService rutaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ExcepcionPeajeService excepcionPeajeService;
|
private ExcepcionPeajeService excepcionPeajeService;
|
||||||
private Intbox txtId;
|
|
||||||
private static Logger log = Logger.getLogger(EditarExcepcionPeajeController.class);
|
private static Logger log = Logger.getLogger(EditarExcepcionPeajeController.class);
|
||||||
|
|
||||||
private MyListbox excepcionPeajeVigenciaList;
|
private MyListbox excepcionPeajeVigenciaList;
|
||||||
|
@ -141,12 +141,14 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
excepcionPeaje = (ExcepcionPeaje) Executions.getCurrent().getArg().get("excepcionPeaje");
|
excepcionPeaje = (ExcepcionPeaje) Executions.getCurrent().getArg().get("excepcionPeaje");
|
||||||
excepcionPeajeList = (MyListbox) Executions.getCurrent().getArg().get("excepcionPeajeList");
|
excepcionPeajeList = (MyListbox) Executions.getCurrent().getArg().get("excepcionPeajeList");
|
||||||
lsExcepcionPeajeVigencia = excepcionPeaje.getLsExcepcionPeajeVigencia();
|
lsExcepcionPeajeVigencia = excepcionPeaje.getLsExcepcionPeajeVigencia();
|
||||||
|
if(lsExcepcionPeajeVigencia != null){
|
||||||
|
Collections.sort(lsExcepcionPeajeVigencia);
|
||||||
|
}
|
||||||
excepcionPeajeVigenciaList.setItemRenderer(new RenderExcepcionPeajeVigencia());
|
excepcionPeajeVigenciaList.setItemRenderer(new RenderExcepcionPeajeVigencia());
|
||||||
if(lsExcepcionPeajeVigencia != null ){
|
if(lsExcepcionPeajeVigencia != null ){
|
||||||
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
||||||
}
|
}
|
||||||
|
|
||||||
// super.doAfterCompose(comp);
|
|
||||||
lsRuta = rutaService.obtenerTodos();
|
lsRuta = rutaService.obtenerTodos();
|
||||||
cmbParadaOrigemCve.setItemRenderer(new ComboitemRenderer() {
|
cmbParadaOrigemCve.setItemRenderer(new ComboitemRenderer() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -203,11 +205,6 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
ci.setParent(cmbParadaDestinoCve);
|
ci.setParent(cmbParadaDestinoCve);
|
||||||
cmbParadaDestinoCve.setSelectedItem(ci);
|
cmbParadaDestinoCve.setSelectedItem(ci);
|
||||||
}
|
}
|
||||||
// if(excepcionPeaje.getExcepcionPeajeId() != null ){
|
|
||||||
// txtId.setValue(excepcionPeaje.getExcepcionPeajeId());
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelect$cmbParadaOrigemCve(Event ev) {
|
public void onSelect$cmbParadaOrigemCve(Event ev) {
|
||||||
|
@ -235,8 +232,7 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void onClick$btnSalvar(Event ev) {
|
public void onClick$btnSalvar(Event ev) {
|
||||||
|
try{
|
||||||
try{//cmbRuta.getValue()
|
|
||||||
if(cmbRuta.getSelectedItem() == null || cmbRuta.getSelectedItem().getValue() == null) {
|
if(cmbRuta.getSelectedItem() == null || cmbRuta.getSelectedItem().getValue() == null) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarExcepcionPeajeController.MSG.necessitaRuta.value"),
|
Labels.getLabel("editarExcepcionPeajeController.MSG.necessitaRuta.value"),
|
||||||
|
@ -259,7 +255,6 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
excepcionPeaje.setOrigem((Parada) cmbParadaOrigem.getSelectedItem().getValue());
|
excepcionPeaje.setOrigem((Parada) cmbParadaOrigem.getSelectedItem().getValue());
|
||||||
excepcionPeaje.setDestino((Parada) cmbParadaDestino.getSelectedItem().getValue());
|
excepcionPeaje.setDestino((Parada) cmbParadaDestino.getSelectedItem().getValue());
|
||||||
excepcionPeaje.setRuta((Ruta) cmbRuta.getSelectedItem().getValue());
|
excepcionPeaje.setRuta((Ruta) cmbRuta.getSelectedItem().getValue());
|
||||||
|
@ -272,36 +267,14 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
excepcionPeajeService.suscribir(excepcionPeaje);
|
excepcionPeajeService.suscribir(excepcionPeaje);
|
||||||
excepcionPeajeList.addItem(excepcionPeaje);
|
excepcionPeajeList.addItem(excepcionPeaje);
|
||||||
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
||||||
for(ExcepcionPeaje e : ls ){
|
Collections.sort(ls);
|
||||||
if(e.getLsExcepcionPeajeVigencia() != null && e.getLsExcepcionPeajeVigencia().size()>0){
|
|
||||||
Iterator iterator = e.getLsExcepcionPeajeVigencia().iterator();
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
ExcepcionPeajeVigencia it = (ExcepcionPeajeVigencia)iterator.next();
|
|
||||||
if(it.getActivo() == false){
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
excepcionPeajeList.setData(ls);
|
excepcionPeajeList.setData(ls);
|
||||||
// excepcionPeajeList.setData(excepcionPeajeService.obtenerTodos());
|
|
||||||
} else {
|
} else {
|
||||||
excepcionPeajeService.actualizacion(excepcionPeaje);
|
excepcionPeajeService.actualizacion(excepcionPeaje);
|
||||||
excepcionPeajeList.updateItem(excepcionPeaje);
|
excepcionPeajeList.updateItem(excepcionPeaje);
|
||||||
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
List<ExcepcionPeaje> ls = excepcionPeajeService.obtenerTodos();
|
||||||
for(ExcepcionPeaje e : ls ){
|
Collections.sort(ls);
|
||||||
if(e.getLsExcepcionPeajeVigencia() != null && e.getLsExcepcionPeajeVigencia().size()>0){
|
|
||||||
Iterator iterator = e.getLsExcepcionPeajeVigencia().iterator();
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
ExcepcionPeajeVigencia it = (ExcepcionPeajeVigencia)iterator.next();
|
|
||||||
if(it.getActivo() == false){
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
excepcionPeajeList.setData(ls);
|
excepcionPeajeList.setData(ls);
|
||||||
// excepcionPeajeList.setData(excepcionPeajeService.obtenerTodos());
|
|
||||||
}
|
}
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("busquedaExcepcionPeajeController.MSG.suscribirOK"),
|
Labels.getLabel("busquedaExcepcionPeajeController.MSG.suscribirOK"),
|
||||||
|
@ -330,24 +303,24 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
this.excepcionPeajeList = excepcionPeajeList;
|
this.excepcionPeajeList = excepcionPeajeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnApagar(Event ev) {
|
public void onClick$btnApagar(Event ev) throws InterruptedException{
|
||||||
// for(ExcepcionPeajeVigencia epv : excepcionPeaje.getLsExcepcionPeajeVigencia()){
|
|
||||||
// epv.setExcepcionPeaje(null);
|
|
||||||
// lsExcepcionPeajeVigencia.remove(epv);
|
|
||||||
// }
|
|
||||||
// excepcionPeajeVigenciaList.setData(null);
|
|
||||||
// excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
|
||||||
excepcionPeajeService.borrar(excepcionPeaje);
|
excepcionPeajeService.borrar(excepcionPeaje);
|
||||||
|
excepcionPeajeList.removeItem(excepcionPeaje);
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("editarExcepcionPeajeController.MSG.borrarOK"),
|
||||||
|
Labels.getLabel("editarExcepcionPeajeController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnRemoverExcepcionPeajeVigencia(Event ev) {
|
public void onClick$btnRemoverExcepcionPeajeVigencia(Event ev) {
|
||||||
ExcepcionPeajeVigencia epv = (ExcepcionPeajeVigencia) excepcionPeajeVigenciaList.getSelected();
|
ExcepcionPeajeVigencia epv = (ExcepcionPeajeVigencia) excepcionPeajeVigenciaList.getSelected();
|
||||||
// epv.setExcepcionPeaje(null);
|
|
||||||
epv.setActivo(Boolean.FALSE);
|
epv.setActivo(Boolean.FALSE);
|
||||||
epv.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
epv.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
epv.setFecmodif(Calendar.getInstance().getTime());
|
epv.setFecmodif(Calendar.getInstance().getTime());
|
||||||
excepcionPeajeService.actualizacion(excepcionPeaje);
|
excepcionPeajeService.actualizacion(excepcionPeaje);
|
||||||
lsExcepcionPeajeVigencia.remove(epv);
|
lsExcepcionPeajeVigencia.remove(epv);
|
||||||
|
Collections.sort(lsExcepcionPeajeVigencia);
|
||||||
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
||||||
excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
||||||
|
|
||||||
|
@ -392,6 +365,9 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
||||||
excepcionPeajeVigencia.setFecmodif(Calendar.getInstance().getTime());
|
excepcionPeajeVigencia.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
|
||||||
lsExcepcionPeajeVigencia.add(excepcionPeajeVigencia);
|
lsExcepcionPeajeVigencia.add(excepcionPeajeVigencia);
|
||||||
|
if(null != lsExcepcionPeajeVigencia){
|
||||||
|
Collections.sort(lsExcepcionPeajeVigencia);
|
||||||
|
}
|
||||||
excepcionPeajeVigencia.setExcepcionPeaje(excepcionPeaje);
|
excepcionPeajeVigencia.setExcepcionPeaje(excepcionPeaje);
|
||||||
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
||||||
excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
||||||
|
|
|
@ -3505,6 +3505,7 @@ editarExcepcionPeajeController.msg.RenderHoraInicio=Hora Inicial
|
||||||
editarExcepcionPeajeController.msg.RenderHoraFin=Hora Final
|
editarExcepcionPeajeController.msg.RenderHoraFin=Hora Final
|
||||||
editarExcepcionPeajeController.msg.RenderDias=Dias da Semana
|
editarExcepcionPeajeController.msg.RenderDias=Dias da Semana
|
||||||
editarExcepcionPeajeController.msg.RenderPrecio=Precio
|
editarExcepcionPeajeController.msg.RenderPrecio=Precio
|
||||||
|
editarExcepcionPeajeController.MSG.borrarOK = Excepcion Peaje se eliminó exitosamente
|
||||||
|
|
||||||
|
|
||||||
# Editar convenio
|
# Editar convenio
|
||||||
|
|
|
@ -3512,7 +3512,7 @@ busquedaExcepcionPeajeController.MSG.suscribirOK = Exceção de Pedágio Registr
|
||||||
busquedaExcepcionPeajeController.lhId.label
|
busquedaExcepcionPeajeController.lhId.label
|
||||||
|
|
||||||
# editar ExcepcionPeaje
|
# editar ExcepcionPeaje
|
||||||
editarExcepcionPeajeController.window.title = Excepcion Peaje
|
editarExcepcionPeajeController.window.title = Exceção de Pedágio
|
||||||
editarExcepcionPeajeController.btnApagar.tooltiptext = Eliminar
|
editarExcepcionPeajeController.btnApagar.tooltiptext = Eliminar
|
||||||
editarExcepcionPeajeController.btnSalvar.tooltiptext = Salvar
|
editarExcepcionPeajeController.btnSalvar.tooltiptext = Salvar
|
||||||
editarExcepcionPeajeController.btnFechar.tooltiptext = Fechar
|
editarExcepcionPeajeController.btnFechar.tooltiptext = Fechar
|
||||||
|
@ -3550,6 +3550,7 @@ editarExcepcionPeajeController.msg.RenderHoraInicio=Hora Inicial
|
||||||
editarExcepcionPeajeController.msg.RenderHoraFin=Hora Final
|
editarExcepcionPeajeController.msg.RenderHoraFin=Hora Final
|
||||||
editarExcepcionPeajeController.msg.RenderDias=Dias da Semana
|
editarExcepcionPeajeController.msg.RenderDias=Dias da Semana
|
||||||
editarExcepcionPeajeController.msg.RenderPrecio=Precio
|
editarExcepcionPeajeController.msg.RenderPrecio=Precio
|
||||||
|
editarExcepcionPeajeController.MSG.borrarOK = Exceção de Pedágio foi excluída
|
||||||
|
|
||||||
# Pesquisa Convênio
|
# Pesquisa Convênio
|
||||||
busquedaConvenioController.window.title = Convênio - Desconto
|
busquedaConvenioController.window.title = Convênio - Desconto
|
||||||
|
|
|
@ -74,13 +74,16 @@
|
||||||
<listhead sizable="true">
|
<listhead sizable="true">
|
||||||
<listheader width="10%" image="/gui/img/builder.gif"
|
<listheader width="10%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('busquedaExcepcionPeajeController.lhId.label')}"
|
label="${c:l('busquedaExcepcionPeajeController.lhId.label')}"
|
||||||
sort="auto(esquemacorridaId)" />
|
sort="auto(excepcionPeajeId)" />
|
||||||
<listheader width="30%" image="/gui/img/builder.gif"
|
<listheader width="30%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('busquedaExcepcionPeajeController.lhRuta.label')}"/>
|
label="${c:l('busquedaExcepcionPeajeController.lhRuta.label')}"
|
||||||
|
sort="auto(ruta.descruta)"/>
|
||||||
<listheader width="30%" image="/gui/img/builder.gif"
|
<listheader width="30%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('busquedaExcepcionPeajeController.lhOrigem.label')}"/>
|
label="${c:l('busquedaExcepcionPeajeController.lhOrigem.label')}"
|
||||||
|
sort="auto(origem.descparada)"/>
|
||||||
<listheader width="30%" image="/gui/img/builder.gif"
|
<listheader width="30%" image="/gui/img/builder.gif"
|
||||||
label="${c:l('busquedaExcepcionPeajeController.lhDestino.label')}"/>
|
label="${c:l('busquedaExcepcionPeajeController.lhDestino.label')}"
|
||||||
|
sort="auto(destino.descparada)"/>
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue