Merge pull request 'AL-1904' (#39) from AL-1904 into master

Reviewed-on: http://18.235.188.113:3000/adm/VentaBoletosAdm/pulls/39
Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>
Reviewed-by: wallace <wallace@rjconsultores.com.br>
master
Gleison da Cruz 2023-01-03 18:39:56 +00:00
commit 04fd4ce744
6 changed files with 302 additions and 268 deletions

516
pom.xml
View File

@ -1,259 +1,259 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.0.29</version>
<packaging>war</packaging>
<properties>
<modelWeb.version>1.0.20</modelWeb.version>
<flyway.version>1.0.11</flyway.version>
</properties>
<distributionManagement>
<repository>
<id>rj-releases</id>
<url>http://52.5.53.15:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<directory>src/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<warSourceDirectory>web</warSourceDirectory>
<outputFileNameMapping>@{artifactId}@.@{extension}@</outputFileNameMapping>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>3.0.0.Final</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ModelWeb</artifactId>
<version>${modelWeb.version}</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>IntegracaoReceitaDespesa</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>WSTotvs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>WSAG</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Auditador</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>GeneradorBoletosCNAB</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>silvergray</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.14.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.zkoss.common</groupId>
<artifactId>zcommon</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zhtml</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zk</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkplus</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zul</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>ckez</artifactId>
<version>3.6.0.0</version>
</dependency>
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>fckez</artifactId>
<version>2.6.1_1</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkspring-security</artifactId>
<version>3.0RC</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>com.trg</groupId>
<artifactId>trg-search</artifactId>
<version>0.4.3</version>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>quartz-all</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0-1</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<classifier>jdk16</classifier>
<version>4.11.2</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.1.6</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
</dependencies>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.0.30</version>
<packaging>war</packaging>
<properties>
<modelWeb.version>1.0.20</modelWeb.version>
<flyway.version>1.0.11</flyway.version>
</properties>
<distributionManagement>
<repository>
<id>rj-releases</id>
<url>http://52.5.53.15:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<directory>src/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<warSourceDirectory>web</warSourceDirectory>
<outputFileNameMapping>@{artifactId}@.@{extension}@</outputFileNameMapping>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>3.0.0.Final</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ModelWeb</artifactId>
<version>${modelWeb.version}</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>${flyway.version}</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>IntegracaoReceitaDespesa</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>WSTotvs</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>WSAG</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Auditador</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>GeneradorBoletosCNAB</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>silvergray</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.14.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.zkoss.common</groupId>
<artifactId>zcommon</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zhtml</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zk</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkplus</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zul</artifactId>
<version>5.0.9</version>
</dependency>
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>ckez</artifactId>
<version>3.6.0.0</version>
</dependency>
<dependency>
<groupId>org.zkoss.zkforge</groupId>
<artifactId>fckez</artifactId>
<version>2.6.1_1</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkspring-security</artifactId>
<version>3.0RC</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>com.trg</groupId>
<artifactId>trg-search</artifactId>
<version>0.4.3</version>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>quartz-all</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0-1</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<classifier>jdk16</classifier>
<version>4.11.2</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.1.6</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
</dependencies>
</project>

View File

@ -82,6 +82,7 @@ public class RelatorioEstornoCartao extends Relatorio {
dataResult.put("descmotivo", rset.getString("descmotivo"));
dataResult.put("adquirente", rset.getString("adquirente"));
dataResult.put("estabelecimento", rset.getString("estabelecimento"));
dataResult.put("nsuhost", rset.getString("nsuhost"));
this.dados.add(dataResult);
@ -136,7 +137,21 @@ public class RelatorioEstornoCartao extends Relatorio {
sql.append(" AND c.corrida_id = dec.corrida_id ");
sql.append(" AND c.numfoliosistema = dec.numfoliosistema ");
sql.append(" AND c.indreimpresion = 1 ");
sql.append(" AND rownum = 1), 'CANCELAMENTO') as descmotivo ");
sql.append(" AND rownum = 1), 'CANCELAMENTO') as descmotivo, ");
//SubSelect para evitar duplicacao dos registros por causa do join com a caja
sql.append(" COALESCE(( select ct.nsuhost ");
sql.append(" from caja c inner join caja_formapago cfp on cfp.caja_id = c.caja_id ");
sql.append(" left join caja_det_pago cdp on cdp.cajaformapago_id = cfp.cajaformapago_id ");
sql.append(" left join caja_tarjeta ct on ct.cajadetpago_id = cdp.cajadetpago_id ");
sql.append(" inner join forma_pago fp on fp.formapago_id = cfp.formapago_id ");
sql.append(" where ");
sql.append(" c.numoperacion = dec.numoperacion ");
sql.append(" AND c.origen_id = dec.origen_id ");
sql.append(" AND c.destino_id = dec.destino_id ");
sql.append(" AND c.corrida_id = dec.corrida_id ");
sql.append(" AND coalesce( ct.nsuhost, '0') <> '0' ");
sql.append(" AND rownum = 1), '') as nsuhost ");
sql.append(" FROM ");
@ -187,7 +202,7 @@ public class RelatorioEstornoCartao extends Relatorio {
}
sql.append(" AND DEC.FECREGISTRO BETWEEN :data_inicial AND :data_final ");
sql.append(" ORDER BY DEC.FECREGISTRO ");
sql.append(" ORDER BY e.nombempresa, DEC.FECREGISTRO ");
return sql.toString();
}

View File

@ -35,4 +35,5 @@ empresa.label=Empresa:
formaPago.label=Forma de Pagamento
pontoDeventa.label=Ponto de Venda
estabelecimento.label=Estab.
adquirente.label=Adquirente
adquirente.label=Adqui.
nsuhost.label=NSU/Host

View File

@ -36,4 +36,5 @@ formaPago.label=Forma de Pagamento
pontoDeventa.label=Ponto de Venda
motivoCancelamento.label=Motivo Cancelamento
estabelecimento.label=Estab.
adquirente.label=Adquirente
adquirente.label=Adqui.
nsuhost.label=NSU/Host

View File

@ -44,6 +44,9 @@
<field name="estabelecimento" class="java.lang.String">
<fieldDescription><![CDATA[Estabelecimento]]></fieldDescription>
</field>
<field name="nsuhost" class="java.lang.String">
<fieldDescription><![CDATA[NsuHost]]></fieldDescription>
</field>
<group name="empresa" isStartNewPage="true" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="150">
<groupExpression><![CDATA[$F{nombempresa}]]></groupExpression>
<groupHeader>
@ -183,14 +186,14 @@
<textFieldExpression><![CDATA[$R{dataServico.label}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="84ffd875-2c40-418f-916d-305d98a04dfc" stretchType="RelativeToTallestObject" x="671" y="27" width="35" height="20"/>
<reportElement uuid="84ffd875-2c40-418f-916d-305d98a04dfc" stretchType="RelativeToTallestObject" x="671" y="27" width="28" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{bilhete.label}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="53e910c5-7876-4cad-96c8-8bebeabcc0b6" stretchType="RelativeToTallestObject" x="706" y="27" width="30" height="20"/>
<reportElement uuid="53e910c5-7876-4cad-96c8-8bebeabcc0b6" stretchType="RelativeToTallestObject" x="699" y="27" width="26" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
@ -218,7 +221,7 @@
<textFieldExpression><![CDATA[$R{motivoCancelamento.label}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="468fff71-1268-4136-9d45-c81f154addae" stretchType="RelativeToTallestObject" x="737" y="27" width="30" height="20"/>
<reportElement uuid="468fff71-1268-4136-9d45-c81f154addae" stretchType="RelativeToTallestObject" x="745" y="27" width="22" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
@ -231,6 +234,13 @@
</textElement>
<textFieldExpression><![CDATA[$R{estabelecimento.label}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="14265fbe-d0be-4a76-b76b-844f21ca3612" stretchType="RelativeToTallestObject" x="725" y="27" width="20" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{nsuhost.label}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
@ -449,14 +459,14 @@
<textFieldExpression><![CDATA[$F{dataServico}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="ca18697e-f3ef-4b34-a10d-9c92b281be56" stretchType="RelativeToTallestObject" x="671" y="0" width="35" height="27"/>
<reportElement uuid="ca18697e-f3ef-4b34-a10d-9c92b281be56" stretchType="RelativeToTallestObject" x="671" y="0" width="28" height="27"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true">
<reportElement uuid="bd34bccf-8a59-452a-8030-425e4974acae" stretchType="RelativeToTallestObject" x="706" y="0" width="30" height="27"/>
<reportElement uuid="bd34bccf-8a59-452a-8030-425e4974acae" stretchType="RelativeToTallestObject" x="699" y="0" width="26" height="27"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
@ -500,7 +510,7 @@
<textFieldExpression><![CDATA[$F{descmotivo}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true">
<reportElement uuid="3c56f360-8ffd-451c-9287-b401874fa805" stretchType="RelativeToTallestObject" x="735" y="0" width="34" height="26"/>
<reportElement uuid="3c56f360-8ffd-451c-9287-b401874fa805" stretchType="RelativeToTallestObject" x="745" y="0" width="22" height="26"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
@ -513,6 +523,13 @@
</textElement>
<textFieldExpression><![CDATA[$F{estabelecimento}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true">
<reportElement uuid="cfb968a8-fc71-456f-84e6-bfc132b09fe8" stretchType="RelativeToTallestObject" x="725" y="0" width="20" height="27"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{nsuhost}]]></textFieldExpression>
</textField>
</band>
</detail>
<summary>