leonardo 2015-12-22 12:24:41 +00:00
parent d29b93495a
commit 21fc38ddf5
1 changed files with 3 additions and 3 deletions

View File

@ -281,7 +281,7 @@ public class Totalbus {
String numDep = " Dep: " + rs.getString(3); String numDep = " Dep: " + rs.getString(3);
String valor = " R$ " + df.format(rs.getBigDecimal(2)); String valor = " R$ " + df.format(rs.getBigDecimal(2));
String ref = " Ref: "; String ref = " Ref: ";
Integer codRecDesp = null;
Boolean podeAdicionar = false; Boolean podeAdicionar = false;
while (rsFechamentos.next()){ while (rsFechamentos.next()){
@ -292,7 +292,7 @@ public class Totalbus {
if (agencia.isEmpty()){ agencia = " Ag: " + rsFechamentos.getString(5); } if (agencia.isEmpty()){ agencia = " Ag: " + rsFechamentos.getString(5); }
if (contaCorrente.isEmpty()){ contaCorrente = " C/C: " + rsFechamentos.getString(6); } if (contaCorrente.isEmpty()){ contaCorrente = " C/C: " + rsFechamentos.getString(6); }
ref += ref.length() <= 6 ? sdf.format(rsFechamentos.getDate(1)) : ", " + sdf.format(rsFechamentos.getDate(1)); ref += ref.length() <= 6 ? sdf.format(rsFechamentos.getDate(1)) : ", " + sdf.format(rsFechamentos.getDate(1));
if (codRecDesp == null){ codRecDesp = rsFechamentos.getInt(8); }
} }
if (podeAdicionar){ // se não tiver dados da subquery não é um depósito válido. if (podeAdicionar){ // se não tiver dados da subquery não é um depósito válido.
@ -303,7 +303,7 @@ public class Totalbus {
deposito.setLocalArrecadação(pvId); deposito.setLocalArrecadação(pvId);
deposito.setValorLançamento(rs.getBigDecimal(2).toString()); deposito.setValorLançamento(rs.getBigDecimal(2).toString());
deposito.setIdentificadorReceitaDespesa("D"); deposito.setIdentificadorReceitaDespesa("D");
deposito.setCodigoReceitaDespesa(Integer.parseInt(rs.getString(8))); deposito.setCodigoReceitaDespesa(codRecDesp);
deposito.setDescricaoDetalhada(banco + agencia + contaCorrente + numDep + valor + ref); deposito.setDescricaoDetalhada(banco + agencia + contaCorrente + numDep + valor + ref);
depositos.add(deposito); depositos.add(deposito);
} }