git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@29503 d1611594-4594-4d17-8e1d-87c2c4800839
parent
e25d2d6ec6
commit
083ec07dcd
|
@ -33,57 +33,106 @@ public class RelatorioLinhaOperacional extends Relatorio {
|
||||||
|
|
||||||
EnumEspecie especie = (EnumEspecie) parametros.get("ESPECIE");
|
EnumEspecie especie = (EnumEspecie) parametros.get("ESPECIE");
|
||||||
String dataDe = (String) parametros.get("DATA_DE");
|
String dataDe = (String) parametros.get("DATA_DE");
|
||||||
|
dataDe = dataDe + " 00:00:00";
|
||||||
String dataAte = (String) parametros.get("DATA_ATE");
|
String dataAte = (String) parametros.get("DATA_ATE");
|
||||||
|
dataAte = dataAte + " 23:59:59";
|
||||||
|
|
||||||
String linhasIds = (String) parametros.get("LINHAS");
|
String linhasIds = (String) parametros.get("LINHAS");
|
||||||
String empresaId = (String) parametros.get("EMPRESA_IDS");
|
String empresaId = (String) parametros.get("EMPRESA_IDS");
|
||||||
|
|
||||||
String sql = getSql(especie, dataDe, dataAte, linhasIds, empresaId);
|
Boolean agruparPorDia = (Boolean) parametros.get("agruparPorDia");
|
||||||
|
Boolean agruparPorMes = (Boolean) parametros.get("agruparPorMes");
|
||||||
|
Boolean agruparPorAno = (Boolean) parametros.get("agruparPorAno");
|
||||||
|
|
||||||
|
Boolean desconsiderarBilhetesDevolvidos = (Boolean) parametros.get("desconsiderarBilhetesDevolvidos");
|
||||||
|
|
||||||
|
String sql = getSql(especie, dataDe, dataAte, linhasIds, empresaId, agruparPorDia, agruparPorMes, agruparPorAno, desconsiderarBilhetesDevolvidos);
|
||||||
parametros.put("SQL", sql);
|
parametros.put("SQL", sql);
|
||||||
parametros.put("STR_ESPECIE", especie.toString());
|
parametros.put("STR_ESPECIE", especie.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSql(EnumEspecie especie, String dataDe, String dataAte, String linhasIds, String empresaId) {
|
private String getSql(EnumEspecie especie, String dataDe, String dataAte, String linhasIds,
|
||||||
|
String empresaId, Boolean agruparPorDia, Boolean agruparPorMes, Boolean agruparPorAno,
|
||||||
|
Boolean desconsiderarBilhetesDevolvidos) {
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
|
|
||||||
sql.append(" SELECT c.feccorrida data_corrida, ");
|
sql.append(" SELECT ");
|
||||||
sql.append(" c.fechorsalida hora_saida, ");
|
sql.append(" ca.fechorventa data_venda, ");
|
||||||
sql.append(" r.descruta linha, ");
|
sql.append(" c.corrida_id corrida_id, ");
|
||||||
sql.append(" o.descparada origem, ");
|
sql.append(" c.feccorrida data_corrida, ");
|
||||||
sql.append(" d.descparada destino, ");
|
sql.append(" r.NUMRUTA codigo, ");
|
||||||
sql.append(" e.empresa_id empresaId, ");
|
sql.append(" r.PREFIXO prefixo, ");
|
||||||
sql.append(" e.nombempresa empresa, ");
|
sql.append(" c.fechorsalida hora_saida, ");
|
||||||
sql.append(" Count(*) qtde_boletos ");
|
sql.append(" r.descruta linha, ");
|
||||||
|
sql.append(" o.descparada origem, ");
|
||||||
|
sql.append(" d.descparada destino, ");
|
||||||
|
sql.append(" e.empresa_id empresaId, ");
|
||||||
|
sql.append(" e.nombempresa empresa, ");
|
||||||
|
sql.append(" COUNT(*) qtde_boletos ");
|
||||||
|
|
||||||
switch (especie) {
|
switch (especie) {
|
||||||
case BILHETE:
|
case BILHETE:
|
||||||
sql.append(" FROM caja ca ");
|
sql.append(" FROM ");
|
||||||
sql.append(" INNER JOIN corrida c ON ( c.corrida_id = ca.corrida_id AND c.feccorrida = ca.feccorrida ) ");
|
sql.append(" ( SELECT ");
|
||||||
sql.append(" INNER JOIN empresa e ON e.empresa_id = c.empresacorrida_id ");
|
sql.append(" corrida_id, ");
|
||||||
sql.append(" INNER JOIN ruta r ON r.ruta_id = c.ruta_id ");
|
sql.append(" origen_id, ");
|
||||||
sql.append(" INNER JOIN parada o ON o.parada_id = ca.origen_id ");
|
sql.append(" destino_id, ");
|
||||||
sql.append(" INNER JOIN parada d ON d.parada_id = ca.destino_id ");
|
sql.append(" feccorrida, ");
|
||||||
sql.append(" WHERE ca.fechorventa BETWEEN To_date('").append(dataDe).append("', 'dd/mm/yyyy') ");
|
sql.append(" empresacorrida_id, ");
|
||||||
sql.append(" AND To_date('").append(dataAte).append("', 'dd/mm/yyyy') ");
|
sql.append(" MOTIVOCANCELACION_ID, ");
|
||||||
sql.append(" AND c.ruta_id IN (").append(linhasIds).append(") ");
|
if (agruparPorDia) {
|
||||||
sql.append(" AND ca.empresacorrida_id IN (").append(empresaId).append(") ");
|
sql.append(" TO_CHAR(fechorventa, 'dd/MM/yyyy') fechorventa ");
|
||||||
|
} else if (agruparPorMes) {
|
||||||
|
sql.append(" TO_CHAR(fechorventa, 'MM/yyyy') fechorventa ");
|
||||||
|
} else if (agruparPorAno) {
|
||||||
|
sql.append(" TO_CHAR(fechorventa, 'yyyy') fechorventa ");
|
||||||
|
}
|
||||||
|
sql.append(" FROM caja ");
|
||||||
|
sql.append(" WHERE fechorventa BETWEEN To_date('").append(dataDe).append("', 'dd/mm/yyyy HH24:mi:ss') ");
|
||||||
|
sql.append(" AND To_date('").append(dataAte).append("', 'dd/mm/yyyy HH24:mi:ss') ");
|
||||||
|
sql.append(" AND empresacorrida_id IN (").append(empresaId).append(") ");
|
||||||
|
sql.append(" )ca ");
|
||||||
|
sql.append(" INNER JOIN corrida c ON (c.corrida_id = ca.corrida_id AND c.feccorrida = ca.feccorrida) ");
|
||||||
|
sql.append(" INNER JOIN empresa e ON e.empresa_id = c.empresacorrida_id ");
|
||||||
|
sql.append(" INNER JOIN ruta r ON r.ruta_id = c.ruta_id ");
|
||||||
|
sql.append(" INNER JOIN parada o ON o.parada_id = ca.origen_id ");
|
||||||
|
sql.append(" INNER JOIN parada d ON d.parada_id = ca.destino_id ");
|
||||||
break;
|
break;
|
||||||
case EXCESSO_BAGAGEM:
|
case EXCESSO_BAGAGEM:
|
||||||
sql.append(" FROM caja_diversos ca ");
|
sql.append(" FROM ");
|
||||||
|
sql.append(" ( SELECT ");
|
||||||
|
sql.append(" eventoextra_id, ");
|
||||||
|
sql.append(" MOTIVOCANCELACION_ID, ");
|
||||||
|
if (agruparPorDia) {
|
||||||
|
sql.append(" TO_CHAR(FECHORVTA, 'dd/MM/yyyy') fechorventa ");
|
||||||
|
} else if (agruparPorMes) {
|
||||||
|
sql.append(" TO_CHAR(FECHORVTA, 'MM/yyyy') fechorventa ");
|
||||||
|
} else if (agruparPorAno) {
|
||||||
|
sql.append(" TO_CHAR(FECHORVTA, 'yyyy') fechorventa ");
|
||||||
|
}
|
||||||
|
sql.append(" FROM caja_diversos ");
|
||||||
|
sql.append(" WHERE FECHORVTA BETWEEN To_date('").append(dataDe).append("', 'dd/mm/yyyy HH24:mi:ss') ");
|
||||||
|
sql.append(" AND To_date('").append(dataAte).append("', 'dd/mm/yyyy HH24:mi:ss') ");
|
||||||
|
sql.append(" )ca ");
|
||||||
sql.append(" INNER JOIN evento_extra ex ON ex.eventoextra_id = ca.eventoextra_id ");
|
sql.append(" INNER JOIN evento_extra ex ON ex.eventoextra_id = ca.eventoextra_id ");
|
||||||
sql.append(" INNER JOIN corrida c ON ( c.corrida_id = ex.corrida_id AND c.feccorrida = ex.feccorrida ) ");
|
sql.append(" INNER JOIN corrida c ON ( c.corrida_id = ex.corrida_id AND c.feccorrida = ex.feccorrida ) ");
|
||||||
sql.append(" INNER JOIN empresa e ON e.empresa_id = c.empresacorrida_id ");
|
sql.append(" INNER JOIN empresa e ON e.empresa_id = c.empresacorrida_id ");
|
||||||
sql.append(" INNER JOIN ruta r ON r.ruta_id = c.ruta_id ");
|
sql.append(" INNER JOIN ruta r ON r.ruta_id = c.ruta_id ");
|
||||||
sql.append(" INNER JOIN parada o ON o.parada_id = c.origen_id ");
|
sql.append(" INNER JOIN parada o ON o.parada_id = c.origen_id ");
|
||||||
sql.append(" INNER JOIN parada d ON d.parada_id = c.destino_id ");
|
sql.append(" INNER JOIN parada d ON d.parada_id = c.destino_id ");
|
||||||
sql.append(" WHERE ca.fechorvta BETWEEN To_date('").append(dataDe).append("', 'dd/mm/yyyy') ");
|
|
||||||
sql.append(" AND To_date('").append(dataAte).append("', 'dd/mm/yyyy') ");
|
|
||||||
sql.append(" AND c.ruta_id IN (").append(linhasIds).append(") ");
|
|
||||||
sql.append(" AND ex.empresa_id IN (").append(empresaId).append(") ");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sql.append(" GROUP BY c.feccorrida, c.fechorsalida, r.descruta, o.descparada, d.descparada, e.empresa_id, e.nombempresa ");
|
sql.append(" WHERE 1 = 1 ");
|
||||||
sql.append(" ORDER BY c.feccorrida, e.nombempresa ASC ");
|
if (!linhasIds.equals("0")) {
|
||||||
|
sql.append(" AND c.ruta_id IN (").append(linhasIds).append(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (desconsiderarBilhetesDevolvidos) {
|
||||||
|
sql.append(" AND ca.MOTIVOCANCELACION_ID IS NULL ");
|
||||||
|
}
|
||||||
|
sql.append("GROUP BY ca.fechorventa, c.corrida_id, c.feccorrida, r.NUMRUTA, r.PREFIXO, c.fechorsalida, r.descruta, o.descparada, d.descparada, e.empresa_id, e.nombempresa ");
|
||||||
|
sql.append("ORDER BY ca.fechorventa, e.nombempresa ASC ");
|
||||||
|
|
||||||
return sql.toString();
|
return sql.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,7 @@ public class RenderRelatorioJasper {
|
||||||
String diretorio = "/com/rjconsultores/ventaboletos/relatorios/templates/" + this.relatorio.getNome() + ".jasper";
|
String diretorio = "/com/rjconsultores/ventaboletos/relatorios/templates/" + this.relatorio.getNome() + ".jasper";
|
||||||
InputStream iStemplate = this.getClass().getResourceAsStream(diretorio);
|
InputStream iStemplate = this.getClass().getResourceAsStream(diretorio);
|
||||||
|
|
||||||
if (iStemplate == null)
|
if (iStemplate == null) {
|
||||||
{
|
|
||||||
throw new Exception("Não foi possivel localizar o template do relátorio no diretorio a seguir: " + diretorio);
|
throw new Exception("Não foi possivel localizar o template do relátorio no diretorio a seguir: " + diretorio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,17 +114,17 @@ public class RenderRelatorioJasper {
|
||||||
|
|
||||||
protected byte[] renderXls() throws Exception {
|
protected byte[] renderXls() throws Exception {
|
||||||
|
|
||||||
JExcelApiExporter exporterXLS = new JExcelApiExporter();
|
JExcelApiExporter exporterXLS = new JExcelApiExporter();
|
||||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.JASPER_PRINT, this.jasperPrint);
|
exporterXLS.setParameter(JExcelApiExporterParameter.JASPER_PRINT, this.jasperPrint);
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.OUTPUT_STREAM, output);
|
exporterXLS.setParameter(JExcelApiExporterParameter.OUTPUT_STREAM, output);
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
|
exporterXLS.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
|
exporterXLS.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
|
exporterXLS.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
|
||||||
exporterXLS.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
|
exporterXLS.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
|
||||||
|
|
||||||
//collapseRowSpan
|
// collapseRowSpan
|
||||||
//JRXlsExporterParameter.
|
// JRXlsExporterParameter.
|
||||||
exporterXLS.exportReport();
|
exporterXLS.exportReport();
|
||||||
return output.toByteArray();
|
return output.toByteArray();
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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="RelatorioLinhaOperacional" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="05f861f2-e7cd-40e1-9ba0-8f8cd2c3c35c">
|
<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="RelatorioLinhaOperacional" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="05f861f2-e7cd-40e1-9ba0-8f8cd2c3c35c">
|
||||||
<property name="ireport.zoom" value="1.0"/>
|
<property name="ireport.zoom" value="3.0"/>
|
||||||
<property name="ireport.x" value="0"/>
|
<property name="ireport.x" value="1126"/>
|
||||||
<property name="ireport.y" value="0"/>
|
<property name="ireport.y" value="223"/>
|
||||||
<parameter name="DATA_DE" class="java.lang.String" isForPrompting="false"/>
|
<parameter name="DATA_DE" class="java.lang.String" isForPrompting="false"/>
|
||||||
<parameter name="DATA_ATE" class="java.lang.String" isForPrompting="false"/>
|
<parameter name="DATA_ATE" class="java.lang.String" isForPrompting="false"/>
|
||||||
<parameter name="LINHAS" class="java.lang.String" isForPrompting="false"/>
|
<parameter name="LINHAS" class="java.lang.String" isForPrompting="false"/>
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
<parameter name="EMPRESA_IDS" class="java.lang.String" isForPrompting="false"/>
|
<parameter name="EMPRESA_IDS" class="java.lang.String" isForPrompting="false"/>
|
||||||
<parameter name="SQL" class="java.lang.String"/>
|
<parameter name="SQL" class="java.lang.String"/>
|
||||||
<parameter name="STR_ESPECIE" class="java.lang.String"/>
|
<parameter name="STR_ESPECIE" class="java.lang.String"/>
|
||||||
|
<parameter name="DESC_LINHAS_SELECIONADAS" class="java.lang.String"/>
|
||||||
<queryString>
|
<queryString>
|
||||||
<![CDATA[$P!{SQL}]]>
|
<![CDATA[$P!{SQL}]]>
|
||||||
</queryString>
|
</queryString>
|
||||||
|
@ -21,7 +22,14 @@
|
||||||
<field name="EMPRESAID" class="java.math.BigDecimal"/>
|
<field name="EMPRESAID" class="java.math.BigDecimal"/>
|
||||||
<field name="EMPRESA" class="java.lang.String"/>
|
<field name="EMPRESA" class="java.lang.String"/>
|
||||||
<field name="QTDE_BOLETOS" class="java.math.BigDecimal"/>
|
<field name="QTDE_BOLETOS" class="java.math.BigDecimal"/>
|
||||||
<variable name="QTDE_BOLETOS_1" class="java.math.BigDecimal" resetType="Group" resetGroup="feccorrida" calculation="Sum">
|
<field name="codigo" class="java.lang.String"/>
|
||||||
|
<field name="prefixo" class="java.lang.String"/>
|
||||||
|
<field name="data_venda" class="java.lang.String"/>
|
||||||
|
<field name="corrida_id" class="java.lang.String"/>
|
||||||
|
<variable name="QTDE_BOLETOS_2" class="java.math.BigDecimal" resetType="Group" resetGroup="empresa" calculation="Sum">
|
||||||
|
<variableExpression><![CDATA[$F{QTDE_BOLETOS}]]></variableExpression>
|
||||||
|
</variable>
|
||||||
|
<variable name="QTDE_BOLETOS_1" class="java.math.BigDecimal" resetType="Group" resetGroup="data_venda" calculation="Sum">
|
||||||
<variableExpression><![CDATA[$F{QTDE_BOLETOS}]]></variableExpression>
|
<variableExpression><![CDATA[$F{QTDE_BOLETOS}]]></variableExpression>
|
||||||
</variable>
|
</variable>
|
||||||
<group name="empresa">
|
<group name="empresa">
|
||||||
|
@ -29,80 +37,123 @@
|
||||||
<groupHeader>
|
<groupHeader>
|
||||||
<band/>
|
<band/>
|
||||||
</groupHeader>
|
</groupHeader>
|
||||||
|
<groupFooter>
|
||||||
|
<band/>
|
||||||
|
</groupFooter>
|
||||||
</group>
|
</group>
|
||||||
<group name="feccorrida">
|
<group name="data_venda">
|
||||||
<groupExpression><![CDATA[$F{DATA_CORRIDA}]]></groupExpression>
|
<groupExpression><![CDATA[$F{data_venda}]]></groupExpression>
|
||||||
<groupHeader>
|
<groupHeader>
|
||||||
<band height="50">
|
<band height="44">
|
||||||
<line>
|
|
||||||
<reportElement uuid="b17d89e0-6b0b-4905-a5d7-8f5efaeba8b7" x="0" y="49" width="555" height="1"/>
|
|
||||||
</line>
|
|
||||||
<staticText>
|
|
||||||
<reportElement uuid="ec08843f-04de-4891-abc8-14f015abf4e4" x="0" y="29" width="57" height="20"/>
|
|
||||||
<textElement>
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<text><![CDATA[Hora]]></text>
|
|
||||||
</staticText>
|
|
||||||
<staticText>
|
|
||||||
<reportElement uuid="23d10c6d-a185-407c-bd32-43d5c0fbd4dd" x="57" y="29" width="180" height="20"/>
|
|
||||||
<textElement>
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<text><![CDATA[Linha]]></text>
|
|
||||||
</staticText>
|
|
||||||
<staticText>
|
|
||||||
<reportElement uuid="00b58cf4-caaa-4721-b08a-2303e6cf5cab" x="237" y="29" width="134" height="20"/>
|
|
||||||
<textElement>
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<text><![CDATA[Origem]]></text>
|
|
||||||
</staticText>
|
|
||||||
<staticText>
|
|
||||||
<reportElement uuid="65b42a56-42d8-427c-8dd4-5767b3124ad9" x="371" y="29" width="134" height="20"/>
|
|
||||||
<textElement>
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<text><![CDATA[Destino]]></text>
|
|
||||||
</staticText>
|
|
||||||
<staticText>
|
|
||||||
<reportElement uuid="cfa49b76-7a66-481c-b436-ce89f9f95be4" x="507" y="29" width="48" height="20"/>
|
|
||||||
<textElement textAlignment="Right">
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<text><![CDATA[Qtde.]]></text>
|
|
||||||
</staticText>
|
|
||||||
<textField pattern="dd/MM/yyyy">
|
<textField pattern="dd/MM/yyyy">
|
||||||
<reportElement uuid="fd966f7d-df9e-41fe-b776-0c26dd329997" x="0" y="9" width="68" height="20"/>
|
<reportElement uuid="40522537-b07f-4001-9b55-7c2ad1b78ee3" x="0" y="1" width="68" height="20"/>
|
||||||
<textElement>
|
<textElement/>
|
||||||
<font isBold="true"/>
|
<textFieldExpression><![CDATA[$F{data_venda}]]></textFieldExpression>
|
||||||
</textElement>
|
|
||||||
<textFieldExpression><![CDATA[$F{DATA_CORRIDA}]]></textFieldExpression>
|
|
||||||
</textField>
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="5f3a69a7-463d-48ea-99af-f5446c6afd9e" x="155" y="21" width="38" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Prefixo]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="27eb2510-ecb8-4c95-b976-10c318e20fd5" x="120" y="21" width="35" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Código]]></text>
|
||||||
|
</staticText>
|
||||||
|
<line>
|
||||||
|
<reportElement uuid="47efb762-6148-45fa-892c-67687d0e52a9" x="0" y="0" width="555" height="1"/>
|
||||||
|
</line>
|
||||||
<textField>
|
<textField>
|
||||||
<reportElement uuid="67b08836-be8c-4e19-a2c8-a75624670dc7" x="68" y="9" width="100" height="20"/>
|
<reportElement uuid="67b08836-be8c-4e19-a2c8-a75624670dc7" x="68" y="1" width="100" height="20"/>
|
||||||
<textElement>
|
<textElement>
|
||||||
<font isBold="true"/>
|
<font isBold="true"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{EMPRESA}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{EMPRESA}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="cfa49b76-7a66-481c-b436-ce89f9f95be4" x="535" y="21" width="19" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Qtde.]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="65b42a56-42d8-427c-8dd4-5767b3124ad9" x="415" y="21" width="80" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Destino]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="00b58cf4-caaa-4721-b08a-2303e6cf5cab" x="336" y="21" width="79" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Origem]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="23d10c6d-a185-407c-bd32-43d5c0fbd4dd" x="193" y="21" width="143" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Linha]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="ec08843f-04de-4891-abc8-14f015abf4e4" x="93" y="21" width="27" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[ Hora]]></text>
|
||||||
|
</staticText>
|
||||||
<line>
|
<line>
|
||||||
<reportElement uuid="47efb762-6148-45fa-892c-67687d0e52a9" x="0" y="8" width="555" height="1"/>
|
<reportElement uuid="b17d89e0-6b0b-4905-a5d7-8f5efaeba8b7" x="0" y="41" width="555" height="1"/>
|
||||||
</line>
|
</line>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="b262d6ff-a3bc-4979-bad8-d1bdd50cdc26" x="0" y="21" width="50" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Data]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="68fc8cc7-0228-48f5-b332-64aa4b34c560" x="50" y="21" width="43" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Serviço]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="7b26d4c7-6ad3-43b2-bfd5-91b430f7ed92" x="495" y="21" width="22" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Mes]]></text>
|
||||||
|
</staticText>
|
||||||
|
<staticText>
|
||||||
|
<reportElement uuid="a639e1eb-67ee-4b2f-a190-1e6ac33c28ff" x="517" y="21" width="18" height="20"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="9" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<text><![CDATA[Ano]]></text>
|
||||||
|
</staticText>
|
||||||
</band>
|
</band>
|
||||||
</groupHeader>
|
</groupHeader>
|
||||||
<groupFooter>
|
<groupFooter>
|
||||||
<band height="22">
|
<band height="23">
|
||||||
<textField>
|
|
||||||
<reportElement uuid="07e8d335-9e16-476b-b170-5f19ac2b140b" x="371" y="0" width="184" height="20"/>
|
|
||||||
<textElement textAlignment="Right">
|
|
||||||
<font size="11" isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<textFieldExpression><![CDATA["Total do dia " + $V{QTDE_BOLETOS_1}]]></textFieldExpression>
|
|
||||||
</textField>
|
|
||||||
<line>
|
<line>
|
||||||
<reportElement uuid="5942b8cb-4274-4ff4-be5c-ded9128456a4" positionType="Float" x="0" y="0" width="555" height="1"/>
|
<reportElement uuid="5942b8cb-4274-4ff4-be5c-ded9128456a4" positionType="Float" x="0" y="0" width="555" height="1"/>
|
||||||
</line>
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="0b71b96c-b8dd-4f9f-b074-96362b21684e" x="420" y="0" width="135" height="20"/>
|
||||||
|
<textElement textAlignment="Right">
|
||||||
|
<font size="11" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA["Total " + $V{QTDE_BOLETOS_1}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
</groupFooter>
|
</groupFooter>
|
||||||
</group>
|
</group>
|
||||||
|
@ -139,13 +190,6 @@
|
||||||
</textElement>
|
</textElement>
|
||||||
<text><![CDATA[Linha(s):]]></text>
|
<text><![CDATA[Linha(s):]]></text>
|
||||||
</staticText>
|
</staticText>
|
||||||
<textField>
|
|
||||||
<reportElement uuid="69376e05-cb11-4073-8230-e2fdf8d12d1f" x="46" y="51" width="509" height="20" isPrintWhenDetailOverflows="true"/>
|
|
||||||
<textElement>
|
|
||||||
<font isBold="true"/>
|
|
||||||
</textElement>
|
|
||||||
<textFieldExpression><![CDATA[$P{LINHAS}]]></textFieldExpression>
|
|
||||||
</textField>
|
|
||||||
<staticText>
|
<staticText>
|
||||||
<reportElement uuid="bb6eb592-643e-4bce-8a2c-4b7f09848727" positionType="Float" x="0" y="71" width="46" height="20"/>
|
<reportElement uuid="bb6eb592-643e-4bce-8a2c-4b7f09848727" positionType="Float" x="0" y="71" width="46" height="20"/>
|
||||||
<textElement>
|
<textElement>
|
||||||
|
@ -161,6 +205,11 @@
|
||||||
<textElement/>
|
<textElement/>
|
||||||
<textFieldExpression><![CDATA[$P{STR_ESPECIE}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$P{STR_ESPECIE}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="bfcb1c28-92e8-4bbe-a3b7-c094012fbd43" x="46" y="51" width="509" height="20"/>
|
||||||
|
<textElement/>
|
||||||
|
<textFieldExpression><![CDATA[$P{DESC_LINHAS_SELECIONADAS}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
</title>
|
</title>
|
||||||
<pageHeader>
|
<pageHeader>
|
||||||
|
@ -178,32 +227,84 @@
|
||||||
<band splitType="Stretch"/>
|
<band splitType="Stretch"/>
|
||||||
</columnHeader>
|
</columnHeader>
|
||||||
<detail>
|
<detail>
|
||||||
<band height="20" splitType="Stretch">
|
<band height="14" splitType="Stretch">
|
||||||
<textField pattern="HH.mm" isBlankWhenNull="true">
|
<textField pattern="HH.mm" isBlankWhenNull="true">
|
||||||
<reportElement uuid="3c1495b2-eb67-4d1a-8483-47526b4e14be" x="0" y="0" width="57" height="20" isPrintWhenDetailOverflows="true"/>
|
<reportElement uuid="3c1495b2-eb67-4d1a-8483-47526b4e14be" x="93" y="0" width="27" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
<textElement/>
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{HORA_SAIDA}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{HORA_SAIDA}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isBlankWhenNull="true">
|
<textField isBlankWhenNull="true">
|
||||||
<reportElement uuid="959dcd09-1ee7-426e-b678-e3d6cd22324d" x="57" y="0" width="180" height="20" isPrintWhenDetailOverflows="true"/>
|
<reportElement uuid="959dcd09-1ee7-426e-b678-e3d6cd22324d" x="193" y="0" width="143" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
<textElement/>
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{LINHA}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{LINHA}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isBlankWhenNull="true">
|
<textField isBlankWhenNull="true">
|
||||||
<reportElement uuid="4a0f6ebe-4f70-4ac9-a93b-44c842b2cf1a" x="237" y="0" width="134" height="20" isPrintWhenDetailOverflows="true"/>
|
<reportElement uuid="d033d5fa-3020-4404-b927-c799a0b33439" x="415" y="0" width="80" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
<textElement/>
|
<textElement>
|
||||||
<textFieldExpression><![CDATA[$F{ORIGEM}]]></textFieldExpression>
|
<font size="8"/>
|
||||||
</textField>
|
</textElement>
|
||||||
<textField isBlankWhenNull="true">
|
|
||||||
<reportElement uuid="d033d5fa-3020-4404-b927-c799a0b33439" x="371" y="0" width="134" height="20" isPrintWhenDetailOverflows="true"/>
|
|
||||||
<textElement/>
|
|
||||||
<textFieldExpression><![CDATA[$F{DESTINO}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{DESTINO}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isBlankWhenNull="true">
|
<textField isBlankWhenNull="true">
|
||||||
<reportElement uuid="466de50f-51a9-4a7f-8a2c-a0e31dc0eefc" x="507" y="0" width="48" height="20" isPrintWhenDetailOverflows="true"/>
|
<reportElement uuid="466de50f-51a9-4a7f-8a2c-a0e31dc0eefc" x="535" y="0" width="19" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
<textElement textAlignment="Right"/>
|
<textElement textAlignment="Right">
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{QTDE_BOLETOS}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{QTDE_BOLETOS}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="7390fb34-2705-439c-ab6b-559544ff211c" x="120" y="0" width="35" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{codigo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="a69fcf9c-097f-4efc-946d-7efd4594fd2a" x="155" y="0" width="38" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{prefixo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="4a0f6ebe-4f70-4ac9-a93b-44c842b2cf1a" x="336" y="0" width="79" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{ORIGEM}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
|
||||||
|
<reportElement uuid="f6037e2d-a04d-4442-b818-46c6afa7428d" x="0" y="0" width="50" height="12" isPrintWhenDetailOverflows="true"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{DATA_CORRIDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement uuid="f753ffdc-6d7f-4910-8a51-f95313d7b139" x="50" y="0" width="43" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{corrida_id}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="MM">
|
||||||
|
<reportElement uuid="53515049-3fa3-4cf0-917b-634f39444af4" x="495" y="0" width="22" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{DATA_CORRIDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField pattern="yyyy">
|
||||||
|
<reportElement uuid="c6ccb2f7-c869-4d17-84e4-61b48d8e6e3e" x="517" y="0" width="18" height="12"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="8"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{DATA_CORRIDA}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
</band>
|
</band>
|
||||||
</detail>
|
</detail>
|
||||||
<columnFooter>
|
<columnFooter>
|
||||||
|
|
|
@ -19,10 +19,13 @@ import org.zkoss.util.resource.Labels;
|
||||||
import org.zkoss.zhtml.Messagebox;
|
import org.zkoss.zhtml.Messagebox;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Bandbox;
|
||||||
|
import org.zkoss.zul.Checkbox;
|
||||||
import org.zkoss.zul.Combobox;
|
import org.zkoss.zul.Combobox;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Datebox;
|
import org.zkoss.zul.Datebox;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
@ -57,6 +60,11 @@ public class RelatorioLinhaOperacionalController extends MyGenericForwardCompose
|
||||||
private Combobox cmbEmpresa;
|
private Combobox cmbEmpresa;
|
||||||
private Combobox cmbEspecie;
|
private Combobox cmbEspecie;
|
||||||
private EnumSet<EnumEspecie> lsEspecie;
|
private EnumSet<EnumEspecie> lsEspecie;
|
||||||
|
private Bandbox bbPesquisaPuntoVenta;
|
||||||
|
private Radio rdAgruparPorDia;
|
||||||
|
private Radio rdAgruparPorMes;
|
||||||
|
private Radio rdAgruparPorAno;
|
||||||
|
private Checkbox chkBilhetesDevolvidos;
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresa() {
|
public List<Empresa> getLsEmpresa() {
|
||||||
return lsEmpresa;
|
return lsEmpresa;
|
||||||
|
@ -85,6 +93,8 @@ public class RelatorioLinhaOperacionalController extends MyGenericForwardCompose
|
||||||
|
|
||||||
private void limparPesquisa() {
|
private void limparPesquisa() {
|
||||||
rutaList.setData(new ArrayList<Ruta>());
|
rutaList.setData(new ArrayList<Ruta>());
|
||||||
|
|
||||||
|
bbPesquisaPuntoVenta.setText(getDescRutasSelecionadas());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executarPesquisa() {
|
private void executarPesquisa() {
|
||||||
|
@ -117,64 +127,80 @@ public class RelatorioLinhaOperacionalController extends MyGenericForwardCompose
|
||||||
executarPesquisa();
|
executarPesquisa();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getDescRutasSelecionadas() {
|
||||||
|
List<Ruta> lsRutasSelecionadas = new ArrayList<Ruta>(Arrays.asList(rutaList.getSelectedsItens().toArray(new Ruta[rutaList.getSelectedsItens().size()])));
|
||||||
|
StringBuilder selecionadas = new StringBuilder("");
|
||||||
|
if (!lsRutasSelecionadas.isEmpty()) {
|
||||||
|
for (Ruta ruta : lsRutasSelecionadas) {
|
||||||
|
selecionadas.append(ruta.getDescruta()).append(", ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return selecionadas.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$bbPesquisaPuntoVenta(Event ev) {
|
||||||
|
bbPesquisaPuntoVenta.setText(getDescRutasSelecionadas());
|
||||||
|
}
|
||||||
|
|
||||||
public void onClick$btnExecutarRelatorio(Event ev) throws InterruptedException, SQLException {
|
public void onClick$btnExecutarRelatorio(Event ev) throws InterruptedException, SQLException {
|
||||||
List<Ruta> lsRutasSelecionadas = new ArrayList<Ruta>(Arrays.asList(rutaList.getSelectedsItens().toArray(new Ruta[rutaList.getSelectedsItens().size()])));
|
List<Ruta> lsRutasSelecionadas = new ArrayList<Ruta>(Arrays.asList(rutaList.getSelectedsItens().toArray(new Ruta[rutaList.getSelectedsItens().size()])));
|
||||||
|
|
||||||
if (!lsRutasSelecionadas.isEmpty()) {
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
Date dataDe = datInicial.getValue();
|
||||||
Date dataDe = datInicial.getValue();
|
Date dataAte = datFinal.getValue();
|
||||||
Date dataAte = datFinal.getValue();
|
|
||||||
|
|
||||||
if (dataAte.after(dataDe)) {
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
parametros.put("DATA_DE", sdf.format(dataDe));
|
||||||
parametros.put("DATA_DE", sdf.format(dataDe));
|
parametros.put("DATA_ATE", sdf.format(dataAte));
|
||||||
parametros.put("DATA_ATE", sdf.format(dataAte));
|
|
||||||
|
|
||||||
String linhasIds = "0";
|
String linhasIds = "0";
|
||||||
for (int i = 0; i < lsRutasSelecionadas.size(); i++) {
|
for (int i = 0; i < lsRutasSelecionadas.size(); i++) {
|
||||||
Ruta ruta = lsRutasSelecionadas.get(i);
|
Ruta ruta = lsRutasSelecionadas.get(i);
|
||||||
linhasIds = linhasIds + "," + ruta.getRutaId();
|
linhasIds = linhasIds + "," + ruta.getRutaId();
|
||||||
}
|
|
||||||
parametros.put("LINHAS", linhasIds);
|
|
||||||
|
|
||||||
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
|
||||||
String empresaId;
|
|
||||||
if (cbiEmpresa != null) {
|
|
||||||
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
|
||||||
empresaId = empresa.getEmpresaId().toString();
|
|
||||||
} else {
|
|
||||||
empresaId = "0";
|
|
||||||
for (int i = 0; i < lsEmpresa.size(); i++) {
|
|
||||||
Empresa empresa = lsEmpresa.get(i);
|
|
||||||
empresaId = empresaId + "," + empresa.getEmpresaId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parametros.put("EMPRESA_IDS", empresaId);
|
|
||||||
|
|
||||||
Comboitem cbiEspecie = cmbEspecie.getSelectedItem();
|
|
||||||
if (cbiEspecie != null) {
|
|
||||||
EnumEspecie especie = (EnumEspecie) cbiEspecie.getValue();
|
|
||||||
parametros.put("ESPECIE", especie);
|
|
||||||
} else {
|
|
||||||
parametros.put("ESPECIE", EnumEspecie.BILHETE);
|
|
||||||
}
|
|
||||||
|
|
||||||
Relatorio relatorio = new RelatorioLinhaOperacional(parametros, dataSource.getConnection());
|
|
||||||
|
|
||||||
Map<String, Object> args = new HashMap<String, Object>();
|
|
||||||
args.put("relatorio", relatorio);
|
|
||||||
|
|
||||||
openWindow("/component/reportView.zul",
|
|
||||||
Labels.getLabel("relatorioLinhaOperacionalController.window.title"), args, MODAL);
|
|
||||||
} else {
|
|
||||||
Messagebox.show(Labels.getLabel("relatorioLinhaOperacionalController.MSG.datainvalida"),
|
|
||||||
Labels.getLabel("relatorioLinhaOperacionalController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Messagebox.show(Labels.getLabel("relatorioLinhaOperacionalController.MSG.selecionarlinha"),
|
|
||||||
Labels.getLabel("relatorioLinhaOperacionalController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
}
|
}
|
||||||
|
parametros.put("LINHAS", linhasIds);
|
||||||
|
parametros.put("DESC_LINHAS_SELECIONADAS", getDescRutasSelecionadas());
|
||||||
|
|
||||||
|
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||||
|
String empresaId;
|
||||||
|
if (cbiEmpresa != null) {
|
||||||
|
Empresa empresa = (Empresa) cbiEmpresa.getValue();
|
||||||
|
empresaId = empresa.getEmpresaId().toString();
|
||||||
|
} else {
|
||||||
|
empresaId = "0";
|
||||||
|
for (int i = 0; i < lsEmpresa.size(); i++) {
|
||||||
|
Empresa empresa = lsEmpresa.get(i);
|
||||||
|
empresaId = empresaId + "," + empresa.getEmpresaId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parametros.put("EMPRESA_IDS", empresaId);
|
||||||
|
|
||||||
|
Comboitem cbiEspecie = cmbEspecie.getSelectedItem();
|
||||||
|
if (cbiEspecie != null) {
|
||||||
|
EnumEspecie especie = (EnumEspecie) cbiEspecie.getValue();
|
||||||
|
parametros.put("ESPECIE", especie);
|
||||||
|
} else {
|
||||||
|
parametros.put("ESPECIE", EnumEspecie.BILHETE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean agruparPorDia = rdAgruparPorDia.isSelected();
|
||||||
|
Boolean agruparPorMes = rdAgruparPorMes.isSelected();
|
||||||
|
Boolean agruparPorAno = rdAgruparPorAno.isSelected();
|
||||||
|
|
||||||
|
parametros.put("agruparPorDia", agruparPorDia);
|
||||||
|
parametros.put("agruparPorMes", agruparPorMes);
|
||||||
|
parametros.put("agruparPorAno", agruparPorAno);
|
||||||
|
|
||||||
|
Boolean desconsiderarBilhetesDevolvidos = chkBilhetesDevolvidos.isChecked();
|
||||||
|
parametros.put("desconsiderarBilhetesDevolvidos", desconsiderarBilhetesDevolvidos);
|
||||||
|
|
||||||
|
Relatorio relatorio = new RelatorioLinhaOperacional(parametros, dataSource.getConnection());
|
||||||
|
|
||||||
|
Map<String, Object> args = new HashMap<String, Object>();
|
||||||
|
args.put("relatorio", relatorio);
|
||||||
|
|
||||||
|
openWindow("/component/reportView.zul",
|
||||||
|
Labels.getLabel("relatorioLinhaOperacionalController.window.title"), args, MODAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20130726_1RC182
|
versao = ADM_20130726_1RC183
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
@ -4349,6 +4349,11 @@ relatorioLinhaOperacionalController.chkAgruparAno.value = Ano
|
||||||
relatorioLinhaOperacionalController.MSG.selecionarlinha = Selecione alguma linha para gerar o relatório.
|
relatorioLinhaOperacionalController.MSG.selecionarlinha = Selecione alguma linha para gerar o relatório.
|
||||||
relatorioLinhaOperacionalController.MSG.datainvalida = Data de inicio não pode ser maior que final.
|
relatorioLinhaOperacionalController.MSG.datainvalida = Data de inicio não pode ser maior que final.
|
||||||
relatorioLinhaOperacionalController.lblEmpresa.value = Empresa
|
relatorioLinhaOperacionalController.lblEmpresa.value = Empresa
|
||||||
|
relatorioLinhaOperacionalController.lblBilhetesDevolvidos.value = Desconsiderar bilhetes devolvidos
|
||||||
|
relatorioLinhaOperacionalController.lblAgrupar.value = Agrupar por
|
||||||
|
relatorioLinhaOperacionalController.rdAgruparPorDia.value = Dia
|
||||||
|
relatorioLinhaOperacionalController.rdAgruparPorMes.value = Mês
|
||||||
|
relatorioLinhaOperacionalController.rdAgruparPorAno.value = Ano
|
||||||
relatorioLinhaOperacionalController.lblEspecie.value = Espécie
|
relatorioLinhaOperacionalController.lblEspecie.value = Espécie
|
||||||
|
|
||||||
#Relatorio Pasajeiros Viajar
|
#Relatorio Pasajeiros Viajar
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
value="${c:l('relatorioLinhaOperacionalController.lblEmpresa.value')}" />
|
value="${c:l('relatorioLinhaOperacionalController.lblEmpresa.value')}" />
|
||||||
<combobox id="cmbEmpresa"
|
<combobox id="cmbEmpresa"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
mold="rounded" buttonVisible="true" width="40%"
|
mold="rounded" buttonVisible="true" width="50%"
|
||||||
model="@{winFiltroRelatorioLinhaOperacional$composer.lsEmpresa}" />
|
model="@{winFiltroRelatorioLinhaOperacional$composer.lsEmpresa}" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
@ -61,6 +61,20 @@
|
||||||
model="@{winFiltroRelatorioLinhaOperacional$composer.lsEspecie}" />
|
model="@{winFiltroRelatorioLinhaOperacional$composer.lsEspecie}" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row spans="1,3">
|
||||||
|
<label
|
||||||
|
value="${c:l('relatorioLinhaOperacionalController.lblAgrupar.value')}" />
|
||||||
|
<radiogroup Id="radioAgrupamento">
|
||||||
|
<radio Id="rdAgruparPorDia"
|
||||||
|
label="${c:l('relatorioLinhaOperacionalController.rdAgruparPorDia.value')}"
|
||||||
|
checked="true" />
|
||||||
|
<radio Id="rdAgruparPorMes"
|
||||||
|
label="${c:l('relatorioLinhaOperacionalController.rdAgruparPorMes.value')}" />
|
||||||
|
<radio Id="rdAgruparPorAno"
|
||||||
|
label="${c:l('relatorioLinhaOperacionalController.rdAgruparPorAno.value')}" />
|
||||||
|
</radiogroup>
|
||||||
|
</row>
|
||||||
|
|
||||||
<row spans="1,3">
|
<row spans="1,3">
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioLinhaOperacionalController.lbRuta.value')}" />
|
value="${c:l('relatorioLinhaOperacionalController.lbRuta.value')}" />
|
||||||
|
@ -104,6 +118,11 @@
|
||||||
</bandpopup>
|
</bandpopup>
|
||||||
</bandbox>
|
</bandbox>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row spans="4">
|
||||||
|
<checkbox id="chkBilhetesDevolvidos" checked="false"
|
||||||
|
label="${c:l('relatorioLinhaOperacionalController.lblBilhetesDevolvidos.value')}" />
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
<toolbar>
|
<toolbar>
|
||||||
|
|
Loading…
Reference in New Issue