fixes bug #9684
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@73102 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
394f989eb3
commit
0e994d6e59
|
@ -125,7 +125,7 @@ public class Ruta implements Serializable, Comparable<Ruta> {
|
||||||
|
|
||||||
@Column(name = "INDRUTAINTERNACIONAL")
|
@Column(name = "INDRUTAINTERNACIONAL")
|
||||||
private Boolean indRutaInternacional;
|
private Boolean indRutaInternacional;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "ruta", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "ruta", cascade = CascadeType.ALL)
|
||||||
private List<RutaEmbarqueDesembarque> lsRutaEmbarqueDesembarque;
|
private List<RutaEmbarqueDesembarque> lsRutaEmbarqueDesembarque;
|
||||||
|
|
||||||
|
@ -294,12 +294,12 @@ public class Ruta implements Serializable, Comparable<Ruta> {
|
||||||
|
|
||||||
public List<RutaSecuencia> getRutaSecuenciaList() {
|
public List<RutaSecuencia> getRutaSecuenciaList() {
|
||||||
List<RutaSecuencia> rsList = new ArrayList<RutaSecuencia>();
|
List<RutaSecuencia> rsList = new ArrayList<RutaSecuencia>();
|
||||||
if(this.rutaSecuenciaList != null)
|
if (this.rutaSecuenciaList != null)
|
||||||
for (RutaSecuencia rs : this.rutaSecuenciaList) {
|
for (RutaSecuencia rs : this.rutaSecuenciaList) {
|
||||||
if (rs.getActivo() == Boolean.TRUE) {
|
if (rs.getActivo() == Boolean.TRUE) {
|
||||||
rsList.add(rs);
|
rsList.add(rs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return rsList;
|
return rsList;
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,15 @@ public class Ruta implements Serializable, Comparable<Ruta> {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (getDescruta() != null || getRutaId() != null) {
|
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 " ";
|
return " ";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue