From 9d41157787cfbfa61cba7a7558ab19c199452786 Mon Sep 17 00:00:00 2001 From: walace Date: Fri, 16 Feb 2018 23:43:18 +0000 Subject: [PATCH] fixes bug #10516 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@79004 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../impl/RelatorioBilhetesVendidos.java | 7 +- .../RelatorioBilhetesVendidosNovoLayout.java | 151 ++++++++ ...ioBilhetesVendidosNovoLayout_es.properties | 25 ++ ...ilhetesVendidosNovoLayout_pt_BR.properties | 25 ++ ...RelatorioBilhetesVendidosNovoLayout.jasper | Bin 0 -> 41707 bytes .../RelatorioBilhetesVendidosNovoLayout.jrxml | 358 ++++++++++++++++++ ...latorioBilhetesVendidosNovoLayoutBean.java | 144 +++++++ .../RelatorioBilhetesVendidosController.java | 79 ++-- web/WEB-INF/i3-label_es_MX.label | 19 + web/WEB-INF/i3-label_pt_BR.label | 1 + .../filtroRelatorioBilhetesVendidos.zul | 59 +-- 11 files changed, 802 insertions(+), 66 deletions(-) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java index 31062e2b4..5285c06be 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidos.java @@ -70,7 +70,9 @@ public class RelatorioBilhetesVendidos extends Relatorio { sql.append(" JOIN PARADA p_destino on p_destino.PARADA_ID = B.DESTINO_ID "); sql.append(" JOIN CATEGORIA ct on ct.CATEGORIA_ID = B.CATEGORIA_ID "); sql.append(" JOIN CLASE_SERVICIO cs on cs.CLASESERVICIO_ID = B.CLASESERVICIO_ID "); - sql.append(" JOIN MARCA m on m.marca_id = B.marca_id "); + sql.append(" JOIN MARCA m on m.marca_id = b.marca_id "); + sql.append(" left join ciudad co ON co.ciudad_id = p_origen.ciudad_id "); + sql.append(" left join estado est ON est.estado_id = co.estado_id "); sql.append(" WHERE "); sql.append(" m.EMPRESA_ID = :EMPRESA_ID "); sql.append(" and B.FECHORVENTA >= :DATA_INICIAL "); @@ -78,6 +80,9 @@ public class RelatorioBilhetesVendidos extends Relatorio { if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) { sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); } + if (parametros.get("ESTADO_ID") != null && !parametros.get("ESTADO_ID").equals("-1")) { + sql.append(" and est.estado_id = " + parametros.get("ESTADO_ID").toString() + ""); + } if (parametros.get("STATUS") != null) { if (parametros.get("STATUS").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) { sql.append(" AND ((b.INDSTATUSBOLETO = 'C' AND B.MOTIVOCANCELACION_ID IS NOT NULL) OR (b.INDSTATUSBOLETO = 'V' AND B.MOTIVOCANCELACION_ID IS NULL)) "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java new file mode 100644 index 000000000..993daa4f5 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBilhetesVendidosNovoLayout.java @@ -0,0 +1,151 @@ +/** + * + */ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.math.BigDecimal; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.rjconsultores.ventaboletos.relatorios.utilitarios.ArrayDataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.IndStatusBoleto; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioBilhetesVendidosNovoLayoutBean; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioVendasPTABean; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +/** + * @author Wallace + * + */ +public class RelatorioBilhetesVendidosNovoLayout extends Relatorio { + + public RelatorioBilhetesVendidosNovoLayout(Map parametros, Connection conexao) throws Exception { + super(parametros, conexao); + } + + private List lsDadosRelatorio; + + @Override + protected void processaParametros() throws Exception { + + this.setCustomDataSource(new ArrayDataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + Map parametros = this.relatorio.getParametros(); + + StringBuilder sql = new StringBuilder(); + + sql.append("SELECT est.cveestado as cveestado, ae.decespecie as especie, "); + sql.append(" a.acfiscal as numaidf,"); + sql.append(" c.fechorventa as datavenda,"); + sql.append(" a.forminicial as forminicial,"); + sql.append(" a.formfinal as formfinal,"); + sql.append(" a.serie AS serie,"); + sql.append(" a.subserie as subserie,"); + sql.append(" est.icms AS valoraliquiotaicms,"); + sql.append(" c.preciopagado as valorcontabil,"); + sql.append(" c.preciopagado - (c.preciopagado * coalesce(ei.porcredbaseicms / 100,0))AS valorbasecalculo, "); + sql.append(" (c.preciopagado - (c.preciopagado * coalesce(ei.porcredbaseicms / 100,0)) * est.icms) / 100 AS valoricms, "); + sql.append(" c.INDSTATUSBOLETO statuspassagem "); + sql.append("FROM boleto c "); + sql.append("LEFT join aidf a ON a.aidf_id = c.aidf_id "); + sql.append("LEFT join aidf_especie ae ON (a.aidfesp_id = ae.aidfesp_id) "); + sql.append("join empresa e ON e.empresa_id = c.empresacorrida_id "); + sql.append("join parada po ON po.parada_id = c.origen_id "); + sql.append("join ciudad co ON co.ciudad_id = po.ciudad_id "); + sql.append("join estado est ON est.estado_id = co.estado_id "); + sql.append("INNER join empresa_imposto ei ON ei.empresa_id = e.empresa_id "); + sql.append("JOIN PUNTO_VENTA pv on c.PUNTOVENTA_ID = pv.PUNTOVENTA_ID "); + sql.append("AND ei.estado_id = est.estado_id "); + sql.append(" where "); + sql.append(" c.empresacorrida_id = :EMPRESA_ID "); + sql.append(" and c.fechorventa BETWEEN :DATA_INICIAL AND :DATA_FINAL "); + sql.append(" and c.activo = 1"); + sql.append(" and ei.activo = 1"); + if (parametros.get("NUMPUNTOVENTA") != null && !parametros.get("NUMPUNTOVENTA").equals("-1")) { + sql.append(" and pv.PUNTOVENTA_ID IN (" + parametros.get("NUMPUNTOVENTA").toString() + ")"); + } + if (parametros.get("ESTADO_ID") != null && !parametros.get("ESTADO_ID").equals("-1")) { + sql.append(" and est.estado_id = " + parametros.get("ESTADO_ID").toString() + ""); + } + if (parametros.get("STATUS") != null) { + if (parametros.get("STATUS").toString().contains("V") && parametros.get("STATUS").toString().contains("C")) { + sql.append(" AND ((c.INDSTATUSBOLETO = 'C' AND c.MOTIVOCANCELACION_ID IS NOT NULL) OR (c.INDSTATUSBOLETO = 'V' AND c.MOTIVOCANCELACION_ID IS NULL)) "); + } else if (parametros.get("STATUS").toString().contains("C")) { + sql.append(" AND c.INDSTATUSBOLETO = 'C' AND c.MOTIVOCANCELACION_ID IS NOT NULL"); + } else if (parametros.get("STATUS").toString().contains("V")) { + sql.append(" AND c.INDSTATUSBOLETO = 'V' AND c.MOTIVOCANCELACION_ID IS NULL"); + } + } + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString()); + + stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString())); + stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime())); + stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime())); + + ResultSet rset = stmt.executeQuery(); + lsDadosRelatorio = new ArrayList(); + + while (rset.next()) { + + RelatorioBilhetesVendidosNovoLayoutBean bean = new RelatorioBilhetesVendidosNovoLayoutBean(); + + Map dataResult = new HashMap(); + + if (rset.getString("SERIE") != null) { + if (rset.getString("SERIE").split("-").length == 1) { + dataResult.put("SERIE", rset.getString("SERIE")); + } else { + dataResult.put("SERIE", rset.getString("SERIE").split("-")[0]); + dataResult.put("SUB_SERIE", rset.getString("SERIE").split("-")[1]); + } + } + + if (rset.getString("statuspassagem") != null) { + dataResult.put("statuspassagem", IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue()); + } + + bean.setNumAIDF((String) (rset.getObject("numaidf") == null ? "" : rset.getObject("numaidf"))); + bean.setDataVenda((Date) (rset.getObject("datavenda") == null ? "" : rset.getObject("datavenda"))); + bean.setFormInicial((String) (rset.getObject("formInicial") == null ? "" : rset.getObject("formInicial"))); + bean.setFormFinal((String) (rset.getObject("formfinal") == null ? "" : rset.getObject("formfinal"))); + bean.setSerie((String) (rset.getObject("serie") == null ? "" : rset.getObject("serie"))); + bean.setSubSerie((String) (rset.getObject("subserie") == null ? "" : rset.getObject("subserie"))); + bean.setValorContabil((BigDecimal) (rset.getObject("valorcontabil") == null ? "" : rset.getObject("valorcontabil"))); + bean.setValorBaseCalculo((BigDecimal) (rset.getObject("valorbasecalculo") == null ? "" : rset.getObject("valorbasecalculo"))); + bean.setValorAliquiotaICMS((BigDecimal) (rset.getObject("valoraliquiotaicms") == null ? "" : rset.getObject("valoraliquiotaicms"))); + bean.setValorICMS((BigDecimal) (rset.getObject("valoricms") == null ? "" : rset.getObject("valoricms"))); + bean.setUf((String) (rset.getObject("cveestado") == null ? "" : rset.getObject("cveestado"))); + bean.setStatusPassagem((String) (rset.getObject("statuspassagem") == null ? "" : IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue())); + bean.setEspecie((String) (rset.getObject("especie") == null ? "" : rset.getObject("especie"))); + + lsDadosRelatorio.add(bean); + + } + + if (lsDadosRelatorio.size() > 0) { + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties new file mode 100644 index 000000000..75e5cef72 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_es.properties @@ -0,0 +1,25 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Documentos Fiscais +cabecalho.relatorio=Relatório +label.periodo=Período: +label.UF=UF +label.especie=Espécie +label.empresa=Empresa: +label.formInicial=Nº Inicial +label.formFinal=Nº Final +label.numAIDF=AIDF +label.serie=Série +label.status=Status +label.subSerie=SubSérie +label.valorContabil=Vlr Contábil +label.valorBaseCalculo=Vlr Base Cálc. +label.valorAliquiotaICMS=Alíquota ICMS +label.valorICMS=Valor ICMS +label.dataVenda=Data Venda +label.valorCancelado=Qtd. Cancec +header.periodo=Período: +header.tipoLinha=Tipo Linha: +header.estado=Estado diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties new file mode 100644 index 000000000..75e5cef72 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBilhetesVendidosNovoLayout_pt_BR.properties @@ -0,0 +1,25 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Documentos Fiscais +cabecalho.relatorio=Relatório +label.periodo=Período: +label.UF=UF +label.especie=Espécie +label.empresa=Empresa: +label.formInicial=Nº Inicial +label.formFinal=Nº Final +label.numAIDF=AIDF +label.serie=Série +label.status=Status +label.subSerie=SubSérie +label.valorContabil=Vlr Contábil +label.valorBaseCalculo=Vlr Base Cálc. +label.valorAliquiotaICMS=Alíquota ICMS +label.valorICMS=Valor ICMS +label.dataVenda=Data Venda +label.valorCancelado=Qtd. Cancec +header.periodo=Período: +header.tipoLinha=Tipo Linha: +header.estado=Estado diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jasper new file mode 100644 index 0000000000000000000000000000000000000000..641f0c9ff6b63a492a4c74c2e16f97228de92839 GIT binary patch literal 41707 zcmeHwd3;>8wZEjB#1nhsEY8Ljvan>sPC^zSl*D%IWP&%mBqRaM#Gb@MY>$~4Cr(&O z2vC+l!wxA03KVFeKno3}l%+t+qflBXOW{FFfspp~6$)LT1s}x4j+HK# zk&QBv$-l#YEtpfoirNxgJ@L-il4v@bW@Bqki*AgT#S>*sv1B~j8Q&6J+ZkI}!$#_4 zbfSLzg8E;Q_tY#zP>$?-lSVI&!qv?2}do?SGr>Z*>(R8KESDi?t zV@XPwYU=IkiY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__fY7{xxSVzrk6+Z-z4X zhEv7A>C|$lXMWEAszP5a{$Evv+xAu!>J0zWRN;A+D#Vka3N=itLJiZZP{Xt;)K6L! z>Xcd)>L;xV^^;bGcrsL>hG|u(pR_8}PXnq#z6&iH+i9 zu~|gLROcS>_bH%OB0&#~^ zA?|dl#NAGJ0zWRN?bNx z|K>-FKl3H9iI$4L@p|!h-YEVFJL^+^GVG&1hw(F`h%=f$4%_KjXFvYDa}a;cnZVz0Ci8clDSVG}IRC(z%0F^u^3RQ!kb~4Wia*7A;PTIMG=p zPIXp`Hs=(v!D$uUPMg^1w2RG7huG@G#d%Jb*zRs=Qigs=bO$n=UdKP=iAN#=N_lRx!0+3?ssaPhoK5Df~77PjvI~%+%lSGbMOvx Tz}tnq4YkX$wW3XLdrkfym*(@V literal 0 HcmV?d00001 diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml new file mode 100644 index 000000000..b186acfe3 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBilhetesVendidosNovoLayout.jrxml @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="28"> + <textField> + <reportElement x="142" y="2" width="416" height="20" uuid="e15d26de-6873-4576-b49b-8dc546b39dbe"/> + <textElement textAlignment="Center"> + <font size="12" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java new file mode 100644 index 000000000..994a804b6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBilhetesVendidosNovoLayoutBean.java @@ -0,0 +1,144 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.math.BigDecimal; +import java.util.Date; + +public class RelatorioBilhetesVendidosNovoLayoutBean { + + private String numAIDF; + private String formInicial; + private String formFinal; + private String serie; + private String subSerie; + private BigDecimal valorContabil; + private BigDecimal valorBaseCalculo; + private BigDecimal valorAliquiotaICMS; + private BigDecimal valorICMS; + private String uf; + private String especie; + private Integer estadoId; + private String statusPassagem; + private String bilhete; + private Date dataVenda; + + public String getNumAIDF() { + return numAIDF; + } + + public void setNumAIDF(String numAIDF) { + this.numAIDF = numAIDF; + } + + public String getFormInicial() { + return formInicial; + } + + public void setFormInicial(String formInicial) { + this.formInicial = formInicial; + } + + public String getFormFinal() { + return formFinal; + } + + public void setFormFinal(String formFinal) { + this.formFinal = formFinal; + } + + public String getSerie() { + return serie; + } + + public void setSerie(String serie) { + this.serie = serie; + } + + public String getSubSerie() { + return subSerie; + } + + public void setSubSerie(String subSerie) { + this.subSerie = subSerie; + } + + public BigDecimal getValorContabil() { + return valorContabil; + } + + public void setValorContabil(BigDecimal valorContabil) { + this.valorContabil = valorContabil; + } + + public BigDecimal getValorBaseCalculo() { + return valorBaseCalculo; + } + + public void setValorBaseCalculo(BigDecimal valorBaseCalculo) { + this.valorBaseCalculo = valorBaseCalculo; + } + + public BigDecimal getValorAliquiotaICMS() { + return valorAliquiotaICMS; + } + + public void setValorAliquiotaICMS(BigDecimal valorAliquiotaICMS) { + this.valorAliquiotaICMS = valorAliquiotaICMS; + } + + public BigDecimal getValorICMS() { + return valorICMS; + } + + public void setValorICMS(BigDecimal valorICMS) { + this.valorICMS = valorICMS; + } + + public String getUf() { + return uf; + } + + public void setUf(String uf) { + this.uf = uf; + } + + public Integer getEstadoId() { + return estadoId; + } + + public void setEstadoId(Integer estadoId) { + this.estadoId = estadoId; + } + + public String getEspecie() { + return especie; + } + + public void setEspecie(String especie) { + this.especie = especie; + } + + public String getStatusPassagem() { + return statusPassagem; + } + + public void setStatusPassagem(String statusPassagem) { + this.statusPassagem = statusPassagem; + } + + public String getBilhete() { + return bilhete; + } + + public void setBilhete(String bilhete) { + this.bilhete = bilhete; + } + + public Date getDataVenda() { + return dataVenda; + } + + public void setDataVenda(Date dataVenda) { + this.dataVenda = dataVenda; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java index bfc17d546..19680ed91 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBilhetesVendidosController.java @@ -8,7 +8,6 @@ import java.util.Map; import javax.sql.DataSource; -import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; @@ -23,11 +22,14 @@ import org.zkoss.zul.Datebox; import org.zkoss.zul.Paging; import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.entidad.Estado; import com.rjconsultores.ventaboletos.entidad.PuntoVenta; import com.rjconsultores.ventaboletos.enums.IndStatusBoleto; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBilhetesVendidos; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBilhetesVendidosNovoLayout; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.service.EstadoService; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; @@ -54,42 +56,30 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose private Datebox datInicial; private Datebox datFinal; - private MyComboboxEstandar cmbEmpresa; + private MyComboboxEstandar cmbEstado; private List lsEmpresa; - + private List lsEstado; @Autowired private transient PagedListWrapper plwPuntoVenta; - private MyTextbox txtNombrePuntoVenta; private Bandbox bbPesquisaPuntoVenta; private MyListbox puntoVentaList; private MyListbox puntoVentaSelList; private Paging pagingPuntoVenta; - private Checkbox chkVendido; private Checkbox chkCancelado; -// private Checkbox chkTransferido; -// private Checkbox chkEntregue; -// private Checkbox chkReservado; -// private Checkbox chkExtraviado; -// private Checkbox chkReimpresso; -// private Checkbox chkMarcado; + @Autowired + private EstadoService estadoService; @Override public void doAfterCompose(Component comp) throws Exception { lsEmpresa = empresaService.obtenerTodos(); + lsEstado = estadoService.obtenerTodos(); super.doAfterCompose(comp); chkVendido.setChecked(true); chkCancelado.setChecked(true); -// chkTransferido.setChecked(true); -// chkEntregue.setChecked(true); -// chkReservado.setChecked(true); -// chkExtraviado.setChecked(true); -// chkReimpresso.setChecked(true); -// chkMarcado.setChecked(true); - puntoVentaList.setItemRenderer(new RenderRelatorioVendasBilheteiro()); } @@ -102,6 +92,14 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose this.lsEmpresa = lsEmpresa; } + public List getLsEstado() { + return lsEstado; + } + + public void setLsEstado(List lsEstado) { + this.lsEstado = lsEstado; + } + private void executarPesquisaAgencia() { HibernateSearchObject puntoVentaBusqueda = new HibernateSearchObject(PuntoVenta.class, pagingPuntoVenta.getPageSize()); @@ -147,7 +145,10 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose } public void onClick$btnExecutarRelatorio(Event ev) throws Exception { - executarRelatorio(); + executarRelatorio(false); + } + public void onClick$btnExecutarRelatorioNovoLayout(Event ev) throws Exception { + executarRelatorio(true); } /** @@ -155,7 +156,7 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose * */ @SuppressWarnings({ "rawtypes", "unchecked" }) - private void executarRelatorio() throws Exception { + private void executarRelatorio(boolean novoLayout) throws Exception { Relatorio relatorio; Map parametros = new HashMap(); StringBuilder filtro = new StringBuilder(); @@ -190,24 +191,6 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose if (chkCancelado.isChecked()) { status += "'" + IndStatusBoleto.C + "',"; } -// if (chkEntregue.isChecked()) { -// status += "'" + IndStatusBoleto.E + "',"; -// } -// if (chkExtraviado.isChecked()) { -// status += "'" + IndStatusBoleto.X + "',"; -// } -// if (chkMarcado.isChecked()) { -// status += "'" + IndStatusBoleto.M + "',"; -// } -// if (chkReimpresso.isChecked()) { -// status += "'" + IndStatusBoleto.R + "',"; -// } -// if (chkReservado.isChecked()) { -// status += "'" + IndStatusBoleto.S + "',"; -// } -// if (chkTransferido.isChecked()) { -// status += "'" + IndStatusBoleto.T + "',"; -// } if (chkVendido.isChecked()) { status += "'" + IndStatusBoleto.V + "',"; } @@ -229,13 +212,27 @@ public class RelatorioBilhetesVendidosController extends MyGenericForwardCompose } else { filtro.append(" Todas;"); } + + Comboitem itemEstado = cmbEstado.getSelectedItem(); + if (itemEstado != null) { + Estado estado = (Estado) itemEstado.getValue(); + parametros.put("ESTADO_ID", estado.getEstadoId()); + parametros.put("ESTADO", estado.getNombestado()); + } else{ + parametros.put("ESTADO", "TODOS"); + } + if(novoLayout){ + relatorio = new RelatorioBilhetesVendidosNovoLayout(parametros, dataSourceRead.getConnection()); + parametros.put("TITULO", Labels.getLabel("relatorioBilhetesVendidosController.window.title")); + }else{ + relatorio = new RelatorioBilhetesVendidos(parametros, dataSourceRead.getConnection()); + } parametros.put("FILTROS", filtro.toString()); - relatorio = new RelatorioBilhetesVendidos(parametros, dataSourceRead.getConnection()); - + Map args = new HashMap(); args.put("relatorio", relatorio); - openWindow("/component/reportView.zul", Labels.getLabel("relatorioVendasBilheteiroController.window.title"), args, MODAL); + openWindow("/component/reportView.zul", Labels.getLabel("relatorioBilhetesVendidosController.window.title"), args, MODAL); } } diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index cd4c7633d..142b6af4c 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -425,6 +425,25 @@ relatorioAproveitamentoController.HoraServico.label = Hora servicio relatorioAproveitamentoController.Classe.label = Clase relatorioAproveitamentoController.btnBuscarServico.label = Buscar servicio +# Relatório Bilhetes Vendidos +relatorioBilhetesVendidosController.window.title = Bilhetes Vendidos +relatorioBilhetesVendidosController.lbDatInicial.value = Fecha inicio +relatorioBilhetesVendidosController.lbDatFinal.value = Fecha final +relatorioBilhetesVendidosController.lbEmpresa.value = Empresa +relatorioBilhetesVendidosController.lbPuntoVenta.value = Agência +relatorioBilhetesVendidosController.lbEstado.value = Estado +relatorioBilhetesVendidosController.lbStatus.value = Status +relatorioBilhetesVendidosController.lbNumero.value = Número +relatorioBilhetesVendidosController.vendido.label = Vendido +relatorioBilhetesVendidosController.cancelado.label = Cancelado +relatorioBilhetesVendidosController.transferido.label = Transferido +relatorioBilhetesVendidosController.entregue.label = Entregue +relatorioBilhetesVendidosController.reservado.label = Reservado +relatorioBilhetesVendidosController.extravidado.label = Extraviado +relatorioBilhetesVendidosController.reimpresso.label = Reimpresso +relatorioBilhetesVendidosController.marcado.label = Marcado +relatorioBilhetesVendidosController.categoria.label = Categoria + # Relatorio Empresa Corrida relatorioEmpresaCorridaController.window.title=Reporte empresa corrida relatorioEmpresaCorridaController.lbDataIni.value=Fecha inicio diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 44d430b3b..ff311e635 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -6789,6 +6789,7 @@ relatorioBilhetesVendidosController.lbDatInicial.value = Data Inicial relatorioBilhetesVendidosController.lbDatFinal.value = Data Final relatorioBilhetesVendidosController.lbEmpresa.value = Empresa relatorioBilhetesVendidosController.lbPuntoVenta.value = Agência +relatorioBilhetesVendidosController.lbEstado.value = Estado relatorioBilhetesVendidosController.lbStatus.value = Status relatorioBilhetesVendidosController.lbNumero.value = Número relatorioBilhetesVendidosController.vendido.label = Vendido diff --git a/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul b/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul index 182e28aca..d6dcee377 100644 --- a/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul +++ b/web/gui/relatorios/filtroRelatorioBilhetesVendidos.zul @@ -4,51 +4,48 @@ - - + - - - - + + + + - - + + - - + - - + + - - - + + + + +