bug#11414
dev:thiago qua:marcelo git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@83728 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
63860ec403
commit
6f3ca4e180
|
@ -0,0 +1,160 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.vo.aidf.ItemRelatorioMovimentoEstoque;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.NamedParameterStatement;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
public class RelatorioMovimentacaoEstoque extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioMovimentacaoEstoque.class);
|
||||
|
||||
List<ItemRelatorioMovimentoEstoque> list = null;
|
||||
|
||||
public RelatorioMovimentacaoEstoque(Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
|
||||
public void initDados() throws Exception {
|
||||
Connection conexao = this.relatorio.getConexao();
|
||||
Map<String, Object> parametros = this.relatorio.getParametros();
|
||||
String sql = getSql();
|
||||
NamedParameterStatement stmt = null;
|
||||
ResultSet rset = null;
|
||||
|
||||
try {
|
||||
stmt = new NamedParameterStatement(conexao, sql);
|
||||
if(parametros.get("empresaId") != null){
|
||||
stmt.setInt("empresaId", Integer.valueOf(parametros.get("empresaId").toString()));
|
||||
}
|
||||
|
||||
if(parametros.get("puntoventaIdEnv") != null){
|
||||
stmt.setInt("puntoventaIdEnv", Integer.valueOf(parametros.get("puntoventaIdEnv").toString()));
|
||||
}
|
||||
|
||||
if(parametros.get("puntoventaIdRec") != null){
|
||||
stmt.setInt("puntoventaIdRec", Integer.valueOf(parametros.get("puntoventaIdRec").toString()));
|
||||
}
|
||||
|
||||
if(parametros.get("estacionIdEnv") != null){
|
||||
stmt.setInt("estacionIdEnv", Integer.valueOf(parametros.get("estacionIdEnv").toString()));
|
||||
}
|
||||
|
||||
if(parametros.get("estacionIdRec") != null){
|
||||
stmt.setInt("estacionIdRec", Integer.valueOf(parametros.get("estacionIdRec").toString()));
|
||||
}
|
||||
|
||||
if(parametros.get("dataInicial") != null){
|
||||
stmt.setString("dataInicial", parametros.get("dataInicial") + " 00:00");
|
||||
}
|
||||
|
||||
if(parametros.get("dataFinal") != null){
|
||||
stmt.setString("dataFinal", parametros.get("dataFinal") + " 23:59");
|
||||
}
|
||||
|
||||
rset = stmt.executeQuery();
|
||||
|
||||
list = new ArrayList<ItemRelatorioMovimentoEstoque>();
|
||||
while (rset.next()) {
|
||||
ItemRelatorioMovimentoEstoque item = new ItemRelatorioMovimentoEstoque();
|
||||
item.setAidf(rset.getString("AIDF"));
|
||||
item.setSerie(rset.getString("SERIE"));
|
||||
item.setSubserie(rset.getString("SUBSERIE"));
|
||||
item.setData(rset.getDate("DATA"));
|
||||
item.setEmpresa(rset.getString("NOMBEMPRESA"));
|
||||
item.setEstacionEnv(rset.getString("ESTACION_ENV"));
|
||||
item.setEstacionRec(rset.getString("ESTACION_REC"));
|
||||
item.setNumFolioInicial(rset.getString("NUMFOLIOINICIAL"));
|
||||
item.setNumFolioFinal(rset.getString("NUMFOLIOFINAL"));
|
||||
item.setTotal(rset.getInt("TOTAL"));
|
||||
item.setPuntoventaEnv(rset.getString("NOMBPUNTOVENTA_ENV"));
|
||||
item.setPuntoventaRec(rset.getString("NOMBPUNTOVENTA_REC"));
|
||||
item.setUsuario(rset.getString("USUARIO"));
|
||||
|
||||
list.add(item);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
} finally {
|
||||
if(rset != null && !rset.isClosed()) {
|
||||
rset.close();
|
||||
}
|
||||
if(stmt != null && !stmt.isClosed()) {
|
||||
stmt.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(list));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
private String getSql() {
|
||||
StringBuilder sQuery = new StringBuilder();
|
||||
sQuery.append("SELECT E.NOMBEMPRESA, DETH.FECMODIF AS DATA, AI.AIDF_ID AS AIDF, AI.SERIE, AI.SUBSERIE, DETREC.NUMFOLIOINICIAL, DETREC.NUMFOLIOFINAL, ")
|
||||
.append("(TO_NUMBER(DETREC .NUMFOLIOFINAL) - TO_NUMBER(DETREC.NUMFOLIOINICIAL) + 1) AS TOTAL, ")
|
||||
.append("PVENV.NOMBPUNTOVENTA AS NOMBPUNTOVENTA_ENV, EENV.DESCESTACION AS ESTACION_ENV, PVREC.NOMBPUNTOVENTA AS NOMBPUNTOVENTA_REC, EREC.DESCESTACION AS ESTACION_REC, ")
|
||||
.append("DETH.FECMODIF AS DATA, U.USUARIO_ID || ' - ' || U.CVEUSUARIO AS USUARIO ")
|
||||
.append("FROM DET_ABASTO_BOLETO DET ")
|
||||
.append("JOIN AIDF AI ON AI.AIDF_ID = DET.AIDF_ID ")
|
||||
.append("JOIN ABASTO_BOLETO AB ON AB.ABASTOBOLETO_ID = DET.ABASTOBOLETO_ID ")
|
||||
.append("JOIN EMPRESA E ON E.EMPRESA_ID = AB.EMPRESA_ID ")
|
||||
.append("JOIN DET_ABASTO_BOLETO_HIST DETH ON DET.DETABASTOBOLETO_ID = DETH.DETABASTOBOLETOENV_ID ")
|
||||
.append("LEFT JOIN DET_ABASTO_BOLETO DETREC ON DETREC.DETABASTOBOLETO_ID = DETH.DETABASTOBOLETOREC_ID ")
|
||||
.append("LEFT JOIN ABASTO_BOLETO ABREC ON ABREC.ABASTOBOLETO_ID = DETREC.ABASTOBOLETO_ID ")
|
||||
.append("LEFT JOIN ESTACION EENV ON EENV.ESTACION_ID = AB.ESTACION_ID ")
|
||||
.append("LEFT JOIN ESTACION EREC ON EREC.ESTACION_ID = ABREC.ESTACION_ID ")
|
||||
.append("LEFT JOIN PUNTO_VENTA PVENV ON PVENV.PUNTOVENTA_ID = AB.PUNTOVENTA_ID ")
|
||||
.append("LEFT JOIN PUNTO_VENTA PVREC ON PVREC.PUNTOVENTA_ID = ABREC.PUNTOVENTA_ID ")
|
||||
.append("LEFT JOIN USUARIO U ON U.USUARIO_ID = DETH.USUARIO_ID ")
|
||||
.append("WHERE DET.ACTIVO = 1 ");
|
||||
|
||||
if(parametros.get("empresaId") != null){
|
||||
sQuery.append("AND E.EMPRESA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(parametros.get("puntoventaIdEnv") != null){
|
||||
sQuery.append("AND PVENV.PUNTOVENTA_ID = :puntoventaIdEnv ");
|
||||
}
|
||||
|
||||
if(parametros.get("puntoventaIdRec") != null){
|
||||
sQuery.append("AND PVREC.PUNTOVENTA_ID = :puntoventaIdRec ");
|
||||
}
|
||||
|
||||
if(parametros.get("estacionIdEnv") != null){
|
||||
sQuery.append(" AND EENV.ESTACION_ID = :estacionIdEnv ");
|
||||
}
|
||||
|
||||
if(parametros.get("estacionIdRec") != null){
|
||||
sQuery.append("AND EREC.ESTACION_ID = :estacionIdRec ");
|
||||
}
|
||||
|
||||
if(parametros.get("dataInicial") != null){
|
||||
sQuery.append("AND DETH.FECMODIF >= TO_DATE(:dataInicial, 'DD/MM/YYYY HH24:MI') ");
|
||||
}
|
||||
|
||||
if(parametros.get("dataFinal") != null){
|
||||
sQuery.append("AND DETH.FECMODIF <= TO_DATE(:dataFinal, 'DD/MM/YYYY HH24:MI') ");
|
||||
}
|
||||
|
||||
sQuery.append("ORDER BY DETH.FECMODIF, E.NOMBEMPRESA");
|
||||
|
||||
return sQuery.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
label.empresa=Empresa
|
||||
label.data=Data
|
||||
label.puntoventaEnv=Agência Emissora
|
||||
label.puntoventaRec=Agência Recebedora
|
||||
label.estacionEnv=Estação Emissora
|
||||
label.estacionRec=Estação Recebedora
|
||||
label.aidf=AIDF
|
||||
label.serie=Série
|
||||
label.subserie=Sub-Série
|
||||
label.numFolioInicial=Iniciante
|
||||
label.numFolioFinal=Encerrante
|
||||
label.total=Total
|
||||
label.usuario=Usuário
|
|
@ -0,0 +1,21 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
||||
|
||||
#Labels cabeçalho
|
||||
cabecalho.dataHora=Data/Hora:
|
||||
cabecalho.impressorPor=Impressor por:
|
||||
cabecalho.pagina=Página
|
||||
cabecalho.de=de
|
||||
label.empresa=Empresa
|
||||
label.data=Data
|
||||
label.puntoventaEnv=Agência Emissora
|
||||
label.puntoventaRec=Agência Recebedora
|
||||
label.estacionEnv=Estação Emissora
|
||||
label.estacionRec=Estação Recebedora
|
||||
label.aidf=AIDF
|
||||
label.serie=Série
|
||||
label.subserie=Sub-Série
|
||||
label.numFolioInicial=Iniciante
|
||||
label.numFolioFinal=Encerrante
|
||||
label.total=Total
|
||||
label.usuario=Usuário
|
Binary file not shown.
|
@ -0,0 +1,305 @@
|
|||
<?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="RelatorioMovimentacaoEstoque" pageWidth="1260" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="1220" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c092ef85-9334-4225-93d7-1acb7cf4d021">
|
||||
<property name="ireport.zoom" value="2.0"/>
|
||||
<property name="ireport.x" value="1817"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<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.1" value="columnHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageHeader"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
|
||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
|
||||
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
|
||||
<parameter name="DATA_INICIAL" class="java.util.Date"/>
|
||||
<parameter name="DATA_FINAL" class="java.util.Date"/>
|
||||
<parameter name="USUARIO" class="java.lang.String"/>
|
||||
<parameter name="FILTROS" class="java.lang.String"/>
|
||||
<queryString>
|
||||
<![CDATA[]]>
|
||||
</queryString>
|
||||
<field name="aidf" class="java.lang.String"/>
|
||||
<field name="empresa" class="java.lang.String"/>
|
||||
<field name="puntoventaEnv" class="java.lang.String"/>
|
||||
<field name="serie" class="java.lang.String"/>
|
||||
<field name="puntoventaRec" class="java.lang.String"/>
|
||||
<field name="estacionEnv" class="java.lang.String"/>
|
||||
<field name="estacionRec" class="java.lang.String"/>
|
||||
<field name="usuario" class="java.lang.String"/>
|
||||
<field name="numFolioInicial" class="java.lang.String"/>
|
||||
<field name="numFolioFinal" class="java.lang.String"/>
|
||||
<field name="total" class="java.lang.Integer"/>
|
||||
<field name="subserie" class="java.lang.String"/>
|
||||
<field name="data" class="java.util.Date"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="65" splitType="Stretch">
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="0" y="0" width="980" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="136a5066-d141-4362-af36-0780f0d16542"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="14" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$P{NOME_RELATORIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="980" y="0" width="159" height="15" uuid="a9d471fb-1e1d-4d9a-9783-bbf988931192"/>
|
||||
<textElement textAlignment="Right">
|
||||
<font size="9" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.dataHora}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="1141" y="0" width="80" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="0d200750-aabf-4c7e-b27b-c0e7af4802a9"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement x="0" y="46" width="1219" height="1" uuid="bbf33a72-515f-42fc-8c79-e859aebca31d"/>
|
||||
</line>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="1087" y="15" width="112" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="bae9bec6-8c42-4bee-a070-34b0a7f1aee4"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.pagina}+" "+$V{PAGE_NUMBER}+" "+$R{cabecalho.de}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="1200" y="15" width="20" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="314e312c-8f24-42de-8354-3c1f7241a985"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="" isBlankWhenNull="false">
|
||||
<reportElement mode="Transparent" x="1116" y="31" width="103" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="4e030613-9cee-443e-9eaa-b19fa3090976"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Top" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="7" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}+" "+$P{USUARIO}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement positionType="Float" x="0" y="64" width="1219" height="1" uuid="6ca45088-a58d-43b3-b196-8fc26e128fbf"/>
|
||||
</line>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement x="0" y="48" width="1219" height="15" uuid="b29d0494-2695-420b-bdc1-b13c08bdbcda"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$P{FILTROS}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="18" splitType="Stretch">
|
||||
<line>
|
||||
<reportElement positionType="Float" x="1" y="16" width="1219" height="1" uuid="a11636cc-5ee1-44cc-8cd1-cbe2ebc47abb"/>
|
||||
</line>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="256" y="0" width="75" height="15" uuid="d9a2225c-8883-4a35-9c16-8af9bcfe6577"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.serie}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="0" y="0" width="128" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="f9ea7239-48e1-4207-b957-dc4aadcaa590"/>
|
||||
<textElement verticalAlignment="Middle" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="381" y="0" width="75" height="15" uuid="304cc0cc-2f1e-4147-ae1a-5ec934ee988d"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.numFolioInicial}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="128" y="0" width="78" height="15" uuid="337f441e-ca7f-402c-8407-f3406ec2b4b0"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.data}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" mode="Transparent" x="206" y="0" width="50" height="15" forecolor="#000000" backcolor="#FFFFFF" uuid="0583701e-920a-473b-b1e4-6137f8d022df"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" markup="none">
|
||||
<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
|
||||
<paragraph lineSpacing="Single"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.aidf}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="331" y="0" width="50" height="15" uuid="97fc1815-2d2b-4f3c-bc7c-fa5645936dec"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.subserie}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="456" y="0" width="75" height="15" uuid="3982c960-0a4f-4e39-84df-0c127a3791ce"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.numFolioFinal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="531" y="0" width="76" height="15" uuid="4f255ce9-c6b2-48d6-9deb-0b0e5ed1023a"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.total}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="607" y="0" width="128" height="15" uuid="cda600ac-384e-4df9-aa31-5e5f539262f2"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.puntoventaEnv}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="735" y="0" width="128" height="15" uuid="76c228a9-cd20-4667-be06-53ece2fa4711"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.estacionEnv}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="863" y="0" width="128" height="15" uuid="50cac9ac-c4f8-49ff-ad22-d1a8c6574b7f"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.puntoventaRec}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="991" y="0" width="128" height="15" uuid="a2b484ed-9c94-4151-80b3-92782886e12e"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.estacionRec}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="1119" y="0" width="102" height="15" uuid="db7aa4d4-0ade-47f7-82e8-f7b4812b65c9"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="10"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{label.usuario}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="15" splitType="Stretch">
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="206" y="0" width="50" height="15" uuid="c35afacb-b160-4ace-b7be-c2e2f54ac1c0"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{aidf}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="128" height="15" uuid="73582b2a-b21b-4637-990c-aff7423a8e27"/>
|
||||
<textElement>
|
||||
<font size="8" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy HH:mm" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="128" y="0" width="78" height="15" uuid="bfb9d635-bbc1-4e92-890a-df8299bc8daa"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8" isBold="false" isItalic="false"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{data}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="256" y="0" width="75" height="15" uuid="736d97e8-8fa9-4b4f-b0d9-5dbef803c638"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="331" y="0" width="50" height="15" uuid="861b23da-9205-4c9b-ba22-9f3bedcb2124"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{subserie}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="381" y="0" width="75" height="15" uuid="69a17ebf-3019-4d31-aacf-63c32987c4b5"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numFolioInicial}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="456" y="0" width="75" height="15" uuid="a0407f67-6a05-4d4d-9a1f-47fb9ef7e25c"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numFolioFinal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="531" y="0" width="76" height="15" uuid="b68701b6-2197-4a7b-84a4-4071ce832780"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{total}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="607" y="0" width="128" height="15" uuid="c8118f6f-010f-4b67-95f5-297845f76be8"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{puntoventaEnv}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="735" y="0" width="128" height="15" uuid="4a4aa77c-d692-4485-ad55-278d1d5be0e9"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{estacionEnv}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="863" y="0" width="128" height="15" uuid="fb0a027b-e631-4ec4-af1b-ec7e0dcbe14c"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{puntoventaRec}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="991" y="0" width="128" height="15" uuid="3edd7b05-4103-4ed5-8963-065ff6b7d9b9"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{estacionRec}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
|
||||
<reportElement stretchType="RelativeToTallestObject" x="1119" y="0" width="102" height="15" uuid="df8ec3b3-ba13-430a-bfaa-fd5dc1eaa186"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<noData>
|
||||
<band height="29">
|
||||
<textField>
|
||||
<reportElement x="1" y="0" width="802" height="26" uuid="6f13c961-dd50-4e44-ba73-65e0752b8b83"/>
|
||||
<textElement markup="none">
|
||||
<font size="11" isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</noData>
|
||||
</jasperReport>
|
|
@ -0,0 +1,200 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioMovimentacaoEstoque;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
|
||||
@Controller("relatorioMovimentacaoEstoqueController")
|
||||
@Scope("prototype")
|
||||
public class RelatorioMovimentacaoEstoqueController extends MyGenericForwardComposer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Datebox dataInicial;
|
||||
private Datebox dataFinal;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
private MyComboboxPuntoVenta cmbPuntoVentaEnv;
|
||||
private MyComboboxPuntoVenta cmbPuntoVentaRec;
|
||||
private MyComboboxEstacion cmbEstacionEnv;
|
||||
private MyComboboxEstacion cmbEstacionRec;
|
||||
private List<Empresa> lsEmpresa;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
lsEmpresa = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||
super.doAfterCompose(comp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
private void executarRelatorio() throws Exception {
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
|
||||
|
||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioMovimentacaoEstoqueController.window.title"));
|
||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario());
|
||||
|
||||
StringBuilder filtro = new StringBuilder("Filtros\n");
|
||||
filtro.append(Labels.getLabel("lb.empresa"))
|
||||
.append(": ");
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||
if(empresa.getEmpresaId() > -1) {
|
||||
parametros.put("empresaId", empresa.getEmpresaId());
|
||||
filtro.append(empresa.getNombempresa());
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
filtro.append("\n");
|
||||
|
||||
filtro.append(Labels.getLabel("relatorioMovimentacaoEstoqueController.lb.puntoventaEnv"))
|
||||
.append(": ");
|
||||
Comboitem itemPuntoVenta = cmbPuntoVentaEnv.getSelectedItem();
|
||||
if (itemPuntoVenta != null) {
|
||||
PuntoVenta puntoVenta = (PuntoVenta) itemPuntoVenta.getValue();
|
||||
if(puntoVenta.getPuntoventaId() > -1) {
|
||||
parametros.put("puntoventaIdEnv", puntoVenta.getPuntoventaId());
|
||||
filtro.append(puntoVenta.getNombpuntoventa());
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
filtro.append("\n");
|
||||
|
||||
filtro.append(Labels.getLabel("relatorioMovimentacaoEstoqueController.lb.puntoventaRec"))
|
||||
.append(": ");
|
||||
itemPuntoVenta = cmbPuntoVentaRec.getSelectedItem();
|
||||
if (itemPuntoVenta != null) {
|
||||
PuntoVenta puntoVenta = (PuntoVenta) itemPuntoVenta.getValue();
|
||||
if(puntoVenta.getPuntoventaId() > -1) {
|
||||
parametros.put("puntoventaIdRec", puntoVenta.getPuntoventaId());
|
||||
filtro.append(puntoVenta.getNombpuntoventa());
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
filtro.append("\n");
|
||||
|
||||
filtro.append(Labels.getLabel("relatorioMovimentacaoEstoqueController.lb.estacionEnv"))
|
||||
.append(": ");
|
||||
Comboitem itemEstacion = cmbEstacionEnv.getSelectedItem();
|
||||
if (itemEstacion != null) {
|
||||
Estacion estacion = (Estacion) itemEstacion.getValue();
|
||||
if(estacion.getEstacionId() > -1) {
|
||||
parametros.put("estacionIdEnv", estacion.getEstacionId());
|
||||
filtro.append(estacion.getDescestacion());
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
filtro.append("\n");
|
||||
|
||||
filtro.append(Labels.getLabel("relatorioMovimentacaoEstoqueController.lb.estacionRec"))
|
||||
.append(": ");
|
||||
itemEstacion = cmbEstacionRec.getSelectedItem();
|
||||
if (itemEstacion != null) {
|
||||
Estacion estacion = (Estacion) itemEstacion.getValue();
|
||||
if(estacion.getEstacionId() > -1) {
|
||||
parametros.put("estacionIdRec", estacion.getEstacionId());
|
||||
filtro.append(estacion.getDescestacion());
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
} else {
|
||||
filtro.append("Todas");
|
||||
}
|
||||
filtro.append("\n");
|
||||
|
||||
filtro.append("Período: ")
|
||||
.append(DateUtil.getStringDate(dataInicial.getValue(), "dd/MM/yyyy"))
|
||||
.append(" até ")
|
||||
.append(DateUtil.getStringDate(dataFinal.getValue(), "dd/MM/yyyy"));
|
||||
parametros.put("dataInicial", DateUtil.getStringDate(dataInicial.getValue(), "dd/MM/yyyy"));
|
||||
parametros.put("dataFinal", DateUtil.getStringDate(dataFinal.getValue(), "dd/MM/yyyy"));
|
||||
|
||||
parametros.put("FILTROS", filtro.toString());
|
||||
Relatorio relatorio = new RelatorioMovimentacaoEstoque(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioMovimentacaoEstoqueController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception{
|
||||
executarRelatorio();
|
||||
}
|
||||
|
||||
public Datebox getDatInicial() {
|
||||
return dataInicial;
|
||||
}
|
||||
|
||||
public void setDatInicial(Datebox datInicial) {
|
||||
this.dataInicial = datInicial;
|
||||
}
|
||||
|
||||
public Datebox getDatFinal() {
|
||||
return dataFinal;
|
||||
}
|
||||
|
||||
public void setDatFinal(Datebox datFinal) {
|
||||
this.dataFinal = datFinal;
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
||||
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||
this.lsEmpresa = lsEmpresa;
|
||||
}
|
||||
|
||||
public MyComboboxEstandar getCmbEmpresa() {
|
||||
return cmbEmpresa;
|
||||
}
|
||||
|
||||
public void setCmbEmpresa(MyComboboxEstandar cmbEmpresa) {
|
||||
this.cmbEmpresa = cmbEmpresa;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.web.utilerias;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
import org.zkoss.zk.ui.WrongValueException;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.InputEvent;
|
||||
import org.zkoss.zkplus.databind.BindingListModel;
|
||||
import org.zkoss.zkplus.databind.BindingListModelList;
|
||||
import org.zkoss.zkplus.spring.SpringUtil;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Estacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||
import com.rjconsultores.ventaboletos.service.EstacionService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Wilian Domingues
|
||||
*/
|
||||
public class MyComboboxEstacion extends Combobox {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private EstacionService estacionService;
|
||||
private List<Estacion> lsEstacion;
|
||||
private Usuario initialValue;
|
||||
private Integer indiceSelected = null;
|
||||
|
||||
public MyComboboxEstacion() {
|
||||
|
||||
super();
|
||||
|
||||
estacionService = (EstacionService) SpringUtil.getBean("estacionService");
|
||||
lsEstacion = new ArrayList<Estacion>();
|
||||
|
||||
this.setAutodrop(false);
|
||||
this.setAutocomplete(false);
|
||||
|
||||
this.addEventListener("onOK", new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
String dscEstacion = MyComboboxEstacion.this.getText().toUpperCase();
|
||||
|
||||
if (dscEstacion.length() < MyComboboxParada.minLength) {
|
||||
return;
|
||||
}
|
||||
if (!dscEstacion.isEmpty()) {
|
||||
lsEstacion = estacionService.buscar(dscEstacion, null, null, null);
|
||||
lsEstacion.add(new Estacion(-1, "TODAS"));
|
||||
|
||||
BindingListModel listModelUsuario = new BindingListModelList(lsEstacion, true);
|
||||
MyComboboxEstacion.this.setModel(listModelUsuario);
|
||||
indiceSelected = null;
|
||||
if (!lsEstacion.isEmpty()) {
|
||||
indiceSelected = 0;
|
||||
}
|
||||
|
||||
MyComboboxEstacion.this.open();
|
||||
} else {
|
||||
lsEstacion.clear();
|
||||
|
||||
BindingListModel listModelEstacion = new BindingListModelList(lsEstacion, true);
|
||||
MyComboboxEstacion.this.setModel(listModelEstacion);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.addEventListener("onChanging", new EventListener() {
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
InputEvent ev = (InputEvent) event;
|
||||
String strUsuario = ev.getValue();
|
||||
if (strUsuario.length() < 2) {
|
||||
lsEstacion.clear();
|
||||
|
||||
BindingListModel listModelEstacion = new BindingListModelList(lsEstacion, true);
|
||||
MyComboboxEstacion.this.setModel(listModelEstacion);
|
||||
|
||||
MyComboboxEstacion.this.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public Usuario getInitialValue() {
|
||||
return initialValue;
|
||||
}
|
||||
|
||||
public void setInitialValue(Estacion initialValue) {
|
||||
if (initialValue == null) {
|
||||
return;
|
||||
}
|
||||
List<Estacion> ls = new ArrayList<Estacion>();
|
||||
ls.add(initialValue);
|
||||
|
||||
this.setModel(new BindingListModelList(ls, false));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param checaBusqueda
|
||||
* @throws WrongValueException
|
||||
*/
|
||||
public String getValue(boolean checaBusqueda) throws WrongValueException {
|
||||
if (checaBusqueda) {
|
||||
if (this.getSelectedItem() == null) {
|
||||
throw new WrongValueException(this, Labels.getLabel("MSG.Error.combobox.hacerBusqueda"));
|
||||
}
|
||||
}
|
||||
|
||||
return super.getValue();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
|
||||
public class ItemMenuRelatorioMovimentacaoEstoque extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuRelatorioMovimentacaoEstoque() {
|
||||
super("indexController.mniRelatorioMovimentacaoEstoque.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.MENU.RELATORIOMOVIMENTACAOESTOQUE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
PantallaUtileria.openWindow("/gui/relatorios/filtroRelatorioMovimentacaoEstoque.zul",
|
||||
Labels.getLabel("relatorioMovimentacaoEstoqueController.window.title"), getArgs(), desktop);
|
||||
|
||||
}
|
||||
}
|
|
@ -128,6 +128,7 @@ analitico.gerenciais.segundaVia=com.rjconsultores.ventaboletos.web.utilerias.men
|
|||
analitico.gerenciais.cadastroClientes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCadastroClientes
|
||||
analitico.gerenciais.historicoClientes=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioHistoricoClientes
|
||||
analitico.gerenciais.aidfDetalhado=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioAidfDetalhado
|
||||
analitico.gerenciais.movimentacaoEstoque=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioMovimentacaoEstoque
|
||||
analitico.gerenciais.cancelamentoAutomaticoECF=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioCancelamentoAutomaticoECF
|
||||
analitico.gerenciais.confFormulario=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioConferenciaFormularioFisico
|
||||
analitico.gerenciais.difTransf=com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.ItemMenuRelatorioDiferencasTransferencias
|
||||
|
|
|
@ -281,6 +281,7 @@ indexController.mniRelatorioCancelamentoTransacao.label = Cancelamento J3
|
|||
indexController.mniRelatorioTabelaPreco.label = Reporte de tabla de precios
|
||||
indexController.mniRelatorioAIDF.label = Reporte AIDF
|
||||
indexController.mniRelatorioAIDFDetalhado.label = Reporte Estoque
|
||||
indexController.mniRelatorioMovimentacaoEstoque.label = Movimientos del Stock
|
||||
indexController.mniRelatorioHistoricoClientes.label = Histórico Clientes
|
||||
indexController.mniRelatorioCadastroClientes.label = Cadastro Clientes
|
||||
indexController.mniRelatorioSegundaVia.label = Segunda Via
|
||||
|
@ -2214,6 +2215,7 @@ editarCatalogoDeRutaController.RadNo.value = No
|
|||
editarCatalogoDeRutaController.radAprobacionAutorizado.value = Autorizado
|
||||
editarCatalogoDeRutaController.radAprobacionLatente.value = Cerrado
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio = Solicitar nombre pasajero
|
||||
editarCatalogoDeRutaController.radioNumfidelidad = Solicitar numero fidelidad
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio.rdSi = Si
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio.rdNo = No
|
||||
editarCatalogoDeRutaController.lbEmpresa.value = Empresa
|
||||
|
@ -7583,3 +7585,10 @@ editarEmpresaController.emiteBpeVdaImpPosterior.ajuda = El sistema generará el
|
|||
editarEmpresaController.cancelaBpeTrocaOrigDest.ajuda = Permite realizar el cambio del BP-e a otro origen / destino informado en el momento del proceso cancelando el anterior vendido.
|
||||
editarEmpresaController.transferenciaBpeMoviCaja.ajuda = Hacen las Transferencias/Reactivaciones BP-e movimientos que generan caja.
|
||||
editarEmpresaController.usarAliasMapaViagemVenda.ajuda = En la pantalla de Venta o botón de Tarjeta de Viagem deve usar Alias para as Ubicaciones.
|
||||
|
||||
#Relatorio Movimentacao Estoque
|
||||
relatorioMovimentacaoEstoqueController.window.title = Reporte del Movimientos del Stock
|
||||
relatorioMovimentacaoEstoqueController.lb.puntoventaEnv = Punto Venta Envio
|
||||
relatorioMovimentacaoEstoqueController.lb.puntoventaRec = Punto Venta Recibimiento
|
||||
relatorioMovimentacaoEstoqueController.lb.estacionEnv = Estacion Envio
|
||||
relatorioMovimentacaoEstoqueController.lb.estacionRec = Estacion Recibimiento
|
|
@ -298,6 +298,7 @@ indexController.mniRelatorioCancelamentoTransacao.label = Cancelamento J3
|
|||
indexController.mniRelatorioTabelaPreco.label = Tabela de Preços
|
||||
indexController.mniRelatorioAIDF.label = AIDF
|
||||
indexController.mniRelatorioAIDFDetalhado.label = Relatório Estoque
|
||||
indexController.mniRelatorioMovimentacaoEstoque.label = Movimentação de Estoque
|
||||
indexController.mniRelatorioHistoricoClientes.label = Histórico Clientes
|
||||
indexController.mniRelatorioCadastroClientes.label = Cadastro Clientes
|
||||
indexController.mniRelatorioConsultaAntt.label= Consulta ANTT
|
||||
|
@ -849,6 +850,12 @@ relatorioAidfDetalhadoController.lbFormInicial.value = Form. Inicial
|
|||
relatorioAidfDetalhadoController.lbFormFinal.value = Form. Final
|
||||
relatorioAidfDetalhadoController.msg.agencia.obrigatorio = Uma Agência deve ser selecionada
|
||||
|
||||
#Relatorio Movimentacao Estoque
|
||||
relatorioMovimentacaoEstoqueController.window.title = Relatório Movimentação de Estoque
|
||||
relatorioMovimentacaoEstoqueController.lb.puntoventaEnv = Agência Envio
|
||||
relatorioMovimentacaoEstoqueController.lb.puntoventaRec = Agência Recebimento
|
||||
relatorioMovimentacaoEstoqueController.lb.estacionEnv = Estação Envio
|
||||
relatorioMovimentacaoEstoqueController.lb.estacionRec = Estação Recebimento
|
||||
|
||||
#Relatório de Vendas PTA
|
||||
relatorioVendasPTAController.window.title = Relatório de Vendas PTA
|
||||
|
@ -2367,6 +2374,7 @@ editarCatalogoDeRutaController.RadNo.value = Não
|
|||
editarCatalogoDeRutaController.radAprobacionAutorizado.value = Autorizado
|
||||
editarCatalogoDeRutaController.radAprobacionLatente.value = Fechado
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio = Solicitar nome passageiro
|
||||
editarCatalogoDeRutaController.radioNumfidelidad = Solicitar número fidelidade
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio.rdSi = Sim
|
||||
editarCatalogoDeRutaController.radioNombreObrigadotio.rdNo = Não
|
||||
editarCatalogoDeRutaController.lbEmpresa.value = Empresa
|
||||
|
@ -7914,7 +7922,6 @@ relatorioMovimentoPorOrgaoConcedente.MSG.dataInicialMaiorFinal=Data inicial maio
|
|||
relatorioMovimentoPorOrgaoConcedente.MSG.informarPeriodoData=Favor informar o período a ser consultado
|
||||
|
||||
# Relatório Vendas com Parcelamento
|
||||
|
||||
relatorioVendasParcelamentoController.window.title = Vendas com Parcelamento
|
||||
relatorioVendasParcelamentoController.lbDataFin.value = Data Final
|
||||
relatorioVendasParcelamentoController.lbDataIni.value = Data Inicial
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?page contentType="text/html;charset=UTF-8"?>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winFiltroRelatorioMovimentacaoEstoque"?>
|
||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||
|
||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||
<window id="winFiltroRelatorioMovimentacaoEstoque" apply="${relatorioMovimentacaoEstoqueController}"
|
||||
contentStyle="overflow:auto"
|
||||
height="190px" width="800px" border="normal">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
<column width="20%" />
|
||||
<column width="30%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row spans="1,3">
|
||||
<label
|
||||
value="${c:l('lb.empresa')}" />
|
||||
<combobox id="cmbEmpresa"
|
||||
buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winFiltroRelatorioMovimentacaoEstoque$composer.lsEmpresa}"
|
||||
constraint="no empty"
|
||||
width="100%" />
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioMovimentacaoEstoqueController.lb.puntoventaEnv')}" />
|
||||
<combobox id="cmbPuntoVentaEnv"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="100%" mold="rounded" buttonVisible="true"/>
|
||||
|
||||
<label
|
||||
value="${c:l('relatorioMovimentacaoEstoqueController.lb.estacionEnv')}" />
|
||||
<combobox id="cmbEstacionEnv"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion"
|
||||
width="100%" mold="rounded" buttonVisible="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('relatorioMovimentacaoEstoqueController.lb.puntoventaRec')}" />
|
||||
<combobox id="cmbPuntoVentaRec"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||
width="100%" mold="rounded" buttonVisible="true"/>
|
||||
|
||||
<label
|
||||
value="${c:l('relatorioMovimentacaoEstoqueController.lb.estacionRec')}" />
|
||||
<combobox id="cmbEstacionRec"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstacion"
|
||||
width="100%" mold="rounded" buttonVisible="true"/>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('lb.dataIni.value')}" />
|
||||
<datebox id="datInicial" width="100%" mold="rounded"
|
||||
format="dd/MM/yyyy" constraint="no empty"
|
||||
maxlength="10" />
|
||||
<label
|
||||
value="${c:l('lb.dataFin.value')}" />
|
||||
<datebox id="datFinal" width="100%" mold="rounded"
|
||||
format="dd/MM/yyyy" constraint="no empty"
|
||||
maxlength="10" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
<button id="btnExecutarRelatorio" image="/gui/img/find.png"
|
||||
label="${c:l('relatorio.lb.btnExecutarRelatorio')}" />
|
||||
</toolbar>
|
||||
</window>
|
||||
</zk>
|
||||
|
Loading…
Reference in New Issue