bug#20781
dev:wilian qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@103920 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
4af7671e4e
commit
5e8402d64a
|
@ -293,7 +293,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
variavel = idRemessa;
|
||||
String codEmpresaBanco = tupla[2] != null ? tupla[2].toString() : "0";
|
||||
String nomeEmpresa = tupla[3].toString();
|
||||
Integer codigoTransmissao = Integer.valueOf(tupla[26].toString());
|
||||
Integer codigoTransmissao = tupla[26] != null ? Integer.valueOf(tupla[26].toString()) : 0;
|
||||
|
||||
if(!tupla[8].toString().contains("-")){
|
||||
log.error("NossoNumero não está no formato correto: " + tupla[8].toString() + ". Ignorando o registro FechamentoBoletoId = " + tupla[0].toString());
|
||||
|
@ -928,6 +928,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
sb.append(" LEFT JOIN CIUDAD ci on ci.CIUDAD_ID = pa.CIUDAD_ID AND ci.ACTIVO = 1 ");
|
||||
sb.append(" LEFT JOIN PLAZA pl on pl.PLAZA_ID = ci.PLAZA_ID AND pl.ACTIVO = 1 ");
|
||||
sb.append(" LEFT JOIN ESTADO es on es.ESTADO_ID = ci.ESTADO_ID AND es.ACTIVO = 1 ");
|
||||
sb.append(" LEFT JOIN EMPRESA_CONTABANCARIA ecb ON emp.EMPRESA_ID = ecb.EMPRESA_ID AND ifi.INSTIFINANCEIRA_ID = ecb.INSTIFINANCEIRA_ID AND ecb.ACTIVO = 1 ");
|
||||
sb.append(" WHERE fb.activo = 1 ");
|
||||
|
||||
if(!reenviar){
|
||||
|
@ -1007,6 +1008,10 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
@Override
|
||||
public Boolean atualizaRemessa(Empresa empresa, ArquivoRemessa arquivoRemessa) throws Exception {
|
||||
|
||||
if(arquivoRemessa == null || arquivoRemessa.getItens() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String ids = "";
|
||||
int count = 0;
|
||||
int seqRemessa = 0;
|
||||
|
|
|
@ -106,17 +106,19 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
|
|||
BancoLayout banco = null;
|
||||
boolean toReturn = Boolean.TRUE;
|
||||
|
||||
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
|
||||
|
||||
FechamentoBoleto fechamentoBoleto = it.next();
|
||||
|
||||
if(banco == null){
|
||||
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
|
||||
}
|
||||
|
||||
if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
|
||||
it.remove();
|
||||
toReturn = Boolean.FALSE;
|
||||
if(boletos != null && !boletos.isEmpty()) {
|
||||
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
|
||||
|
||||
FechamentoBoleto fechamentoBoleto = it.next();
|
||||
|
||||
if(banco == null){
|
||||
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
|
||||
}
|
||||
|
||||
if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
|
||||
it.remove();
|
||||
toReturn = Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,12 +130,14 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
|
|||
|
||||
boolean toReturn = Boolean.FALSE;
|
||||
|
||||
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
|
||||
|
||||
FechamentoBoleto fechamentoBoleto = it.next();
|
||||
|
||||
if(fechamentoBoleto.getRemessaId() == null){
|
||||
return Boolean.TRUE;
|
||||
if(boletos != null && !boletos.isEmpty()) {
|
||||
for (java.util.Iterator<FechamentoBoleto> it = boletos.iterator(); it.hasNext();) {
|
||||
|
||||
FechamentoBoleto fechamentoBoleto = it.next();
|
||||
|
||||
if(fechamentoBoleto.getRemessaId() == null){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue