Created
February 27, 2016 22:14
-
-
Save abacha/a5d11b90b79bdb1e6ff2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SINACOR - CC - ok 24/02 | |
| ARQUIVO - FIDC - ok 24/02 | |
| grouped = { | |
| CPF_Cliente1 => { | |
| 8468 => { | |
| "02/2015" => [100,50], | |
| "06/2015" => [1450,21] | |
| }, | |
| 5537 = > { | |
| "01/2015" => [10300,1230], | |
| "02/2015" => [66,444] | |
| }, | |
| }, | |
| CPF_Cliente2 => { | |
| 8468 => { | |
| "09/2015" => [1,2], | |
| "10/2015" => [10,3] | |
| }, | |
| 5537 = > { | |
| "01/2015" => [10300,1230], | |
| "02/2015" => [66,444] | |
| }, | |
| }, | |
| }; | |
| for (BigDecimal cpf : grouped.keys()) { | |
| Hash line = grouped.get(cpf); | |
| if (line.containsKey("8468")) { | |
| file.write("OPERAÇÕES FINANCEIRAS") | |
| } | |
| if (line.containsKey("8468")) { | |
| file.write("DAYTRADE") | |
| this.populateLines(line, file); | |
| } | |
| } | |
| void populateLines(Hash line, FILE file) { | |
| for (String monthYear : line.keys()) { | |
| String income = line.get(monthYear)[0]; | |
| String IR = line.get(monthYear)[0]; | |
| file.write(monthYear + income + IR) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment