P5 - Criar um relatório de conferência de checkin’s por localidade de partida (fixes bug #6360)
Tempo: 1 hora git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@44899 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c13b63a759
commit
4fcf05a97f
|
@ -27,18 +27,14 @@ public class RelatorioCheckin extends Relatorio {
|
|||
Integer corridaId = (Integer) getParametros().get("CORRIDA_ID");
|
||||
Integer origenId = (Integer) getParametros().get("ORIGEN_ID");
|
||||
String nomeBilheteiro = (String) getParametros().get("NOME_BILHETEIRO");
|
||||
String numVoucher = (String) getParametros().get("NUM_VOUCHER");
|
||||
Date fecInicio = (Date) getParametros().get("DATA_INICIAL");
|
||||
Date fecFinal = (Date) getParametros().get("DATA_FINAL");
|
||||
|
||||
String sql = getSql(fecInicio, fecFinal, corridaId, origenId, nomeBilheteiro, numVoucher);
|
||||
String sql = getSql(corridaId, origenId, nomeBilheteiro);
|
||||
|
||||
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), sql);
|
||||
|
||||
if (fecInicio != null && fecFinal != null) {
|
||||
stmt.setTimestamp("fecInicio", new java.sql.Timestamp(fecInicio.getTime()));
|
||||
stmt.setTimestamp("fecFinal", new java.sql.Timestamp(fecFinal.getTime()));
|
||||
}
|
||||
stmt.setTimestamp("fecInicio", new java.sql.Timestamp(fecInicio.getTime()));
|
||||
stmt.setTimestamp("fecFinal", new java.sql.Timestamp(fecFinal.getTime()));
|
||||
|
||||
if (corridaId != null) {
|
||||
stmt.setInt("corridaId", corridaId);
|
||||
|
@ -52,10 +48,6 @@ public class RelatorioCheckin extends Relatorio {
|
|||
stmt.setString("nomeBilheteiro", nomeBilheteiro);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(numVoucher)) {
|
||||
stmt.setString("numVoucher", numVoucher);
|
||||
}
|
||||
|
||||
List<Checkin> checkins = new ArrayList<Checkin>();
|
||||
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
@ -82,21 +74,22 @@ public class RelatorioCheckin extends Relatorio {
|
|||
this.setCollectionDataSource(new JRBeanCollectionDataSource(checkins));
|
||||
}
|
||||
|
||||
private String getSql(Date fecInicio, Date fecFinal, Integer corridaId, Integer origenId, String nomeBilheteiro, String numVoucher) {
|
||||
private String getSql(Integer corridaId, Integer origenId, String nomeBilheteiro) {
|
||||
|
||||
StringBuffer sql = new StringBuffer();
|
||||
sql.append("select b.boleto_id, b.numoperacion, o.descparada, b.corrida_id, ");
|
||||
sql.append("select b.boleto_id, o.descparada, b.corrida_id, ");
|
||||
sql.append("case when b.numfoliosistema is not null ");
|
||||
sql.append(" then b.numfoliosistema else b.numoperacion end numoperacion, ");
|
||||
sql.append("b.feccorrida, bc.datavenda, bc.datacancelado, bc.dataremarcacao, u.nombusuario ");
|
||||
sql.append("from boleto b ");
|
||||
sql.append("inner join boleto_checkin bc on b.boleto_id = bc.boletooriginal_id ");
|
||||
sql.append("inner join parada o on b.origen_id = o.parada_id ");
|
||||
sql.append("inner join usuario u on b.usuario_id = u.usuario_id ");
|
||||
sql.append(" where b.activo = 1 ");
|
||||
sql.append(fecInicio == null && fecFinal == null ? "" : "and b.feccorrida between :fecInicio and :fecFinal ");
|
||||
sql.append("and b.feccorrida between :fecInicio and :fecFinal ");
|
||||
sql.append(corridaId == null ? "" : " and b.corrida_id = :corridaId ");
|
||||
sql.append(origenId == null ? "" : " and b.origen_id = :origenId ");
|
||||
sql.append(StringUtils.isBlank(nomeBilheteiro) ? "" : " and u.nombusuario like :nomeBilheteiro ");
|
||||
sql.append(StringUtils.isBlank(numVoucher) ? "" : " and b.numoperacion = :numVoucher ");
|
||||
|
||||
return sql.toString();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
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:
|
||||
|
||||
#Labels datail
|
||||
datail.voucher=Nº Bilhete / Voucher
|
||||
datail.origen=Origem
|
||||
datail.servicio=Serviço
|
||||
datail.data.servicio=Data do Serviço
|
||||
datail.data.checkin=Data Checkin
|
||||
datail.bilheteiro=Bilheteiro
|
||||
datail.data.remarcada=Data Remarcada
|
|
@ -1,7 +1,6 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.relatorio=Relatório:
|
||||
cabecalho.periodo=Período:
|
||||
|
@ -10,4 +9,13 @@ cabecalho.dataHora=Data/Hora:
|
|||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
cabecalho.filtros=Filtros:
|
||||
cabecalho.filtros=Filtros:
|
||||
|
||||
#Labels datail
|
||||
datail.voucher=Nº Bilhete / Voucher
|
||||
datail.origen=Origem
|
||||
datail.servicio=Serviço
|
||||
datail.data.servicio=Data do Serviço
|
||||
datail.data.checkin=Data Checkin
|
||||
datail.bilheteiro=Bilheteiro
|
||||
datail.data.remarcada=Data Remarcada
|
Binary file not shown.
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioCheckin" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="48d32af4-ba9f-41c2-91a5-5d2fe57e149c">
|
||||
<property name="ireport.zoom" value="1.4641000000000008"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.x" value="72"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||
<parameter name="DATA_INICIAL" class="java.util.Date"/>
|
||||
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||
<parameter name="CORRIDA_ID" class="java.lang.Long"/>
|
||||
<parameter name="NUM_VOUCHER" class="java.lang.String"/>
|
||||
<parameter name="ORIGEN" class="java.lang.String"/>
|
||||
<parameter name="NOME_BILHETEIRO" class="java.lang.String"/>
|
||||
<queryString>
|
||||
|
@ -26,7 +25,7 @@
|
|||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="24" splitType="Stretch">
|
||||
<band height="21" splitType="Stretch">
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="0" y="0" width="338" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="5ee43799-932b-4ce1-8056-df380a9050a8"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
|
@ -45,55 +44,55 @@
|
|||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="33" splitType="Stretch">
|
||||
<staticText>
|
||||
<reportElement x="0" y="0" width="100" height="30" uuid="6329d59a-06da-4cb8-afe9-738da0b71867"/>
|
||||
<textElement>
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="100" height="30" uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Nº Bilhete / Voucher]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="100" y="0" width="134" height="30" uuid="9530b934-ab02-49e5-b92d-77012c21301d"/>
|
||||
<textElement>
|
||||
<textFieldExpression><![CDATA[$R{datail.voucher}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="100" y="0" width="134" height="30" uuid="1e0b20c0-f208-4853-8601-73cec6e1992e"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Origem]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="234" y="0" width="49" height="30" uuid="31ded62d-1237-4ce0-89ff-392e262b28fd"/>
|
||||
<textElement>
|
||||
<textFieldExpression><![CDATA[$R{datail.origen}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="234" y="0" width="39" height="30" uuid="32e830a3-6303-465c-85aa-12678fe6b80a"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Serviço]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="283" y="0" width="55" height="30" isPrintWhenDetailOverflows="true" uuid="7182958d-23c2-491c-b78f-bff5448efbe8"/>
|
||||
<textElement rotation="None">
|
||||
<textFieldExpression><![CDATA[$R{datail.servicio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="273" y="0" width="55" height="30" isPrintWhenDetailOverflows="true" uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec"/>
|
||||
<textElement rotation="None" markup="none">
|
||||
<font isBold="true" isUnderline="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data do Serviço]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="338" y="0" width="48" height="30" isPrintWhenDetailOverflows="true" uuid="d62d3352-3972-49c3-8848-84b148f091cd"/>
|
||||
<textElement>
|
||||
<textFieldExpression><![CDATA[$R{datail.data.servicio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="328" y="0" width="48" height="30" isPrintWhenDetailOverflows="true" uuid="d937b8b4-5e49-4d0d-a211-42e3d3fb45ba"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data Checkin]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="386" y="0" width="115" height="30" uuid="54769773-b33c-4f10-b4f0-33e38df2326a"/>
|
||||
<textElement>
|
||||
<textFieldExpression><![CDATA[$R{datail.data.checkin}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="376" y="0" width="115" height="30" uuid="44e42972-eac1-40e6-ba0e-7c83b208d41b"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Bilheteiro]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="501" y="0" width="54" height="30" isPrintWhenDetailOverflows="true" uuid="b4ca6634-4f46-4452-8a0a-fd5c2736e0ec"/>
|
||||
<textElement>
|
||||
<textFieldExpression><![CDATA[$R{datail.bilheteiro}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="491" y="0" width="64" height="30" isPrintWhenDetailOverflows="true" uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae"/>
|
||||
<textElement markup="none">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data Remarcada]]></text>
|
||||
</staticText>
|
||||
<textFieldExpression><![CDATA[$R{datail.data.remarcada}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement x="0" y="30" width="555" height="1" uuid="acc2f86e-4ee2-4e61-807f-27fd740db652"/>
|
||||
</line>
|
||||
|
@ -116,35 +115,35 @@
|
|||
<textFieldExpression><![CDATA[$F{origen}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="234" y="0" width="49" height="20" uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3"/>
|
||||
<reportElement x="234" y="0" width="39" height="20" uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{corridaId}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement x="283" y="0" width="55" height="20" uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e"/>
|
||||
<reportElement x="273" y="0" width="55" height="20" uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{feccorrida}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement x="338" y="0" width="48" height="20" uuid="1ce5d236-a684-450f-8e63-1523f0c7e103"/>
|
||||
<reportElement x="328" y="0" width="48" height="20" uuid="1ce5d236-a684-450f-8e63-1523f0c7e103"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dataVenda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="386" y="0" width="115" height="20" uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c"/>
|
||||
<reportElement x="376" y="0" width="115" height="20" uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{nombUsuario}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||
<reportElement x="501" y="0" width="54" height="20" uuid="648d03b0-ee8a-4b2f-af9f-c33c4d01f40e"/>
|
||||
<reportElement x="491" y="0" width="64" height="20" uuid="648d03b0-ee8a-4b2f-af9f-c33c4d01f40e"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Map;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -22,7 +21,6 @@ import org.zkoss.zul.Textbox;
|
|||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCheckin;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParadaCve;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
@ -37,7 +35,6 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
|||
private Datebox datFinal;
|
||||
private Intbox txtCorridaId;
|
||||
private Textbox txtBilheteiro;
|
||||
private Textbox txtVoucher;
|
||||
|
||||
private MyComboboxParada cmbParadaOrigem;
|
||||
private MyComboboxParadaCve cmbParadaOrigemCve;
|
||||
|
@ -68,10 +65,9 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
|||
String origen = cmbParadaOrigemCve.getSelectedItem() == null ? null
|
||||
: ((Parada) cmbParadaOrigemCve.getSelectedItem().getValue()).getDescparada();
|
||||
|
||||
if (origenId == null && txtCorridaId.getValue() == null && StringUtils.isBlank(txtBilheteiro.getValue())
|
||||
&& datInicial.getValue() == null && datFinal.getValue() == null && StringUtils.isBlank(txtVoucher.getValue())) {
|
||||
if (datInicial.getValue() == null && datFinal.getValue() == null) {
|
||||
|
||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||
Messagebox.show(Labels.getLabel("relatorioCheckinController.MSG.erroPeriodo"),
|
||||
Labels.getLabel("indexController.mniRelatorioCheckin.label"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
|
@ -82,7 +78,6 @@ public class RelatorioCheckinController extends MyGenericForwardComposer {
|
|||
parametros.put("NOME_BILHETEIRO", txtBilheteiro.getValue());
|
||||
parametros.put("DATA_INICIAL", datInicial.getValue());
|
||||
parametros.put("DATA_FINAL", datFinal.getValue());
|
||||
parametros.put("NUM_VOUCHER", txtVoucher.getValue());
|
||||
parametros.put("ORIGEN_ID", origenId);
|
||||
parametros.put("ORIGEN", origen);
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("indexController.mniRelatorioCheckin.label"));
|
||||
|
|
|
@ -4953,6 +4953,10 @@ relatorioOrigemDestinoController.chkBilhetesGratuitos.value = Considerar pasajes
|
|||
relatorioOrigemDestinoController.chkTrechoSemMovimento.value = Exibir tramos sin movimiento
|
||||
relatorioOrigemDestinoController.MSG.trechoSemMovimento = Para exibir tramos sin movimiento es necesário seleccionar cuales son las corridas deseadas
|
||||
|
||||
# Relatorio Checkin
|
||||
relatorioCheckinController.lbBilheteiro.label = Bilheteiro
|
||||
relatorioCheckinController.MSG.erroPeriodo = Los campos Fecha de inicio y Fecha de finalización deben ser completado
|
||||
|
||||
# Editar Conexion
|
||||
#busquedaConexionController.btnNovo.tooltiptext = Nuevo
|
||||
#busquedaConexionController.btnPesquisa.label = Búsqueda
|
||||
|
|
|
@ -5021,6 +5021,10 @@ relatorioOrigemDestinoController.chkBilhetesGratuitos.value = Considerar bilhete
|
|||
relatorioOrigemDestinoController.chkTrechoSemMovimento.value = Exibir trechos sem movimento
|
||||
relatorioOrigemDestinoController.MSG.trechoSemMovimento = Para exibir trechos sem movimento é necessário selecionar quais são os serviços desejados.
|
||||
|
||||
# Relatorio Checkin
|
||||
relatorioCheckinController.lbBilheteiro.label = Bilheteiro
|
||||
relatorioCheckinController.MSG.erroPeriodo = Os campos Data Inicial e Data Final devem ser preenchidos
|
||||
|
||||
# Editar Conexion
|
||||
#busquedaConexionController.btnNovo.tooltiptext = Novo
|
||||
#busquedaConexionController.btnPesquisa.label = Pesquisa
|
||||
|
|
|
@ -54,22 +54,15 @@
|
|||
value="${c:l('relatorioOrigemDestinoController.lbServico.value')}" />
|
||||
<intbox width="99%" id="txtCorridaId" />
|
||||
</row>
|
||||
|
||||
|
||||
|
||||
<row>
|
||||
<label id="lbBilheteiro" value="Bilheteiro" />
|
||||
<label id="lbBilheteiro"
|
||||
value="${c:l('relatorioCheckinController.lbBilheteiro.label')}" />
|
||||
<textbox id="txtBilheteiro" width="99%"
|
||||
maxlength="50"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
|
||||
<row>
|
||||
<label id="lbVoucher" value="Numero Voucher" />
|
||||
<textbox id="txtVoucher" width="99%" maxlength="50"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue