Adição de reintegração e padronizado hibernate fix bug#AL-2540
parent
e593f2f86a
commit
941a07bbb1
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ModelWeb</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.3.2</version>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>rj-releases</id>
|
||||
|
|
|
@ -153,12 +153,12 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
public synchronized boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
|
||||
public boolean atualizaFechamento(Long fechamentocntcorrenteId, int status) throws Exception {
|
||||
|
||||
if(fechamentocntcorrenteId == null ) {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
|
||||
getSession().flush();
|
||||
|
||||
StringBuilder qry = new StringBuilder();
|
||||
|
@ -171,15 +171,6 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
|||
query.setLong("fechamentoId", fechamentocntcorrenteId);
|
||||
|
||||
query.executeUpdate();
|
||||
*/
|
||||
//é feito update manualmente porque o hibernate utiliza sco_read e nao tem permissao de escrita no banco
|
||||
try(Connection con = scoDs.getConnection();
|
||||
Statement stmt = con.createStatement()){
|
||||
stmt.addBatch("UPDATE FECHAMENTO_CNTCORRENTE SET INDINTEGRADOSAP = "+ status
|
||||
+" WHERE FECHAMENTOCNTCORRENTE_ID = " + fechamentocntcorrenteId);
|
||||
|
||||
stmt.executeBatch();
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class SapServiceImpl implements SapService{
|
|||
|
||||
private void tratarProcessoManual(boolean processoManual, String mensagem, FechamentoCntCorrenteVO fechamentoCntcorrente) {
|
||||
if(processoManual) {
|
||||
throw new BusinessRuntimeException( mensagem, fechamentoCntcorrente.getFechamentocntcorrenteId());
|
||||
throw new BusinessRuntimeException( String.format(mensagem, fechamentoCntcorrente.getFechamentocntcorrenteId()) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue