gleimar 2017-06-01 23:01:41 +00:00
parent c0be8a0731
commit fcf81e1c0c
1 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,8 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
int i=0;
for(PeajeVO peajeVO : peajes){
i++;
stmt.addBatch(peajeVO.toInsertQuery());
stmt.addBatch(peajeVO.toUpdateExcepcionPeajeQuery());
stmt.addBatch(peajeVO.toUpdateExcepcionPeajeVigenciaQuery());
@ -244,6 +246,7 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
if(i%100 == 0){
result = stmt.executeBatch();
con.commit();
stmt.close();
stmt = con.createStatement();
}
@ -251,6 +254,7 @@ public class CalcularPeajeHibernateDAO extends GenericHibernateDAO<String, Strin
result = stmt.executeBatch();
con.commit();
stmt.close();
recalcularExcecoesPedagio(peajes);
}
catch (SQLException e) {