Merge pull request 'fixes bug#AL-2027' (#23) from AL-2027 into master

Reviewed-on: http://18.235.188.113:3000/adm/ModelWeb/pulls/23
Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>
Reviewed-by: Gleison da Cruz <gleison.cruz@totvs.com.br>
master
fabio 2023-01-17 20:43:08 +00:00
commit ca03830634
3 changed files with 3 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ModelWeb</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
<distributionManagement>
<repository>
<id>rj-releases</id>

View File

@ -151,7 +151,7 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
@Override
@Transactional
public boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
public synchronized boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
if(fechamentocntcorrenteId == null ) {
return false;

View File

@ -133,15 +133,8 @@ public class SapServiceImpl implements SapService{
while(!listaPendente.isEmpty()) {
log.info("IntegracaoSap: Registro a enviar:"+listaPendente.size());
try {
remessa(listaPendente, false);
} catch (Exception e) {
throw e;
}
remessa(listaPendente, false);
listaPendente = obtenerTodosParaRemessa(null, DateUtil.getYesterdayDate(), new Date(), "2");
}
}
}