Feito o agrupamento dos bilhetes conforme solicitação da qualidade.
bug#10771 dev:bruno qua:renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@80305 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
1417396e0c
commit
4fe4db191d
|
@ -3,10 +3,10 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.Timestamp;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -47,16 +47,16 @@ public class RelatorioBilhetesVendidosNovoLayout extends Relatorio {
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.append("select t.cveestado,");
|
sql.append("select t.cveestado,");
|
||||||
sql.append(" t.datavenda,");
|
sql.append(" to_char(t.dataVenda, 'dd/MM/yy') as dataVenda, ");
|
||||||
sql.append(" t.statuspassagem,");
|
sql.append(" t.statuspassagem,");
|
||||||
sql.append(" t.especie,");
|
sql.append(" t.especie,");
|
||||||
sql.append(" t.forminicial,");
|
sql.append(" t.forminicial,");
|
||||||
sql.append(" t.formfinal,");
|
sql.append(" t.formfinal,");
|
||||||
sql.append(" t.serie,");
|
sql.append(" t.serie,");
|
||||||
sql.append(" t.preciopagado as valorcontabil,");
|
sql.append(" sum(t.preciopagado) AS valorcontabil,");
|
||||||
sql.append(" t.preciopagado - (t.preciopagado * coalesce(t.porcredbaseicms / 100,0))as valorbasecalculo,");
|
sql.append(" sum(t.preciopagado - (t.preciopagado * coalesce(t.porcredbaseicms / 100,0)))AS valorbasecalculo,");
|
||||||
sql.append(" t.valoraliquiotaicms,");
|
sql.append(" t.valoraliquiotaicms,");
|
||||||
sql.append(" ((t.preciopagado - (t.preciopagado * coalesce(t.porcredbaseicms / 100,0))) * t.icms) / 100 as valoricms ");
|
sql.append(" sum( ((t.preciopagado - (t.preciopagado * coalesce(t.porcredbaseicms / 100,0))) * t.icms) / 100) AS valoricms ");
|
||||||
sql.append("from");
|
sql.append("from");
|
||||||
sql.append(" (select distinct est.icms,");
|
sql.append(" (select distinct est.icms,");
|
||||||
sql.append(" est.cveestado as cveestado,");
|
sql.append(" est.cveestado as cveestado,");
|
||||||
|
@ -107,7 +107,16 @@ public class RelatorioBilhetesVendidosNovoLayout extends Relatorio {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sql.append(") t ");
|
sql.append(") t ");
|
||||||
sql.append("order by t.cveestado, t.datavenda ");
|
sql.append("group by ");
|
||||||
|
sql.append("t.cveestado, ");
|
||||||
|
sql.append("to_char(t.dataVenda, 'dd/MM/yy'), ");
|
||||||
|
sql.append("t.statuspassagem, ");
|
||||||
|
sql.append("t.especie, ");
|
||||||
|
sql.append("t.forminicial, ");
|
||||||
|
sql.append("t.formfinal, ");
|
||||||
|
sql.append("t.serie, ");
|
||||||
|
sql.append("t.valoraliquiotaicms ");
|
||||||
|
sql.append("order by t.cveestado, to_char(t.dataVenda, 'dd/MM/yy') ");
|
||||||
|
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
|
NamedParameterStatement stmt = new NamedParameterStatement(conexao, sql.toString());
|
||||||
|
|
||||||
|
@ -139,14 +148,14 @@ public class RelatorioBilhetesVendidosNovoLayout extends Relatorio {
|
||||||
if (rset.getString("statuspassagem") != null) {
|
if (rset.getString("statuspassagem") != null) {
|
||||||
dataResult.put("statuspassagem", IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue());
|
dataResult.put("statuspassagem", IndStatusBoleto.valueOf(rset.getString("statuspassagem")).getValue());
|
||||||
}
|
}
|
||||||
bean.setDataVenda(rset.getTimestamp("datavenda") != null ? DateUtil.getStringDate(rset.getTimestamp("datavenda"), "dd/MM/yyyy HH:mm") : "");
|
bean.setDataVenda(rset.getString("datavenda") != null ? DateUtil.changeFormatStringDate(rset.getString("datavenda"),"dd/MM/yy", "dd/MM/yyyy") : "");
|
||||||
bean.setFormInicial((String) (rset.getObject("formInicial") == null ? "" : rset.getObject("formInicial")));
|
bean.setFormInicial((String) (rset.getObject("formInicial") == null ? "" : rset.getObject("formInicial")));
|
||||||
bean.setFormFinal((String) (rset.getObject("formfinal") == null ? "" : rset.getObject("formfinal")));
|
bean.setFormFinal((String) (rset.getObject("formfinal") == null ? "" : rset.getObject("formfinal")));
|
||||||
bean.setSerie((String) (rset.getObject("serie") == null ? "" : rset.getObject("serie")));
|
bean.setSerie((String) (rset.getObject("serie") == null ? "" : rset.getObject("serie")));
|
||||||
bean.setValorContabil(rset.getObject("valorcontabil") == null ? "" : df.format(rset.getFloat("valorcontabil")));
|
bean.setValorContabil((BigDecimal) (rset.getObject("valorcontabil") == null ? "" : rset.getObject("valorcontabil")));
|
||||||
bean.setValorBaseCalculo(rset.getObject("valorbasecalculo") == null ? "" : df.format(rset.getFloat("valorbasecalculo")));
|
bean.setValorBaseCalculo((BigDecimal) (rset.getObject("valorbasecalculo") == null ? "" : rset.getObject("valorbasecalculo")));
|
||||||
bean.setValorAliquiotaICMS(rset.getObject("valoraliquiotaicms") == null ? "" : df.format(rset.getFloat("valoraliquiotaicms")));
|
bean.setValorAliquiotaICMS((BigDecimal) (rset.getObject("valoraliquiotaicms") == null ? "" : rset.getObject("valoraliquiotaicms")));
|
||||||
bean.setValorICMS(rset.getObject("valoricms") == null ? "" : df.format(rset.getDouble("valoricms")));
|
bean.setValorICMS((BigDecimal) (rset.getObject("valoricms") == null ? "" : rset.getObject("valoricms")));
|
||||||
bean.setUf((String) (rset.getObject("cveestado") == null ? "" : rset.getObject("cveestado")));
|
bean.setUf((String) (rset.getObject("cveestado") == null ? "" : rset.getObject("cveestado")));
|
||||||
bean.setStatusPassagem((String) (rset.getObject("statuspassagem") != null && rset.getObject("statuspassagem").equals("V") ? "N" : rset.getString("statuspassagem")));
|
bean.setStatusPassagem((String) (rset.getObject("statuspassagem") != null && rset.getObject("statuspassagem").equals("V") ? "N" : rset.getString("statuspassagem")));
|
||||||
bean.setEspecie((String) (rset.getObject("especie") == null ? "" : rset.getObject("especie")));
|
bean.setEspecie((String) (rset.getObject("especie") == null ? "" : rset.getObject("especie")));
|
||||||
|
|
Binary file not shown.
|
@ -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="RelatorioDocumentosFiscais" pageWidth="898" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="858" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="RelatorioDocumentosFiscais" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
|
<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="RelatorioDocumentosFiscais" pageWidth="898" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="858" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" resourceBundle="RelatorioDocumentosFiscais" whenResourceMissingType="Empty" uuid="94834362-0ecc-46da-b0a2-5cdee355da3e">
|
||||||
<property name="ireport.zoom" value="1.0245201830476134"/>
|
<property name="ireport.zoom" value="1.0245201830476134"/>
|
||||||
<property name="ireport.x" value="0"/>
|
<property name="ireport.x" value="207"/>
|
||||||
<property name="ireport.y" value="0"/>
|
<property name="ireport.y" value="0"/>
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/>
|
||||||
|
@ -32,10 +32,10 @@
|
||||||
<field name="formFinal" class="java.lang.String"/>
|
<field name="formFinal" class="java.lang.String"/>
|
||||||
<field name="serie" class="java.lang.String"/>
|
<field name="serie" class="java.lang.String"/>
|
||||||
<field name="subSerie" class="java.lang.String"/>
|
<field name="subSerie" class="java.lang.String"/>
|
||||||
<field name="valorContabil" class="java.lang.String"/>
|
<field name="valorContabil" class="java.math.BigDecimal"/>
|
||||||
<field name="valorBaseCalculo" class="java.lang.String"/>
|
<field name="valorBaseCalculo" class="java.math.BigDecimal"/>
|
||||||
<field name="valorAliquiotaICMS" class="java.lang.String"/>
|
<field name="valorAliquiotaICMS" class="java.math.BigDecimal"/>
|
||||||
<field name="valorICMS" class="java.lang.String"/>
|
<field name="valorICMS" class="java.math.BigDecimal"/>
|
||||||
<field name="uf" class="java.lang.String"/>
|
<field name="uf" class="java.lang.String"/>
|
||||||
<field name="dataVenda" class="java.lang.String"/>
|
<field name="dataVenda" class="java.lang.String"/>
|
||||||
<field name="especie" class="java.lang.String"/>
|
<field name="especie" class="java.lang.String"/>
|
||||||
|
@ -239,7 +239,7 @@
|
||||||
</columnHeader>
|
</columnHeader>
|
||||||
<detail>
|
<detail>
|
||||||
<band height="23" splitType="Stretch">
|
<band height="23" splitType="Stretch">
|
||||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false">
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="781" y="1" width="76" height="22" isPrintWhenDetailOverflows="true" uuid="784343f8-f7aa-4997-82e7-312878bd9a27"/>
|
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="781" y="1" width="76" height="22" isPrintWhenDetailOverflows="true" uuid="784343f8-f7aa-4997-82e7-312878bd9a27"/>
|
||||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||||
<font size="11" isBold="false"/>
|
<font size="11" isBold="false"/>
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{formInicial}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{formInicial}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="560" y="1" width="83" height="22" isPrintWhenDetailOverflows="true" uuid="0ed9578b-73d5-4f51-b21c-07d9419bbc08"/>
|
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="560" y="1" width="83" height="22" isPrintWhenDetailOverflows="true" uuid="0ed9578b-73d5-4f51-b21c-07d9419bbc08"/>
|
||||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||||
<font size="11" isBold="false"/>
|
<font size="11" isBold="false"/>
|
||||||
|
@ -267,14 +267,14 @@
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{formFinal}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{formFinal}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="643" y="1" width="79" height="22" isPrintWhenDetailOverflows="true" uuid="92017408-1781-4e17-90b7-5ff86457cf6d"/>
|
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="643" y="1" width="79" height="22" isPrintWhenDetailOverflows="true" uuid="92017408-1781-4e17-90b7-5ff86457cf6d"/>
|
||||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||||
<font size="11" isBold="false"/>
|
<font size="11" isBold="false"/>
|
||||||
</textElement>
|
</textElement>
|
||||||
<textFieldExpression><![CDATA[$F{valorBaseCalculo}]]></textFieldExpression>
|
<textFieldExpression><![CDATA[$F{valorBaseCalculo}]]></textFieldExpression>
|
||||||
</textField>
|
</textField>
|
||||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
<textField isStretchWithOverflow="true" pattern="#,##0.00" isBlankWhenNull="true">
|
||||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="722" y="1" width="59" height="22" isPrintWhenDetailOverflows="true" uuid="36f5d507-0340-4c7e-b44b-5057c1e8bee6"/>
|
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="722" y="1" width="59" height="22" isPrintWhenDetailOverflows="true" uuid="36f5d507-0340-4c7e-b44b-5057c1e8bee6"/>
|
||||||
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
<textElement textAlignment="Center" verticalAlignment="Top" markup="none">
|
||||||
<font size="11" isBold="false"/>
|
<font size="11" isBold="false"/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class RelatorioBilhetesVendidosNovoLayoutBean {
|
public class RelatorioBilhetesVendidosNovoLayoutBean {
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ public class RelatorioBilhetesVendidosNovoLayoutBean {
|
||||||
private String formFinal;
|
private String formFinal;
|
||||||
private String serie;
|
private String serie;
|
||||||
private String subSerie;
|
private String subSerie;
|
||||||
private String valorContabil;
|
private BigDecimal valorContabil;
|
||||||
private String valorBaseCalculo;
|
private BigDecimal valorBaseCalculo;
|
||||||
private String valorAliquiotaICMS;
|
private BigDecimal valorAliquiotaICMS;
|
||||||
private String valorICMS;
|
private BigDecimal valorICMS;
|
||||||
private String uf;
|
private String uf;
|
||||||
private String especie;
|
private String especie;
|
||||||
private Integer estadoId;
|
private Integer estadoId;
|
||||||
|
@ -20,7 +20,7 @@ public class RelatorioBilhetesVendidosNovoLayoutBean {
|
||||||
private String bilhete;
|
private String bilhete;
|
||||||
private String dataVenda;
|
private String dataVenda;
|
||||||
private String codFiscal;
|
private String codFiscal;
|
||||||
|
|
||||||
public String getCodFiscal() {
|
public String getCodFiscal() {
|
||||||
return codFiscal;
|
return codFiscal;
|
||||||
}
|
}
|
||||||
|
@ -69,35 +69,35 @@ public class RelatorioBilhetesVendidosNovoLayoutBean {
|
||||||
this.subSerie = subSerie;
|
this.subSerie = subSerie;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValorContabil() {
|
public BigDecimal getValorContabil() {
|
||||||
return valorContabil;
|
return valorContabil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValorContabil(String valorContabil) {
|
public void setValorContabil(BigDecimal valorContabil) {
|
||||||
this.valorContabil = valorContabil;
|
this.valorContabil = valorContabil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValorBaseCalculo() {
|
public BigDecimal getValorBaseCalculo() {
|
||||||
return valorBaseCalculo;
|
return valorBaseCalculo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValorBaseCalculo(String valorBaseCalculo) {
|
public void setValorBaseCalculo(BigDecimal valorBaseCalculo) {
|
||||||
this.valorBaseCalculo = valorBaseCalculo;
|
this.valorBaseCalculo = valorBaseCalculo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValorAliquiotaICMS() {
|
public BigDecimal getValorAliquiotaICMS() {
|
||||||
return valorAliquiotaICMS;
|
return valorAliquiotaICMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValorAliquiotaICMS(String valorAliquiotaICMS) {
|
public void setValorAliquiotaICMS(BigDecimal valorAliquiotaICMS) {
|
||||||
this.valorAliquiotaICMS = valorAliquiotaICMS;
|
this.valorAliquiotaICMS = valorAliquiotaICMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValorICMS() {
|
public BigDecimal getValorICMS() {
|
||||||
return valorICMS;
|
return valorICMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValorICMS(String valorICMS) {
|
public void setValorICMS(BigDecimal valorICMS) {
|
||||||
this.valorICMS = valorICMS;
|
this.valorICMS = valorICMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue