fixed bug #7866: Corrigido parcialmente, incluí os itens 1, 2 e 3, restando o item 4 descrito no caso

1: expandida as colunas terminal, caixa e usuário
2: removida a coluna abertura
3: corrigida a ligação entre ponto de venda e estação

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@60111 d1611594-4594-4d17-8e1d-87c2c4800839
master
tharcisio 2016-09-08 19:02:10 +00:00
parent 5dde77ab90
commit 2d8bf49733
3 changed files with 31 additions and 45 deletions

View File

@ -7,12 +7,10 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.ConferenciaFormularioFisico; import com.rjconsultores.ventaboletos.relatorios.utilitarios.ConferenciaFormularioFisico;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioConferenciaFormularioFisico extends Relatorio { public class RelatorioConferenciaFormularioFisico extends Relatorio {
@ -41,22 +39,24 @@ public class RelatorioConferenciaFormularioFisico extends Relatorio {
sql.append(" min(c.numfoliopreimpreso) as minfisico, "); sql.append(" min(c.numfoliopreimpreso) as minfisico, ");
sql.append(" max(c.numfoliopreimpreso) as maxfisico, "); sql.append(" max(c.numfoliopreimpreso) as maxfisico, ");
sql.append(" (max(c.numfoliopreimpreso) + 1) - min(c.numfoliopreimpreso) as dif1, "); sql.append(" (max(c.numfoliopreimpreso) + 1) - 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(
" count(case when (c.indreimpresion = 1 and c.indstatusboleto = 'E') then -1 else 1 end) as total ");
sql.append("from "); sql.append("from ");
sql.append(" caja c "); sql.append(" caja c ");
sql.append(" inner join estacion e on e.estacion_id = c.estacion_id "); 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 punto_venta p on p.puntoventa_id = c.puntoventa_id ");
sql.append(" and p.puntoventa_id = e.puntoventa_id ");
sql.append(" inner join usuario u on u.usuario_id = c.usuario_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(" inner join turno t on t.turno_id = c.turno_id ");
sql.append(" where "); sql.append(" where ");
sql.append(" c.empresacorrida_id = ? "); sql.append(" c.empresacorrida_id = ? ");
sql.append(" and c.feccorte between ? and ? "); sql.append(" and c.feccorte between ? and ? ");
if (puntoventaId != null && puntoventaId != -1){ if (puntoventaId != null && puntoventaId != -1) {
sql.append(" and c.puntoventa_id = " + puntoventaId); sql.append(" and c.puntoventa_id = " + puntoventaId);
} }
sql.append(" and c.activo <> 0 "); sql.append(" and c.activo <> 0 ");
sql.append(" and c.numfoliopreimpreso is not null "); sql.append(" and c.numfoliopreimpreso is not null ");
sql.append(" and c.numfoliosistema is not null "); sql.append(" and c.numfoliosistema is not null ");
sql.append("group by "); sql.append("group by ");
sql.append(" e.numcaja, "); sql.append(" e.numcaja, ");
sql.append(" p.nombpuntoventa, "); sql.append(" p.nombpuntoventa, ");
@ -70,7 +70,7 @@ public class RelatorioConferenciaFormularioFisico extends Relatorio {
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 (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 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 "); sql.append("inner join abasto_boleto abb on abb.abastoboleto_id = dab.abastoboleto_id ");
if (tipoventaId != null){ if (tipoventaId != null) {
sql.append("where abb.articulo_id = " + tipoventaId); sql.append("where abb.articulo_id = " + tipoventaId);
} }
sql.append(" order by t1.caixa, t2.numfoliosistema, t3.numfoliosistema "); sql.append(" order by t1.caixa, t2.numfoliosistema, t3.numfoliosistema ");

View File

@ -1,7 +1,7 @@
<?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="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"> <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.zoom" value="1.4641000000000008"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="262"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<parameter name="NOME_RELATORIO" class="java.lang.String"/> <parameter name="NOME_RELATORIO" class="java.lang.String"/>
<parameter name="DATA_INICIAL" class="java.util.Date"/> <parameter name="DATA_INICIAL" class="java.util.Date"/>
@ -94,40 +94,33 @@
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166" x="39" y="61" width="31" height="15"/> <reportElement uuid="e4282770-fa67-4c58-a5aa-92e4d6f27166" x="35" y="61" width="54" height="15"/>
<textElement markup="none"> <textElement markup="none">
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{datail.terminal}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.terminal}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="1e0b20c0-f208-4853-8601-73cec6e1992e" x="70" y="61" width="92" height="15"/> <reportElement uuid="1e0b20c0-f208-4853-8601-73cec6e1992e" x="89" y="61" width="130" height="15"/>
<textElement markup="none"> <textElement markup="none">
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{datail.caixa}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.caixa}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="32e830a3-6303-465c-85aa-12678fe6b80a" x="162" y="61" width="45" height="15"/> <reportElement uuid="32e830a3-6303-465c-85aa-12678fe6b80a" x="219" y="61" width="50" height="15"/>
<textElement markup="none"> <textElement markup="none">
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{datail.serie}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.serie}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec" x="207" y="61" width="70" height="15" isPrintWhenDetailOverflows="true"/> <reportElement uuid="a5ac8565-1ca0-425b-9d25-97d26753e7ec" x="269" y="61" width="110" height="15" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none"> <textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/> <font size="8" isBold="true" isUnderline="false"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{datail.usuario}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.usuario}]]></textFieldExpression>
</textField> </textField>
<textField>
<reportElement uuid="44e42972-eac1-40e6-ba0e-7c83b208d41b" x="311" y="61" width="77" height="15"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{datail.abertura}]]></textFieldExpression>
</textField>
<textField> <textField>
<reportElement uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae" x="464" y="61" width="52" height="15" isPrintWhenDetailOverflows="true"/> <reportElement uuid="29e15a6a-68ff-4f19-832f-ce0d7a7310ae" x="464" y="61" width="52" height="15" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right" markup="none"> <textElement textAlignment="Right" markup="none">
@ -136,7 +129,7 @@
<textFieldExpression><![CDATA[$R{datail.bilheteFisicoAbertura}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.bilheteFisicoAbertura}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="28a7ce94-e2d1-4a68-a816-185b176ba0a8" x="388" y="61" width="76" height="15" isPrintWhenDetailOverflows="true"/> <reportElement uuid="28a7ce94-e2d1-4a68-a816-185b176ba0a8" x="414" y="61" width="50" height="15" isPrintWhenDetailOverflows="true"/>
<textElement markup="none"> <textElement markup="none">
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
@ -185,7 +178,7 @@
<textFieldExpression><![CDATA[$R{datail.total}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{datail.total}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="2c1adbf8-a646-42ee-95c0-f625d4ceb14f" x="277" y="61" width="34" height="15" isPrintWhenDetailOverflows="true"/> <reportElement uuid="2c1adbf8-a646-42ee-95c0-f625d4ceb14f" x="379" y="61" width="35" height="15" isPrintWhenDetailOverflows="true"/>
<textElement rotation="None" markup="none"> <textElement rotation="None" markup="none">
<font size="8" isBold="true" isUnderline="false"/> <font size="8" isBold="true" isUnderline="false"/>
</textElement> </textElement>
@ -210,42 +203,35 @@
<detail> <detail>
<band height="19" splitType="Stretch"> <band height="19" splitType="Stretch">
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="82b42ca3-255a-4038-9730-35e2f9a1bb0f" x="39" y="2" width="31" height="16"/> <reportElement uuid="82b42ca3-255a-4038-9730-35e2f9a1bb0f" x="35" y="2" width="54" height="15"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{terminal}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{terminal}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="c5cc5e04-b1fa-4ebc-b408-3810648fc7eb" x="70" y="2" width="92" height="16"/> <reportElement uuid="c5cc5e04-b1fa-4ebc-b408-3810648fc7eb" x="89" y="2" width="130" height="16"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{caixa}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{caixa}]]></textFieldExpression>
</textField> </textField>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3" x="162" y="2" width="45" height="16"/> <reportElement uuid="d4baaf3d-a171-4b29-8aa8-cef5b56a11b3" x="219" y="2" width="50" height="16"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="true"> <textField pattern="" isBlankWhenNull="true">
<reportElement uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e" x="207" y="2" width="70" height="16"/> <reportElement uuid="acbbd64d-1fbd-4b4f-b7d5-5a11005ae98e" x="269" y="2" width="110" height="16"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true"> <textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="64e2b043-f9cb-4211-852c-def2fed7ae2c" x="311" y="2" width="77" height="16"/> <reportElement uuid="80c86e43-26cc-428c-b2e5-99d685118a06" x="414" y="2" width="50" height="16"/>
<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="388" y="2" width="76" height="16"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>
@ -301,7 +287,7 @@
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
</textField> </textField>
<textField pattern="" isBlankWhenNull="true"> <textField pattern="" isBlankWhenNull="true">
<reportElement uuid="a16f6612-4d70-410b-b86d-68c99cdcbbf1" x="277" y="2" width="34" height="16"/> <reportElement uuid="a16f6612-4d70-410b-b86d-68c99cdcbbf1" x="379" y="2" width="35" height="16"/>
<textElement> <textElement>
<font size="8"/> <font size="8"/>
</textElement> </textElement>