git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@31589 d1611594-4594-4d17-8e1d-87c2c4800839
parent
8970739612
commit
412a029c24
|
@ -535,13 +535,14 @@ public class CorridaHibernateDAO extends GenericHibernateDAO<Corrida, Corrida.Id
|
||||||
Calendar horLlegada = null;
|
Calendar horLlegada = null;
|
||||||
|
|
||||||
// Si los tiempos son distintos, hube cambio de huso horario/horario de verano
|
// Si los tiempos son distintos, hube cambio de huso horario/horario de verano
|
||||||
if (tiempoOrigen != tiempoDestino) {
|
|
||||||
long elapsedMinutes = DateUtil.getElapsedMinutos(fechorsalida, fechorllegada);
|
long elapsedMinutes = DateUtil.getElapsedMinutos(fechorsalida, fechorllegada);
|
||||||
|
|
||||||
horLlegada = Calendar.getInstance();
|
horLlegada = Calendar.getInstance();
|
||||||
horLlegada.setTime(fechorsalidaH);
|
horLlegada.setTime(fechorsalidaH);
|
||||||
|
|
||||||
horLlegada.add(Calendar.MINUTE, (int) elapsedMinutes);
|
horLlegada.add(Calendar.MINUTE, (int) elapsedMinutes);
|
||||||
|
|
||||||
|
if (tiempoOrigen != tiempoDestino) {
|
||||||
horLlegada.add(Calendar.HOUR, difHuso(tiempoOrigen, tiempoDestino));
|
horLlegada.add(Calendar.HOUR, difHuso(tiempoOrigen, tiempoDestino));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -687,13 +687,14 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
|
|
||||||
Calendar horLlegada = null;
|
Calendar horLlegada = null;
|
||||||
// Si los tiempos son distintos, hube cambio de huso horario/horario de verano
|
// Si los tiempos son distintos, hube cambio de huso horario/horario de verano
|
||||||
if (tiempoOrigen != tiempoDestino) {
|
|
||||||
long elapsedMinutes = DateUtil.getElapsedMinutos(corridaTramo.getFechorsalida(), corridaTramo.getFechorllegada());
|
long elapsedMinutes = DateUtil.getElapsedMinutos(corridaTramo.getFechorsalida(), corridaTramo.getFechorllegada());
|
||||||
|
|
||||||
horLlegada = Calendar.getInstance();
|
horLlegada = Calendar.getInstance();
|
||||||
horLlegada.setTime(corridaTramo.getFechorsalidaH());
|
horLlegada.setTime(corridaTramo.getFechorsalidaH());
|
||||||
|
|
||||||
horLlegada.add(Calendar.MINUTE, (int) elapsedMinutes);
|
horLlegada.add(Calendar.MINUTE, (int) elapsedMinutes);
|
||||||
|
if (tiempoOrigen != tiempoDestino) {
|
||||||
horLlegada.add(Calendar.HOUR, difHuso(tiempoOrigen, tiempoDestino));
|
horLlegada.add(Calendar.HOUR, difHuso(tiempoOrigen, tiempoDestino));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1122,7 +1123,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
@Override
|
@Override
|
||||||
public Boolean atualizarCorridaFecHusoFecVerano(Estado estado, Date dataInicial, Integer corridaId) {
|
public Boolean atualizarCorridaFecHusoFecVerano(Estado estado, Date dataInicial, Integer corridaId) {
|
||||||
try {
|
try {
|
||||||
List<Corrida> corridas = corridaDAO.buscarPorEstado(estado, dataInicial);
|
List<Corrida> corridas = corridaDAO.buscarPorEstado(estado, dataInicial, corridaId);
|
||||||
corridaDAO.actualizaFecHusoFecVerano(corridas);
|
corridaDAO.actualizaFecHusoFecVerano(corridas);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue