Rev 377 | Rev 380 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 377 | Rev 379 | ||
|---|---|---|---|
| Line 111... | Line 111... | ||
| 111 | 111 | ||
| 112 | public void uploadArquivoExtratoBancario() { |
112 | public void uploadArquivoExtratoBancario() { |
| 113 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
113 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 114 | public void execute() { |
114 | public void execute() { |
| 115 | ExtratoBancarioArquivoDTO extratoBancarioArquivoDTO = conciliacaoBancariaService.uploadArquivoExtratoBancario(getArquivoExtratoBancarioDTO()); |
115 | ExtratoBancarioArquivoDTO extratoBancarioArquivoDTO = conciliacaoBancariaService.uploadArquivoExtratoBancario(getArquivoExtratoBancarioDTO()); |
| 116 | getEntidade().getArquivosExtratoBancarioDTO().add(extratoBancarioArquivoDTO); |
- | |
| 117 | setArquivoExtratoBancarioDTO(new ExtratoBancarioArquivoDTO()); |
- | |
| 118 | extratoBancoService.atualizarExtratosAnexados(getEntidade()); |
- | |
| - | 116 | extratoBancarioArquivoDTO.extrairDados(); |
|
| - | 117 | getEntidade().getArquivosExtratoBancarioParaCadastrarDTO().add(extratoBancarioArquivoDTO); |
|
| 119 | LancadorMensagem.lancarSucesso(extratoBancarioArquivoDTO.getArquivoExtratoBancario().getFileName() + " FOI ADICIONADO COM SUCESSO!"); |
118 | LancadorMensagem.lancarSucesso(extratoBancarioArquivoDTO.getArquivoExtratoBancario().getFileName() + " FOI ADICIONADO COM SUCESSO!"); |
| 120 | }
|
119 | }
|
| 121 | }); |
120 | }); |
| 122 | }
|
121 | }
|
| - | 122 | ||
| - | 123 | public void removerArquivoExtratoBancarioAnexado(ExtratoBancarioArquivoDTO extratoBancarioArquivoDTO) { |
|
| - | 124 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
|
| - | 125 | public void execute() { |
|
| - | 126 | getEntidade().getArquivosExtratoBancarioParaCadastrarDTO().remove(extratoBancarioArquivoDTO); |
|
| - | 127 | LancadorMensagem.lancarSucesso("ARQUIVO REMOVIDO COM SUCESSO"); |
|
| - | 128 | }
|
|
| - | 129 | }); |
|
| - | 130 | }
|
|
| - | 131 | ||
| - | 132 | /*******************************************/
|
|
| - | 133 | ||
| - | 134 | ||
| 123 | 135 | ||
| 124 | public void conciliar(final ConciliacaoBancariaLancamentoDTO conciliacaoBancariaLancamentoDTO) { |
136 | public void conciliar(final ConciliacaoBancariaLancamentoDTO conciliacaoBancariaLancamentoDTO) { |
| 125 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
137 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 126 | public void execute() { |
138 | public void execute() { |
| 127 | conciliacaoBancariaService.realizarConciliacao(conciliacaoBancariaLancamentoDTO); |
139 | conciliacaoBancariaService.realizarConciliacao(conciliacaoBancariaLancamentoDTO); |
| Line 168... | Line 180... | ||
| 168 | throw new NegocioException("SELECIONE A VIGÊNCIA"); |
180 | throw new NegocioException("SELECIONE A VIGÊNCIA"); |
| 169 | }
|
181 | }
|
| 170 | extratoBancoService.conciliarExtratosComArquivos(getEntidade().getLancamentosDTO()); |
182 | extratoBancoService.conciliarExtratosComArquivos(getEntidade().getLancamentosDTO()); |
| 171 | consultarConciliacaoBancaria(); |
183 | consultarConciliacaoBancaria(); |
| 172 | LancadorMensagem.lancarSucesso("EXTRATOS ATUALIZADOS COM SUCESSO"); |
184 | LancadorMensagem.lancarSucesso("EXTRATOS ATUALIZADOS COM SUCESSO"); |
| 173 | }
|
- | |
| 174 | }); |
- | |
| 175 | }
|
- | |
| 176 | - | ||
| 177 | public void removerArquivoExtratoBancarioAnexado(final ExtratoBancarioArquivoDTO conciliacaoBancariaArquivoExtratoDTO) { |
- | |
| 178 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
- | |
| 179 | public void execute() { |
- | |
| 180 | getEntidade().getArquivosExtratoBancarioDTO().remove(conciliacaoBancariaArquivoExtratoDTO); |
- | |
| 181 | LancadorMensagem.lancarSucesso("ARQUIVO REMOVIDO COM SUCESSO"); |
- | |
| 182 | }
|
185 | }
|
| 183 | }); |
186 | }); |
| 184 | }
|
187 | }
|
| 185 | 188 | ||
| 186 | public List<String> extrairLinhasArquivo(UploadedFile arquivo) { |
189 | public List<String> extrairLinhasArquivo(UploadedFile arquivo) { |