fixes bug#8446
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@66334 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
839b6b98a8
commit
d293b86cb2
|
@ -14,6 +14,8 @@ import java.util.Map;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.commons.lang.WordUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Cliente;
|
import com.rjconsultores.ventaboletos.entidad.Cliente;
|
||||||
|
@ -28,10 +30,13 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
|
|
||||||
private static Logger log = org.slf4j.LoggerFactory.getLogger(RelatorioCarteirinha.class);
|
private static Logger log = org.slf4j.LoggerFactory.getLogger(RelatorioCarteirinha.class);
|
||||||
|
|
||||||
private List<Cliente> clientes;
|
public enum TipoLayout { LAYOUT_1, LAYOUT_2, LAYOUT_CLIENTE }
|
||||||
private Integer tipoLayout;
|
|
||||||
|
|
||||||
public RelatorioCarteirinha(Map<String, Object> parametros, final List<Cliente> lsClienteSelecionados, Connection conexao, Integer tipoLayout) throws Exception {
|
private List<Cliente> clientes;
|
||||||
|
private TipoLayout tipoLayout;
|
||||||
|
|
||||||
|
public RelatorioCarteirinha(Map<String, Object> parametros, final List<Cliente> lsClienteSelecionados,
|
||||||
|
TipoLayout tipoLayout, Connection conexao) throws Exception {
|
||||||
super(parametros, conexao);
|
super(parametros, conexao);
|
||||||
this.clientes = lsClienteSelecionados;
|
this.clientes = lsClienteSelecionados;
|
||||||
this.tipoLayout = tipoLayout;
|
this.tipoLayout = tipoLayout;
|
||||||
|
@ -45,12 +50,8 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNome() {
|
public String getNome() {
|
||||||
if(tipoLayout.intValue() == 1 ){
|
String layoutCamelCase = StringUtils.remove(WordUtils.capitalizeFully(tipoLayout.name(), new char[] {'_'}), "_");
|
||||||
return this.getClass().getSimpleName();
|
return this.getClass().getSimpleName() + layoutCamelCase;
|
||||||
}else{
|
|
||||||
return "RelatorioCarteirinhaLayout2";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,10 +82,10 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
}
|
}
|
||||||
for(int i = 0; i < clientes.size(); i++){
|
for (Cliente cliente : clientes) {
|
||||||
if(validadeDescuentoValida(clientes.get(i))){
|
if(tipoLayout.equals(TipoLayout.LAYOUT_CLIENTE) || validadeDescuentoValida(cliente)){
|
||||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||||
preencherDadosCliente(i, dataResult);
|
preencherDadosCliente(cliente, dataResult);
|
||||||
preencherDadosEmpresa(dados, rset, image, dataResult);
|
preencherDadosEmpresa(dados, rset, image, dataResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,40 +115,40 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
dados.add(dataResult);
|
dados.add(dataResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void preencherDadosCliente(int i, Map<String, Object> dataResult) {
|
private void preencherDadosCliente(Cliente cliente, Map<String, Object> dataResult) {
|
||||||
|
|
||||||
String numeroFidelidade = null;
|
String numeroFidelidade = null;
|
||||||
|
|
||||||
for(ClienteFidelidad clienteFidelidad : clientes.get(i).getListClienteFidelidadActivos()){
|
for(ClienteFidelidad clienteFidelidad : cliente.getListClienteFidelidadActivos()){
|
||||||
clienteFidelidad.getEmpresa().getEmpresaId().equals(clientes.get(i));
|
clienteFidelidad.getEmpresa().getEmpresaId().equals(cliente);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(clientes.get(i).getListClienteFidelidadActivos() != null && clientes.get(i).getListClienteFidelidadActivos().size() > 0){
|
if(cliente.getListClienteFidelidadActivos() != null && cliente.getListClienteFidelidadActivos().size() > 0){
|
||||||
numeroFidelidade = clientes.get(i).getListClienteFidelidadActivos().get(0).getTarjetaFidelidad().getNumTarjeta().toString();
|
numeroFidelidade = cliente.getListClienteFidelidadActivos().get(0).getTarjetaFidelidad().getNumTarjeta().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
dataResult.put("numeroCliente", numeroFidelidade != null? numeroFidelidade : "");
|
dataResult.put("numeroCliente", numeroFidelidade != null? numeroFidelidade : "");
|
||||||
dataResult.put("nomeCliente", clientes.get(i).getNombcliente());
|
dataResult.put("nomeCliente", cliente.getNombcliente());
|
||||||
|
|
||||||
if(clientes.get(i).getLsClienteDireccion() != null && clientes.get(i).getLsClienteDireccion().size() > 0){
|
if(cliente.getLsClienteDireccion() != null && cliente.getLsClienteDireccion().size() > 0){
|
||||||
ClienteDireccion clienteDireccion = clientes.get(i).getLsClienteDireccion().get(0);
|
ClienteDireccion clienteDireccion = cliente.getLsClienteDireccion().get(0);
|
||||||
dataResult.put("enderecoCliente", construirStringEnderecoCompletoCliente(clienteDireccion));
|
dataResult.put("enderecoCliente", construirStringEnderecoCompletoCliente(clienteDireccion));
|
||||||
}else{
|
}else{
|
||||||
dataResult.put("enderecoCliente", "");
|
dataResult.put("enderecoCliente", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(clientes.get(i).getEscola() != null){
|
if(cliente.getEscola() != null){
|
||||||
dataResult.put("escola", clientes.get(i).getEscola().getNombescola());
|
dataResult.put("escola", cliente.getEscola().getNombescola());
|
||||||
}else{
|
}else{
|
||||||
dataResult.put("escola", "");
|
dataResult.put("escola", "");
|
||||||
}
|
}
|
||||||
Date validadeDate = null;
|
Date validadeDate = null;
|
||||||
if(clientes.get(i).getLsClienteDescuento() != null && !clientes.get(i).getLsClienteDescuento().isEmpty() &&
|
if(cliente.getLsClienteDescuento() != null && !cliente.getLsClienteDescuento().isEmpty() &&
|
||||||
clientes.get(i).getLsClienteDescuento().get(0) != null){
|
cliente.getLsClienteDescuento().get(0) != null){
|
||||||
validadeDate = clientes.get(i).getLsClienteDescuento().get(0).getFecFin();
|
validadeDate = cliente.getLsClienteDescuento().get(0).getFecFin();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ClienteDescuento cd : clientes.get(i).getLsClienteDescuento()){
|
for(ClienteDescuento cd : cliente.getLsClienteDescuento()){
|
||||||
if(validadeDate != null && cd.getFecFin().after(validadeDate) ){
|
if(validadeDate != null && cd.getFecFin().after(validadeDate) ){
|
||||||
validadeDate = cd.getFecFin();
|
validadeDate = cd.getFecFin();
|
||||||
}
|
}
|
||||||
|
@ -159,17 +160,17 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
dataResult.put("validade", "" );
|
dataResult.put("validade", "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(clientes.get(i).getLsClienteDescuento() != null && clientes.get(i).getLsClienteDescuento().size() > 0){
|
if(cliente.getLsClienteDescuento() != null && cliente.getLsClienteDescuento().size() > 0){
|
||||||
StringBuilder trechosDescuento = new StringBuilder();
|
StringBuilder trechosDescuento = new StringBuilder();
|
||||||
for(ClienteDescuento clienteDescuento : clientes.get(i).getLsClienteDescuento()){
|
for(ClienteDescuento clienteDescuento : cliente.getLsClienteDescuento()){
|
||||||
if(tipoLayout.intValue() == 2 && clienteDescuento.getOrigem().getParadaId().intValue() != -1 ){
|
if(tipoLayout.equals(TipoLayout.LAYOUT_2) && clienteDescuento.getOrigem().getParadaId().intValue() != -1 ){
|
||||||
trechosDescuento.append(clienteDescuento.getOrigem().getCveparada());
|
trechosDescuento.append(clienteDescuento.getOrigem().getCveparada());
|
||||||
}else{
|
}else{
|
||||||
trechosDescuento.append(clienteDescuento.getOrigem().getDescparada());
|
trechosDescuento.append(clienteDescuento.getOrigem().getDescparada());
|
||||||
}
|
}
|
||||||
|
|
||||||
trechosDescuento.append(" >> ");
|
trechosDescuento.append(" >> ");
|
||||||
if(tipoLayout.intValue() == 2 && clienteDescuento.getDestino().getParadaId().intValue() != -1 ){
|
if(tipoLayout.equals(TipoLayout.LAYOUT_2) && clienteDescuento.getDestino().getParadaId().intValue() != -1 ){
|
||||||
trechosDescuento.append(clienteDescuento.getDestino().getCveparada());
|
trechosDescuento.append(clienteDescuento.getDestino().getCveparada());
|
||||||
}else{
|
}else{
|
||||||
trechosDescuento.append(clienteDescuento.getDestino().getDescparada());
|
trechosDescuento.append(clienteDescuento.getDestino().getDescparada());
|
||||||
|
@ -216,44 +217,24 @@ public class RelatorioCarteirinha extends Relatorio {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String contruirStringCnpjIEstadual(ResultSet rset) throws SQLException {
|
private String contruirStringCnpjIEstadual(ResultSet rset) throws SQLException {
|
||||||
StringBuilder cnpjIEstadualEmpresa = new StringBuilder();
|
String cnpj = rset.getString("CNPJ");
|
||||||
cnpjIEstadualEmpresa.append("CNPJ ");
|
String inscEstadual = rset.getString("NUMINSCRICAOESTADUAL");
|
||||||
cnpjIEstadualEmpresa.append(rset.getString("CNPJ") != null ? rset.getString("CNPJ") : "" );
|
return String.format("CNPJ %s - Inscr. Estadual %s", cnpj, inscEstadual);
|
||||||
cnpjIEstadualEmpresa.append(" - ");
|
|
||||||
cnpjIEstadualEmpresa.append("Inscr. Estadual ");
|
|
||||||
cnpjIEstadualEmpresa.append(rset.getString("NUMINSCRICAOESTADUAL") != null ? rset.getString("NUMINSCRICAOESTADUAL") : "" );
|
|
||||||
return cnpjIEstadualEmpresa.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String construirStringCepTelefoneEmpresa(ResultSet rset) throws SQLException {
|
private String construirStringCepTelefoneEmpresa(ResultSet rset) throws SQLException {
|
||||||
StringBuilder cepTelefoneEmpresa = new StringBuilder();
|
String cep = rset.getString("CEP");
|
||||||
cepTelefoneEmpresa.append("CEP ");
|
String fone = rset.getString("NUMTELEFONO");
|
||||||
cepTelefoneEmpresa.append(rset.getString("CEP") != null ? rset.getString("CEP") : "");
|
return String.format("CEP %s - Fone %s", cep, fone);
|
||||||
cepTelefoneEmpresa.append(" - ");
|
|
||||||
cepTelefoneEmpresa.append("Fone ");
|
|
||||||
cepTelefoneEmpresa.append(rset.getString("NUMTELEFONO") != null ? rset.getString("NUMTELEFONO") : "" );
|
|
||||||
return cepTelefoneEmpresa.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String construirStringEnderecoCompletoEmpresa(ResultSet rset) throws SQLException {
|
private String construirStringEnderecoCompletoEmpresa(ResultSet rset) throws SQLException {
|
||||||
StringBuilder enderecoCompleto = new StringBuilder();
|
String logradouro = rset.getString("LOGRADOURO");
|
||||||
enderecoCompleto.append(rset.getString("LOGRADOURO") != null ? rset.getString("LOGRADOURO") : "" );
|
String numero = rset.getString("NUMERO");
|
||||||
enderecoCompleto.append(", ");
|
String bairro = rset.getString("BAIRRO");
|
||||||
enderecoCompleto.append(rset.getString("NUMERO") != null ? rset.getString("NUMERO") : "");
|
String ciudad = rset.getString("NOMBCIUDAD");
|
||||||
enderecoCompleto.append(" - ");
|
String estado = rset.getString("NOMBESTADO");
|
||||||
enderecoCompleto.append(rset.getString("BAIRRO") != null ? rset.getString("BAIRRO") : "");
|
return String.format("%s, %s - %s - %s - %s", logradouro, numero, bairro, ciudad, estado);
|
||||||
enderecoCompleto.append(" - ");
|
|
||||||
enderecoCompleto.append(rset.getString("NOMBCIUDAD") != null ? rset.getString("NOMBCIUDAD") : "");
|
|
||||||
enderecoCompleto.append(" - ");
|
|
||||||
enderecoCompleto.append(rset.getString("NOMBESTADO") != null ? rset.getString("NOMBESTADO") : "" );
|
|
||||||
return enderecoCompleto.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getTipoLayout() {
|
|
||||||
return tipoLayout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTipoLayout(Integer tipoLayout) {
|
|
||||||
this.tipoLayout = tipoLayout;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
label.titulo=CARTEIRA DE IDENTIFICAÇÃO
|
||||||
|
label.numero = Nº:
|
||||||
|
label.nome = Nome:
|
||||||
|
label.endereco = Endereço:
|
||||||
|
label.escola = Escola:
|
||||||
|
label.trajeto = Trajeto:
|
||||||
|
label.assinatura = Assinatura
|
||||||
|
label.de = de
|
||||||
|
label.validade = Validade
|
|
@ -0,0 +1,9 @@
|
||||||
|
label.titulo=CARTEIRA DE IDENTIFICAÇÃO
|
||||||
|
label.numero = Nº:
|
||||||
|
label.nome = Nome:
|
||||||
|
label.endereco = Endereço:
|
||||||
|
label.escola = Escola:
|
||||||
|
label.trajeto = Trajeto:
|
||||||
|
label.assinatura = Assinatura
|
||||||
|
label.de = de
|
||||||
|
label.validade = Validade
|
Binary file not shown.
|
@ -0,0 +1,237 @@
|
||||||
|
<?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="RelatorioCarteirinha" columnCount="2" printOrder="Horizontal" pageWidth="555" pageHeight="802" columnWidth="277" columnSpacing="1" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="45e60734-3047-4ed1-864d-5c96cbf2a87c">
|
||||||
|
<property name="ireport.zoom" value="2.0"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="35"/>
|
||||||
|
<style name="style1"/>
|
||||||
|
<field name="nomeEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="enderecoEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="cepTelefoneEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="cnpjIEstadualEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="local" class="java.lang.String"/>
|
||||||
|
<field name="logomarca" class="java.awt.Image"/>
|
||||||
|
<field name="nomeCliente" class="java.lang.String"/>
|
||||||
|
<field name="enderecoCliente" class="java.lang.String"/>
|
||||||
|
<field name="escola" class="java.lang.String"/>
|
||||||
|
<field name="trajeto" class="java.lang.String"/>
|
||||||
|
<field name="numeroCliente" class="java.lang.String"/>
|
||||||
|
<field name="dia" class="java.lang.String"/>
|
||||||
|
<field name="mes" class="java.lang.String"/>
|
||||||
|
<field name="ano" class="java.lang.String"/>
|
||||||
|
<field name="validade" class="java.lang.String"/>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="188" splitType="Stretch">
|
||||||
|
<rectangle>
|
||||||
|
<reportElement x="3" y="17" width="270" height="167" uuid="bc55347b-529d-42a3-be9a-ff3ffcff7c5e"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</rectangle>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="37" width="108" height="7" uuid="394f5c12-2c2c-4163-8bc3-acd6f3bc5d28"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{cepTelefoneEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<rectangle>
|
||||||
|
<reportElement x="8" y="68" width="86" height="112" uuid="83734f3b-766a-4763-be16-45b5069c07a4"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</rectangle>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="83" width="48" height="8" uuid="9cb7ec2e-f157-4aea-ab7b-949d4407876e"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.numero}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="95" width="48" height="7" uuid="db03a582-9ac3-4bd4-8601-b03e61d2d574"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.nome}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<image isUsingCache="true" evaluationTime="Auto">
|
||||||
|
<reportElement x="20" y="20" width="97" height="32" uuid="26b05150-ef3c-4858-b212-0bfac5b8acf8"/>
|
||||||
|
<imageExpression><![CDATA[$F{logomarca}]]></imageExpression>
|
||||||
|
</image>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="146" y="160" width="58" height="11" uuid="03905d16-be95-4402-a96c-94285b306567"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.assinatura}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement positionType="Float" x="98" y="159" width="156" height="1" uuid="a6e3aac5-6397-4ff0-981b-3e1b0d434947"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="96" y="172" width="100" height="10" uuid="9d29c54f-cd25-4a3d-bf57-376894802d22"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{local}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="208" y="172" width="15" height="10" uuid="3748a0d2-52f4-4d70-a615-94aabc419f3f"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.de}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="240" y="172" width="15" height="10" uuid="6c415b9e-2080-4767-a59d-197438e3b97c"/>
|
||||||
|
<textElement verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.de}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="83" width="146" height="8" isPrintWhenDetailOverflows="true" uuid="5039e861-4bf5-430f-abf0-98cfa54698f8"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{numeroCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="106" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="e420ff44-ca6a-4aac-b83d-a5150c5fd324"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{enderecoCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="95" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="f51b30e5-1cd8-4172-9430-e6a1e294ed16"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{nomeCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="116" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="54cf868a-7657-48b4-a8d7-4d288037eb62"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{escola}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="126" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="6c7dee6a-2ca8-4b8b-8e6e-143ac88d6870"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{trajeto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="20" width="108" height="7" uuid="df8ed424-684c-48a4-8aa3-5ecd916e17b9"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{nomeEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="29" width="108" height="7" uuid="e8992c9f-8d48-44cc-90fa-811f36c50c11"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{enderecoEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="45" width="108" height="7" uuid="79715320-72a3-4dc0-aa97-db4093ff03a4"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{cnpjIEstadualEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="116" width="48" height="7" uuid="4b3cd63f-ddbd-435b-8706-f5a644bc952f"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.escola}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="106" width="48" height="7" uuid="8301812f-003b-4eb8-96e8-3a24614bb2b3"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.endereco}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="126" width="48" height="7" uuid="7cbd4d0f-3dae-42f9-a4fa-9f9f9491e6f7"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.trajeto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="39" y="53" width="211" height="14" uuid="1b9eb694-5e65-461d-89dd-76725bfe36c7"/>
|
||||||
|
<textElement textAlignment="Center" markup="none">
|
||||||
|
<font size="8" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.titulo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="195" y="172" width="13" height="10" uuid="d81de290-edf0-4e39-af32-7ab6a4cc944c"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="223" y="172" width="17" height="10" uuid="8c8e7468-0133-4b72-a5c2-0374b3a77229"/>
|
||||||
|
<textElement verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{mes}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="255" y="172" width="17" height="10" uuid="6bab4624-e5ad-4ac0-98a9-8c686673ba08"/>
|
||||||
|
<textElement verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{ano}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement positionType="Float" x="127" y="136" width="143" height="7" isPrintWhenDetailOverflows="true" uuid="0beed54d-e5b1-4a71-aa81-4a9d08215fe1"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{validade}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="136" width="48" height="7" uuid="6dd238c4-a42f-4f67-89c8-b988e1bb0320"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.validade}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
</jasperReport>
|
Binary file not shown.
|
@ -0,0 +1,223 @@
|
||||||
|
<?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="RelatorioCarteirinha" columnCount="2" printOrder="Horizontal" pageWidth="555" pageHeight="802" columnWidth="277" columnSpacing="1" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="45e60734-3047-4ed1-864d-5c96cbf2a87c">
|
||||||
|
<property name="ireport.zoom" value="2.0"/>
|
||||||
|
<property name="ireport.x" value="0"/>
|
||||||
|
<property name="ireport.y" value="0"/>
|
||||||
|
<style name="style1"/>
|
||||||
|
<field name="nomeEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="enderecoEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="cepTelefoneEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="cnpjIEstadualEmpresa" class="java.lang.String"/>
|
||||||
|
<field name="local" class="java.lang.String"/>
|
||||||
|
<field name="logomarca" class="java.awt.Image"/>
|
||||||
|
<field name="nomeCliente" class="java.lang.String"/>
|
||||||
|
<field name="enderecoCliente" class="java.lang.String"/>
|
||||||
|
<field name="escola" class="java.lang.String"/>
|
||||||
|
<field name="trajeto" class="java.lang.String"/>
|
||||||
|
<field name="numeroCliente" class="java.lang.String"/>
|
||||||
|
<field name="dia" class="java.lang.String"/>
|
||||||
|
<field name="mes" class="java.lang.String"/>
|
||||||
|
<field name="ano" class="java.lang.String"/>
|
||||||
|
<field name="validade" class="java.lang.String"/>
|
||||||
|
<background>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</background>
|
||||||
|
<title>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</title>
|
||||||
|
<pageHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageHeader>
|
||||||
|
<columnHeader>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnHeader>
|
||||||
|
<detail>
|
||||||
|
<band height="188" splitType="Stretch">
|
||||||
|
<rectangle>
|
||||||
|
<reportElement x="3" y="17" width="270" height="167" uuid="bc55347b-529d-42a3-be9a-ff3ffcff7c5e"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</rectangle>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="37" width="108" height="7" uuid="394f5c12-2c2c-4163-8bc3-acd6f3bc5d28"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{cepTelefoneEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<rectangle>
|
||||||
|
<reportElement x="8" y="68" width="86" height="112" uuid="83734f3b-766a-4763-be16-45b5069c07a4"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</rectangle>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="83" width="48" height="8" uuid="9cb7ec2e-f157-4aea-ab7b-949d4407876e"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.numero}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="95" width="48" height="7" uuid="db03a582-9ac3-4bd4-8601-b03e61d2d574"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.nome}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<image isUsingCache="true" evaluationTime="Auto">
|
||||||
|
<reportElement x="20" y="20" width="97" height="32" uuid="26b05150-ef3c-4858-b212-0bfac5b8acf8"/>
|
||||||
|
<imageExpression><![CDATA[$F{logomarca}]]></imageExpression>
|
||||||
|
</image>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="146" y="160" width="58" height="11" uuid="03905d16-be95-4402-a96c-94285b306567"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.assinatura}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<line>
|
||||||
|
<reportElement positionType="Float" x="98" y="159" width="156" height="1" uuid="a6e3aac5-6397-4ff0-981b-3e1b0d434947"/>
|
||||||
|
<graphicElement>
|
||||||
|
<pen lineWidth="0.5"/>
|
||||||
|
</graphicElement>
|
||||||
|
</line>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="96" y="172" width="100" height="10" uuid="9d29c54f-cd25-4a3d-bf57-376894802d22"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{local}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="208" y="172" width="15" height="10" uuid="3748a0d2-52f4-4d70-a615-94aabc419f3f"/>
|
||||||
|
<textElement textAlignment="Center" verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.de}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="240" y="172" width="15" height="10" uuid="6c415b9e-2080-4767-a59d-197438e3b97c"/>
|
||||||
|
<textElement verticalAlignment="Middle" markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.de}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="83" width="146" height="8" isPrintWhenDetailOverflows="true" uuid="5039e861-4bf5-430f-abf0-98cfa54698f8"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{numeroCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="106" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="e420ff44-ca6a-4aac-b83d-a5150c5fd324"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{enderecoCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="95" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="f51b30e5-1cd8-4172-9430-e6a1e294ed16"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{nomeCliente}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement positionType="Float" x="125" y="126" width="146" height="7" isPrintWhenDetailOverflows="true" uuid="6c7dee6a-2ca8-4b8b-8e6e-143ac88d6870"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{trajeto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="20" width="108" height="7" uuid="df8ed424-684c-48a4-8aa3-5ecd916e17b9"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{nomeEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="29" width="108" height="7" uuid="e8992c9f-8d48-44cc-90fa-811f36c50c11"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{enderecoEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="142" y="45" width="108" height="7" uuid="79715320-72a3-4dc0-aa97-db4093ff03a4"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{cnpjIEstadualEmpresa}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="106" width="48" height="7" uuid="8301812f-003b-4eb8-96e8-3a24614bb2b3"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.endereco}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="126" width="48" height="7" uuid="7cbd4d0f-3dae-42f9-a4fa-9f9f9491e6f7"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.trajeto}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="39" y="53" width="211" height="14" uuid="1b9eb694-5e65-461d-89dd-76725bfe36c7"/>
|
||||||
|
<textElement textAlignment="Center" markup="none">
|
||||||
|
<font size="8" isBold="true"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.titulo}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="195" y="172" width="13" height="10" uuid="d81de290-edf0-4e39-af32-7ab6a4cc944c"/>
|
||||||
|
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{dia}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="223" y="172" width="17" height="10" uuid="8c8e7468-0133-4b72-a5c2-0374b3a77229"/>
|
||||||
|
<textElement verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{mes}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement x="255" y="172" width="17" height="10" uuid="6bab4624-e5ad-4ac0-98a9-8c686673ba08"/>
|
||||||
|
<textElement verticalAlignment="Middle">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{ano}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField isStretchWithOverflow="true">
|
||||||
|
<reportElement positionType="Float" x="127" y="136" width="143" height="7" isPrintWhenDetailOverflows="true" uuid="0beed54d-e5b1-4a71-aa81-4a9d08215fe1"/>
|
||||||
|
<textElement>
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$F{validade}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
<textField>
|
||||||
|
<reportElement positionType="Float" x="98" y="136" width="48" height="7" uuid="6dd238c4-a42f-4f67-89c8-b988e1bb0320"/>
|
||||||
|
<textElement markup="none">
|
||||||
|
<font size="5"/>
|
||||||
|
</textElement>
|
||||||
|
<textFieldExpression><![CDATA[$R{label.validade}]]></textFieldExpression>
|
||||||
|
</textField>
|
||||||
|
</band>
|
||||||
|
</detail>
|
||||||
|
<columnFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</columnFooter>
|
||||||
|
<pageFooter>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</pageFooter>
|
||||||
|
<summary>
|
||||||
|
<band splitType="Stretch"/>
|
||||||
|
</summary>
|
||||||
|
</jasperReport>
|
|
@ -17,7 +17,7 @@ import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radiogroup;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.hibernate.ClienteDescuentoHibernateDAO;
|
import com.rjconsultores.ventaboletos.dao.hibernate.ClienteDescuentoHibernateDAO;
|
||||||
import com.rjconsultores.ventaboletos.dao.hibernate.ClienteDireccionHibernateDAO;
|
import com.rjconsultores.ventaboletos.dao.hibernate.ClienteDireccionHibernateDAO;
|
||||||
|
@ -27,7 +27,6 @@ import com.rjconsultores.ventaboletos.entidad.ClienteDireccion;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCarteirinha;
|
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioCarteirinha;
|
||||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||||
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
@ -47,13 +46,11 @@ public class RelatorioCarteirinhaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private MyComboboxEstandar cmbEmpresa;
|
private MyComboboxEstandar cmbEmpresa;
|
||||||
private List<Empresa> lsEmpresa;
|
private List<Empresa> lsEmpresa;
|
||||||
private Radio layout1;
|
private Radiogroup rgLayout;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EmpresaService empresaService;
|
private EmpresaService empresaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConstanteService constanteService;
|
|
||||||
@Autowired
|
|
||||||
private DataSource dataSourceRead;
|
private DataSource dataSourceRead;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -87,68 +84,31 @@ public class RelatorioCarteirinhaController extends MyGenericForwardComposer {
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
private void executarRelatorio() throws Exception {
|
private void executarRelatorio() throws Exception {
|
||||||
|
|
||||||
if(layout1.isChecked()){
|
|
||||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
|
||||||
if(itemEmpresa != null && clienteSelList.getData() != null && clienteSelList.getData().length > 0){
|
|
||||||
Relatorio relatorio;
|
|
||||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
|
||||||
StringBuilder filtro = new StringBuilder();
|
|
||||||
List<Cliente> lsClienteSelecionados = new ArrayList(Arrays.asList(clienteSelList.getData()));
|
List<Cliente> lsClienteSelecionados = new ArrayList(Arrays.asList(clienteSelList.getData()));
|
||||||
filtro.append("Empresa: ");
|
|
||||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
||||||
filtro.append(empresa.getNombempresa() + ";");
|
RelatorioCarteirinha.TipoLayout tipoLayout = RelatorioCarteirinha.TipoLayout.valueOf(rgLayout.getSelectedItem().getValue());
|
||||||
relatorio = new RelatorioCarteirinha(parametros, lsClienteSelecionados, dataSourceRead.getConnection(), 1);
|
Relatorio relatorio = new RelatorioCarteirinha(parametros, lsClienteSelecionados, tipoLayout, dataSourceRead.getConnection());
|
||||||
|
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
args.put("relatorio", relatorio);
|
args.put("relatorio", relatorio);
|
||||||
openWindow("/component/reportView.zul",
|
openWindow("/component/reportView.zul",
|
||||||
Labels.getLabel("carteirinhaController.window.title"), args, MODAL);
|
Labels.getLabel("carteirinhaController.window.title"), args, MODAL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
if(clienteSelList.getData() == null || clienteSelList.getData().length == 0){
|
|
||||||
|
if(clienteSelList.getData().length == 0){
|
||||||
Messagebox.show(Labels.getLabel("relatorioCarterinhaController.selecao.cliente"), Labels.getLabel("carteirinhaController.window.title"),
|
Messagebox.show(Labels.getLabel("relatorioCarterinhaController.selecao.cliente"), Labels.getLabel("carteirinhaController.window.title"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
|
||||||
if(itemEmpresa != null && clienteSelList.getData() != null && clienteSelList.getData().length > 0){
|
|
||||||
Relatorio relatorio;
|
|
||||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
|
||||||
StringBuilder filtro = new StringBuilder();
|
|
||||||
List<Cliente> lsClienteSelecionados = new ArrayList(Arrays.asList(clienteSelList.getData()));
|
|
||||||
filtro.append("Empresa: ");
|
|
||||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
|
||||||
parametros.put("EMPRESA_ID", empresa.getEmpresaId());
|
|
||||||
filtro.append(empresa.getNombempresa() + ";");
|
|
||||||
relatorio = new RelatorioCarteirinha(parametros, lsClienteSelecionados, dataSourceRead.getConnection(), 2);
|
|
||||||
Map args = new HashMap();
|
|
||||||
args.put("relatorio", relatorio);
|
|
||||||
openWindow("/component/reportView.zul",
|
|
||||||
Labels.getLabel("carteirinhaController.window.title"), args, MODAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if(clienteSelList.getData() == null || clienteSelList.getData().length == 0){
|
|
||||||
Messagebox.show(Labels.getLabel("relatorioCarterinhaController.selecao.cliente"), Labels.getLabel("carteirinhaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (InterruptedException ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception{
|
|
||||||
executarRelatorio();
|
executarRelatorio();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executarPesquisaCliente() {
|
private void executarPesquisaCliente() {
|
||||||
|
|
|
@ -6782,6 +6782,9 @@ relatorioCarterinhaController.lblDocumento = Documento
|
||||||
relatorioCarterinhaController.selecao.cliente = Seleccione al menos un cliente
|
relatorioCarterinhaController.selecao.cliente = Seleccione al menos un cliente
|
||||||
editarConexionExcepcionRutaController.rutaId.label=Linea ID
|
editarConexionExcepcionRutaController.rutaId.label=Linea ID
|
||||||
relatorioCarterinhaController.lblLayout = Layout
|
relatorioCarterinhaController.lblLayout = Layout
|
||||||
|
relatorioCarterinhaController.lblLayout1 = Estudante 1
|
||||||
|
relatorioCarterinhaController.lblLayout2 = Estudante 2
|
||||||
|
relatorioCarterinhaController.lblLayoutCliente = Cliente
|
||||||
|
|
||||||
# Importacion Fiscal
|
# Importacion Fiscal
|
||||||
busquedaImportacionFiscalEcfController.window.title=Impresión Fiscal :: ECF
|
busquedaImportacionFiscalEcfController.window.title=Impresión Fiscal :: ECF
|
||||||
|
|
|
@ -6961,6 +6961,9 @@ relatorioCarterinhaController.lblIdCliente = Id
|
||||||
relatorioCarterinhaController.lblDocumento = Documento
|
relatorioCarterinhaController.lblDocumento = Documento
|
||||||
relatorioCarterinhaController.selecao.cliente = Selecione pelo menos um cliente
|
relatorioCarterinhaController.selecao.cliente = Selecione pelo menos um cliente
|
||||||
relatorioCarterinhaController.lblLayout = Layout
|
relatorioCarterinhaController.lblLayout = Layout
|
||||||
|
relatorioCarterinhaController.lblLayout1 = Estudante 1
|
||||||
|
relatorioCarterinhaController.lblLayout2 = Estudante 2
|
||||||
|
relatorioCarterinhaController.lblLayoutCliente = Cliente
|
||||||
|
|
||||||
|
|
||||||
editarConexionExcepcionRutaController.rutaId.label=Linha ID
|
editarConexionExcepcionRutaController.rutaId.label=Linha ID
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winFiltroCarteirinha"
|
<window id="winFiltroCarteirinha"
|
||||||
apply="${relatorioCarterinhaController}" contentStyle="overflow:auto"
|
apply="${relatorioCarterinhaController}" contentStyle="overflow:auto"
|
||||||
height="438px" width="600px" border="normal">
|
height="475px" width="600px" border="normal">
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="25%" />
|
<column width="25%" />
|
||||||
|
@ -70,17 +70,12 @@
|
||||||
<label
|
<label
|
||||||
value="${c:l('relatorioCarterinhaController.lblLayout')}" />
|
value="${c:l('relatorioCarterinhaController.lblLayout')}" />
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
|
||||||
<column width="50%" />
|
|
||||||
<column width="50%" />
|
|
||||||
</columns>
|
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<radiogroup Id="layouts" >
|
<radiogroup Id="rgLayout" >
|
||||||
<radio id="layout1"
|
<radio label="${c:l('relatorioCarterinhaController.lblLayout1')}" value="LAYOUT_1" checked = "true"/>
|
||||||
label="1" checked = "true"/>
|
<radio label="${c:l('relatorioCarterinhaController.lblLayout2')}" value="LAYOUT_2" />
|
||||||
<radio id="layout2"
|
<radio label="${c:l('relatorioCarterinhaController.lblLayoutCliente')}" value="LAYOUT_CLIENTE" />
|
||||||
label="2" />
|
|
||||||
</radiogroup>
|
</radiogroup>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
|
Loading…
Reference in New Issue