bug#12397
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@86470 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ce91ac70c6
commit
10c0263c90
|
@ -56,11 +56,15 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
|
|||
|
||||
String pdvs = (String) parametros.get("agencias");
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), getSql(ufs, pdvs, tipoPuntoVenta == null ? -1 : tipoPuntoVenta.getTipoptovtaId().intValue(), isBpe));
|
||||
String sql = getSql(ufs, pdvs, tipoPuntoVenta == null ? -1 : tipoPuntoVenta.getTipoptovtaId().intValue(), isBpe);
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), sql);
|
||||
stmt.setInt("EMPRESA_ID", empresa.getEmpresaId());
|
||||
stmt.setTimestamp("DATE_INICIO", new java.sql.Timestamp(DateUtil.inicioFecha(inicio).getTime()));
|
||||
stmt.setTimestamp("DATE_FIM", new java.sql.Timestamp(DateUtil.fimFecha(fim).getTime()));
|
||||
|
||||
System.out.println(sql);
|
||||
|
||||
listdata = new ArrayList<FinanceiroSintetico>();
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
while (rset.next()) {
|
||||
|
@ -70,7 +74,15 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
|
|||
if (isBpe) {
|
||||
String xml_bpe_rec = rset.getNString("xml_bpe_rec");
|
||||
String xml_bpe_rec_2 = rset.getNString("xml_bpe_rec_2");
|
||||
String xml_bpe_rec_3 = rset.getNString("xml_bpe_rec_3");
|
||||
String xml_bpe_rec_3 = null;
|
||||
try {
|
||||
xml_bpe_rec_3 = rset.getNString("xml_bpe_rec_3");
|
||||
} catch (Exception e) {
|
||||
|
||||
System.out.println("error");
|
||||
|
||||
}
|
||||
|
||||
String[] array = new String[3];
|
||||
array[0] = xml_bpe_rec;
|
||||
array[1] = xml_bpe_rec_2;
|
||||
|
@ -404,9 +416,9 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
|
|||
sql.append(" AND agrc.estadoId = eed.estadoId ");
|
||||
|
||||
sql.append(" FULL JOIN ");
|
||||
sql.append(" (select empresaId, puntoventaId, estadoId, codigo_rec, estadoOrigem_rec, sum(tarifa) ");
|
||||
sql.append(" (select empresaId, puntoventaId, estadoId, codigo_rec, estadoOrigem_rec, sum(tarifa) as receita_rdi_bpr ");
|
||||
sql.append(isBpe ? ", xml_bpe_rec, xml_bpe_rec_2, xml_bpe_rec_3 " : "");
|
||||
sql.append(" receita_rdi_bpr from ( ");
|
||||
sql.append(" from ( ");
|
||||
sql.append(" SELECT DISTINCT ");
|
||||
sql.append(" c.caja_id as cajaId, ");
|
||||
sql.append(" e.empresa_id AS empresaId, ");
|
||||
|
@ -417,7 +429,7 @@ public class RelatorioFinanceiroSintetico extends Relatorio {
|
|||
sql.append(isBpe ? " DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000) as xml_bpe_rec, " : "");
|
||||
sql.append(isBpe ? " DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000, 3001) as xml_bpe_rec_2, " : "");
|
||||
sql.append(isBpe ? " DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000, 6001) as xml_bpe_rec_3, " : "");
|
||||
sql.append(" COALESCE(c.preciopagado, 0)AS tarifa, ");
|
||||
sql.append(" COALESCE(c.preciopagado, 0) AS tarifa, ");
|
||||
sql.append(" COALESCE(c.importetaxaembarque, 0) AS taxaEmbarque, ");
|
||||
sql.append(" COALESCE(c.importepedagio, 0) AS pedagio, ");
|
||||
sql.append(" COALESCE(c.importeseguro, 0) AS seguro, ");
|
||||
|
|
Loading…
Reference in New Issue