Skip to content

Instantly share code, notes, and snippets.

@abacha
Created February 27, 2016 22:14
Show Gist options
  • Select an option

  • Save abacha/a5d11b90b79bdb1e6ff2 to your computer and use it in GitHub Desktop.

Select an option

Save abacha/a5d11b90b79bdb1e6ff2 to your computer and use it in GitHub Desktop.
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