Relatório de Trecho Vendido Por Agência
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@29078 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
af462a8143
commit
6edd5b8391
10
.classpath
10
.classpath
|
@ -92,18 +92,18 @@
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-ooxml-3.8-20120326.jar"/>
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-ooxml-3.8-20120326.jar"/>
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-ooxml-schemas-3.8-20120326.jar"/>
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/poi-ooxml-schemas-3.8-20120326.jar"/>
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/xmlbeans-2.3.0.jar"/>
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/xmlbeans-2.3.0.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 6.0 Runtime">
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-5.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-fonts-5.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-javaflow-5.1.0.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 6.0 Runtime Server">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="owner.project.facets" value="jst.web"/>
|
<attribute name="owner.project.facets" value="jst.web"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6 - 32">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="owner.project.facets" value="java"/>
|
<attribute name="owner.project.facets" value="java"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-5.1.0.jar"/>
|
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-fonts-5.1.0.jar"/>
|
|
||||||
<classpathentry kind="lib" path="/LibreriasAdmVenta/jasperreports-javaflow-5.1.0.jar"/>
|
|
||||||
<classpathentry kind="output" path="build/classes"/>
|
<classpathentry kind="output" path="build/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<faceted-project>
|
<faceted-project>
|
||||||
<runtime name="JBoss 6.0 Runtime"/>
|
<runtime name="JBoss 6.0 Runtime Server"/>
|
||||||
<fixed facet="java"/>
|
<fixed facet="java"/>
|
||||||
<fixed facet="jst.web"/>
|
<fixed facet="jst.web"/>
|
||||||
<fixed facet="wst.jsdt.web"/>
|
<fixed facet="wst.jsdt.web"/>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
|
||||||
|
public class RelatorioTrechoVendido extends Relatorio {
|
||||||
|
|
||||||
|
public RelatorioTrechoVendido(Map<String, Object> parametros, Connection conexao) {
|
||||||
|
super(parametros, conexao);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processaParametros() throws Exception {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
#geral
|
||||||
|
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||||
|
msg.a=à
|
||||||
|
|
||||||
|
#Labels header
|
||||||
|
header.titulo.relatorio=Trecho Vendido Por Agência
|
||||||
|
header.periodo=Período:
|
||||||
|
header.data.hora=Data/Hora:
|
||||||
|
header.pagina=Página:
|
||||||
|
header.filtro.agencia=Filtros: Agência:
|
||||||
|
|
||||||
|
#Labels group
|
||||||
|
|
||||||
|
group.trecho=Trecho
|
||||||
|
group.horario=Horário
|
||||||
|
group.venda=Venda
|
||||||
|
group.poltronas.livres=P. Livre
|
||||||
|
group.total=Total
|
||||||
|
group.valor.total=Vr. Total
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,310 @@
|
||||||
|
<?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="RelatorioTrechoVendido" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="41ab2d20-dc50-4e37-b78d-20e600a984d4">
|
||||||
|
<property name="ireport.zoom" value="1.5"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<parameter name="DATA_INICIO" class="java.util.Date"/>
|
||||||
|
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||||
|
<parameter name="PUNTOVENTA_ID" class="java.lang.Integer"/>
|
||||||
|
<parameter name="NOMBEMPRESA" class="java.lang.String">
|
||||||
|
<parameterDescription><![CDATA[]]></parameterDescription>
|
||||||
|
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
|
||||||
|
</parameter>
|
||||||
|
<parameter name="NOW" class="java.util.Date"/>
|
||||||
|
<parameter name="NOMBEMPRESA_SEARCH" class="java.lang.String"/>
|
||||||
|
<queryString>
|
||||||
|
<![CDATA[SELECT
|
||||||
|
c.CORRIDA_ID AS CORRIDA_ID,
|
||||||
|
c.FECCORRIDA AS FECCORRIDA,
|
||||||
|
origem.DESCPARADA AS ORIGEM,
|
||||||
|
destino.DESCPARADA AS DESTINO,
|
||||||
|
cor.FECHORSALIDA AS FECHORSALIDA,
|
||||||
|
e.NOMBEMPRESA AS NOMBEMPRESA,
|
||||||
|
SUM (c.PRECIOPAGADO) AS SOMA,
|
||||||
|
COUNT(
|
||||||
|
CASE
|
||||||
|
WHEN c.PRECIOPAGADO = 0
|
||||||
|
OR c.PRECIOPAGADO IS NULL
|
||||||
|
THEN 1
|
||||||
|
ELSE NULL
|
||||||
|
END) AS LIVRE,
|
||||||
|
COUNT(
|
||||||
|
CASE
|
||||||
|
WHEN c.PRECIOPAGADO <> 0
|
||||||
|
THEN 1
|
||||||
|
ELSE NULL
|
||||||
|
END) AS VENDA
|
||||||
|
FROM
|
||||||
|
CAJA c
|
||||||
|
LEFT JOIN PARADA origem
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.ORIGEN_ID = origem.PARADA_ID
|
||||||
|
)
|
||||||
|
LEFT JOIN PARADA destino
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.DESTINO_ID = destino.PARADA_ID
|
||||||
|
)
|
||||||
|
LEFT JOIN CORRIDA cor
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
c.CORRIDA_ID = cor.CORRIDA_ID
|
||||||
|
AND c.FECCORRIDA = cor.FECCORRIDA
|
||||||
|
)
|
||||||
|
LEFT JOIN EMPRESA e
|
||||||
|
ON
|
||||||
|
(
|
||||||
|
e.EMPRESA_ID = c.EMPRESAPUNTOVENTA_ID
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
c.FECCORRIDA BETWEEN $P{DATA_INICIO} AND $P{DATA_FINAL}
|
||||||
|
AND c.PUNTOVENTA_ID = $P{PUNTOVENTA_ID}
|
||||||
|
AND e.NOMBEMPRESA LIKE $P{NOMBEMPRESA_SEARCH}
|
||||||
|
GROUP BY
|
||||||
|
c.CORRIDA_ID,
|
||||||
|
c.FECCORRIDA,
|
||||||
|
origem.DESCPARADA,
|
||||||
|
destino.DESCPARADA,
|
||||||
|
cor.FECHORSALIDA,
|
||||||
|
e.NOMBEMPRESA
|
||||||
|
ORDER BY
|
||||||
|
origem.DESCPARADA,
|
||||||
|
destino.DESCPARADA]]>
|
||||||
|
</queryString>
|
||||||
|
<field name="CORRIDA_ID" class="java.math.BigDecimal"/>
|
||||||
|
<field name="FECCORRIDA" class="java.sql.Timestamp"/>
|
||||||
|
<field name="ORIGEM" class="java.lang.String"/>
|
||||||
|
<field name="DESTINO" class="java.lang.String"/>
|
||||||
|
<field name="FECHORSALIDA" class="java.sql.Timestamp"/>
|
||||||
|
<field name="NOMBEMPRESA" class="java.lang.String"/>
|
||||||
|
<field name="SOMA" class="java.math.BigDecimal"/>
|
||||||
|
<field name="LIVRE" class="java.math.BigDecimal"/>
|
||||||
|
<field name="VENDA" class="java.math.BigDecimal"/>
|
||||||
|
<variable name="SOMA_TRECHO" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{SOMA}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="VENDA_1" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{VENDA}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="LIVRE_1" class="java.math.BigDecimal" resetType="Group" resetGroup="ORIGEM_DESTINO" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{LIVRE}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="TOTAL_V_L" class="java.math.BigDecimal" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[($V{VENDA_1}.add($V{LIVRE_1}))]]></variableExpression>
|
||||||
|
<initialValueExpression><![CDATA[BigDecimal.ZERO]]></initialValueExpression>
|
||||||
|
</variable>
|
||||||
|
<group name="ORIGEM_DESTINO">
|
||||||
|
<groupExpression><![CDATA[$F{ORIGEM} + $F{DESTINO}]]></groupExpression>
|
||||||
|
<groupHeader>
|
||||||
|
<band height="24">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="f69c0e2b-192d-4e29-89a2-cc946586e4fb" x="0" y="1" width="100" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{ORIGEM}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="998d3f53-5b81-431b-9b46-f06b3dc51ccc" x="153" y="2" width="128" height="19"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{DESTINO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e16f012b-fe60-44c1-a82d-a831a035b7b1" x="114" y="1" width="26" height="20"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.a}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="2722767b-42a9-43f4-8530-a3843acd50f5" x="0" y="20" width="551" height="1"/>
|
||||||
|
</line>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="86c9cbad-4985-468c-94b3-df769598cbfc" x="0" y="0" width="551" height="1"/>
|
||||||
|
</line>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="179fee07-d42f-496e-b230-845f93d8c8f0" x="499" y="2" width="52" height="18"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{SOMA_TRECHO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="a322f9ad-954c-465c-9b40-ac3cab4dc79b" x="344" y="2" width="18" height="18"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{VENDA_1}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="5d465455-d176-491c-85d6-32c9253ee154" x="400" y="0" width="15" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{LIVRE_1}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField evaluationTime="Group" evaluationGroup="ORIGEM_DESTINO">
|
||||||
|
<reportElement uuid="01f963e8-3bec-4337-b9a5-b268e1a542e1" x="454" y="2" width="16" height="18"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$V{LIVRE_1}.add( $V{VENDA_1} )]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band/>
|
||||||
|
</groupFooter>
|
||||||
|
</group>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band height="1" splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band height="81" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="ba15f24b-d005-454d-a657-77e4026eb86d" x="0" y="20" width="243" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.titulo.relatorio}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="51c70ea8-b2da-4205-987b-440e2fd92472" x="0" y="40" width="57" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.periodo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e937012b-ba35-4470-a65d-721239415cfb" x="0" y="60" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.filtro.agencia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="cb97e1df-8fd7-4be9-a133-3847faca4a55" x="0" y="0" width="243" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="12" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOMBEMPRESA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="82c899d6-0520-4713-87c1-9547f112e0a6" x="57" y="40" width="57" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{DATA_INICIO}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="96b616f7-e1b7-4d89-8f06-00a0cce0565a" x="85" y="60" width="15" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{PUNTOVENTA_ID}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0edcc027-d655-4f86-a3a4-7ef42dc76c79" x="114" y="40" width="13" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.a}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy">
|
||||||
|
<reportElement uuid="845264f4-fe59-4244-9ba3-a379ed2554af" x="127" y="40" width="62" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="55501b9a-fd9a-463d-ae0d-cb8c15a6139f" x="534" y="20" width="17" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="8d99edae-4a10-4091-bb1a-bc5fc4ef1b78" x="495" y="20" width="39" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.pagina}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0f57ef57-d7b2-414c-84e5-73b8936474e3" x="411" y="0" width="55" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy HH:mm">
|
||||||
|
<reportElement uuid="54dce584-fcac-4ea6-8c53-5fffbd0fc369" x="466" y="0" width="85" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{NOW}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band height="20" splitType="Stretch">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="27c1f448-0728-42af-a89b-84443846c281" x="0" y="0" width="281" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.trecho}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="d86c76ce-f705-45e7-8cdb-a11b626bcb83" x="281" y="0" width="53" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.horario}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="69a8660b-6a02-443a-bfd8-c04a1fdafe01" x="381" y="0" width="44" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.poltronas.livres}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="aa808a36-04ce-4f33-8cca-17782c004628" x="425" y="0" width="64" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="48b8257c-bf68-4b1e-9b6b-b51fecd0d6d0" x="499" y="0" width="52" height="20"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.valor.total}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="889f0cb9-8418-42b0-83b8-a30794a7541f" x="334" y="0" width="47" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$R{group.venda}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="07c2d42d-0861-42f7-bda2-8157b5120f87" x="0" y="0" width="555" height="1"/>
|
||||||
|
</line>
|
||||||
|
</band>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="22" splitType="Stretch">
|
||||||
|
<textField pattern="HH:mm">
|
||||||
|
<reportElement uuid="3875c823-7570-4b5b-aaf1-98d6d68d268c" x="281" y="0" width="53" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$F{FECHORSALIDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="b27e9c29-cf89-41db-a94b-799c969ef1e1" x="499" y="1" width="52" height="20"/>
|
||||||
|
<textElement textAlignment="Right"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{SOMA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="2b9b18b3-59d0-443c-9171-b5f43febb878" x="344" y="0" width="18" height="20"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{VENDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="5834225d-51b1-4929-b692-c9b61910587e" x="400" y="1" width="15" height="19"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{LIVRE}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="e9915cd8-dd51-4e7b-8115-200c0222e843" x="454" y="1" width="16" height="19"/>
|
||||||
|
<textElement textAlignment="Center"/>
|
||||||
|
<textFieldExpression><![CDATA[$F{VENDA}.add( $F{LIVRE} )]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
<noData>
|
||||||
|
<band height="23">
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="637f94f0-fe53-4a50-934e-58f2312a96a4" x="0" y="0" width="555" height="20"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</noData>
|
||||||
|
</jasperReport>
|
|
@ -0,0 +1,214 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
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;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zhtml.Messagebox;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Bandbox;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Datebox;
|
||||||
|
import org.zkoss.zul.Paging;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioTrechoVendido;
|
||||||
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPuntoVentaSimple;
|
||||||
|
import com.trg.search.Filter;
|
||||||
|
|
||||||
|
@Controller("relatorioTrechoVendidoController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class RelatorioTrechoVendidoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private static Logger log = Logger.getLogger(RelatorioTrechoVendidoController.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EmpresaService empresaService;
|
||||||
|
|
||||||
|
private ArrayList<String> lsNumPuntoVenta = new ArrayList<String>();
|
||||||
|
private ArrayList<String> lsNumEmpresa = new ArrayList<String>();
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
||||||
|
private MyListbox puntoVentaList;
|
||||||
|
private Paging pagingPuntoVenta;
|
||||||
|
private Bandbox bbPesquisaPuntoVenta;
|
||||||
|
private Textbox txtPalavraPesquisa;
|
||||||
|
private Datebox datInicial;
|
||||||
|
private Datebox datFinal;
|
||||||
|
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
|
private List<Empresa> lsEmpresa;
|
||||||
|
|
||||||
|
private void executarRelatorio() throws Exception {
|
||||||
|
|
||||||
|
if (lsNumPuntoVenta.size() > 0) {
|
||||||
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
parametros.put("DATA_INICIO", new java.sql.Date(((java.util.Date) this.datInicial.getValue()).getTime()));
|
||||||
|
parametros.put("DATA_FINAL", new java.sql.Date(((java.util.Date) this.datFinal.getValue()).getTime()));
|
||||||
|
|
||||||
|
if (lsNumPuntoVenta.size() > 0) {
|
||||||
|
Integer puntuVentaId = null;
|
||||||
|
try {
|
||||||
|
puntuVentaId = Integer.parseInt(lsNumPuntoVenta.iterator().next());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getStackTrace());
|
||||||
|
}
|
||||||
|
parametros.put("PUNTOVENTA_ID", puntuVentaId);
|
||||||
|
}
|
||||||
|
|
||||||
|
String empresa = "";
|
||||||
|
try {
|
||||||
|
empresa = cmbEmpresa.getValue();
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getStackTrace());
|
||||||
|
}
|
||||||
|
parametros.put("NOMBEMPRESA", empresa);
|
||||||
|
|
||||||
|
String empresaSearch = "";
|
||||||
|
if (!empresa.equals(null)) {
|
||||||
|
empresaSearch = "%" + empresa + "%";
|
||||||
|
} else {
|
||||||
|
empresaSearch = "%%";
|
||||||
|
}
|
||||||
|
parametros.put("NOMBEMPRESA_SEARCH", empresaSearch);
|
||||||
|
|
||||||
|
Date now = new Date();
|
||||||
|
parametros.put("NOW", now);
|
||||||
|
|
||||||
|
Relatorio relatorio = new RelatorioTrechoVendido(parametros, dataSource.getConnection());
|
||||||
|
|
||||||
|
Map args = new HashMap();
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
|
||||||
|
openWindow("/component/reportView.zul",
|
||||||
|
Labels.getLabel("relatorioTrechoVendidoController.window.title"), args, MODAL);
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("relatorioTrechoVendidoController.no.agencia"),
|
||||||
|
Labels.getLabel("relatorioTrechoVendidoController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSelect$puntoVentaList(Event ev) {
|
||||||
|
|
||||||
|
String strListPuntoVenta = new String();
|
||||||
|
ArrayList<Object> lsSelecionados = (ArrayList<Object>) puntoVentaList.getSelectedsItens();
|
||||||
|
|
||||||
|
lsNumPuntoVenta.clear();
|
||||||
|
for (Object objPuntoVenta : lsSelecionados) {
|
||||||
|
strListPuntoVenta = ((PuntoVenta) objPuntoVenta).getNombpuntoventa() + " " + strListPuntoVenta;
|
||||||
|
lsNumPuntoVenta.add(((PuntoVenta) objPuntoVenta).getPuntoventaId().toString());
|
||||||
|
}
|
||||||
|
this.bbPesquisaPuntoVenta.setValue(strListPuntoVenta);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnLimpar(Event ev) {
|
||||||
|
limparPesquisaAgencia();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisa(Event ev) {
|
||||||
|
executarPesquisa();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
|
executarRelatorio();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void limparPesquisaAgencia() {
|
||||||
|
puntoVentaList.clearSelection();
|
||||||
|
|
||||||
|
lsNumPuntoVenta.clear();
|
||||||
|
this.bbPesquisaPuntoVenta.setValue("");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void executarPesquisa() {
|
||||||
|
HibernateSearchObject<PuntoVenta> puntoVentaBusqueda =
|
||||||
|
new HibernateSearchObject<PuntoVenta>(PuntoVenta.class,
|
||||||
|
pagingPuntoVenta.getPageSize());
|
||||||
|
|
||||||
|
puntoVentaBusqueda.addFilterOr(Filter.like("nombpuntoventa", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")), Filter.like("numPuntoVenta", "%" + txtPalavraPesquisa.getText().trim().toUpperCase().concat("%")));
|
||||||
|
|
||||||
|
puntoVentaBusqueda.addSortAsc("nombpuntoventa");
|
||||||
|
|
||||||
|
puntoVentaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
|
plwPuntoVenta.init(puntoVentaBusqueda, puntoVentaList, pagingPuntoVenta);
|
||||||
|
|
||||||
|
if (puntoVentaList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("relatorioTrechoVendidoController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
puntoVentaList.setItemRenderer(new RenderPuntoVentaSimple());
|
||||||
|
lsEmpresa = empresaService.obtenerTodos();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataSource getDataSource() {
|
||||||
|
return dataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataSource(DataSource dataSource) {
|
||||||
|
this.dataSource = dataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getLsNumPuntoVenta() {
|
||||||
|
return lsNumPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsNumPuntoVenta(ArrayList<String> lsNumPuntoVenta) {
|
||||||
|
this.lsNumPuntoVenta = lsNumPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<String> getLsNumEmpresa() {
|
||||||
|
return lsNumEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsNumEmpresa(ArrayList<String> lsNumEmpresa) {
|
||||||
|
this.lsNumEmpresa = lsNumEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresa() {
|
||||||
|
return lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||||
|
this.lsEmpresa = lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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 ItemMenuRelatorioTrechoVendido extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuRelatorioTrechoVendido() {
|
||||||
|
super("indexController.mniRelatorioTrechoVendido.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOTRECHOVENDIDO";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioTrechoVedido.zul",
|
||||||
|
Labels.getLabel("relatorioTrechoVendidoController.window.title"), null, desktop);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -214,6 +214,7 @@ indexController.mniRelatorios.label = Relatórios
|
||||||
indexController.mniRelatorioAproveitamento.label = Relatório de Aproveitamento
|
indexController.mniRelatorioAproveitamento.label = Relatório de Aproveitamento
|
||||||
indexController.mniRelatorioReceitaDiariaAgencia.label = Relatório de Receita Diária por Agência
|
indexController.mniRelatorioReceitaDiariaAgencia.label = Relatório de Receita Diária por Agência
|
||||||
indexController.mniRelatorioLinhaOperacional.label = Relatório de Linha Operacional
|
indexController.mniRelatorioLinhaOperacional.label = Relatório de Linha Operacional
|
||||||
|
indexController.mniRelatorioTrechoVendido.label = Relatório de Trecho Vendido Por Agência
|
||||||
|
|
||||||
#PARTE REALIZADA POR MANUEL
|
#PARTE REALIZADA POR MANUEL
|
||||||
indexController.mnCortesias.label = Cortesias Para Funcionários
|
indexController.mnCortesias.label = Cortesias Para Funcionários
|
||||||
|
@ -254,6 +255,15 @@ relatorioAproveitamentoController.HoraServico.label = Hora Serviço
|
||||||
relatorioAproveitamentoController.Classe.label = Classe
|
relatorioAproveitamentoController.Classe.label = Classe
|
||||||
relatorioAproveitamentoController.btnBuscarServico.label = Buscar Serviço
|
relatorioAproveitamentoController.btnBuscarServico.label = Buscar Serviço
|
||||||
|
|
||||||
|
#Relatorio Trecho Vendido
|
||||||
|
relatorioTrechoVendidoController.lbDataIni.value = Data Inicial
|
||||||
|
relatorioTrechoVendidoController.lbDataFin.value = Data Final
|
||||||
|
relatorioTrechoVendidoController.lbPuntoVenta.value = Agência
|
||||||
|
relatorioTrechoVendidoController.btnPesquisa.label = Pesquisar
|
||||||
|
relatorioTrechoVendidoController.btnLimpar.label = Limpar Seleção
|
||||||
|
relatorioTrechoVendidoController.lbEmpresa.label = Empresa
|
||||||
|
relatorioTrechoVendidoController.window.title = Relatório de Trecho Vendido Por Agência
|
||||||
|
relatorioTrechoVendidoController.no.agencia = Selecione uma agência
|
||||||
|
|
||||||
#Receita Diária por Agência
|
#Receita Diária por Agência
|
||||||
relatorioReceitaDiariaAgenciaController.window.title = Relatório de Receita Diária por Agência
|
relatorioReceitaDiariaAgenciaController.window.title = Relatório de Receita Diária por Agência
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioTrechoVendido"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winFiltroRelatorioTrechoVendido"
|
||||||
|
apply="${relatorioTrechoVendidoController}"
|
||||||
|
contentStyle="overflow:auto" height="133px" width="550px"
|
||||||
|
border="normal">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="30%" />
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="30%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioTrechoVendidoController.lbDataIni.value')}" />
|
||||||
|
<datebox id="datInicial" width="90%"
|
||||||
|
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||||
|
maxlength="10" />
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioTrechoVendidoController.lbDataFin.value')}" />
|
||||||
|
<datebox id="datFinal" width="90%"
|
||||||
|
format="dd/MM/yyyy" lenient="false" constraint="no empty"
|
||||||
|
maxlength="10" />
|
||||||
|
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioTrechoVendidoController.lbPuntoVenta.value')}" />
|
||||||
|
<bandbox id="bbPesquisaPuntoVenta" width="90%"
|
||||||
|
mold="rounded" readonly="true">
|
||||||
|
<bandpopup>
|
||||||
|
<vbox>
|
||||||
|
<hbox>
|
||||||
|
<textbox id="txtPalavraPesquisa" />
|
||||||
|
<button id="btnPesquisa"
|
||||||
|
image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorioTrechoVendidoController.btnPesquisa.label')}" />
|
||||||
|
<button id="btnLimpar"
|
||||||
|
image="/gui/img/eraser.png"
|
||||||
|
label="${c:l('relatorioTrechoVendidoController.btnLimpar.label')}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<listbox checkmark="true"
|
||||||
|
multiple="false" id="puntoVentaList" mold="paging"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
vflex="true" height="60%" width="360px">
|
||||||
|
<listhead>
|
||||||
|
<listheader label="Código" />
|
||||||
|
<listheader label="Nome" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingPuntoVenta"
|
||||||
|
pageSize="10" />
|
||||||
|
</vbox>
|
||||||
|
</bandpopup>
|
||||||
|
</bandbox>
|
||||||
|
|
||||||
|
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioTrechoVendidoController.lbEmpresa.label')}" />
|
||||||
|
<combobox id="cmbEmpresa"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winFiltroRelatorioTrechoVendido$composer.lsEmpresa}" />
|
||||||
|
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
|
||||||
|
</grid>
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||||
|
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
</window>
|
||||||
|
</zk>
|
Loading…
Reference in New Issue