fixes bug #7643
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@57496 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
473b948dfb
commit
8c96b3e861
|
@ -455,7 +455,7 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
id.setCorridaId(numCorrida);
|
||||
id.setFeccorrida(DateUtil.normalizarToFecha(dataGeracao));
|
||||
|
||||
if(esquemaCorrida.getIndDiaSimDiaNao() != null && esquemaCorrida.getIndDiaSimDiaNao()) {
|
||||
if (esquemaCorrida.getIndDiaSimDiaNao() != null && esquemaCorrida.getIndDiaSimDiaNao()) {
|
||||
Calendar calendarData = Calendar.getInstance();
|
||||
calendarData.setTime(dataGeracao);
|
||||
calendarData.add(Calendar.DATE, -1);
|
||||
|
@ -523,23 +523,17 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
corrida.setAutobus(null);
|
||||
corrida.setClaseServicio(esquemaCorrida.getClaseServicio());
|
||||
corrida.setConductor(null);
|
||||
if(esquemaCorrida.getIndCorridaExtra()){
|
||||
corrida.setTipoServicio(new Short("2"));
|
||||
}else{
|
||||
corrida.setTipoServicio(new Short("1"));
|
||||
}
|
||||
if (esquemaCorrida.getIndCorridaExtra()) {
|
||||
corrida.setTipoServicio(new Short("2"));
|
||||
} else {
|
||||
corrida.setTipoServicio(new Short("1"));
|
||||
}
|
||||
corrida.setInfoCorrida(esquemaCorrida.getInfoCorrida());
|
||||
Integer cantparados = esquemaCorrida.getCantparados();
|
||||
if (cantparados != null) {
|
||||
corrida.setCantParados(cantparados.shortValue());
|
||||
}
|
||||
|
||||
Parada destino = rutaService.getDestino(ruta);
|
||||
if (destino == null) {
|
||||
return null;
|
||||
}
|
||||
corrida.setDestino(destino);
|
||||
|
||||
corrida.setEsquemaAgrupacionId(esquemaCorrida.getEsquemaAgrupacionId());
|
||||
|
||||
corrida.setEmpresa(esquemaCorrida.getEmpresa());
|
||||
|
@ -560,12 +554,6 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
corrida.setNodo(corridaCtrl.getNodo());
|
||||
corrida.setDivision(esquemaCorrida.getDivision());
|
||||
|
||||
Parada origem = rutaService.getOrigem(ruta);
|
||||
if (origem == null) {
|
||||
return null;
|
||||
}
|
||||
corrida.setOrigem(origem);
|
||||
|
||||
corrida.setRuta(esquemaCorrida.getRuta());
|
||||
corrida.setRolOperativo(esquemaCorrida.getRolOperativo());
|
||||
corrida.setZona(null);
|
||||
|
@ -584,10 +572,28 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
|
||||
Date husoHorVeranoLlegadaAnterior = null;
|
||||
|
||||
if (lsEsquemaTramo == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
EsquemaTramo primeiro = lsEsquemaTramo.get(0);
|
||||
Parada origem = primeiro.getTramo().getOrigem();
|
||||
if (origem == null) {
|
||||
return null;
|
||||
}
|
||||
corrida.setOrigem(origem);
|
||||
|
||||
EsquemaTramo ultimo = lsEsquemaTramo.get(lsEsquemaTramo.size() - 1);
|
||||
Parada destino = ultimo.getTramo().getDestino();
|
||||
if (destino == null) {
|
||||
return null;
|
||||
}
|
||||
corrida.setDestino(destino);
|
||||
|
||||
for (EsquemaTramo esquemaTramo : lsEsquemaTramo) {
|
||||
|
||||
CorridaTramo corridaTramo = new CorridaTramo();
|
||||
if(esquemaTramo.getNumsecuencia() == 22){
|
||||
if (esquemaTramo.getNumsecuencia() == 22) {
|
||||
System.out.println("");
|
||||
}
|
||||
corridaTramo.setAutobus(null);
|
||||
|
@ -748,7 +754,7 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
tiempoOrigen += estadoOrigen.getTiempoHorVerano();
|
||||
}
|
||||
}
|
||||
//21688
|
||||
// 21688
|
||||
Estado estadoDestino = esquemaTramo.getTramo().getDestino().getCiudad().getEstado();
|
||||
int tiempoDestino = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue