lucas.calixto 2017-03-03 19:16:57 +00:00
parent 9c1a65f85c
commit a32fce93ed
9 changed files with 52 additions and 9 deletions

View File

@ -13,6 +13,7 @@ import java.util.Map;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource; import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioDepositosDetalhadosBean; import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioDepositosDetalhadosBean;
@ -34,6 +35,7 @@ public class RelatorioDepositosDetalhado extends Relatorio {
private Timestamp fecFinal; private Timestamp fecFinal;
private Integer marcaId; private Integer marcaId;
private Integer instFinanceira; private Integer instFinanceira;
private PuntoVenta puntoVenta;
public RelatorioDepositosDetalhado(Map<String, Object> parametros, Connection conexao) throws Exception { public RelatorioDepositosDetalhado(Map<String, Object> parametros, Connection conexao) throws Exception {
super(parametros, conexao); super(parametros, conexao);
@ -52,6 +54,10 @@ public class RelatorioDepositosDetalhado extends Relatorio {
instFinanceira = Integer.valueOf(parametros.get("INST_FINANCEIRA").toString()); instFinanceira = Integer.valueOf(parametros.get("INST_FINANCEIRA").toString());
} }
if (parametros.get("puntoVenta") != null) {
puntoVenta = (PuntoVenta) parametros.get("puntoVenta");
}
Connection conexao = this.relatorio.getConexao(); Connection conexao = this.relatorio.getConexao();
processarDepositosDetalhados(conexao); processarDepositosDetalhados(conexao);
setLsDadosRelatorio(lsDadosRelatorio); setLsDadosRelatorio(lsDadosRelatorio);
@ -172,6 +178,9 @@ public class RelatorioDepositosDetalhado extends Relatorio {
if (parametros.get("INST_FINANCEIRA") != null) { if (parametros.get("INST_FINANCEIRA") != null) {
sQuery.append(" and if.INSTIFINANCEIRA_ID =:INST_FINANCEIRA "); sQuery.append(" and if.INSTIFINANCEIRA_ID =:INST_FINANCEIRA ");
} }
if (puntoVenta != null) {
sQuery.append("and pv.PUNTOVENTA_ID = " + puntoVenta.getPuntoventaId());
}
sQuery.append(" and FD.FECCREACION between :fecInicio and :fecFinal"); sQuery.append(" and FD.FECCREACION between :fecInicio and :fecFinal");
sQuery.append(" GROUP BY "); sQuery.append(" GROUP BY ");
sQuery.append(" fd.FECHAMENTODEPOSITO_ID, "); sQuery.append(" fd.FECHAMENTODEPOSITO_ID, ");

View File

@ -21,3 +21,4 @@ label.banco=Banco
label.numConta=Cuenta label.numConta=Cuenta
label.numAgencia=Agencia label.numAgencia=Agencia
label.valorDeposito=Valor label.valorDeposito=Valor
label.puntoVenta=Punto Venta

View File

@ -21,3 +21,4 @@ label.banco=Banco
label.numConta=Conta label.numConta=Conta
label.numAgencia=Ag\u00EAncia label.numAgencia=Ag\u00EAncia
label.valorDeposito=Valor label.valorDeposito=Valor
label.puntoVenta=Agência

View File

@ -1,13 +1,14 @@
<?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="RelatorioVendasComissao" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4"> <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="RelatorioVendasComissao" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84b9dfcf-8ec5-4f51-80cc-7339e3b158b4">
<property name="ireport.zoom" value="1.0980750000000008"/> <property name="ireport.zoom" value="1.0980750000000008"/>
<property name="ireport.x" value="215"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<parameter name="fecInicio" class="java.lang.String"/> <parameter name="fecInicio" class="java.lang.String"/>
<parameter name="fecFinal" class="java.lang.String"/> <parameter name="fecFinal" class="java.lang.String"/>
<parameter name="noDataRelatorio" class="java.lang.String"/> <parameter name="noDataRelatorio" class="java.lang.String"/>
<parameter name="empresa" class="java.lang.String"/> <parameter name="empresa" class="java.lang.String"/>
<parameter name="banco" class="java.lang.String"/> <parameter name="banco" class="java.lang.String"/>
<parameter name="nombPuntoVenta" class="java.lang.String"/>
<queryString> <queryString>
<![CDATA[]]> <![CDATA[]]>
</queryString> </queryString>
@ -58,7 +59,7 @@
<band splitType="Stretch"/> <band splitType="Stretch"/>
</background> </background>
<title> <title>
<band height="82" splitType="Stretch"> <band height="110" splitType="Stretch">
<textField> <textField>
<reportElement uuid="43b2c28d-4760-4890-b00d-25e931e79c74" x="0" y="0" width="620" height="20"/> <reportElement uuid="43b2c28d-4760-4890-b00d-25e931e79c74" x="0" y="0" width="620" height="20"/>
<textElement markup="none"> <textElement markup="none">
@ -81,25 +82,37 @@
<textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression> <textFieldExpression><![CDATA[$R{cabecalho.periodo} + " " + $P{fecInicio} + " " + $R{cabecalho.periodoA} + " " + $P{fecFinal}]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a" x="53" y="41" width="263" height="20"/> <reportElement uuid="8fa1c53b-1da7-4d4d-a75c-ab1543acae2a" x="60" y="41" width="263" height="20"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{empresa}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="53" height="20"/> <reportElement uuid="a91f6081-4740-4e36-8965-41b6cde4cc20" x="0" y="41" width="60" height="20"/>
<textElement/> <textElement/>
<text><![CDATA[Empresa:]]></text> <text><![CDATA[Empresa:]]></text>
</staticText> </staticText>
<textField> <textField>
<reportElement uuid="a0d7c1c5-7a17-477e-929a-b0d9665b409c" x="53" y="61" width="263" height="20"/> <reportElement uuid="a0d7c1c5-7a17-477e-929a-b0d9665b409c" x="60" y="61" width="263" height="20"/>
<textElement/> <textElement/>
<textFieldExpression><![CDATA[$P{banco}]]></textFieldExpression> <textFieldExpression><![CDATA[$P{banco}]]></textFieldExpression>
</textField> </textField>
<staticText> <staticText>
<reportElement uuid="2a1c0967-7154-4aa5-bc93-577d682a1e5a" x="0" y="61" width="53" height="20"/> <reportElement uuid="2a1c0967-7154-4aa5-bc93-577d682a1e5a" x="0" y="61" width="60" height="20"/>
<textElement/> <textElement/>
<text><![CDATA[Banco:]]></text> <text><![CDATA[Banco:]]></text>
</staticText> </staticText>
<textField>
<reportElement uuid="d65cc40d-662b-4159-b0ed-a1b5b3148d30" x="0" y="81" width="60" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$R{label.puntoVenta}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d5a28828-ff2f-407c-b0b3-7c9154a27d5d" x="60" y="81" width="181" height="20"/>
<textElement>
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{nombPuntoVenta}]]></textFieldExpression>
</textField>
</band> </band>
</title> </title>
<pageHeader> <pageHeader>

View File

@ -24,12 +24,14 @@ import org.zkoss.zul.Messagebox;
import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.InstiFinanceira; import com.rjconsultores.ventaboletos.entidad.InstiFinanceira;
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDepositosDetalhado; import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioDepositosDetalhado;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio; import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.EmpresaService; import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.InstiFinanceiraService; import com.rjconsultores.ventaboletos.service.InstiFinanceiraService;
import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar; import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer; import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
/** /**
@ -53,6 +55,7 @@ private static final long serialVersionUID = 1L;
private MyComboboxEstandar cmbEmpresa; private MyComboboxEstandar cmbEmpresa;
private List<Empresa> lsEmpresa; private List<Empresa> lsEmpresa;
private MyComboboxPuntoVenta cmbPuntoVenta;
private MyComboboxEstandar cmbBanco; private MyComboboxEstandar cmbBanco;
private List<InstiFinanceira> lsBanco; private List<InstiFinanceira> lsBanco;
@ -99,6 +102,7 @@ private static final long serialVersionUID = 1L;
} else{ } else{
parametros.put("empresa", "Todas;"); parametros.put("empresa", "Todas;");
} }
Comboitem itemBanco = cmbBanco.getSelectedItem(); Comboitem itemBanco = cmbBanco.getSelectedItem();
if (itemBanco != null) { if (itemBanco != null) {
InstiFinanceira banco = (InstiFinanceira) itemBanco.getValue(); InstiFinanceira banco = (InstiFinanceira) itemBanco.getValue();
@ -108,6 +112,15 @@ private static final long serialVersionUID = 1L;
parametros.put("banco", "Todos;"); parametros.put("banco", "Todos;");
} }
Comboitem cmbItemPuntoVenta = cmbPuntoVenta.getSelectedItem();
if (cmbItemPuntoVenta != null) {
PuntoVenta puntoVenta = (PuntoVenta) cmbItemPuntoVenta.getValue();
parametros.put("puntoVenta", puntoVenta);
parametros.put("nombPuntoVenta", puntoVenta.getNombpuntoventa());
} else {
parametros.put("nombPuntoVenta", "Todos;");
}
Relatorio relatorio = new RelatorioDepositosDetalhado(parametros, dataSourceRead.getConnection()); Relatorio relatorio = new RelatorioDepositosDetalhado(parametros, dataSourceRead.getConnection());
Map<String, Object> args = new HashMap<String, Object>(); Map<String, Object> args = new HashMap<String, Object>();

View File

@ -6445,6 +6445,7 @@ relatorioDepositosDetalhadosController.lbEmpresa.value = Empresa
relatorioDepositosDetalhadosController.lbBanco.value = Banco relatorioDepositosDetalhadosController.lbBanco.value = Banco
relatorioDepositosDetalhadosController.window.title=Depositos Detallados relatorioDepositosDetalhadosController.window.title=Depositos Detallados
relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Fecha de inicio retrasado hasta la fecha final. relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Fecha de inicio retrasado hasta la fecha final.
relatorioDepositosDetalhadosController.lbPuntoVenta=Punto Venta
# Calculo Comissao # Calculo Comissao
busquedaCalculoComissaoController.window.title = Cálculo de Comisión busquedaCalculoComissaoController.window.title = Cálculo de Comisión

View File

@ -6636,6 +6636,7 @@ relatorioDepositosDetalhadosController.lbEmpresa.value = Empresa
relatorioDepositosDetalhadosController.lbBanco.value = Banco relatorioDepositosDetalhadosController.lbBanco.value = Banco
relatorioDepositosDetalhadosController.window.title=Depósitos Detalhados relatorioDepositosDetalhadosController.window.title=Depósitos Detalhados
relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Data de início posterior a data Final. relatorioDepositosDetalhadosController.MSG.busquedaPeriodo = Data de início posterior a data Final.
relatorioDepositosDetalhadosController.lbPuntoVenta=Agência
# Calculo Comissao # Calculo Comissao
busquedaCalculoComissaoController.window.title = Cálculo de Comissão busquedaCalculoComissaoController.window.title = Cálculo de Comissão

View File

@ -36,6 +36,10 @@
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
model="@{winFiltroRelatorioDepositosDetalhados$composer.lsEmpresa}" model="@{winFiltroRelatorioDepositosDetalhados$composer.lsEmpresa}"
width="95%" /> width="95%" />
<label value="${c:l('relatorioDepositosDetalhadosController.lbPuntoVenta')}"/>
<combobox id="cmbPuntoVenta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
mold="rounded" buttonVisible="true" />
</row> </row>
<row> <row>
<label <label