fixes bug#24598
dev: Celio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@112595 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
1888c55cca
commit
48e13f3902
|
@ -24,6 +24,9 @@ import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|||
@Service("importacaoRetornoBancarioService")
|
||||
public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBancarioService {
|
||||
|
||||
private static final String LIQUIDACAO_NORMAL = "06";
|
||||
private static final String LIQUIDACAO_EM_CARTORIO = "08";
|
||||
|
||||
@Autowired
|
||||
private RemessaCNABBancosDAO remessaCNABBancosDAO;
|
||||
|
||||
|
@ -55,7 +58,11 @@ public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBa
|
|||
|
||||
for (DetalheRetorno detalhe : retornoBancario.getTitulos()) {
|
||||
try {
|
||||
if( salvarRetornoBancario( detalhe, empresa.getEmpresaId(), usuarioId )) {
|
||||
if( !detalhe.getCodigoOcorrencia().equals(LIQUIDACAO_NORMAL)
|
||||
&& !detalhe.getCodigoOcorrencia().equals(LIQUIDACAO_EM_CARTORIO) ) {
|
||||
erros++;
|
||||
detalhado.append("Registro sem ocorrencia de quitação: ").append(detalhe.getNossoNumero()).append(".\n");
|
||||
}else if( salvarRetornoBancario( detalhe, empresa.getEmpresaId(), usuarioId )) {
|
||||
atualizados++;
|
||||
detalhado.append("Quitado:").append(detalhe.getNossoNumero()).append(".\n");
|
||||
}else {
|
||||
|
@ -126,6 +133,7 @@ public class ImportacaoRetornoBancarioServiceImpl implements ImportacaoRetornoBa
|
|||
|
||||
if(linha.startsWith("1")) { //detalhe
|
||||
DetalheRetornoItau detalhe = new DetalheRetornoItau();
|
||||
detalhe.setCodigoOcorrencia(linha.substring(108, 110));
|
||||
detalhe.setNossoNumero(linha.substring(85, 93)+"-"+linha.substring(93, 94));
|
||||
arquivo.addTitulo(detalhe);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue