Alteração em persistência de numero de linha
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@46077 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
b406f31497
commit
c932ab5bce
|
@ -605,17 +605,23 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
|
||||||
txtPrefixo.getValue();
|
txtPrefixo.getValue();
|
||||||
|
|
||||||
List<Ruta> lsRuta = rutaService.buscarNumRuta(txtNumRuta.getValue());
|
List<Ruta> lsRuta = rutaService.buscarNumRuta(txtNumRuta.getValue());
|
||||||
|
|
||||||
|
if (radIda.isChecked()) {
|
||||||
|
ruta.setIndSentidoIda(Boolean.TRUE);
|
||||||
|
} else if (radVolta.isChecked()) {
|
||||||
|
ruta.setIndSentidoIda(Boolean.FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
if (!lsRuta.isEmpty()) {
|
if (!lsRuta.isEmpty()) {
|
||||||
boolean exists = CollectionUtils.exists(lsRuta, new Predicate() {
|
boolean exists = CollectionUtils.exists(lsRuta, new Predicate() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean evaluate(Object object) {
|
public boolean evaluate(Object object) {
|
||||||
return ((Ruta) object).getRutaId().equals(ruta.getRutaId());
|
return ((Ruta) object).getNumRuta().equals(ruta.getNumRuta()) && ((Ruta) object).getIndSentidoIda().equals(ruta.getIndSentidoIda());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!exists) {
|
if (ruta.getRutaId() == null && exists) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.registroNumRutaExiste"),
|
Labels.getLabel("editarCatalogoDeRutaController.registroNumRutaExiste"),
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
||||||
|
@ -658,11 +664,7 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
|
||||||
ruta.setIndNombreObligatorio(Boolean.FALSE);
|
ruta.setIndNombreObligatorio(Boolean.FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radIda.isChecked()) {
|
|
||||||
ruta.setIndSentidoIda(Boolean.TRUE);
|
|
||||||
} else if (radVolta.isChecked()) {
|
|
||||||
ruta.setIndSentidoIda(Boolean.FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ruta.getRutaId() == null) {
|
if (ruta.getRutaId() == null) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue