From deb689494f2cf45e660aa64a0de0bc9819adc30c Mon Sep 17 00:00:00 2001 From: "lucas.calixto" Date: Wed, 29 Mar 2017 12:16:29 +0000 Subject: [PATCH] fixes bug#8748 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@67342 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../impl/RelatorioBaixasVendasInternet.java | 86 +++++++++ ...elatorioBaixasVendasInternet_es.properties | 22 +++ ...torioBaixasVendasInternet_pt_BR.properties | 22 +++ .../RelatorioBaixasVendasInternet.jasper | Bin 0 -> 30980 bytes .../RelatorioBaixasVendasInternet.jrxml | 166 ++++++++++++++++++ .../RelatorioBaixasVendasInternetBean.java | 72 ++++++++ ...latorioBaixasVendasInternetController.java | 46 +++++ ...ItemMenuRelatorioBaixasVendasInternet.java | 25 +++ .../filtroRelatorioBaixasVendasInternet.zul | 45 +++++ 9 files changed, 484 insertions(+) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBaixasVendasInternet.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_es.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBaixasVendasInternetBean.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBaixasVendasInternetController.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBaixasVendasInternet.java create mode 100644 web/gui/relatorios/filtroRelatorioBaixasVendasInternet.zul diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBaixasVendasInternet.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBaixasVendasInternet.java new file mode 100644 index 000000000..18efa7f52 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioBaixasVendasInternet.java @@ -0,0 +1,86 @@ +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioBaixasVendasInternetBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioBaixasVendasInternet extends Relatorio { + + private Date fecInicio; + private Date fecFinal; + private PuntoVenta puntoVenta; + + public RelatorioBaixasVendasInternet(Connection conexao, Date fecInicio, Date fecFinal, PuntoVenta puntoVenta) { + super(new HashMap(), conexao); + this.fecInicio = fecInicio; + this.fecFinal = fecFinal; + this.puntoVenta = puntoVenta; + } + + @Override + protected void processaParametros() throws Exception { + + NamedParameterStatement namedParameterStatement = new NamedParameterStatement(getConexao(), getSql()); + + namedParameterStatement.setInt("puntoVentaId", puntoVenta.getPuntoventaId()); + this.parametros.put("nombPuntoVenta", puntoVenta.getNombpuntoventa()); + + SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); + this.parametros.put("fecInicio", dateFormat.format(fecInicio)); + this.parametros.put("fecFinal", dateFormat.format(fecFinal)); + namedParameterStatement.setDate("fecInicio", new java.sql.Date(fecInicio.getTime())); + namedParameterStatement.setDate("fecFinal", new java.sql.Date(fecFinal.getTime())); + + ResultSet resultSet = namedParameterStatement.executeQuery(); + List resultBean = transformResultSet(resultSet); + setCollectionDataSource(new JRBeanCollectionDataSource(resultBean)); + + } + + private List transformResultSet(ResultSet resultSet) throws SQLException { + List resultBean = new ArrayList(); + while (resultSet.next()) { + RelatorioBaixasVendasInternetBean bean = new RelatorioBaixasVendasInternetBean(); + bean.setFecImpresion(resultSet.getDate("FECCREACION")); + bean.setNumFolioSistema(resultSet.getString("NUMFOLIOSISTEMA")); + bean.setOrigen(resultSet.getString("ORIGEN")); + bean.setDestino(resultSet.getString("DESTINO")); + bean.setValor(resultSet.getBigDecimal("VALOR")); + bean.setUsuarioId(resultSet.getInt("USUARIO_ID")); + bean.setNombUsuario(resultSet.getString("NOMBUSUARIO")); + resultBean.add(bean); + } + return resultBean; + } + + private String getSql() { + + String sql = "SELECT DISTINCT B.FECCREACION, B.NUMFOLIOSISTEMA, " + + "U.USUARIO_ID, U.NOMBUSUARIO, O.DESCPARADA ORIGEN, D.DESCPARADA DESTINO, " + + "COALESCE((B.PRECIOPAGADO + B.IMPORTETAXAEMBARQUE + B.IMPORTESEGURO + B.IMPORTEPEDAGIO + B.IMPORTEOUTROS), 0) AS VALOR " + + "FROM BOLETO B " + + "JOIN PARADA O ON B.ORIGEN_ID = O.PARADA_ID " + + "JOIN PARADA D ON B.DESTINO_ID = D.PARADA_ID " + + "JOIN USUARIO U ON B.USUARIO_ID = U.USUARIO_ID " + + "WHERE B.INDSTATUSBOLETO = 'E' " + + "AND B.FECCREACION BETWEEN :fecInicio AND :fecFinal " + + "AND PUNTOVENTA_ID = :puntoVentaId " + + "ORDER BY U.USUARIO_ID "; + + return sql; + + } + +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_es.properties new file mode 100644 index 000000000..51bff3371 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_es.properties @@ -0,0 +1,22 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Vendas para Comissão +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +cabecalho.usuario=Usuário: + +label.nombPuntoVenta=Punto Venta +label.fecImpresion=Data da Impressão +label.numFolioSistema=Número Folio +label.origen=Origen +label.destino=Destino +label.valor=Valor del Folio +label.total=Total \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_pt_BR.properties new file mode 100644 index 000000000..c14d9b1ea --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioBaixasVendasInternet_pt_BR.properties @@ -0,0 +1,22 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório de Baixas Vendas Internet +cabecalho.relatorio=Relatório: +cabecalho.periodo=Período: +cabecalho.periodoA=à +cabecalho.dataHora=Data/Hora: +cabecalho.impressorPor=Impressor por: +cabecalho.pagina=Página +cabecalho.de=de +cabecalho.filtros=Filtros: +cabecalho.usuario=Usuário: + +label.nombPuntoVenta=Ponto de Venda +label.fecImpresion=Data da Impressão +label.numFolioSistema=Número da Passagem +label.origen=Origem +label.destino=Destino +label.valor=Valor da Passagem +label.total=Total \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jasper new file mode 100644 index 0000000000000000000000000000000000000000..cb5724907af559d7c52c1ea3512909c1271a2c0a GIT binary patch literal 30980 zcmeHw3wT^rwg1{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8g7mH7z#Vz6rajUpWd`4U+K8un&#LeOh zkoUWBcMs(Ke#rZmA@2`D-XDUze;xAv4aoarkoRvv-oFER|1RYHX~_G(K;EB)yni3^ zegyLV9OV6HkoT7$?;HPD-iwg;|3B>ervHKR4xFcwcU{FR@9gQg@-F=zN8atHf5^Uz z-$UO20C|5M^8P2t`%%dIUm@>rK;GY^dkljfG)m~JMj1VBAV_V5=^3MveqhX{=Z$K5 z(O5t)8w=@GV=?{NIF61QwL%ytic;egF&k1?ZPbY+#!6V(263vf8rF54SYxag>x?tR zCgV)8#n>WRjkk(+qgiwtEuz_`8@t4(j0?ma z#@obQMob(v2F2fv5o4*b$5>|UGcGa`hGnFUcjE3cW8Apb*l&E$IAq*tTx{Hg+}n+J z8Fw1*F%BD-8xI**8IKwtg1m2rkApahMe_p>S>O})*b|!c-4y2(%64o*4e7HYng0VB CVbU4^ literal 0 HcmV?d00001 diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jrxml new file mode 100644 index 000000000..3c0687792 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioBaixasVendasInternet.jrxml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <band height="81" splitType="Stretch"> + <textField> + <reportElement uuid="43b2c28d-4760-4890-b00d-25e931e79c74" x="0" y="0" width="620" height="20"/> + <textElement markup="none"> + <font size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression> + </textField> + <textField pattern="dd/MM/yyyy HH:mm"> + <reportElement uuid="4d1bcd65-c9a6-44b4-8dca-cc3c4c20c9a5" x="638" y="0" width="164" height="20"/> + <textElement textAlignment="Right"> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="fd05bd35-30d9-4baf-aa56-f8e5d3c3268b" x="0" y="20" width="620" height="20"/> + <textElement> + <font isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression> + </textField> + <textField> + <reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="263" height="20"/> + <textElement/> + <textFieldExpression><![CDATA[$R{label.nombPuntoVenta} + ": " + $P{nombPuntoVenta}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBaixasVendasInternetBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBaixasVendasInternetBean.java new file mode 100644 index 000000000..f62c9d546 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioBaixasVendasInternetBean.java @@ -0,0 +1,72 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.math.BigDecimal; +import java.util.Date; + +public class RelatorioBaixasVendasInternetBean { + + private Date fecImpresion; + private String numFolioSistema; + private String origen; + private String destino; + private BigDecimal valor; + private Integer usuarioId; + private String nombUsuario; + + public Date getFecImpresion() { + return fecImpresion; + } + + public void setFecImpresion(Date fecImpresion) { + this.fecImpresion = fecImpresion; + } + + public String getNumFolioSistema() { + return numFolioSistema; + } + + public void setNumFolioSistema(String numFolioSistema) { + this.numFolioSistema = numFolioSistema; + } + + public String getOrigen() { + return origen; + } + + public void setOrigen(String origen) { + this.origen = origen; + } + + public String getDestino() { + return destino; + } + + public void setDestino(String destino) { + this.destino = destino; + } + + public BigDecimal getValor() { + return valor; + } + + public void setValor(BigDecimal valor) { + this.valor = valor; + } + + public Integer getUsuarioId() { + return usuarioId; + } + + public void setUsuarioId(Integer usuarioId) { + this.usuarioId = usuarioId; + } + + public String getNombUsuario() { + return nombUsuario; + } + + public void setNombUsuario(String nombUsuario) { + this.nombUsuario = nombUsuario; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBaixasVendasInternetController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBaixasVendasInternetController.java new file mode 100644 index 000000000..318671e4d --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioBaixasVendasInternetController.java @@ -0,0 +1,46 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Scope; +import org.springframework.stereotype.Controller; +import org.zkoss.util.resource.Labels; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.entidad.PuntoVenta; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBaixasVendasInternet; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; + +@Controller("relatorioBaixasVendasInternetController") +@Scope("prototype") +public class RelatorioBaixasVendasInternetController extends MyGenericForwardComposer { + + private static final long serialVersionUID = 722641825753640276L; + + private Datebox fecInicio; + private Datebox fecFinal; + private MyComboboxPuntoVenta cmbPuntoVenta; + + @Autowired + private DataSource dataSourceRead; + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + + PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); + RelatorioBaixasVendasInternet relatorio = new RelatorioBaixasVendasInternet(dataSourceRead.getConnection(), fecInicio.getValue(), fecFinal.getValue(), puntoVenta); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("indexController.mniRelatorioBaixasVendasInternet.label"), args, MODAL); + + } + +} \ No newline at end of file diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBaixasVendasInternet.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBaixasVendasInternet.java new file mode 100644 index 000000000..cd9977006 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioBaixasVendasInternet.java @@ -0,0 +1,25 @@ +package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios; + +import org.zkoss.util.resource.Labels; + +import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria; +import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema; + +public class ItemMenuRelatorioBaixasVendasInternet extends DefaultItemMenuSistema { + + public ItemMenuRelatorioBaixasVendasInternet() { + super("indexController.mniRelatorioBaixasVendasInternet.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOBAIXASVENDASINTERNET"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioBaixasVendasInternet.zul", + Labels.getLabel("relatorioBaixasVendasInternetController.window.title"), getArgs(), desktop); + + } +} diff --git a/web/gui/relatorios/filtroRelatorioBaixasVendasInternet.zul b/web/gui/relatorios/filtroRelatorioBaixasVendasInternet.zul new file mode 100644 index 000000000..9c538dfc9 --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioBaixasVendasInternet.zul @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + +