valdevir 2017-08-25 21:24:58 +00:00
parent 394f989eb3
commit 0e994d6e59
1 changed files with 15 additions and 7 deletions

View File

@ -294,7 +294,7 @@ public class Ruta implements Serializable, Comparable<Ruta> {
public List<RutaSecuencia> getRutaSecuenciaList() {
List<RutaSecuencia> rsList = new ArrayList<RutaSecuencia>();
if(this.rutaSecuenciaList != null)
if (this.rutaSecuenciaList != null)
for (RutaSecuencia rs : this.rutaSecuenciaList) {
if (rs.getActivo() == Boolean.TRUE) {
rsList.add(rs);
@ -500,7 +500,15 @@ public class Ruta implements Serializable, Comparable<Ruta> {
@Override
public String toString() {
if (getDescruta() != null || getRutaId() != null) {
return this.getDescruta() + " - " + this.getRutaId();
if (getRutaId() != -1) {
String sentido = this.getIndSentidoIda() == null || Boolean.TRUE.equals(this.getIndSentidoIda()) ? "IDA" : "VOLTA";
String numRuta = this.getNumRuta() != null ? this.getNumRuta() : "null";
String descClaseServicio = this.getClaseServicio() != null ? this.getClaseServicio().getDescclase() : "null";
String descLinha = numRuta + " - " + this.getDescruta() + " - " + descClaseServicio + " - " + this.getRutaId().toString() + " - " + sentido;
return descLinha;
} else {
return this.getRutaId() + " - " + this.getDescruta();
}
}
return " ";
}