leonardo 2016-03-22 14:38:13 +00:00
parent c261b1c18e
commit b22a52953d
2 changed files with 80 additions and 2 deletions

View File

@ -469,7 +469,86 @@ public class EsquemaCorrida implements Serializable {
public void setIndCorridaExtra(Boolean indCorridaExtra) {
this.indCorridaExtra = indCorridaExtra;
}
public void clone(EsquemaCorrida other){
this.activo = other.activo;
this.cantDiasGeneracion = other.cantDiasGeneracion;
this.cantparados = other.cantparados;
this.claseServicio = other.claseServicio;
this.claseServicio2 = other.claseServicio2;
this.diagramaAutobusId = other.diagramaAutobusId;
this.division = other.division;
this.empresa = other.empresa;
this.empresa1 = other.empresa1;
this.esquemaAgrupacionId = other.esquemaAgrupacionId;
this.esquemacorridaId = null;
this.esquemaCorridaRebote = other.esquemaCorridaRebote;
this.esquemaOperacional = other.esquemaOperacional;
this.fecmodif = other.fecmodif;
this.horasalida = other.horasalida;
this.indCorridaExtra = other.indCorridaExtra;
this.indDiaSimDiaNao = other.indDiaSimDiaNao;
this.inddomingo = other.inddomingo;
this.indGeneraFeriado = other.indGeneraFeriado;
this.indjueves = other.indjueves;
this.indlunes = other.indlunes;
this.indmartes = other.indmartes;
this.indmiercoles = other.indmiercoles;
this.indsabado = other.indsabado;
this.indviernes = other.indviernes;
this.infoCorrida = other.infoCorrida;
this.marca = other.marca;
this.numCorrida = other.numCorrida;
this.numCorridaPisoExtra = other.numCorridaPisoExtra;
this.pisoExtra = other.pisoExtra;
this.rolOperativo = other.rolOperativo;
this.rolOperativo2 = other.rolOperativo2;
this.ruta = other.ruta;
this.statusCorrida = other.statusCorrida;
this.tipocorrida = other.tipocorrida;
this.usuarioId = other.usuarioId;
//this.esquemaAsientoList;
//this.esquemaTramoList;
for (EsquemaTramo old : other.esquemaTramoList){
EsquemaTramo et = new EsquemaTramo();
et.setActivo(old.getActivo());
et.setEsquemaCorrida(this);
et.setExcepcionRecorrido(old.getExcepcionRecorrido());
et.setFecmodif(old.getFecmodif());
et.setNumsecuencia(old.getNumsecuencia());
et.setPlataforma(old.getPlataforma());
et.setTiempoEstancia(old.getTiempoEstancia());
et.setTramo(old.getTramo());
et.setUsuarioId(old.getUsuarioId());
if (esquemaTramoList == null){
esquemaTramoList = new ArrayList<EsquemaTramo>();
}
esquemaTramoList.add(et);
}
for (EsquemaAsiento old : other.esquemaAsientoList){
EsquemaAsiento a = new EsquemaAsiento();
a.setActivo(old.getActivo());
a.setDestino(old.getDestino());
a.setEsquemaasientoId(null);
a.setEsquemaCorrida(this);
a.setFecmodif(old.getFecmodif());
a.setIndvendible(old.getIndvendible());
a.setMotivobloqueo(old.getMotivobloqueo());
a.setNumasiento(old.getNumasiento());
a.setParada(old.getParada());
a.setTiempoLiberacion(old.getTiempoLiberacion());
a.setUsuarioId(old.getUsuarioId());
if (esquemaAsientoList == null){
esquemaAsientoList = new ArrayList<EsquemaAsiento>();
}
esquemaAsientoList.add(a);
}
}
public Boolean getIndDiaSimDiaNao() {
return indDiaSimDiaNao;
}

View File

@ -120,7 +120,6 @@ public class EsquemaCorridaServiceImpl implements EsquemaCorridaService {
et.setActivo(Boolean.FALSE);
et.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
et.setFecmodif(Calendar.getInstance().getTime());
esquemaTramoDAO.actualizacion(et);
}
}