fixes bug #7163
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@53257 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6b93e5c87c
commit
b2caceab1d
|
@ -181,6 +181,9 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
listManuais.add(item);
|
||||
}
|
||||
|
||||
if (!getConexao().isClosed())
|
||||
getConexao().close();
|
||||
|
||||
return listManuais;
|
||||
}
|
||||
|
||||
|
@ -284,6 +287,9 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
listRedZ.add(item);
|
||||
}
|
||||
|
||||
if (!getConexao().isClosed())
|
||||
getConexao().close();
|
||||
|
||||
return listRedZ;
|
||||
}
|
||||
|
||||
|
@ -504,6 +510,9 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
importacionNaoFiscalVOs.add(importacionNaoFiscal);
|
||||
}
|
||||
|
||||
if (!getConexao().isClosed())
|
||||
getConexao().close();
|
||||
|
||||
return importacionNaoFiscalVOs;
|
||||
}
|
||||
|
||||
|
|
|
@ -506,11 +506,11 @@ 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) {
|
||||
|
@ -598,7 +598,6 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
|
||||
horaChegadaAnterior = fecHorallegada;
|
||||
|
||||
|
||||
corridaTramo.setFechortarjetaviaje(null);
|
||||
corridaTramo.setNodo(corridaCtrl.getNodo());
|
||||
|
||||
|
@ -634,8 +633,8 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
corridaTramo.setFechorsalidaH(corridaTramo.getFechorsalida());
|
||||
} else {
|
||||
|
||||
//Ajusta tambem o tempo de instancia do calculo do horario de verao
|
||||
if (esquemaTramo.getTiempoEstancia() != null){
|
||||
// Ajusta tambem o tempo de instancia do calculo do horario de verao
|
||||
if (esquemaTramo.getTiempoEstancia() != null) {
|
||||
GregorianCalendar tmp = new GregorianCalendar();
|
||||
tmp.setTime(husoHorVeranoLlegadaAnterior);
|
||||
|
||||
|
@ -661,8 +660,6 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
corridaTramo.setFechorSalidaOriginalH(corridaTramo.getFechorSalidaOriginal());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (numSec == 1) {
|
||||
corrida.setFechorSalidaOriginalH(corridaTramo.getFechorsalidaH());
|
||||
}
|
||||
|
@ -1091,7 +1088,7 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
status = transactionManager.getTransaction(def);
|
||||
} catch (Throwable ex) {
|
||||
log.error("", ex);
|
||||
log.error(" Erro ao gerar corrida = " + esquemaCorrida.getNumCorrida() + " esquemaCorrida = " + esquemaCorrida.getEsquemacorridaId());
|
||||
log.error(" Erro ao gerar corrida = " + esquemaCorrida.getNumCorrida() + " esquemaCorrida = " + esquemaCorrida.getEsquemacorridaId());
|
||||
transactionManager.rollback(status);
|
||||
status = transactionManager.getTransaction(def);
|
||||
}
|
||||
|
@ -1336,6 +1333,9 @@ public class CorridaServiceImpl implements CorridaService {
|
|||
|
||||
}
|
||||
|
||||
if (!conexao.isClosed())
|
||||
conexao.close();
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.error("", e);
|
||||
}
|
||||
|
|
|
@ -600,6 +600,10 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
gravarArq.print(fechamento + QUEBRA_LINHA);
|
||||
|
||||
gravarArq.close();
|
||||
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue