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);
|
listManuais.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!getConexao().isClosed())
|
||||||
|
getConexao().close();
|
||||||
|
|
||||||
return listManuais;
|
return listManuais;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,6 +287,9 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
||||||
listRedZ.add(item);
|
listRedZ.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!getConexao().isClosed())
|
||||||
|
getConexao().close();
|
||||||
|
|
||||||
return listRedZ;
|
return listRedZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,6 +510,9 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
||||||
importacionNaoFiscalVOs.add(importacionNaoFiscal);
|
importacionNaoFiscalVOs.add(importacionNaoFiscal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!getConexao().isClosed())
|
||||||
|
getConexao().close();
|
||||||
|
|
||||||
return importacionNaoFiscalVOs;
|
return importacionNaoFiscalVOs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -506,11 +506,11 @@ 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) {
|
||||||
|
@ -598,7 +598,6 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
|
|
||||||
horaChegadaAnterior = fecHorallegada;
|
horaChegadaAnterior = fecHorallegada;
|
||||||
|
|
||||||
|
|
||||||
corridaTramo.setFechortarjetaviaje(null);
|
corridaTramo.setFechortarjetaviaje(null);
|
||||||
corridaTramo.setNodo(corridaCtrl.getNodo());
|
corridaTramo.setNodo(corridaCtrl.getNodo());
|
||||||
|
|
||||||
|
@ -634,8 +633,8 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
corridaTramo.setFechorsalidaH(corridaTramo.getFechorsalida());
|
corridaTramo.setFechorsalidaH(corridaTramo.getFechorsalida());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//Ajusta tambem o tempo de instancia do calculo do horario de verao
|
// Ajusta tambem o tempo de instancia do calculo do horario de verao
|
||||||
if (esquemaTramo.getTiempoEstancia() != null){
|
if (esquemaTramo.getTiempoEstancia() != null) {
|
||||||
GregorianCalendar tmp = new GregorianCalendar();
|
GregorianCalendar tmp = new GregorianCalendar();
|
||||||
tmp.setTime(husoHorVeranoLlegadaAnterior);
|
tmp.setTime(husoHorVeranoLlegadaAnterior);
|
||||||
|
|
||||||
|
@ -661,8 +660,6 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
corridaTramo.setFechorSalidaOriginalH(corridaTramo.getFechorSalidaOriginal());
|
corridaTramo.setFechorSalidaOriginalH(corridaTramo.getFechorSalidaOriginal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (numSec == 1) {
|
if (numSec == 1) {
|
||||||
corrida.setFechorSalidaOriginalH(corridaTramo.getFechorsalidaH());
|
corrida.setFechorSalidaOriginalH(corridaTramo.getFechorsalidaH());
|
||||||
}
|
}
|
||||||
|
@ -1091,7 +1088,7 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
status = transactionManager.getTransaction(def);
|
status = transactionManager.getTransaction(def);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
log.error("", 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);
|
transactionManager.rollback(status);
|
||||||
status = transactionManager.getTransaction(def);
|
status = transactionManager.getTransaction(def);
|
||||||
}
|
}
|
||||||
|
@ -1336,6 +1333,9 @@ public class CorridaServiceImpl implements CorridaService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!conexao.isClosed())
|
||||||
|
conexao.close();
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,6 +600,10 @@ public class FiscalServiceImpl implements FiscalService {
|
||||||
gravarArq.print(fechamento + QUEBRA_LINHA);
|
gravarArq.print(fechamento + QUEBRA_LINHA);
|
||||||
|
|
||||||
gravarArq.close();
|
gravarArq.close();
|
||||||
|
|
||||||
|
if (!conn.isClosed())
|
||||||
|
conn.close();
|
||||||
|
|
||||||
return arquivo;
|
return arquivo;
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in New Issue