leonardo 2016-06-24 18:48:56 +00:00
parent 63bb3dde94
commit 54b797dabc
7 changed files with 259 additions and 187 deletions

View File

@ -25,68 +25,74 @@ public class RelatorioConferenciaFormularioFisico extends Relatorio {
this.setCollectionDataSource(new JRBeanCollectionDataSource(formularios));
}
private String getSql(Integer puntoventaId) {
private String getSql(Integer puntoventaId, Integer tipoventaId) {
StringBuffer sql = new StringBuffer();
sql.append("select ");
sql.append(" e.numcaja as ter, ");
sql.append(" p.nombpuntoventa as caixa, ");
sql.append(" c.numseriepreimpresa as serie, ");
sql.append(" u.nombusuario as usuario, ");
sql.append(" t.turno_id as turno, ");
sql.append(" min(c.fechorventa) as abertura, ");
sql.append(" max(c.fechorventa) as fechamento, ");
sql.append(" min(c.numfoliopreimpreso), ");
sql.append(" max(c.numfoliopreimpreso), ");
sql.append(" max(c.numfoliopreimpreso) - min(c.numfoliopreimpreso) as dif1, ");
sql.append(" min(c.numfoliosistema), ");
sql.append(" max(c.numfoliosistema), ");
sql.append(" max(c.numfoliosistema) - min(c.numfoliosistema) as dif2 ");
sql.append("from ");
sql.append(" caja c ");
sql.append(" inner join estacion e on e.estacion_id = c.estacion_id ");
sql.append(" inner join punto_venta p on p.puntoventa_id = c.puntoventa_id ");
sql.append(" inner join usuario u on u.usuario_id = c.usuario_id ");
sql.append(" inner join turno t on t.turno_id = c.turno_id ");
sql.append("where ");
sql.append(" c.empresacorrida_id = ? ");
sql.append(" and c.feccorte between ? and ? ");
sql.append("select distinct t1.*, t2.numfoliosistema as minlogico, t3.numfoliosistema as maxlogico ");
sql.append("from ");
sql.append("(select ");
sql.append(" e.numcaja as ter, ");
sql.append(" p.nombpuntoventa as caixa, ");
sql.append(" c.numseriepreimpresa as serie, ");
sql.append(" u.usuario_id || ' - ' || u.nombusuario as usuario, ");
sql.append(" t.turno_id as turno, ");
sql.append(" min(c.fechorventa) as abertura, ");
sql.append(" max(c.fechorventa) as fechamento, ");
sql.append(" min(c.numfoliopreimpreso) as minfisico, ");
sql.append(" max(c.numfoliopreimpreso) as maxfisico, ");
sql.append(" max(c.numfoliopreimpreso) - min(c.numfoliopreimpreso) as dif1, ");
sql.append(" count(case when (c.indreimpresion = 1 and c.indstatusboleto = 'E') then -1 else 1 end) as total ");
sql.append("from ");
sql.append(" caja c ");
sql.append(" inner join estacion e on e.estacion_id = c.estacion_id ");
sql.append(" inner join punto_venta p on p.puntoventa_id = c.puntoventa_id ");
sql.append(" inner join usuario u on u.usuario_id = c.usuario_id ");
sql.append(" inner join turno t on t.turno_id = c.turno_id ");
sql.append(" where ");
sql.append(" c.empresacorrida_id = ? ");
sql.append(" and c.feccorte between ? and ? ");
if (puntoventaId != null && puntoventaId != -1){
sql.append(" and c.puntoventa_id = ? ");
sql.append(" and c.puntoventa_id = " + puntoventaId);
}
sql.append(" and c.activo <> 0 ");
sql.append("group by ");
sql.append(" e.numcaja, ");
sql.append(" p.nombpuntoventa, ");
sql.append(" c.numseriepreimpresa, ");
sql.append(" u.nombusuario, ");
sql.append(" t.turno_id ");
sql.append("order by ");
sql.append(" u.nombusuario, min(c.fechorventa)");
sql.append(" and c.numfoliopreimpreso is not null ");
sql.append(" and c.numfoliosistema is not null ");
sql.append("group by ");
sql.append(" e.numcaja, ");
sql.append(" p.nombpuntoventa, ");
sql.append(" c.numseriepreimpresa, ");
sql.append(" u.usuario_id || ' - ' || u.nombusuario, ");
sql.append(" t.turno_id ");
sql.append("having min(c.numfoliopreimpreso) > 0 ");
sql.append("order by ");
sql.append(" u.nombusuario, min(c.fechorventa)) t1 ");
sql.append("inner join (select numfoliosistema, numfoliopreimpreso, numseriepreimpresa from caja) t2 on t1.minfisico = t2.numfoliopreimpreso and t1.serie = t2.numseriepreimpresa ");
sql.append("inner join (select numfoliosistema, numfoliopreimpreso, numseriepreimpresa from caja) t3 on t1.maxfisico = t3.numfoliopreimpreso and t1.serie = t3.numseriepreimpresa ");
sql.append("inner join det_abasto_boleto dab on t1.minfisico between dab.numfolioinicial and dab.numfoliofinal and dab.numseriepreimpresa = t1.serie ");
sql.append("inner join abasto_boleto abb on abb.abastoboleto_id = dab.abastoboleto_id ");
if (tipoventaId != null){
sql.append("where abb.articulo_id = " + tipoventaId);
}
return sql.toString();
}
@Override
protected void processaParametros() throws Exception {
Integer puntoventaId = (Integer) getParametros().get("PUNTOVENTA_ID");
Integer tipoventaId = (Integer) getParametros().get("TIPOVENTA_ID");
Integer empresaId = (Integer) getParametros().get("EMPRESA_ID");
Date fecInicio = (Date) getParametros().get("DATA_INICIAL");
Date fecFinal = (Date) getParametros().get("DATA_FINAL");
fecInicio = DateUtil.inicioFecha(fecInicio);
fecFinal = DateUtil.fimFecha(fecFinal);
String sql = getSql(puntoventaId);
String sql = getSql(puntoventaId, tipoventaId);
PreparedStatement pstmt = getConexao().prepareStatement(sql);
pstmt.setInt(1, empresaId);
pstmt.setTimestamp(2, new java.sql.Timestamp(fecInicio.getTime()));
pstmt.setTimestamp(3, new java.sql.Timestamp(fecFinal.getTime()));
if (puntoventaId != null) {
pstmt.setInt(4, puntoventaId);
}
List<ConferenciaFormularioFisico> formularios = new ArrayList<ConferenciaFormularioFisico>();
ResultSet rs = pstmt.executeQuery();
@ -97,16 +103,16 @@ public class RelatorioConferenciaFormularioFisico extends Relatorio {
formulario.setBilheteFisicoAbertura(rs.getInt(8));
formulario.setBilheteFisicoFechamento(rs.getInt(9));
formulario.setDif1(rs.getInt(10));
formulario.setBilheteLogicoAbertura(rs.getInt(11));
formulario.setBilheteLogicoFechamento(rs.getInt(12));
formulario.setDif2(rs.getInt(13));
formulario.setBilheteLogicoAbertura(rs.getInt(12));
formulario.setBilheteLogicoFechamento(rs.getInt(13));
formulario.setDif2(rs.getInt(10));
formulario.setCaixa(rs.getString(2));
formulario.setFechamento(rs.getDate(7));
formulario.setSerie(rs.getString(3));
formulario.setTerminal(rs.getInt(1));
formulario.setTurno(rs.getInt(5));
formulario.setUsuario(rs.getString(4));
formulario.setTotal(rs.getInt(13));
formulario.setTotal(rs.getInt(11));
formularios.add(formulario);
}

View File

@ -2,7 +2,7 @@
<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="842" pageHeight="675" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" 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.y" value="1"/>
<property name="ireport.y" value="49"/>
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
<parameter name="DATA_INICIAL" class="java.util.Date"/>
<parameter name="DATA_FINAL" class="java.util.Date"/>
@ -27,134 +27,25 @@
<group name="caixa">
<groupExpression><![CDATA[$F{caixa}]]></groupExpression>
<groupHeader>
<band height="50">
<band height="30">
<textField>
<reportElement uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166" x="0" y="33" width="31" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.terminal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1e0b20c0-f208-4853-8601-73cec6e1992e" x="31" y="33" width="92" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.caixa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="32e830a3-6303-465c-85aa-12678fe6b80a" x="123" y="33" width="45" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.serie}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec" x="168" y="33" width="70" height="17" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.usuario}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="44e42972-eac1-40e6-ba0e-7c83b208d41b" x="272" y="33" width="77" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.abertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae" x="425" y="33" width="52" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisicoAbertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="28a7ce94-e2d1-4a68-a816-185b176ba0a8" x="349" y="33" width="76" height="17" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.fechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="9591658f-b725-4d9d-8863-5435c1540e95" x="86" y="7" width="263" height="20"/>
<reportElement uuid="9591658f-b725-4d9d-8863-5435c1540e95" x="125" y="7" width="263" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{caixa}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="acc2f86e-4ee2-4e61-807f-27fd740db652" x="0" y="49" width="792" height="1"/>
<reportElement uuid="acc2f86e-4ee2-4e61-807f-27fd740db652" x="0" y="0" width="792" height="1"/>
</line>
<textField>
<reportElement uuid="dddef494-9886-46f0-a409-6dd4a5475162" x="477" y="33" width="52" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisicoFechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f7cee4f0-a2e0-4617-be45-34564f2a52c1" x="559" y="33" width="50" height="15" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogicoAbertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c341bc6d-ab37-41d2-95f0-16e918baaaad" x="609" y="34" width="50" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogicoFechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d040b34d-dd10-4d5a-ae20-c14ee7240c22" x="529" y="33" width="30" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.dif}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="706c5fdb-ffcb-48a2-8328-699b264b6c43" x="659" y="33" width="30" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.dif}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c636597b-5dac-4bf4-a70c-33d088bb8757" x="689" y="33" width="61" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.total}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1cfe040e-ad09-41cc-abb8-db89fa01a555" x="425" y="16" width="104" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisico}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7d1be3b8-8106-4dd4-b078-73cb375db2b0" x="559" y="16" width="100" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogico}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2c1adbf8-a646-42ee-95c0-f625d4ceb14f" x="238" y="33" width="34" height="16" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.turno}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="3e57e8b7-68d6-4357-b273-8389cab912f3" x="0" y="7" width="84" height="20"/>
<reportElement uuid="3e57e8b7-68d6-4357-b273-8389cab912f3" x="39" y="7" width="84" height="20"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Agência:]]></text>
</staticText>
<rectangle>
<reportElement uuid="1cb8c7c8-c094-41cc-863d-b7f13228e6ca" x="0" y="7" width="26" height="20"/>
</rectangle>
</band>
</groupHeader>
</group>
@ -180,7 +71,7 @@
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="43" splitType="Stretch">
<band height="85" splitType="Stretch">
<textField>
<reportElement uuid="1e817468-1e3c-495d-a701-12515d636388" x="84" y="20" width="471" height="22"/>
<textElement verticalAlignment="Middle"/>
@ -217,108 +108,223 @@
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166" x="39" y="68" width="31" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.terminal}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1e0b20c0-f208-4853-8601-73cec6e1992e" x="70" y="68" width="92" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.caixa}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="32e830a3-6303-465c-85aa-12678fe6b80a" x="162" y="68" width="45" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.serie}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec" x="207" y="68" width="70" height="17" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.usuario}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="44e42972-eac1-40e6-ba0e-7c83b208d41b" x="311" y="68" width="77" height="17"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.abertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae" x="464" y="68" width="52" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisicoAbertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="28a7ce94-e2d1-4a68-a816-185b176ba0a8" x="388" y="68" width="76" height="17" isPrintWhenDetailOverflows="true"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.fechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="dddef494-9886-46f0-a409-6dd4a5475162" x="516" y="68" width="52" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisicoFechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f7cee4f0-a2e0-4617-be45-34564f2a52c1" x="598" y="68" width="50" height="15" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogicoAbertura}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c341bc6d-ab37-41d2-95f0-16e918baaaad" x="648" y="69" width="50" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogicoFechamento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d040b34d-dd10-4d5a-ae20-c14ee7240c22" x="568" y="68" width="30" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.dif}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="706c5fdb-ffcb-48a2-8328-699b264b6c43" x="698" y="68" width="30" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.dif}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c636597b-5dac-4bf4-a70c-33d088bb8757" x="728" y="68" width="61" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.total}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2c1adbf8-a646-42ee-95c0-f625d4ceb14f" x="277" y="68" width="34" height="16" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.turno}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1cfe040e-ad09-41cc-abb8-db89fa01a555" x="464" y="52" width="104" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteFisico}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="7d1be3b8-8106-4dd4-b078-73cb375db2b0" x="598" y="52" width="100" height="16" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.bilheteLogico}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="23" splitType="Stretch">
<textField isBlankWhenNull="true">
<reportElement uuid="82b42ca3-255a-4038-9730-35e2f9a1bb0f" x="0" y="0" width="31" height="20"/>
<reportElement uuid="82b42ca3-255a-4038-9730-35e2f9a1bb0f" x="39" y="0" width="31" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{terminal}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="c5cc5e04-b1fa-4ebc-b408-3810648fc7eb" x="31" y="0" width="92" height="20"/>
<reportElement uuid="c5cc5e04-b1fa-4ebc-b408-3810648fc7eb" x="70" y="0" width="92" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{caixa}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3" x="123" y="0" width="45" height="20"/>
<reportElement uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3" x="162" y="0" width="45" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e" x="168" y="0" width="70" height="20"/>
<reportElement uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e" x="207" y="0" width="70" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">
<reportElement uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c" x="272" y="0" width="77" height="20"/>
<reportElement uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c" x="311" y="0" width="77" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{abertura}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">
<reportElement uuid="80c86e43-26cc-428c-b2e5-99d685118a06" x="349" y="0" width="76" height="20"/>
<reportElement uuid="80c86e43-26cc-428c-b2e5-99d685118a06" x="388" y="0" width="76" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{fechamento}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="c777b9ac-f2f3-4bfa-9eed-593abae4c3bd" x="609" y="0" width="50" height="20"/>
<reportElement uuid="c777b9ac-f2f3-4bfa-9eed-593abae4c3bd" x="648" y="0" width="50" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilheteLogicoFechamento}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="648d03b0-ee8a-4b2f-af9f-c33c4d01f40e" x="425" y="0" width="52" height="20"/>
<reportElement uuid="648d03b0-ee8a-4b2f-af9f-c33c4d01f40e" x="464" y="0" width="52" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilheteFisicoAbertura}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="22664e0d-f3d2-4eaf-9eea-3acedd65183e" x="477" y="0" width="52" height="20"/>
<reportElement uuid="22664e0d-f3d2-4eaf-9eea-3acedd65183e" x="516" y="0" width="52" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilheteFisicoFechamento}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="882c06a1-647f-4506-9c78-ec71e2a65b83" x="529" y="0" width="30" height="20"/>
<reportElement uuid="882c06a1-647f-4506-9c78-ec71e2a65b83" x="568" y="0" width="30" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{dif1}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="d975aaf9-a224-4cbb-8d7b-bb6cbc00ec1b" x="559" y="0" width="50" height="20"/>
<reportElement uuid="d975aaf9-a224-4cbb-8d7b-bb6cbc00ec1b" x="598" y="0" width="50" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilheteLogicoAbertura}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="a4273724-e408-4266-a6d3-358f5eebf1df" x="659" y="0" width="30" height="20"/>
<reportElement uuid="a4273724-e408-4266-a6d3-358f5eebf1df" x="698" y="0" width="30" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{dif2}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="62d70d18-269f-415d-ae0f-5806990b177f" x="689" y="0" width="61" height="20"/>
<reportElement uuid="62d70d18-269f-415d-ae0f-5806990b177f" x="728" y="0" width="61" height="20"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement uuid="a16f6612-4d70-410b-b86d-68c99cdcbbf1" x="238" y="0" width="34" height="20"/>
<reportElement uuid="a16f6612-4d70-410b-b86d-68c99cdcbbf1" x="277" y="0" width="34" height="20"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{turno}]]></textFieldExpression>
</textField>
<rectangle>
<reportElement uuid="48534aca-e618-49aa-a8f0-d04663d6c92e" x="0" y="1" width="26" height="20"/>
</rectangle>
</band>
</detail>
<columnFooter>

View File

@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
import java.sql.Connection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
@ -14,13 +15,19 @@ 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.Comboitem;
import org.zkoss.zul.ComboitemRenderer;
import org.zkoss.zul.Datebox;
import com.rjconsultores.ventaboletos.entidad.Articulo;
import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.entidad.TipoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioConferenciaFormularioFisico;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa;
import com.rjconsultores.ventaboletos.service.ArticuloService;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
@ -31,17 +38,39 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(RelatorioConferenciaFormularioFisicoController.class);
private MyComboboxEmpresa cmbEmpresa;
private MyComboboxEstandar cmbEmpresa;
private MyComboboxPuntoVenta cmbPuntoVenta;
private MyComboboxEstandar cmbTipoVenda;
private Datebox datInicial;
private Datebox datFinal;
@Autowired
private EmpresaService empresaService;
@Autowired
private ArticuloService articuloService;
private List<Empresa> lsEmpresas;
private List<Articulo> lsTiposVenda;
@Autowired
private DataSource dataSourceRead;
@Override
public void doAfterCompose(Component comp) throws Exception {
lsEmpresas = empresaService.obtenerTodos();
lsTiposVenda = articuloService.obtenerTodos();
super.doAfterCompose(comp);
cmbTipoVenda.setItemRenderer(new ComboitemRenderer() {
@Override
public void render(Comboitem cmbtm, Object o) throws Exception {
Articulo tipo = (Articulo) o;
cmbtm.setLabel(tipo.getDescarticulo());
cmbtm.setValue(tipo);
}
});
}
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
@ -75,6 +104,7 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
parametros.put("AGENCIA", cmbPuntoVenta.getSelectedIndex() != -1 ? ((PuntoVenta)cmbPuntoVenta.getSelectedItem().getValue()).getNombpuntoventa(): null);
parametros.put("EMPRESA", ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getNombempresa());
parametros.put("PUNTOVENTA_ID", cmbPuntoVenta.getSelectedIndex() != -1 ? ((PuntoVenta)cmbPuntoVenta.getSelectedItem().getValue()).getPuntoventaId() : null);
parametros.put("TIPOVENTA_ID", cmbTipoVenda.getSelectedIndex() != -1 ? ((Articulo)cmbTipoVenda.getSelectedItem().getValue()).getArticuloId() : null);
parametros.put("DATA_INICIAL", datInicial.getValue());
parametros.put("DATA_FINAL", datFinal.getValue());
parametros.put("EMPRESA_ID", ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId());
@ -89,11 +119,11 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
Labels.getLabel("indexController.mniRelatorioConferenciaFormularioFisico.label"), args, MODAL);
}
public MyComboboxEmpresa getCmbEmpresa() {
public MyComboboxEstandar getCmbEmpresa() {
return cmbEmpresa;
}
public void setCmbEmpresa(MyComboboxEmpresa cmbEmpresa) {
public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) {
this.cmbEmpresa = cmbEmpresa;
}
@ -119,5 +149,22 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
public void setDatFinal(Datebox datFinal) {
this.datFinal = datFinal;
}
public List<Empresa> getLsEmpresas() {
return lsEmpresas;
}
public void setLsEmpresas(List<Empresa> lsEmpresas) {
this.lsEmpresas = lsEmpresas;
}
public List<Articulo> getLsTiposVenda() {
return lsTiposVenda;
}
public void setLsTiposVenda(List<Articulo> lsTiposVenda) {
this.lsTiposVenda = lsTiposVenda;
}
}

View File

@ -6488,9 +6488,10 @@ busquedaOCDParamController.SomenteCartao.label = Solo tarjeta
busquedaOCDParamController.TodasFormasPagamento.label = Todas las formas de pago
# Relatorio Conferencia Formulario Fisico
relatorioArquivoBGMController.lbDataIni.value = Data Inicial
relatorioArquivoBGMController.lbDataFin.value = Data Final
relatorioArquivoBGMController.lbEmpresa.value = Empresa
relatorioArquivoBGMController.lbPuntoVenta.value = Agência
relatorioArquivoBGMController.msg.erro.puntoventa = O Campo Agência é obrigatório!
relatorioArquivoBGMController.msg.erro.empresa = O Campo Empresa é obrigatório!
relatorioConferenciaFormularioFisicoController.lbDataIni.value = Data Inicial
relatorioConferenciaFormularioFisicoController.lbDataFin.value = Data Final
relatorioConferenciaFormularioFisicoController.lbEmpresa.value = Empresa
relatorioConferenciaFormularioFisicoController.lbTipoVenda.value = Tipo Venda
relatorioConferenciaFormularioFisicoController.lbPuntoVenta.value = Agência
relatorioConferenciaFormularioFisicoController.msg.erro.puntoventa = O Campo Agência é obrigatório!
relatorioConferenciaFormularioFisicoController.msg.erro.empresa = O Campo Empresa é obrigatório!

View File

@ -6627,9 +6627,11 @@ busquedaImportacionFiscalEcfReducaoZController.window.title=Impressão Fiscal ::
relatorioConferenciaFormularioFisicoController.lbDataIni.value = Data Inicial
relatorioConferenciaFormularioFisicoController.lbDataFin.value = Data Final
relatorioConferenciaFormularioFisicoController.lbEmpresa.value = Empresa
relatorioConferenciaFormularioFisicoController.lbTipoVenda.value = Tipo Venda
relatorioConferenciaFormularioFisicoController.lbPuntoVenta.value = Agência
relatorioConferenciaFormularioFisicoController.msg.erro.puntoventa = O Campo Agência é obrigatório!
relatorioConferenciaFormularioFisicoController.msg.erro.empresa = O Campo Empresa é obrigatório!
busquedaImportacionFiscalEcfPendenciaReducaoZController.window.title=Impressão Fiscal :: Pendência Redução Z
busquedaImportacionFiscalEcfReducaoZController.window.title=Impressão Fiscal :: ECF Integrado c/ Redução Z
busquedaImportacionFiscalEcfPendenciaReducaoZController.window.title=Impressão Fiscal :: Pendência Redução Z

View File

@ -34,9 +34,10 @@
<label
value="${c:l('relatorioConferenciaFormularioFisicoController.lbEmpresa.value')}" />
<combobox id="cmbEmpresa"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEmpresa"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" constraint="no empty"
width="70%" />
width="70%"
model="@{winRelatorioConferenciaFormularioFisico$composer.lsEmpresas}"/>
</row>
<row>
<label
@ -46,6 +47,15 @@
mold="rounded" buttonVisible="true"
width="70%" />
</row>
<row>
<label
value="${c:l('relatorioConferenciaFormularioFisicoController.lbTipoVenda.value')}" />
<combobox id="cmbTipoVenda"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true"
width="70%"
model="@{winRelatorioConferenciaFormularioFisico$composer.lsTiposVenda}"/>
</row>
</rows>
</grid>
<toolbar>