Merge pull request 'fixes bug#AL-3731' (!427) from AL-3731 into master

Reviewed-on: adm/VentaBoletosAdm#427
Reviewed-by: wallace <wallace@rjconsultores.com.br>
master 1.55.6
Gleison da Cruz 2024-03-07 12:51:44 +00:00
commit 8a957cd856
4 changed files with 75 additions and 29 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId> <artifactId>ventaboletosadm</artifactId>
<version>1.55.5</version> <version>1.55.6</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>

View File

@ -90,7 +90,8 @@ public class RelatorioCheckinAberto extends Relatorio {
bean.setServico(rs.getInt("servico")); bean.setServico(rs.getInt("servico"));
bean.setDataServico(formatadorData.format(rs.getDate("data_servico"))); bean.setDataServico(formatadorData.format(rs.getDate("data_servico")));
bean.setLocalidade(rs.getString("localidade")); bean.setLocalidade(rs.getString("localidade"));
//bean.setUsuario(rs.getString("usuario")); bean.setUsuario(rs.getString("usuario"));
bean.setImei(rs.getString("imei"));
lsDadosRelatorio.add(bean); lsDadosRelatorio.add(bean);
} }
@ -121,12 +122,15 @@ public class RelatorioCheckinAberto extends Relatorio {
private String getSql(String dataInicioServico, String dataFimServico, String dataInicioEncerramento, String dataFimEncerramento, Integer empresa_id, Integer localidade_id) { private String getSql(String dataInicioServico, String dataFimServico, String dataInicioEncerramento, String dataFimEncerramento, Integer empresa_id, Integer localidade_id) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("select c.corrida_id as servico, "); sb.append("select c.corrida_id as servico, ");
sb.append("c.feccorrida as data_servico, "); sb.append(" c.feccorrida as data_servico, ");
sb.append("p.cveparada || ' - ' || p.descparada as localidade, "); sb.append(" p.cveparada || ' - ' || p.descparada as localidade, ");
sb.append("cc.fechorcerrado as data_encerramento "); sb.append(" cc.fechorcerrado as data_encerramento, ");
sb.append("from corrida c "); sb.append(" u.nombusuario as usuario, ");
sb.append("join parada p on p.parada_id = c.origen_id "); sb.append(" cc.imei_embarcada as imei ");
sb.append("left join checkin_cerrado cc on (c.corrida_id = cc.corrida_id and c.feccorrida=cc.feccorrida ) "); sb.append(" from corrida c join parada p on p.parada_id = c.origen_id ");
sb.append(" left join checkin_cerrado cc on (c.corrida_id = cc.corrida_id and c.feccorrida=cc.feccorrida ) ");
sb.append(" left join usuario u on u.usuario_id = cc.usuario_id ");
if (empresa_id!=null) { if (empresa_id!=null) {

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="RelatorioEncerramentoCheckin" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0e8aff42-5ba8-48ac-9950-da8178561888"> <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="RelatorioEncerramentoCheckin" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0e8aff42-5ba8-48ac-9950-da8178561888">
<property name="ireport.zoom" value="1.7715610000000017"/> <property name="ireport.zoom" value="1.7715610000000017"/>
<property name="ireport.x" value="26"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<parameter name="TITULO" class="java.lang.String"/> <parameter name="TITULO" class="java.lang.String"/>
<parameter name="PERIODO_SERVICO" class="java.lang.String"/> <parameter name="PERIODO_SERVICO" class="java.lang.String"/>
@ -22,74 +22,74 @@
<pageHeader> <pageHeader>
<band height="82" splitType="Stretch"> <band height="82" splitType="Stretch">
<line> <line>
<reportElement x="0" y="76" width="555" height="1" uuid="481b2107-ee62-4815-8a89-8435d34384c8"/> <reportElement uuid="481b2107-ee62-4815-8a89-8435d34384c8" x="0" y="76" width="555" height="1"/>
</line> </line>
<textField isBlankWhenNull="true"> <textField isBlankWhenNull="true">
<reportElement x="111" y="40" width="444" height="15" uuid="63ce47a3-7e94-42a2-8325-eceef777fbe2"/> <reportElement uuid="63ce47a3-7e94-42a2-8325-eceef777fbe2" x="111" y="40" width="444" height="15"/>
<textElement verticalAlignment="Middle"> <textElement verticalAlignment="Middle">
<font size="9"/> <font size="9"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{PERIODO_ENCERRAMENTO}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{PERIODO_ENCERRAMENTO}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement x="0" y="40" width="111" height="15" uuid="46ecd1c0-ef3e-4274-9094-1b2dbed2fc43"/> <reportElement uuid="46ecd1c0-ef3e-4274-9094-1b2dbed2fc43" x="0" y="40" width="111" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/> <textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{header.periodo.encerramento}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{header.periodo.encerramento}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement x="454" y="0" width="44" height="10" uuid="33327397-2913-4d10-a128-6e18a85a33c7"/> <reportElement uuid="33327397-2913-4d10-a128-6e18a85a33c7" x="454" y="0" width="44" height="10"/>
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font size="7"/> <font size="7"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement x="0" y="56" width="111" height="15" uuid="17a5536e-1cf6-48d8-91ad-53d8148af1d6"/> <reportElement uuid="17a5536e-1cf6-48d8-91ad-53d8148af1d6" x="0" y="56" width="111" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/> <textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{header.empresa}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement x="482" y="14" width="44" height="10" uuid="be33ee08-3388-45c3-a0b0-29f482d37076"/> <reportElement uuid="be33ee08-3388-45c3-a0b0-29f482d37076" x="482" y="14" width="44" height="10"/>
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font size="7"/> <font size="7"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{header.pagina} + "" + $V{PAGE_NUMBER}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{header.pagina} + "" + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> <textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement x="111" y="56" width="444" height="15" uuid="48f1a994-4bbe-4b8e-948f-81542fa792c3"/> <reportElement uuid="48f1a994-4bbe-4b8e-948f-81542fa792c3" x="111" y="56" width="444" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle"> <textElement textAlignment="Left" verticalAlignment="Middle">
<font size="9"/> <font size="9"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{EMPRESA}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{EMPRESA}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true"> <textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement x="111" y="24" width="444" height="15" uuid="7f5ee01d-f86d-49a4-a2a1-f1c671621ef0"/> <reportElement uuid="7f5ee01d-f86d-49a4-a2a1-f1c671621ef0" x="111" y="24" width="444" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle"> <textElement textAlignment="Left" verticalAlignment="Middle">
<font size="9"/> <font size="9"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{PERIODO_SERVICO}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{PERIODO_SERVICO}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement x="0" y="0" width="454" height="20" uuid="9bc31956-04ad-43d0-bcee-08f7b5bf1145"/> <reportElement uuid="9bc31956-04ad-43d0-bcee-08f7b5bf1145" x="0" y="0" width="454" height="20"/>
<textElement textAlignment="Left" verticalAlignment="Top"> <textElement textAlignment="Left" verticalAlignment="Top">
<font size="14" isBold="true"/> <font size="14" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy"> <textField pattern="dd/MM/yyyy">
<reportElement x="0" y="24" width="111" height="15" uuid="4a51f623-fe84-4f71-8bfe-271f36619eb1"/> <reportElement uuid="4a51f623-fe84-4f71-8bfe-271f36619eb1" x="0" y="24" width="111" height="15"/>
<textElement textAlignment="Left" verticalAlignment="Middle"/> <textElement textAlignment="Left" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$R{header.periodo.servico}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{header.periodo.servico}]]></textFieldExpression>
</textField> </textField>
<textField pattern="dd/MM/yyyy HH:mm"> <textField pattern="dd/MM/yyyy HH:mm">
<reportElement x="499" y="0" width="56" height="10" uuid="34f65212-5ae5-4077-b4d8-64d55f0289a9"/> <reportElement uuid="34f65212-5ae5-4077-b4d8-64d55f0289a9" x="499" y="0" width="56" height="10"/>
<textElement textAlignment="Right"> <textElement textAlignment="Right">
<font size="7"/> <font size="7"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField> </textField>
<textField evaluationTime="Report"> <textField evaluationTime="Report">
<reportElement x="526" y="14" width="29" height="10" uuid="7883d71b-800c-4367-8c86-e8df1c9a8c35"/> <reportElement uuid="7883d71b-800c-4367-8c86-e8df1c9a8c35" x="526" y="14" width="29" height="10"/>
<textElement> <textElement>
<font size="7"/> <font size="7"/>
</textElement> </textElement>
@ -100,54 +100,96 @@
<columnHeader> <columnHeader>
<band height="17" splitType="Stretch"> <band height="17" splitType="Stretch">
<line> <line>
<reportElement x="0" y="14" width="555" height="1" uuid="cd1b96dd-2097-4af7-a025-7962bc5d7bee"/> <reportElement uuid="cd1b96dd-2097-4af7-a025-7962bc5d7bee" x="0" y="14" width="555" height="1"/>
</line> </line>
<textField> <textField>
<reportElement x="0" y="0" width="86" height="14" uuid="61efe86a-3f69-4010-ad07-57ade030c3c3"/> <reportElement uuid="61efe86a-3f69-4010-ad07-57ade030c3c3" x="0" y="0" width="86" height="14"/>
<textElement> <textElement>
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{detail.servico}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{detail.servico}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement x="86" y="0" width="94" height="14" uuid="dbf216e4-6896-4a81-8391-6a51b2703155"/> <reportElement uuid="dbf216e4-6896-4a81-8391-6a51b2703155" x="86" y="0" width="94" height="14"/>
<textElement> <textElement>
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{detail.data.servico}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{detail.data.servico}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement x="180" y="0" width="133" height="14" uuid="7812f684-2bdd-4642-84f2-426c0fa9f826"/> <reportElement uuid="7812f684-2bdd-4642-84f2-426c0fa9f826" x="180" y="0" width="133" height="14"/>
<textElement> <textElement>
<font size="8" isBold="true"/> <font size="8" isBold="true"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$R{detail.localidade}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{detail.localidade}]]></textFieldExpression>
</textField> </textField>
<textField>
<reportElement uuid="361896ac-9692-4a7b-bdb6-0e8192ada018" x="313" y="2" width="76" height="12"/>
<textElement>
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.data.encerramento}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="16b6597c-c9e0-4ae9-a5d1-a92e508379ce" x="389" y="2" width="93" height="12"/>
<textElement>
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.usuario.operacao}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ad8c8aaf-5713-42e7-b61e-00a5fba49c18" x="482" y="2" width="73" height="12"/>
<textElement>
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{detail.imei}]]></textFieldExpression>
</textField>
</band> </band>
</columnHeader> </columnHeader>
<detail> <detail>
<band height="11" splitType="Stretch"> <band height="11" splitType="Stretch">
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="86" height="10" uuid="6ef05dfb-fea9-451c-a45a-1dc3f766af84"/> <reportElement uuid="6ef05dfb-fea9-451c-a45a-1dc3f766af84" stretchType="RelativeToBandHeight" x="0" y="0" width="86" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle"> <textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/> <font size="7" isBold="false"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="86" y="0" width="94" height="10" uuid="bb3d4047-5bea-4a27-8fbe-0f3ffc8e2c61"/> <reportElement uuid="bb3d4047-5bea-4a27-8fbe-0f3ffc8e2c61" stretchType="RelativeToBandHeight" x="86" y="0" width="94" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle"> <textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/> <font size="7" isBold="false"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{dataServico}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{dataServico}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true"> <textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="RelativeToBandHeight" x="180" y="0" width="133" height="10" uuid="75f7f9d7-1565-4fb2-81ae-2155c588c756"/> <reportElement uuid="75f7f9d7-1565-4fb2-81ae-2155c588c756" stretchType="RelativeToBandHeight" x="180" y="0" width="133" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle"> <textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/> <font size="7" isBold="false"/>
</textElement> </textElement>
<textFieldExpression><![CDATA[$F{localidade}]]></textFieldExpression> <textFieldExpression><![CDATA[$F{localidade}]]></textFieldExpression>
</textField> </textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="8982fe97-4cd3-44b2-a173-d900407614b3" stretchType="RelativeToBandHeight" x="313" y="0" width="76" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataEncerramento}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="b43ff719-78e5-42e4-a427-3740567f105e" stretchType="RelativeToBandHeight" x="482" y="0" width="73" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{imei}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="8717aa25-4e17-4dd3-84b9-9c7e37d80940" stretchType="RelativeToBandHeight" x="389" y="0" width="93" height="10"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font size="7" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression>
</textField>
</band> </band>
</detail> </detail>
<columnFooter> <columnFooter>
@ -159,7 +201,7 @@
<noData> <noData>
<band height="20"> <band height="20">
<textField> <textField>
<reportElement x="0" y="0" width="555" height="20" uuid="6320f11e-df43-4140-8144-55d84dc92ce6"/> <reportElement uuid="6320f11e-df43-4140-8144-55d84dc92ce6" x="0" y="0" width="555" height="20"/>
<textElement markup="none"/> <textElement markup="none"/>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField> </textField>