fixes bug #6832
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@50083 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d4400615c8
commit
353939319e
|
@ -517,6 +517,7 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
|||
Integer tiempoHorVeranoOrigem = Integer.valueOf(0);
|
||||
Integer tiempoHorHusoDestino = Integer.valueOf(0);
|
||||
Integer tiempoHorVeranoDestino = Integer.valueOf(0);
|
||||
Date tiempoestancia = null;
|
||||
|
||||
List<Object[]> tramos = buscarTramosCorrida(corrida);
|
||||
|
||||
|
@ -529,6 +530,7 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
|||
tiempoHorVeranoOrigem = Integer.valueOf(objeto[6].toString());
|
||||
tiempoHorHusoDestino = Integer.valueOf(objeto[7].toString());
|
||||
tiempoHorVeranoDestino = Integer.valueOf(objeto[8].toString());
|
||||
tiempoestancia = (Date) objeto[9];
|
||||
|
||||
if (husoHorVeranoLlegadaAnterior == null) {
|
||||
fechorSalidaOriginalUpdate = fechorSalidaOriginal;
|
||||
|
@ -544,6 +546,22 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
|||
fechorsalidaUpdate,
|
||||
tiempoHorHusoOrigem + tiempoHorVeranoOrigem,
|
||||
tiempoHorHusoDestino + tiempoHorVeranoDestino);
|
||||
|
||||
if(tiempoestancia != null) {
|
||||
Calendar aux = Calendar.getInstance();
|
||||
aux.setTime(DateUtil.normalizar(husoHorVeranoLlegadaAnterior));
|
||||
aux.add(Calendar.MINUTE, tiempoestancia.getMinutes());
|
||||
aux.add(Calendar.HOUR_OF_DAY, tiempoestancia.getHours());
|
||||
|
||||
husoHorVeranoLlegadaAnterior = aux.getTime();
|
||||
|
||||
Calendar auxFechorsalidaUpdate = Calendar.getInstance();
|
||||
auxFechorsalidaUpdate.setTime(DateUtil.normalizar(fechorsalidaUpdate));
|
||||
auxFechorsalidaUpdate.add(Calendar.MINUTE, tiempoestancia.getMinutes());
|
||||
auxFechorsalidaUpdate.add(Calendar.HOUR_OF_DAY, tiempoestancia.getHours());
|
||||
|
||||
fechorsalidaUpdate = auxFechorsalidaUpdate.getTime();
|
||||
}
|
||||
|
||||
if (husoHorVeranoLlegadaAnterior != null) {
|
||||
fechorllegadaUpdate = husoHorVeranoLlegadaAnterior;
|
||||
|
@ -657,7 +675,8 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
|||
hql.append(" estadoD.fecInicioHorVerano ");
|
||||
hql.append(" and estadoD.fecFinoHorVerano ");
|
||||
hql.append(" then (estadoD.tiempoHorVerano)");
|
||||
hql.append(" else 0 end, 0) as tiempoHorVeranoDestino");
|
||||
hql.append(" else 0 end, 0) as tiempoHorVeranoDestino,");
|
||||
hql.append(" ct.tiempoEstancia ");
|
||||
hql.append(" from CorridaTramo ct ");
|
||||
hql.append(" inner join ct.origem origem ");
|
||||
hql.append(" inner join origem.ciudad ciudadO ");
|
||||
|
|
Loading…
Reference in New Issue