diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamento.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamento.java index 013ecb814..bf66f5211 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamento.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioAgenciaFechamento.java @@ -8,17 +8,20 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; - import org.apache.commons.lang.math.NumberUtils; +import org.slf4j.Logger; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioAgenciaFechamentoBean; import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + public class RelatorioAgenciaFechamento extends Relatorio { + private static Logger log = org.slf4j.LoggerFactory.getLogger(RelatorioCarteirinha.class); + private List lsDadosRelatorio; public RelatorioAgenciaFechamento(Map parametros, Connection conexao) throws Exception { @@ -37,12 +40,12 @@ public class RelatorioAgenciaFechamento extends Relatorio { String empresa = parametros.get("empresa") != null ? parametros.get("empresa").toString() : ""; String empresaNome = parametros.get("empresaNome") != null ? parametros.get("empresaNome").toString() : ""; String puntoVenta = parametros.get("NUMPUNTOVENTA") != null ? parametros.get("NUMPUNTOVENTA").toString() : null; - + lsDadosRelatorio = new ArrayList(); String sql = carregarDadosTotaisdeVenda(puntoVenta); - System.out.println(sql); + log.debug(sql); NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); ResultSet rset1 = null; @@ -59,55 +62,34 @@ public class RelatorioAgenciaFechamento extends Relatorio { rset1= stmt.executeQuery(); while (rset1.next()) { + + Integer qtdExcesso = NumberUtils.INTEGER_ZERO; + Integer qtdSeguro = NumberUtils.INTEGER_ZERO; + + BigDecimal valorExcesso = BigDecimal.ZERO; + BigDecimal valorSeguro = BigDecimal.ZERO; RelatorioAgenciaFechamentoBean agenciaFechamento = new RelatorioAgenciaFechamentoBean(); - BigDecimal total = BigDecimal.ZERO; - BigDecimal vendido = BigDecimal.ZERO; - - String puntoVentaId = rset1.getString("codigo"); - - Integer qtdevendido = rset1.getInt("qtdevendido"); - Integer qtdedigitado = rset1.getInt("qtdedigitado"); - Integer qtdeAnulado = rset1.getInt("qtdeAnulado"); - Integer qtdeDevolvido = rset1.getInt("qtdeDevolvido"); - Integer qtdeTotal = null; - - vendido = rset1.getBigDecimal("vendido"); - BigDecimal digitado = rset1.getBigDecimal("digitado"); - BigDecimal anulado = rset1.getBigDecimal("anulado"); - BigDecimal devolvido = rset1.getBigDecimal("devolvido"); agenciaFechamento.setEmpresa(empresaNome); - - agenciaFechamento.setCodigo(rset1.getString("codigo")); + String puntoVentaId = rset1.getString("codigo"); agenciaFechamento.setDescricao(rset1.getString("descricao")); - - agenciaFechamento.setQtdeVendido(qtdevendido != null ? qtdevendido : NumberUtils.INTEGER_ZERO); - agenciaFechamento.setQtdeDigitado(qtdedigitado != null ? qtdedigitado : NumberUtils.INTEGER_ZERO); - agenciaFechamento.setQtdeAnulado(qtdeAnulado != null ? qtdeAnulado : NumberUtils.INTEGER_ZERO); - agenciaFechamento.setQtdeDevolvido(qtdeDevolvido != null ? qtdeDevolvido : NumberUtils.INTEGER_ZERO); - - qtdeTotal = ((qtdevendido != null ? qtdevendido : NumberUtils.INTEGER_ZERO) + (qtdedigitado != null ? qtdedigitado : NumberUtils.INTEGER_ZERO)) - - ((qtdeAnulado != null ? qtdeAnulado : NumberUtils.INTEGER_ZERO) + (qtdeDevolvido != null ? qtdeDevolvido : NumberUtils.INTEGER_ZERO)); - - if (qtdeTotal < 0) { - qtdeTotal = NumberUtils.INTEGER_ZERO; - } - - agenciaFechamento.setQtdeTotal(qtdeTotal); - - agenciaFechamento.setDigitado(digitado != null ? digitado : BigDecimal.ZERO); - agenciaFechamento.setAnulado(anulado != null ? anulado : BigDecimal.ZERO); - agenciaFechamento.setDevolvido(devolvido != null ? devolvido : BigDecimal.ZERO); - - total = total.add(vendido != null ? vendido : BigDecimal.ZERO); - total = total.add(digitado != null ? digitado : BigDecimal.ZERO); - total = total.subtract(anulado != null ? anulado : BigDecimal.ZERO); - total = total.subtract(devolvido != null ? devolvido : BigDecimal.ZERO); - stmt = new NamedParameterStatement(conexao, carregarDadosReceitaDespesa(puntoVentaId)); + agenciaFechamento.setValorBilhete(rset1.getBigDecimal("valorBilhete")); + agenciaFechamento.setValorVch(rset1.getBigDecimal("valorVch")); + agenciaFechamento.setValorInternet(rset1.getBigDecimal("valorInternet")); + agenciaFechamento.setValorCancelado(rset1.getBigDecimal("valorCancelado")); + agenciaFechamento.setValorEstornado(rset1.getBigDecimal("valorEstornado")); + valorSeguro = rset1.getBigDecimal("valorSeguro"); - System.out.println(carregarDadosReceitaDespesa(puntoVentaId)); + agenciaFechamento.setQtdBilhete(rset1.getInt("qtdBilhete")); + agenciaFechamento.setQtdVch(rset1.getInt("qtdVch")); + agenciaFechamento.setQtdInternet(rset1.getInt("qtdInternet")); + agenciaFechamento.setQtdCancelado(rset1.getInt("qtdCancelado")); + agenciaFechamento.setQtdEstornado(rset1.getInt("qtdEstornado")); + qtdSeguro = rset1.getInt("qtdSeguro"); + + stmt = new NamedParameterStatement(conexao, carregarEventosExtras(puntoVentaId)); stmt.setTimestamp("de", new java.sql.Timestamp(sdf.parse(fecInicio).getTime())); stmt.setTimestamp("ate", new java.sql.Timestamp(sdf.parse(fecFinal).getTime())); @@ -116,35 +98,21 @@ public class RelatorioAgenciaFechamento extends Relatorio { stmt.setInt("empresaId", Integer.parseInt(empresa)); } - if (puntoVentaId != null ) { - stmt.setString("puntoVentaId", puntoVentaId); - } - rset2 = stmt.executeQuery(); - + if (rset2.next()) { - Integer qtdedespesa = rset2.getInt("qtdedespesa"); - BigDecimal receita = rset2.getBigDecimal("receita"); - BigDecimal despesa = rset2.getBigDecimal("despesa"); - - agenciaFechamento.setQtdeDespesa(qtdedespesa != null ? qtdedespesa : NumberUtils.INTEGER_ZERO); - agenciaFechamento.setReceita(receita != null ? receita : BigDecimal.ZERO); - agenciaFechamento.setDespesa(despesa != null ? despesa : BigDecimal.ZERO); - - total = total.add(receita != null ? receita : BigDecimal.ZERO); - total = total.subtract(despesa != null ? despesa : BigDecimal.ZERO); - - agenciaFechamento.setVendido(vendido != null ? vendido : BigDecimal.ZERO); - agenciaFechamento.setTotal(total.abs()); - - } else { - agenciaFechamento.setQtdeDespesa(NumberUtils.INTEGER_ZERO); - agenciaFechamento.setReceita(BigDecimal.ZERO); - agenciaFechamento.setDespesa(BigDecimal.ZERO); - agenciaFechamento.setVendido(vendido != null ? vendido : BigDecimal.ZERO); - agenciaFechamento.setTotal(total.abs()); + qtdSeguro += rset2.getInt("qtdSeguro"); + qtdExcesso = rset2.getInt("qtdExcesso"); + + valorSeguro = valorSeguro.add(rset2.getBigDecimal("valorSeguro")); + valorExcesso = valorExcesso.add(rset2.getBigDecimal("valorExcesso")); } + + agenciaFechamento.setQtdExcesso(qtdExcesso); + agenciaFechamento.setQtdSeguro(qtdSeguro); + agenciaFechamento.setValorExcesso(valorExcesso); + agenciaFechamento.setValorSeguro(valorSeguro); lsDadosRelatorio.add(agenciaFechamento); //Estava dando um erro de "máximo de cursores abertos excedido" @@ -152,9 +120,10 @@ public class RelatorioAgenciaFechamento extends Relatorio { rset2.getStatement().close(); rset2.close(); } + + rset1.close(); if (lsDadosRelatorio.size() > 0) { - setLsDadosRelatorio(lsDadosRelatorio); } @@ -174,98 +143,142 @@ public class RelatorioAgenciaFechamento extends Relatorio { private String carregarDadosTotaisdeVenda(String puntoVenta) { StringBuilder sql = new StringBuilder(); - sql.append(" SELECT "); - sql.append(" pv.PUNTOVENTA_ID AS codigo, "); - sql.append(" pv.nombpuntoventa AS descricao, "); - sql.append(" "); - sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN c.caja_id ELSE NULL END),0) AS qtdevendido, "); - sql.append(" "); - sql.append(" COALESCE(COUNT(CASE WHEN c.INDREMOTOINVERSO = 1 THEN 1 ELSE NULL END),0) AS qtdedigitado, "); - sql.append(" "); - sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID = 31 THEN 1 ELSE NULL END),0) AS qtdeAnulado, "); - sql.append(" COALESCE(COUNT(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN 1 ELSE NULL END),0) AS qtdeDevolvido, "); - sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and (c.INDREMOTOINVERSO is null or c.INDREMOTOINVERSO =0) THEN ( "); - sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); - sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS vendido, "); - sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID IS NULL and c.INDREMOTOINVERSO = 1 THEN ( "); - sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); - sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS digitado, "); - sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID = 31 THEN ( "); - sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); - sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS anulado, "); - sql.append(" "); - sql.append(" COALESCE(SUM(CASE WHEN c.MOTIVOCANCELACION_ID is not null and c.MOTIVOCANCELACION_ID <> 31 THEN ( "); - sql.append(" coalesce(c.IMPORTEOUTROS,0) + coalesce(c.IMPORTEPEDAGIO,0) + coalesce(c.IMPORTESEGURO,0) "); - sql.append(" +coalesce(IMPORTETAXAEMBARQUE ,0)+coalesce(c.preciopagado,0)) ELSE NULL END),0) AS devolvido "); - sql.append(" "); - sql.append(" "); - sql.append(" FROM CAJA c "); - sql.append(" INNER JOIN PUNTO_VENTA pv ON c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); - sql.append(" inner join marca m on m.marca_id = c.marca_id "); - sql.append(" WHERE c.TURNO_ID IS NOT NULL "); - sql.append(" AND c.FECCORTE BETWEEN :de AND :ate "); + sql.append(" SELECT pv.PUNTOVENTA_ID AS codigo, "); + sql.append(" pv.nombpuntoventa AS descricao, "); + sql.append(" COALESCE(SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND (c.INDREMOTOINVERSO IS NULL "); + sql.append(" OR c.INDREMOTOINVERSO =0) "); + sql.append(" AND (c.INDSTATUSBOLETO <> 'E' AND c.TIPOVENTA_ID not in (5,12,18)) "); + sql.append(" THEN ( COALESCE(c.IMPORTEOUTROS,0) + COALESCE(c.IMPORTEPEDAGIO,0) +COALESCE(IMPORTETAXAEMBARQUE ,0)+COALESCE(c.preciopagado,0)) "); + sql.append(" ELSE null "); + sql.append(" END),0) AS valorBilhete, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND (c.INDREMOTOINVERSO IS NULL "); + sql.append(" OR c.INDREMOTOINVERSO =0) "); + sql.append(" AND (c.INDSTATUSBOLETO <> 'E' AND c.TIPOVENTA_ID not in (5,12,18)) "); + sql.append(" THEN c.caja_id "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdBilhete, "); + sql.append(" SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND COALESCE(c.IMPORTESEGURO,0) > 0 "); + sql.append(" THEN c.IMPORTESEGURO "); + sql.append(" ELSE 0 "); + sql.append(" END) AS valorSeguro, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND COALESCE(c.IMPORTESEGURO,0) > 0 "); + sql.append(" THEN 1 "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdSeguro, "); + sql.append(" COALESCE(SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND (c.INDSTATUSBOLETO = 'E' OR c.TIPOVENTA_ID in (5,18)) "); + sql.append(" THEN ( COALESCE(c.IMPORTEOUTROS,0) + COALESCE(c.IMPORTEPEDAGIO,0) +COALESCE(IMPORTETAXAEMBARQUE ,0)+COALESCE(c.preciopagado,0)) "); + sql.append(" ELSE 0 "); + sql.append(" END),0) AS valorVch, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND (c.INDSTATUSBOLETO = 'E' OR c.TIPOVENTA_ID in (5,18)) "); + sql.append(" THEN 1 "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdVch, "); + sql.append(" COALESCE(SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND c.TIPOVENTA_ID = 12 "); + sql.append(" THEN ( COALESCE(c.IMPORTEOUTROS,0) + COALESCE(c.IMPORTEPEDAGIO,0) +COALESCE(IMPORTETAXAEMBARQUE ,0)+COALESCE(c.preciopagado,0)) "); + sql.append(" ELSE 0 "); + sql.append(" END),0) AS valorInternet, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NULL "); + sql.append(" AND c.TIPOVENTA_ID = 12 "); + sql.append(" THEN 1 "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdInternet, "); + sql.append(" COALESCE(SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID = 31 "); + sql.append(" THEN ( COALESCE(c.IMPORTEOUTROS,0) + COALESCE(c.IMPORTEPEDAGIO,0) +COALESCE(IMPORTETAXAEMBARQUE ,0)+COALESCE(c.preciopagado,0)) "); + sql.append(" ELSE 0 "); + sql.append(" END),0) AS valorCancelado, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID = 31 "); + sql.append(" THEN 1 "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdCancelado, "); + sql.append(" COALESCE(SUM( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NOT NULL "); + sql.append(" AND c.MOTIVOCANCELACION_ID <> 31 "); + sql.append(" THEN ( COALESCE(c.IMPORTEOUTROS,0) + COALESCE(c.IMPORTEPEDAGIO,0) +COALESCE(IMPORTETAXAEMBARQUE ,0)+COALESCE(c.preciopagado,0)) "); + sql.append(" ELSE 0 "); + sql.append(" END),0) AS valorEstornado, "); + sql.append(" COALESCE(COUNT( "); + sql.append(" CASE "); + sql.append(" WHEN c.MOTIVOCANCELACION_ID IS NOT NULL "); + sql.append(" AND c.MOTIVOCANCELACION_ID <> 31 "); + sql.append(" THEN 1 "); + sql.append(" ELSE NULL "); + sql.append(" END),0) AS qtdEstornado "); + sql.append(" "); + sql.append(" FROM CAJA c "); + sql.append(" INNER JOIN PUNTO_VENTA pv "); + sql.append(" ON c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); + sql.append(" INNER JOIN marca m "); + sql.append(" ON m.marca_id = c.marca_id "); + sql.append(" WHERE c.TURNO_ID IS NOT NULL "); + sql.append(" AND c.FECCORTE BETWEEN :de AND :ate "); if (puntoVenta != null && !puntoVenta.equals("-1")) { sql.append(" AND c.PUNTOVENTA_ID in (" + puntoVenta + ") "); } - sql.append(" AND c.TIPOVENTA_ID <> 6 "); - sql.append(" AND c.INDREIMPRESION = 0 "); - sql.append(" AND m.empresa_id = :empresaId "); - sql.append(" GROUP BY pv.PUNTOVENTA_ID , pv.nombpuntoventa "); - sql.append(" ORDER BY pv.PUNTOVENTA_ID , pv.nombpuntoventa "); + sql.append(" AND c.TIPOVENTA_ID <> 6 "); + sql.append(" AND c.INDREIMPRESION = 0 "); + sql.append(" AND m.empresa_id = :empresaId "); + sql.append(" GROUP BY pv.PUNTOVENTA_ID, pv.nombpuntoventa "); + sql.append(" ORDER BY pv.nombpuntoventa "); return sql.toString(); } - - private String carregaAgenciasComVenda() { + + private String carregarEventosExtras(String puntoVenta) { StringBuilder sql = new StringBuilder(); - sql.append(" SELECT DISTINCT cc.PUNTOVENTA_ID "); - sql.append(" FROM CONTA_CORRENTE_PTOVTA cc "); - sql.append(" WHERE cc.FECHOROPERACION BETWEEN :de AND :ate "); - sql.append(" and cc.EMPRESA_ID = :empresaId "); - - return sql.toString(); - - } - - private String carregarDadosReceitaDespesa(String puntoVenta) { - - StringBuilder sql = new StringBuilder(); - sql.append(" SELECT "); - sql.append(" COALESCE(COUNT(CASE WHEN cdp.IMPORTE < 0 THEN 1 ELSE NULL END),0) as qtdedespesa, "); - sql.append(" COALESCE(SUM(CASE WHEN cdp.IMPORTE > 0 THEN cdp.IMPORTE ELSE NULL END),0) AS receita, "); - sql.append(" COALESCE(ABS(SUM(CASE WHEN cdp.IMPORTE < 0 THEN cdp.IMPORTE ELSE NULL END)),0) AS despesa "); - sql.append(" FROM CAJA_DIVERSOS cd, "); - sql.append(" CAJA_DIVERSOS_PAGO cdp, "); - sql.append(" EVENTO_EXTRA ee "); - sql.append(" WHERE cd.MOTIVOCANCELACION_ID IS NULL "); - sql.append(" AND ee.EVENTOEXTRA_ID = cd.EVENTOEXTRA_ID "); - sql.append(" AND cdp.CAJADIVERSOS_ID = cd.CAJADIVERSOS_ID "); + sql.append(" SELECT "); + sql.append(" COALESCE(SUM(CASE WHEN tee.CVETIPOEVENTO = 'EXCESSO_BAGAGEM' THEN cd.PRECIO ELSE NULL END),0) AS valorExcesso, "); + sql.append(" COALESCE(COUNT(CASE WHEN tee.CVETIPOEVENTO = 'EXCESSO_BAGAGEM' THEN 1 ELSE NULL END),0) as qtdExcesso, "); + sql.append(" COALESCE(SUM(CASE WHEN tee.CVETIPOEVENTO = 'SEGURO_OPCIONAL' THEN cd.PRECIO ELSE NULL END),0) AS valorSeguro, "); + sql.append(" COALESCE(COUNT(CASE WHEN tee.CVETIPOEVENTO = 'SEGURO_OPCIONAL' THEN 1 ELSE NULL END),0) as qtdSeguro "); + sql.append(" FROM CAJA_DIVERSOS cd "); + sql.append(" INNER JOIN EVENTO_EXTRA ee "); + sql.append(" ON ee.EVENTOEXTRA_ID = cd.EVENTOEXTRA_ID "); + sql.append(" INNER JOIN TIPO_EVENTO_EXTRA tee "); + sql.append(" ON ee.TIPOEVENTOEXTRA_ID = tee.TIPOEVENTOEXTRA_ID "); + sql.append(" WHERE cd.MOTIVOCANCELACION_ID IS NULL "); sql.append(" AND ee.activo = 1 "); sql.append(" AND cd.TURNO_ID IS NOT NULL "); + sql.append(" AND tee.CVETIPOEVENTO in ('EXCESSO_BAGAGEM', 'SEGURO_OPCIONAL' ) "); sql.append(" AND cd.FECCORTE BETWEEN :de AND :ate "); if (puntoVenta != null && !puntoVenta.equals("-1")) { - sql.append(" AND cd.PUNTOVENTA_ID = :puntoVentaId "); + sql.append(" AND cd.PUNTOVENTA_ID = ").append(puntoVenta); } sql.append(" AND ee.EMPRESA_ID=:empresaId "); + + log.debug(sql.toString()); return sql.toString(); } - private String carregarNomeEmpresa() { - - StringBuilder sql = new StringBuilder(); - sql.append(" SELECT "); - sql.append(" NOMBEMPRESA "); - sql.append(" FROM EMPRESA "); - sql.append(" WHERE EMPRESA_ID=:empresaId "); - - return sql.toString(); - - } } diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es .properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es .properties deleted file mode 100644 index abaee55bf..000000000 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es .properties +++ /dev/null @@ -1,23 +0,0 @@ -#geral -msg.noData=No se pudo obtener datos con los parámetros reportados. -msg.a=a - -#Labels header -header.data=Data : -header.empresa=Empresa : -header.codigo=Código -header.descricao=Descrição -header.vendido=Vendido -header.digitado=Digitado -header.anulado=Anulados -header.devolvido=Devolvidos -header.receita=Receita -header.despesa=Despesa -header.total=Total - -detail.agencia=AGÊNCIA -detail.quantidade=QUANTIDADE -detail.valor=VALOR -detail.totalGeral=TOTAL GERAL - -linhas=Linhas \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es.properties new file mode 100644 index 000000000..5f9d7c2fb --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_es.properties @@ -0,0 +1,41 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) +#geral + +detail.agencia = AG\u00CANCIA +detail.qtd.bilhete = Qtd. Bilhete Entrada +detail.qtd.cancelados = Qtd. Cancelados +detail.qtd.estornados = Qtd. Estornados +detail.qtd.excesso = Qtd. Excesso Entrada +detail.qtd.internet = Qtd. Internet Entrada +detail.qtd.itex = Qtd. Itex Entrada +detail.qtd.seguro = Qtd. Seguro Entrada +detail.qtd.vch = Qtd. VCH Entrada +detail.quantidade = QUANTIDADE +detail.totalGeral = TOTAL GERAL +detail.valor = VALOR +detail.valor.bilhete = Valor Bilhete Entrada +detail.valor.cancelados = Valor Cancelados +detail.valor.estornados = Valor Estornados +detail.valor.excesso = Valor Excesso Entrada +detail.valor.internet = Valor Internet Entrada +detail.valor.itex = Valor Itex Entrada +detail.valor.seguro = Valor Seguro Entrada +detail.valor.vch = Valor VCH Entrada + +header.anulado = Anulados +header.codigo = C\u00F3digo +#Labels header +header.data = Data : +header.descricao = Descri\u00E7\u00E3o +header.despesa = Despesa +header.devolvido = Devolvidos +header.digitado = Digitado +header.empresa = Empresa : +header.receita = Receita +header.total = Total +header.vendido = Vendido + +linhas = Linhas + +msg.a = a +msg.noData = No se pudo obtener datos con los par\u00E1metros reportados. diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_pt_BR.properties index abaee55bf..da8ef5c22 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_pt_BR.properties +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioAgenciaFechamento_pt_BR.properties @@ -1,23 +1,41 @@ +#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/) #geral -msg.noData=No se pudo obtener datos con los parámetros reportados. -msg.a=a +detail.agencia = Ag\u00EAncia +detail.qtd.bilhete = Qtd. Bilhete Entrada +detail.qtd.cancelados = Qtd. Cancelados +detail.qtd.estornados = Qtd. Estornados +detail.qtd.excesso = Qtd. Excesso Entrada +detail.qtd.internet = Qtd. Internet Entrada +detail.qtd.itex = Qtd. Itex Entrada +detail.qtd.seguro = Qtd. Seguro Entrada +detail.qtd.vch = Qtd. VCH Entrada +detail.quantidade = QUANTIDADE +detail.totalGeral = TOTAL GERAL +detail.valor = VALOR +detail.valor.bilhete = Valor Bilhete Entrada +detail.valor.cancelados = Valor Cancelados +detail.valor.estornados = Valor Estornados +detail.valor.excesso = Valor Excesso Entrada +detail.valor.internet = Valor Internet Entrada +detail.valor.itex = Valor Itex Entrada +detail.valor.seguro = Valor Seguro Entrada +detail.valor.vch = Valor VCH Entrada + +header.anulado = Anulados +header.codigo = C\u00F3digo #Labels header -header.data=Data : -header.empresa=Empresa : -header.codigo=Código -header.descricao=Descrição -header.vendido=Vendido -header.digitado=Digitado -header.anulado=Anulados -header.devolvido=Devolvidos -header.receita=Receita -header.despesa=Despesa -header.total=Total +header.data = Data : +header.descricao = Descri\u00E7\u00E3o +header.despesa = Despesa +header.devolvido = Devolvidos +header.digitado = Digitado +header.empresa = Empresa : +header.receita = Receita +header.total = Total +header.vendido = Vendido -detail.agencia=AGÊNCIA -detail.quantidade=QUANTIDADE -detail.valor=VALOR -detail.totalGeral=TOTAL GERAL +linhas = Linhas -linhas=Linhas \ No newline at end of file +msg.a = a +msg.noData = No se pudo obtener datos con los par\u00E1metros reportados. diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jasper index ecfc27dfc..57d0cab12 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jrxml index ec964c188..383f58c75 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioAgenciaFechamento.jrxml @@ -1,8 +1,13 @@ - - - - + + + + + + + + + @@ -11,88 +16,91 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + - + - + - + - + - + - + @@ -100,12 +108,12 @@ - + - + @@ -124,365 +132,347 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioAgenciaFechamentoBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioAgenciaFechamentoBean.java index 115f15656..aa441b7fa 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioAgenciaFechamentoBean.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioAgenciaFechamentoBean.java @@ -4,120 +4,149 @@ import java.math.BigDecimal; public class RelatorioAgenciaFechamentoBean { protected String empresa; - protected String codigo; protected String descricao; - protected Integer qtdeVendido; - protected Integer qtdeDigitado; - protected Integer qtdeAnulado; - protected Integer qtdeDevolvido; - protected Integer qtdeDespesa; - protected Integer qtdeTotal; + protected Integer qtdBilhete; + protected Integer qtdExcesso; + protected Integer qtdSeguro; + protected Integer qtdVch; + protected Integer qtdInternet; + protected Integer qtdCancelado; + protected Integer qtdEstornado; - protected BigDecimal vendido; - protected BigDecimal digitado; - protected BigDecimal anulado; - protected BigDecimal devolvido; - protected BigDecimal receita; - protected BigDecimal despesa; - protected BigDecimal total; + protected BigDecimal valorBilhete; + protected BigDecimal valorExcesso; + protected BigDecimal valorSeguro; + protected BigDecimal valorVch; + protected BigDecimal valorInternet; + protected BigDecimal valorCancelado; + protected BigDecimal valorEstornado; public String getEmpresa() { return empresa; } + public void setEmpresa(String empresa) { this.empresa = empresa; } - public String getCodigo() { - return codigo; - } - public void setCodigo(String codigo) { - this.codigo = codigo; - } public String getDescricao() { return descricao; } + public void setDescricao(String descricao) { this.descricao = descricao; } - public Integer getQtdeVendido() { - return qtdeVendido; + + public Integer getQtdBilhete() { + return qtdBilhete; } - public void setQtdeVendido(Integer qtdeVendido) { - this.qtdeVendido = qtdeVendido; + + public void setQtdBilhete(Integer qtdBilhete) { + this.qtdBilhete = qtdBilhete; } - - public Integer getQtdeDigitado() { - return qtdeDigitado; + + public Integer getQtdExcesso() { + return qtdExcesso; } - public void setQtdeDigitado(Integer qtdeDigitado) { - this.qtdeDigitado = qtdeDigitado; + + public void setQtdExcesso(Integer qtdExcesso) { + this.qtdExcesso = qtdExcesso; } - public Integer getQtdeAnulado() { - return qtdeAnulado; + + public Integer getQtdSeguro() { + return qtdSeguro; } - public void setQtdeAnulado(Integer qtdeAnulado) { - this.qtdeAnulado = qtdeAnulado; + + public void setQtdSeguro(Integer qtdSeguro) { + this.qtdSeguro = qtdSeguro; } - public Integer getQtdeDevolvido() { - return qtdeDevolvido; + + public Integer getQtdVch() { + return qtdVch; } - public void setQtdeDevolvido(Integer qtdeDevolvido) { - this.qtdeDevolvido = qtdeDevolvido; + + public void setQtdVch(Integer qtdVch) { + this.qtdVch = qtdVch; } - public Integer getQtdeDespesa() { - return qtdeDespesa; + + public Integer getQtdInternet() { + return qtdInternet; } - public void setQtdeDespesa(Integer qtdeDespesa) { - this.qtdeDespesa = qtdeDespesa; + + public void setQtdInternet(Integer qtdInternet) { + this.qtdInternet = qtdInternet; } - public BigDecimal getVendido() { - return vendido; + + public Integer getQtdCancelado() { + return qtdCancelado; } - public void setVendido(BigDecimal vendido) { - this.vendido = vendido; + + public void setQtdCancelado(Integer qtdCancelado) { + this.qtdCancelado = qtdCancelado; } - public BigDecimal getDigitado() { - return digitado; + + public Integer getQtdEstornado() { + return qtdEstornado; } - public void setDigitado(BigDecimal digitado) { - this.digitado = digitado; + + public void setQtdEstornado(Integer qtdEstornado) { + this.qtdEstornado = qtdEstornado; } - public BigDecimal getAnulado() { - return anulado; + + public BigDecimal getValorBilhete() { + return valorBilhete; } - public void setAnulado(BigDecimal anulado) { - this.anulado = anulado; + + public void setValorBilhete(BigDecimal valorBilhete) { + this.valorBilhete = valorBilhete; } - public BigDecimal getDevolvido() { - return devolvido; + + public BigDecimal getValorExcesso() { + return valorExcesso; } - public void setDevolvido(BigDecimal devolvido) { - this.devolvido = devolvido; + + public void setValorExcesso(BigDecimal valorExcesso) { + this.valorExcesso = valorExcesso; } - public BigDecimal getReceita() { - return receita; + + public BigDecimal getValorSeguro() { + return valorSeguro; } - public void setReceita(BigDecimal receita) { - this.receita = receita; + + public void setValorSeguro(BigDecimal valorSeguro) { + this.valorSeguro = valorSeguro; } - public BigDecimal getDespesa() { - return despesa; + + public BigDecimal getValorVch() { + return valorVch; } - public void setDespesa(BigDecimal despesa) { - this.despesa = despesa; + + public void setValorVch(BigDecimal valorVch) { + this.valorVch = valorVch; } - public Integer getQtdeTotal() { - return qtdeTotal; + + public BigDecimal getValorInternet() { + return valorInternet; } - public void setQtdeTotal(Integer qtdeTotal) { - this.qtdeTotal = qtdeTotal; + + public void setValorInternet(BigDecimal valorInternet) { + this.valorInternet = valorInternet; } - public BigDecimal getTotal() { - return total; + + public BigDecimal getValorCancelado() { + return valorCancelado; } - public void setTotal(BigDecimal total) { - this.total = total; + + public void setValorCancelado(BigDecimal valorCancelado) { + this.valorCancelado = valorCancelado; + } + + public BigDecimal getValorEstornado() { + return valorEstornado; + } + + public void setValorEstornado(BigDecimal valorEstornado) { + this.valorEstornado = valorEstornado; } }