Rev 456 | Rev 623 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 456 | Rev 462 | ||
|---|---|---|---|
| Line 114... | Line 114... | ||
| 114 | if (getTipoExtratoBancarioCsv().equals(TipoExtratoBancarioCsv.EXTRATO_BANCARIO_CSV_BNB.getValor())) { |
114 | if (getTipoExtratoBancarioCsv().equals(TipoExtratoBancarioCsv.EXTRATO_BANCARIO_CSV_BNB.getValor())) { |
| 115 | setDadosExtratoBancoDTO(new ArrayList<ExtratoBancoDTO>()); |
115 | setDadosExtratoBancoDTO(new ArrayList<ExtratoBancoDTO>()); |
| 116 | getDadosExtratoBancoDTO().addAll(extrairDadosBnb(extratosAnexadosAnteriormente)); |
116 | getDadosExtratoBancoDTO().addAll(extrairDadosBnb(extratosAnexadosAnteriormente)); |
| 117 | }
|
117 | }
|
| 118 | }
|
118 | }
|
| - | 119 | ||
| - | 120 | public static void main(String[] args) { |
|
| - | 121 | String valor = "SISPAG PAG TIT BANCO 00"; |
|
| - | 122 | System.out.println(!valor.contains("SISPAG PAG")); |
|
| - | 123 | }
|
|
| - | 124 | ||
| 119 | 125 | ||
| 120 | private List<ExtratoBancoDTO> extrairDadosItau(List<ExtratoBancarioArquivoDTO> extratosAnexadosAnteriormente) { |
126 | private List<ExtratoBancoDTO> extrairDadosItau(List<ExtratoBancarioArquivoDTO> extratosAnexadosAnteriormente) { |
| 121 | List<ExtratoBancoDTO> extratosExtraidos = new ArrayList<ExtratoBancoDTO>(); |
127 | List<ExtratoBancoDTO> extratosExtraidos = new ArrayList<ExtratoBancoDTO>(); |
| 122 | List<ExtratoBancoDTO> extratosExtraidosSemCategoria = new ArrayList<ExtratoBancoDTO>(); |
128 | List<ExtratoBancoDTO> extratosExtraidosSemCategoria = new ArrayList<ExtratoBancoDTO>(); |
| 123 | for (String linha : this.getLinhasArquivo()) { |
129 | for (String linha : this.getLinhasArquivo()) { |
| Line 162... | Line 168... | ||
| 162 | !extratoBancoDTO.getDescricao().contains("TRANSF 7951.24318-2") && |
168 | !extratoBancoDTO.getDescricao().contains("TRANSF 7951.24318-2") && |
| 163 | !extratoBancoDTO.getDescricao().contains("TRANSF 7951.99861-1") && |
169 | !extratoBancoDTO.getDescricao().contains("TRANSF 7951.99861-1") && |
| 164 | !extratoBancoDTO.getDescricao().contains("SISPAG TRIBUTOS") && |
170 | !extratoBancoDTO.getDescricao().contains("SISPAG TRIBUTOS") && |
| 165 | !extratoBancoDTO.getDescricao().contains("SISPAG FORNECEDORES") && |
171 | !extratoBancoDTO.getDescricao().contains("SISPAG FORNECEDORES") && |
| 166 | !extratoBancoDTO.getDescricao().contains("SISPAG PAG") && |
172 | !extratoBancoDTO.getDescricao().contains("SISPAG PAG") && |
| - | 173 | !extratoBancoDTO.getDescricao().contains("SISPAG PAG") && |
|
| 167 | !extratoBancoDTO.getDescricao().contains("RES APLIC AUT") && |
174 | !extratoBancoDTO.getDescricao().contains("RES APLIC AUT") && |
| 168 | !extratoBancoDTO.getDescricao().contains("APL APLIC AUT")) || |
- | |
| - | 175 | !extratoBancoDTO.getDescricao().contains("APL APLIC AUT") && |
|
| - | 176 | !extratoBancoDTO.getDescricao().contains("SISPAG CONSOLIDADO")) || |
|
| 169 | (extratoBancoDTO.getDescricao().contains("SISPAG SALARIOS"))) { |
177 | (extratoBancoDTO.getDescricao().contains("SISPAG SALARIOS"))) { |
| 170 | if (VerificadorUtil.naoEstaNulo(valor)) { |
178 | if (VerificadorUtil.naoEstaNulo(valor)) { |
| 171 | if (valor < 0.0) { |
179 | if (valor < 0.0) { |
| 172 | extratoBancoDTO.setValorTotal(valor * -1); |
180 | extratoBancoDTO.setValorTotal(valor * -1); |
| 173 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.PAGAMENTO.getValor()); |
181 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.PAGAMENTO.getValor()); |
| Line 224... | Line 232... | ||
| 224 | }
|
232 | }
|
| 225 | extratoBancoDTO.setValorTotal(valor); |
233 | extratoBancoDTO.setValorTotal(valor); |
| 226 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.SEM_CATEGORIA.getValor()); |
234 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.SEM_CATEGORIA.getValor()); |
| 227 | if (extratoBancoDTO.getDescricao().contains("PIX") && |
235 | if (extratoBancoDTO.getDescricao().contains("PIX") && |
| 228 | extratoBancoDTO.getDescricao().contains("21.494.821")) { |
236 | extratoBancoDTO.getDescricao().contains("21.494.821")) { |
| 229 | if (valor < 0.0) { |
- | |
| - | 237 | if (valor > 0.0) { |
|
| 230 | valor = valor * -1; |
238 | valor = valor * -1; |
| 231 | }
|
239 | }
|
| 232 | extratoBancoDTO.setValorTotal(valor); |
240 | extratoBancoDTO.setValorTotal(valor); |
| 233 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.TRANSFERENCIAS_ENTRE_CONTAS.getValor()); |
241 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.TRANSFERENCIAS_ENTRE_CONTAS.getValor()); |
| 234 | } else if (!extratoBancoDTO.getDescricao().contains("SALDO PARCIAL")) { |
242 | } else if (!extratoBancoDTO.getDescricao().contains("SALDO PARCIAL")) { |
| 235 | if (VerificadorUtil.naoEstaNulo(valor)) { |
243 | if (VerificadorUtil.naoEstaNulo(valor)) { |
| 236 | extratoBancoDTO.setValorTotal(valor); |
244 | extratoBancoDTO.setValorTotal(valor); |
| 237 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.PAGAMENTO.getValor()); |
245 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.PAGAMENTO.getValor()); |
| 238 | }
|
246 | }
|
| 239 | }
|
247 | }
|
| - | 248 | if (VerificadorUtil.naoEstaNuloOuVazio(dadosSeparados[6])) { |
|
| - | 249 | if (!dadosSeparados[6].equals("Efetuado")) { |
|
| - | 250 | extratoBancoDTO.setTipoExtratoBanco(TipoExtratoBanco.SEM_CATEGORIA.getValor()); |
|
| - | 251 | }
|
|
| - | 252 | }
|
|
| 240 | if (!extratoBancoDTO.getTipoExtratoBanco().equals(TipoExtratoBanco.SEM_CATEGORIA.getValor())) { |
253 | if (!extratoBancoDTO.getTipoExtratoBanco().equals(TipoExtratoBanco.SEM_CATEGORIA.getValor())) { |
| 241 | extratoBancoDTO.setIndicadorCadastrar(true); |
254 | extratoBancoDTO.setIndicadorCadastrar(true); |
| 242 | } else { |
255 | } else { |
| 243 | extratosExtraidosSemCategoria.add(extratoBancoDTO); |
256 | extratosExtraidosSemCategoria.add(extratoBancoDTO); |
| 244 | }
|
257 | }
|