Correção bugs Aguia Branca.
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@75895 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ca77a99282
commit
4685b250a5
|
@ -18,6 +18,3 @@ label.agencia=Agencia
|
|||
label.serie=Serie
|
||||
label.bilhete=Bilhetes
|
||||
label.numeracao=Numeração
|
||||
label.subserie=Subserie
|
||||
label.formInicio=F. Inicio
|
||||
label.formFim=F. Fim
|
|
@ -205,14 +205,14 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
spTiempoLiberacionInternetMinutoCaduc.setText(horaMinutoTiempoliberacioninternetCaduc[1]);
|
||||
|
||||
|
||||
validaIsChecked();
|
||||
if(reservacionCtrl.getIndTipoReserva()!= null && reservacionCtrl.getIndTipoReserva()){
|
||||
ra2.setChecked(Boolean.TRUE);
|
||||
}else{
|
||||
ra1.setChecked(Boolean.TRUE);
|
||||
}
|
||||
desabilitaTempos();
|
||||
|
||||
}else{
|
||||
btnApagar.setVisible(Boolean.FALSE);
|
||||
|
||||
ra1.setChecked(true);
|
||||
desabilitaTempos();
|
||||
}
|
||||
|
||||
txtDescripcion.focus();
|
||||
|
@ -546,7 +546,6 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
tabControl.setSelected(Boolean.TRUE);
|
||||
txtDescripcion.getValue();
|
||||
|
@ -578,7 +577,7 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
List<ReservacionCtrl> lsTraslapa = reservacionCtrlService.buscarFechaTraslapa(reservacionCtrl);
|
||||
Boolean podeSalvarTraslapa = lsTraslapa.isEmpty() ? true : false;
|
||||
if (lsTraslapa.size() == 1) {
|
||||
// Somente edição
|
||||
// Somente editar
|
||||
if (reservacionCtrl.getReservacionctrlId() != null) {
|
||||
if (reservacionCtrl.getReservacionctrlId().equals(lsTraslapa.get(0).getReservacionctrlId())) {
|
||||
podeSalvarTraslapa = true;
|
||||
|
@ -586,7 +585,7 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
}
|
||||
}
|
||||
|
||||
// Se não pode salvar pq translapa
|
||||
// Se nao pode salvar pq translapa
|
||||
if (!podeSalvarTraslapa) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarConfiguracionReservacionController.MSG.conflitoVigencias"),
|
||||
|
@ -657,6 +656,7 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
Date fin = DateUtil.fimFecha(fecFinal.getValue());
|
||||
reservacionCtrl.setFecinicio(inicio);
|
||||
reservacionCtrl.setFecfinal(fin);
|
||||
reservacionCtrl.setIndTipoReserva(ra2.isChecked());
|
||||
|
||||
reservacionCtrl.setTiempoliberacion(spTiempoLiberacionHora.getValue(), spTiempoLiberacionMinuto.getValue());
|
||||
reservacionCtrl.setTiempoliberacioninternet(spTiempoLiberacionInternetHora.getValue(), spTiempoLiberacionInternetMinuto.getValue());
|
||||
|
@ -770,23 +770,6 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
|||
|
||||
}
|
||||
|
||||
private void validaIsChecked(){
|
||||
|
||||
if(spTiempoLiberacionHora.getValue() > 0 || spTiempoLiberacionMinuto.getValue() > 0
|
||||
|| spTiempoLiberacionInternetHora.getValue() > 0 || spTiempoLiberacionInternetMinuto.getValue() > 0 ){
|
||||
|
||||
ra1.setChecked(Boolean.TRUE);
|
||||
|
||||
}
|
||||
|
||||
if(spTiempoLiberacionHoraCaduc.getValue() > 0 || spTiempoLiberacionMinutoCaduc.getValue() > 0
|
||||
|| spTiempoLiberacionInternetHoraCaduc.getValue() > 0 || spTiempoLiberacionInternetMinutoCaduc.getValue() > 0 ){
|
||||
|
||||
ra2.setChecked(Boolean.TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ReservacionCtrl getReservacionCtrl() {
|
||||
return reservacionCtrl;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderParadaCodOrgaoConcedente;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
@Controller("editarCatalogoDeParadaController")
|
||||
|
@ -89,7 +89,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
codOrgaosConcedentesList.setData(parada.getCodigosOrgaosConcedentes());
|
||||
lsTipoParadas = tipoParadaService.obtenerTodos();
|
||||
lsOrgaosConcedentes = orgaoConcedenteService.obtenerTodosExceto(-1,OrgaoConcedente.CODIGO_ANTT);
|
||||
|
||||
|
||||
lsNodo = nodoService.obtenerTodos();
|
||||
|
||||
if (parada.getParadaId() == null) {
|
||||
|
@ -97,14 +97,14 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
} else {
|
||||
Ciudad ciudad = parada.getCiudad();
|
||||
if (ciudad != null) {
|
||||
cmbCiudad.setText(ciudad.getNombciudad());
|
||||
cmbCiudad.setText(ciudad.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ApplicationProperties.getInstance().codAnttNaoObrigatorio()) {
|
||||
codAntt.setConstraint("");
|
||||
}
|
||||
|
||||
|
||||
txtNome.focus();
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
cmbTipoParada.getValue();
|
||||
codAntt.getValue();
|
||||
descProcon.getValue();
|
||||
|
||||
|
||||
if (!validaNome()){
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarCatalogoDeParadaController.MSG.nomeInvalido"),
|
||||
|
@ -125,9 +125,9 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
try {
|
||||
Nodo nodoCentral = lsNodo.get(0);
|
||||
Nodo nodoCentral = lsNodo.get(0);
|
||||
parada.setNodo(nodoCentral);
|
||||
|
||||
|
||||
cmbCiudad.getValue(parada.getParadaId() == null);
|
||||
paradaService.suscribirActualizar(parada);
|
||||
|
||||
|
@ -190,7 +190,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
parada.addCodOrgaoConcedente(codigo);
|
||||
codOrgaosConcedentesList.setData(parada.getCodigosOrgaosConcedentes());
|
||||
}
|
||||
|
||||
|
||||
public void onClick$btnRemoverCodOrgaoConcedente(Event ev) throws InterruptedException {
|
||||
try {
|
||||
if(codOrgaosConcedentesList.getSelected() != null) {
|
||||
|
@ -198,7 +198,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
Labels.getLabel("editarCatalogoDeParadaController.MSG.borrarCodigoOrgaoConcedentePergunta"),
|
||||
Labels.getLabel("editarCatalogoDeParadaController.window.title"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
|
||||
if (resp == Messagebox.YES) {
|
||||
ParadaCodOrgaoConcedente codigo = (ParadaCodOrgaoConcedente) codOrgaosConcedentesList.getSelected();
|
||||
parada.removeCodOrgaoConcedente(codigo);
|
||||
|
@ -206,10 +206,10 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
paradaCodOrgaoConcedenteService.borrar(codigo);
|
||||
Messagebox.show(Labels.getLabel("editarCatalogoDeParadaController.msg.borrarCodigoOrgaoConcedenteOk"),
|
||||
Labels.getLabel("editarCatalogoDeParadaController.window.title"),
|
||||
Messagebox.OK,Messagebox.INFORMATION);
|
||||
Messagebox.OK,Messagebox.INFORMATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
Messagebox.show(Labels.getLabel("MSG.Error"),
|
||||
|
@ -217,7 +217,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
Messagebox.OK,Messagebox.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<Nodo> getLsNodo() {
|
||||
return lsNodo;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public class EditarCatalogoDeParadaController extends MyGenericForwardComposer {
|
|||
this.lsTipoParadas = lsTipoParadas;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<OrgaoConcedente> getLsOrgaosConcedentes() {
|
||||
return lsOrgaosConcedentes;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.gr;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -999,12 +999,10 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
if (gravarNovo) {
|
||||
// eu guardo antes para gantir que os dados que eu tenho na tela estao no banco
|
||||
pricingService.actualizacion(pricing);
|
||||
List<Pricing> lsPricing =
|
||||
pricingService.buscarPorNombre(pricing.getNombPricing());
|
||||
|
||||
if (lsPricing.size() <= 1) {
|
||||
if (lsPricing.size() == 0) {
|
||||
pricingService.actualizacion(pricing);
|
||||
pricingList.addItemNovo(pricing);
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||
import com.rjconsultores.ventaboletos.service.CiudadService;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -19,6 +17,9 @@ import org.zkoss.zkplus.databind.BindingListModelList;
|
|||
import org.zkoss.zkplus.spring.SpringUtil;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||
import com.rjconsultores.ventaboletos.service.CiudadService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author rodrigo
|
||||
|
@ -40,7 +41,7 @@ public class MyComboboxCiudad extends Combobox {
|
|||
this.setAutodrop(false);
|
||||
this.setAutocomplete(false);
|
||||
|
||||
|
||||
|
||||
this.addEventListener("onOK", new EventListener() {
|
||||
|
||||
@Override
|
||||
|
@ -50,6 +51,11 @@ public class MyComboboxCiudad extends Combobox {
|
|||
if (strCiudad.length() < MyComboboxParada.minLength) {
|
||||
return;
|
||||
}
|
||||
int indiceSeparacaoEstado = strCiudad.indexOf(",");
|
||||
if (indiceSeparacaoEstado != -1) {
|
||||
strCiudad = strCiudad.substring(0, indiceSeparacaoEstado);
|
||||
}
|
||||
|
||||
if (!strCiudad.isEmpty()) {
|
||||
lsCiudad = ciudadService.buscaLike(strCiudad);
|
||||
|
||||
|
@ -72,7 +78,8 @@ public class MyComboboxCiudad extends Combobox {
|
|||
|
||||
this.addEventListener("onChanging", new EventListener() {
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
InputEvent ev = (InputEvent) event;
|
||||
String strCiudad = ev.getValue();
|
||||
if (strCiudad.length() < 2) {
|
||||
|
@ -100,9 +107,9 @@ public class MyComboboxCiudad extends Combobox {
|
|||
|
||||
this.setModel(new BindingListModelList(ls, false));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param checaBusqueda
|
||||
* @throws WrongValueException
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue