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.setCorridaId(numCorrida);
|
||||||
id.setFeccorrida(DateUtil.normalizarToFecha(dataGeracao));
|
id.setFeccorrida(DateUtil.normalizarToFecha(dataGeracao));
|
||||||
|
|
||||||
if(esquemaCorrida.getIndDiaSimDiaNao() != null && esquemaCorrida.getIndDiaSimDiaNao()) {
|
if (esquemaCorrida.getIndDiaSimDiaNao() != null && esquemaCorrida.getIndDiaSimDiaNao()) {
|
||||||
Calendar calendarData = Calendar.getInstance();
|
Calendar calendarData = Calendar.getInstance();
|
||||||
calendarData.setTime(dataGeracao);
|
calendarData.setTime(dataGeracao);
|
||||||
calendarData.add(Calendar.DATE, -1);
|
calendarData.add(Calendar.DATE, -1);
|
||||||
|
@ -523,23 +523,17 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
corrida.setAutobus(null);
|
corrida.setAutobus(null);
|
||||||
corrida.setClaseServicio(esquemaCorrida.getClaseServicio());
|
corrida.setClaseServicio(esquemaCorrida.getClaseServicio());
|
||||||
corrida.setConductor(null);
|
corrida.setConductor(null);
|
||||||
if(esquemaCorrida.getIndCorridaExtra()){
|
if (esquemaCorrida.getIndCorridaExtra()) {
|
||||||
corrida.setTipoServicio(new Short("2"));
|
corrida.setTipoServicio(new Short("2"));
|
||||||
}else{
|
} else {
|
||||||
corrida.setTipoServicio(new Short("1"));
|
corrida.setTipoServicio(new Short("1"));
|
||||||
}
|
}
|
||||||
corrida.setInfoCorrida(esquemaCorrida.getInfoCorrida());
|
corrida.setInfoCorrida(esquemaCorrida.getInfoCorrida());
|
||||||
Integer cantparados = esquemaCorrida.getCantparados();
|
Integer cantparados = esquemaCorrida.getCantparados();
|
||||||
if (cantparados != null) {
|
if (cantparados != null) {
|
||||||
corrida.setCantParados(cantparados.shortValue());
|
corrida.setCantParados(cantparados.shortValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
Parada destino = rutaService.getDestino(ruta);
|
|
||||||
if (destino == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
corrida.setDestino(destino);
|
|
||||||
|
|
||||||
corrida.setEsquemaAgrupacionId(esquemaCorrida.getEsquemaAgrupacionId());
|
corrida.setEsquemaAgrupacionId(esquemaCorrida.getEsquemaAgrupacionId());
|
||||||
|
|
||||||
corrida.setEmpresa(esquemaCorrida.getEmpresa());
|
corrida.setEmpresa(esquemaCorrida.getEmpresa());
|
||||||
|
@ -560,12 +554,6 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
corrida.setNodo(corridaCtrl.getNodo());
|
corrida.setNodo(corridaCtrl.getNodo());
|
||||||
corrida.setDivision(esquemaCorrida.getDivision());
|
corrida.setDivision(esquemaCorrida.getDivision());
|
||||||
|
|
||||||
Parada origem = rutaService.getOrigem(ruta);
|
|
||||||
if (origem == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
corrida.setOrigem(origem);
|
|
||||||
|
|
||||||
corrida.setRuta(esquemaCorrida.getRuta());
|
corrida.setRuta(esquemaCorrida.getRuta());
|
||||||
corrida.setRolOperativo(esquemaCorrida.getRolOperativo());
|
corrida.setRolOperativo(esquemaCorrida.getRolOperativo());
|
||||||
corrida.setZona(null);
|
corrida.setZona(null);
|
||||||
|
@ -584,10 +572,28 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
|
|
||||||
Date husoHorVeranoLlegadaAnterior = null;
|
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) {
|
for (EsquemaTramo esquemaTramo : lsEsquemaTramo) {
|
||||||
|
|
||||||
CorridaTramo corridaTramo = new CorridaTramo();
|
CorridaTramo corridaTramo = new CorridaTramo();
|
||||||
if(esquemaTramo.getNumsecuencia() == 22){
|
if (esquemaTramo.getNumsecuencia() == 22) {
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
}
|
}
|
||||||
corridaTramo.setAutobus(null);
|
corridaTramo.setAutobus(null);
|
||||||
|
@ -748,7 +754,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
tiempoOrigen += estadoOrigen.getTiempoHorVerano();
|
tiempoOrigen += estadoOrigen.getTiempoHorVerano();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//21688
|
// 21688
|
||||||
Estado estadoDestino = esquemaTramo.getTramo().getDestino().getCiudad().getEstado();
|
Estado estadoDestino = esquemaTramo.getTramo().getDestino().getCiudad().getEstado();
|
||||||
int tiempoDestino = 0;
|
int tiempoDestino = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue