From 6d919f8674a6153905a2be50aff8f0699300e1b1 Mon Sep 17 00:00:00 2001 From: walace Date: Wed, 23 Aug 2017 13:08:42 +0000 Subject: [PATCH] fixes bug #9452 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@72825 d1611594-4594-4d17-8e1d-87c2c4800839 --- ...elatorioServicoBloqueadoVendaInternet.java | 105 +++++++++ ...ervicoBloqueadoVendaInternet_es.properties | 23 ++ ...icoBloqueadoVendaInternet_pt_BR.properties | 26 +++ ...atorioServicoBloqueadoVendaInternet.jasper | Bin 0 -> 31908 bytes ...latorioServicoBloqueadoVendaInternet.jrxml | 209 ++++++++++++++++++ ...orioServicoBloqueadoVendaInternetBean.java | 72 ++++++ ...rvicoBloqueadoVendaInternetController.java | 90 ++++++++ ...elatorioServicoBloqueadoVendaInternet.java | 25 +++ ...RelatorioServicoBloqueadoVendaInternet.zul | 46 ++++ 9 files changed, 596 insertions(+) create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioServicoBloqueadoVendaInternet.java create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_es.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_pt_BR.properties create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jasper create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jrxml create mode 100644 src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioServicoBloqueadoVendaInternetBean.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioServicoBloqueadoVendaInternetController.java create mode 100644 src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioServicoBloqueadoVendaInternet.java create mode 100644 web/gui/relatorios/filtroRelatorioServicoBloqueadoVendaInternet.zul diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioServicoBloqueadoVendaInternet.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioServicoBloqueadoVendaInternet.java new file mode 100644 index 000000000..68285e707 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioServicoBloqueadoVendaInternet.java @@ -0,0 +1,105 @@ + +package com.rjconsultores.ventaboletos.relatorios.impl; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioServicoBloqueadoVendaInternetBean; +import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement; + +import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; + +public class RelatorioServicoBloqueadoVendaInternet extends Relatorio { + + public RelatorioServicoBloqueadoVendaInternet(Map parametros, Connection conexao) { + super(parametros, conexao); + + } + + private List lsDadosRelatorio; + + @Override + protected void processaParametros() throws Exception { + + this.setCustomDataSource(new DataSource(this) { + @Override + public void initDados() throws Exception { + + Connection conexao = this.relatorio.getConexao(); + + Map parametros = this.relatorio.getParametros(); + Empresa empresa = (Empresa) parametros.get("EMPRESA"); + + String sql = getSql(empresa); + + NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql); + + stmt.setTimestamp("DATA_INICIAL", (Timestamp) parametros.get("DATA_INICIAL")); + stmt.setTimestamp("DATA_FINAL", (Timestamp) parametros.get("DATA_FINAL")); + + ResultSet rset = null; + rset = stmt.executeQuery(); + + lsDadosRelatorio = new ArrayList(); + + while (rset.next()) { + + RelatorioServicoBloqueadoVendaInternetBean bean = new RelatorioServicoBloqueadoVendaInternetBean(); + + bean.setCodOrigem((Integer) Integer.parseInt(rset.getObject("codOrigem").toString())); + bean.setCodDestino((Integer) Integer.parseInt(rset.getObject("codDestino").toString())); + bean.setDescOrigem((String) rset.getObject("descOrigem")); + bean.setDescDestino((String) rset.getObject("descDestino")); + bean.setServico((String) rset.getObject("servico").toString()); + bean.setHoraViagem((String) rset.getObject("horaViagem")); + bean.setDataServico((Date) rset.getObject("dataServico")); + + lsDadosRelatorio.add(bean); + } + + if (lsDadosRelatorio.size() > 0) { + + setLsDadosRelatorio(lsDadosRelatorio); + } + } + }); + } + + public void setLsDadosRelatorio(List lsDadosRelatorio) { + this.setCollectionDataSource(new JRBeanCollectionDataSource(lsDadosRelatorio)); + this.lsDadosRelatorio = lsDadosRelatorio; + } + + private String getSql(Empresa empresa) { + + StringBuilder sql = new StringBuilder(); + + sql.append("SELECT C.CORRIDA_ID AS servico, "); + sql.append(" CRC.ORIGEN_ID AS codOrigem, "); + sql.append(" CRC.DESTINO_ID AS codDestino, "); + sql.append(" PO.DESCPARADA AS descOrigem, "); + sql.append(" PD.DESCPARADA AS descDestino, "); + sql.append(" TO_DATE(C.FECCORRIDA,'dd/MM/yy') AS dataServico, "); + sql.append(" TO_CHAR(C.FECHORSALIDA, 'HH24:MI:SS') AS horaViagem "); + sql.append("FROM CONF_RESTRICAO_CANALVENTA CRC "); + sql.append("INNER JOIN PARADA PO ON PO.PARADA_ID = CRC.ORIGEN_ID "); + sql.append("INNER JOIN PARADA PD ON PD.PARADA_ID = CRC.DESTINO_ID "); + sql.append("INNER JOIN CORRIDA C ON CRC.CORRIDA_ID = C.CORRIDA_ID "); + sql.append("WHERE CRC.CORRIDA_ID = 2520283 "); + sql.append(" AND CRC.TIPOPTOVTA_ID = 2 "); + sql.append("AND C.FECCORRIDA BETWEEN :DATA_INICIAL AND :DATA_FINAL "); + sql.append("AND CRC.EMPRESA_ID =" + empresa.getEmpresaId() + " "); + sql.append("AND C.ACTIVO = 1 "); + + return sql.toString(); + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_es.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_es.properties new file mode 100644 index 000000000..9f195c817 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_es.properties @@ -0,0 +1,23 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. +#Labels cabeçalho +cabecalho.nome=Relatório Servicos Bloqueados na Venda 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.puntoventa=Agência: +cabecalho.usuario=Usuário: +label.servico=Serviço +label.horaViagem=Hora da Viagem +label.dataServico=Data Serviço +label.dataEmbarque=Data Embarque +label.bilhete=Bilhete +label.dataEmissao=Data Emissão +label.origem= Origem +label.destino=Destino +label.empresa=Empresa: diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_pt_BR.properties b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_pt_BR.properties new file mode 100644 index 000000000..05969998a --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/internacionalizacao/RelatorioServicoBloqueadoVendaInternet_pt_BR.properties @@ -0,0 +1,26 @@ +#geral +msg.noData=Não foi possivel obter dados com os parâmetros informados. + +#Labels cabeçalho +cabecalho.nome=Relatório Servicos Bloqueados na Venda 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.puntoventa=Agência: +cabecalho.usuario=Usuário: +label.servico=Serviço +label.horaViagem=Hora da Viagem +label.dataServico=Data Serviço +label.dataEmbarque=Data Embarque +label.bilhete=Bilhete +label.dataEmissao=Data Emissão +label.origem= Origem +label.destino=Destino +label.empresa=Empresa: +label.dataInicial=Data Final: +label.dataFinal=Data Final: diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jasper new file mode 100644 index 0000000000000000000000000000000000000000..967195a5eb6516a3f1e97ecd2827562d2fd41ddd GIT binary patch literal 31908 zcmeHwdth8e_5YchwAm(`G)-T$1sb5(Hf@tWC?G{>o^48ACTUAsHEfcbWa(x%>~7k$ z2nfhSKtM4s{n!7tC2FM?E&cfrR`6j2cb(XR?BK2Ut{{hXP(kJ-K5Y~knc_s=(F z=gyrok27b^Idf*_%;nBEX+kPV3*vUVIyF#zawIikCzJL_BAHHA+ws9@+^$|H6FX%h z$-nt8T2#NFn$dD{WLu;rnyBfrlhH^lx--%nvsbmy6rHUtGHiE^ z4h%%c(o~@`$0G5;nyz#*8XrW)Qk^kbAB&_?r_kwSjU{PGF5G$}DInNchesxYRn0W3 zqpNX!LwiqGV`p=1OV5VJ&aUS6wx0FP4b2qpO{CL_;nqkJoowd5#72kX^@-7Vx|uQI zx2};$A5e3l8>9W{q0Lkt9gHWEc1HvyBk5=&zL};*Q%$i%Bwa7dH6;>hJINVSU8BRp zk>rjxdpok*o2k-G+89j_aoSot(r+hg2BeI6*;1IB$#4i%ZIsib_bbAt21N|gtaJo7vofvUyE89L~$J-J-g55ht>=r8S zjr46DOo9ykX`0sp+SjB8Y7D-pQG8LuWRLe_+$Jk(HAItkAET9~6*&v0(Naz4XxuH( z7#|%*Jz-Ukq5}_qp_`_NB-6G~s2}L2>~tzk3%2BJX zG)-25F`ACXAV-XMh=pVnBP#`>g~}itX=WUQP9?*UXk2$TP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/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jrxml new file mode 100644 index 000000000..3498aa1d1 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioServicoBloqueadoVendaInternet.jrxml @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + <band height="37"> + <textField> + <reportElement x="168" y="0" width="491" height="27" uuid="766b74e4-28c9-4045-8538-343a8bc8e665"/> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="18" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{cabecalho.nome}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioServicoBloqueadoVendaInternetBean.java b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioServicoBloqueadoVendaInternetBean.java new file mode 100644 index 000000000..538d9ff49 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/utilitarios/RelatorioServicoBloqueadoVendaInternetBean.java @@ -0,0 +1,72 @@ +package com.rjconsultores.ventaboletos.relatorios.utilitarios; + +import java.math.BigDecimal; +import java.util.Date; + +public class RelatorioServicoBloqueadoVendaInternetBean { + + private String servico; + private Integer codOrigem; + private Integer codDestino; + private String descOrigem; + private String descDestino; + private String horaViagem; + private Date dataServico; + + public String getServico() { + return servico; + } + + public void setServico(String servico) { + this.servico = servico; + } + + public Integer getCodOrigem() { + return codOrigem; + } + + public void setCodOrigem(Integer codOrigem) { + this.codOrigem = codOrigem; + } + + public Integer getCodDestino() { + return codDestino; + } + + public void setCodDestino(Integer codDestino) { + this.codDestino = codDestino; + } + + public String getDescOrigem() { + return descOrigem; + } + + public void setDescOrigem(String descOrigem) { + this.descOrigem = descOrigem; + } + + public String getDescDestino() { + return descDestino; + } + + public void setDescDestino(String descDestino) { + this.descDestino = descDestino; + } + + public String getHoraViagem() { + return horaViagem; + } + + public void setHoraViagem(String horaViagem) { + this.horaViagem = horaViagem; + } + + public Date getDataServico() { + return dataServico; + } + + public void setDataServico(Date dataServico) { + this.dataServico = dataServico; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioServicoBloqueadoVendaInternetController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioServicoBloqueadoVendaInternetController.java new file mode 100644 index 000000000..4f86da4f6 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioServicoBloqueadoVendaInternetController.java @@ -0,0 +1,90 @@ +package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios; + +import java.sql.Timestamp; +import java.util.HashMap; +import java.util.List; +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.Component; +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zul.Datebox; + +import com.rjconsultores.ventaboletos.entidad.Empresa; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioServicoBloqueadoVendaInternet; +import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioVendasPTA; +import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; +import com.rjconsultores.ventaboletos.service.EmpresaService; +import com.rjconsultores.ventaboletos.utilerias.DateUtil; +import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; +import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; + +@Controller("relatorioServicoBloqueadoVendaInternetController") +@Scope("prototype") +public class RelatorioServicoBloqueadoVendaInternetController extends MyGenericForwardComposer { + + /** + * + */ + private static final long serialVersionUID = 1L; + @Autowired + private EmpresaService empresaService; + private List lsEmpresa; + private MyComboboxEstandar cmbEmpresa; + + private Datebox datInicial; + private Datebox datFinal; + @Autowired + private DataSource dataSourceRead; + + @Override + public void doAfterCompose(Component comp) throws Exception { + + super.doAfterCompose(comp); + lsEmpresa = empresaService.obtenerTodos(); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private void executarRelatorio() throws Exception { + Relatorio relatorio; + + Map parametros = new HashMap(); + + Timestamp dataInicio = new Timestamp((DateUtil.inicioFecha((java.util.Date) this.datInicial.getValue()).getTime())); + Timestamp dataFinal = new Timestamp((DateUtil.fimFecha((java.util.Date) this.datFinal.getValue()).getTime())); + + parametros.put("DATA_INICIAL", dataInicio); + parametros.put("DATA_FINAL", dataFinal); + + Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); + parametros.put("EMPRESA", empresa); + parametros.put("NOME_EMPRESA", empresa.getNombempresa()); + parametros.put("TITULO", Labels.getLabel("relatorioServicoBloqueadoVendaInternetController.window.title")); + + relatorio = new RelatorioServicoBloqueadoVendaInternet(parametros, dataSourceRead.getConnection()); + + Map args = new HashMap(); + args.put("relatorio", relatorio); + + openWindow("/component/reportView.zul", + Labels.getLabel("relatorioServicoBloqueadoVendaInternetController.window.title"), args, MODAL); + } + + public void onClick$btnExecutarRelatorio(Event ev) throws Exception { + executarRelatorio(); + } + + public List getLsEmpresa() { + return lsEmpresa; + } + + public void setLsEmpresa(List lsEmpresa) { + this.lsEmpresa = lsEmpresa; + } + +} diff --git a/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioServicoBloqueadoVendaInternet.java b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioServicoBloqueadoVendaInternet.java new file mode 100644 index 000000000..98cd90143 --- /dev/null +++ b/src/java/com/rjconsultores/ventaboletos/web/utilerias/menu/item/relatorios/ItemMenuRelatorioServicoBloqueadoVendaInternet.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 ItemMenuRelatorioServicoBloqueadoVendaInternet extends DefaultItemMenuSistema { + + public ItemMenuRelatorioServicoBloqueadoVendaInternet() { + super("indexController.mniRelatorioServicoBloqueadoVendaInternet.label"); + } + + @Override + public String getClaveMenu() { + return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOSERVICOBLOQUEADOVENDAINTERNET"; + } + + @Override + public void ejecutar() { + PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioServicoBloqueadoVendaInternet.zul", + Labels.getLabel("relatorioServicoBloqueadoVendaInternetController.window.title"), getArgs(), desktop); + } + +} diff --git a/web/gui/relatorios/filtroRelatorioServicoBloqueadoVendaInternet.zul b/web/gui/relatorios/filtroRelatorioServicoBloqueadoVendaInternet.zul new file mode 100644 index 000000000..f6135f999 --- /dev/null +++ b/web/gui/relatorios/filtroRelatorioServicoBloqueadoVendaInternet.zul @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + +