fixes bug#24125

qua:
dev:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@110892 d1611594-4594-4d17-8e1d-87c2c4800839
master
walace 2022-02-15 21:07:36 +00:00
parent 767715b6ca
commit 0b46f2aa8f
10 changed files with 554 additions and 10 deletions

View File

@ -0,0 +1,44 @@
/**
*
*/
package com.rjconsultores.ventaboletos.relatorios.impl;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.rjconsultores.ventaboletos.entidad.LogAuditoria;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.LogAuditoriaBean;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
public class RelatorioLogAuditoria extends RelatorioDemandas {
public RelatorioLogAuditoria(Map<String, Object> parametros, Connection conexao, List list) throws Exception {
super(parametros, conexao);
List<LogAuditoriaBean> listaBean = new ArrayList<LogAuditoriaBean>();
for (Object object : list) {
LogAuditoria log = (LogAuditoria)object;
LogAuditoriaBean bean = new LogAuditoriaBean();
bean.setIdAuditado(log.getIdAuditado());
bean.setCampoAlterado(log.getCampoAlterado());
bean.setEmpresa(log.getEmpresa().getNombempresa());
bean.setUsuario(log.getUsuario().getNombusuario());
bean.setClasseAlterada(log.getClasseAlterada());
bean.setClassePrincipal(log.getClassePrincipal());
bean.setTela(log.getTela());
bean.setDataAlteracao(log.getFecmodif());
bean.setCampoAlterado(log.getCampoAlterado());
bean.setValorAtual(log.getValorNovo());
bean.setValorAnterior(log.getValorAnterior());
bean.setTipoAlteracao(log.getTipoAlteracao());
listaBean.add(bean);
}
setCollectionDataSource(new JRBeanCollectionDataSource(listaBean));
}
}

View File

@ -0,0 +1,19 @@
TITULO = Relatório Log de Auditoria
PERIODO = PERÍODO
header.data.hora=Data/Hora\:
cabecalho.impressorPor=Impresso por
DATA_ALTERACAO = DATA ATLERAÇÃO
ID_AUDITADO = ID AUDITADO
EMPRESA = EMPRESA
USUARIO = USUARIO
TIPO_ALTERACAO = TIPO ALTERAÇÃO
TELA = TELA
CAMPO_ALTERADO = CAMPO ALTERADO
VALOR_ATUAL = VALOR ATUAL
VALOR_ANTERIOR = VALOR ANTERIOR
CLASSE_ALTERADA = CLASSE ALTERADA
CLASSE_PRINCIPAL = CLASSE PRINCIPAL
msg.noData=Não foi possivel obter dados com os parâmetros informados.

View File

@ -0,0 +1,19 @@
TITULO = Relatório Log de Auditoria
PERIODO = PERÍODO
header.data.hora=Data/Hora\:
cabecalho.impressorPor=Impresso por
DATA_ALTERACAO = DATA ATLERAÇÃO
ID_AUDITADO = ID AUDITADO
EMPRESA = EMPRESA
USUARIO = USUARIO
TIPO_ALTERACAO = TIPO ALTERAÇÃO
TELA = TELA
CAMPO_ALTERADO = CAMPO ALTERADO
VALOR_ATUAL = VALOR ATUAL
VALOR_ANTERIOR = VALOR ANTERIOR
CLASSE_ALTERADA = CLASSE ALTERADA
CLASSE_PRINCIPAL = CLASSE PRINCIPAL
msg.noData=Não foi possivel obter dados com os parâmetros informados.

View File

@ -0,0 +1,267 @@
<?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="relatorioFormaPagamentoAgencia" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="832cc8a2-6330-4063-9b36-f96514ae8283">
<property name="ireport.zoom" value="6.1159090448414934"/>
<property name="ireport.x" value="977"/>
<property name="ireport.y" value="102"/>
<parameter name="DATA_INICIAL" class="java.util.Date"/>
<parameter name="DATA_FINAL" class="java.util.Date"/>
<parameter name="NOME_USUARIO" class="java.lang.String"/>
<parameter name="USUARIO_ID" class="java.lang.String"/>
<queryString language="SQL">
<![CDATA[]]>
</queryString>
<field name="dataAlteracao" class="java.util.Date"/>
<field name="idAuditado" class="java.lang.String"/>
<field name="empresa" class="java.lang.String"/>
<field name="usuario" class="java.lang.String"/>
<field name="tipoAlteracao" class="java.lang.String"/>
<field name="tela" class="java.lang.String"/>
<field name="campoAlterado" class="java.lang.String"/>
<field name="valorAtual" class="java.lang.String"/>
<field name="valorAnterior" class="java.lang.String"/>
<field name="classeAlterada" class="java.lang.String"/>
<field name="classePrincipal" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="41">
<textField>
<reportElement uuid="3152d9c0-592e-4136-b3d8-2a674e779468" mode="Opaque" x="0" y="20" width="94" height="20" backcolor="#CCCCCC"/>
<textElement markup="none">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{PERIODO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="50b8071e-9e65-49d2-bd12-b9354502caf3" mode="Opaque" x="0" y="0" width="561" height="20" backcolor="#CCCCCC"/>
<textElement markup="none">
<font size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{TITULO}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="07dfa225-148c-4de6-a428-3c91f83c4081" mode="Opaque" x="94" y="20" width="128" height="20" backcolor="#CCCCCC"/>
<textElement/>
<textFieldExpression><![CDATA[$P{DATA_INICIAL}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy">
<reportElement uuid="3948e59f-21d8-47c8-8077-a57af30605c5" mode="Opaque" x="222" y="20" width="339" height="20" backcolor="#CCCCCC"/>
<textElement/>
<textFieldExpression><![CDATA[$P{DATA_FINAL}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="7e62b5c0-9626-4774-b650-1dc0906be19d" x="1" y="40" width="801" height="1"/>
</line>
<textField pattern="dd/MM/yyyy HH:mm">
<reportElement uuid="eeee2daa-07e2-427c-9b9a-9fdb48f7a4ea" mode="Opaque" x="700" y="0" width="102" height="20" backcolor="#CDCDCD"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="dd78670d-f524-42f3-b915-eec9faf69a27" mode="Opaque" x="561" y="20" width="139" height="20" backcolor="#CDCDCD"/>
<textElement/>
<textFieldExpression><![CDATA[$R{cabecalho.impressorPor}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d7f6f595-b82b-4a05-9433-9313538db864" mode="Opaque" x="700" y="20" width="102" height="20" backcolor="#CDCDCD"/>
<textElement/>
<textFieldExpression><![CDATA[$P{USUARIO_ID}+"-"+$P{NOME_USUARIO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d219b329-181b-4ef6-b4f6-b624acb75988" mode="Opaque" x="561" y="0" width="139" height="20" backcolor="#CDCDCD"/>
<textElement/>
<textFieldExpression><![CDATA[$R{header.data.hora}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="29">
<textField>
<reportElement uuid="333a50a8-5d67-42b5-b3c6-2d70ceabfe25" x="0" y="0" width="94" height="28"/>
<textElement markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{DATA_ALTERACAO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="29bb0167-21cd-401c-94d9-f94bb1e9b9e4" x="94" y="0" width="51" height="28"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{ID_AUDITADO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="9457e696-5c75-4983-98c3-9dc4fc54e976" x="145" y="0" width="77" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{EMPRESA}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ab54d7e9-29fd-42da-9721-07fe99bb8874" x="222" y="0" width="55" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{USUARIO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fafe4849-b6d5-4a20-ab2c-bb3551337bbd" x="277" y="0" width="77" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{TIPO_ALTERACAO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="52cf4306-6208-414e-8892-3085a69fa84a" x="354" y="0" width="70" height="28"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{TELA}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="be9f28a6-e16c-49af-a1ae-a806a4a835d8" x="501" y="0" width="60" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{VALOR_ATUAL}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="218e15c9-18bd-4ec5-9ff1-36b5e016569e" x="561" y="0" width="79" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{VALOR_ANTERIOR}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="33fdc3c8-28af-450b-9afb-bffbe50ff8b8" x="1" y="28" width="801" height="1"/>
</line>
<textField>
<reportElement uuid="478182fa-9c5c-4e61-8719-e4b056b80585" x="640" y="0" width="60" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{CLASSE_ALTERADA}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fd782db0-7497-4596-8ace-8adbd28b895a" x="424" y="0" width="77" height="28"/>
<textElement textAlignment="Center" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{CAMPO_ALTERADO}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b34da1e3-7c52-4ae7-88a4-503b181eeb79" x="700" y="0" width="102" height="28"/>
<textElement textAlignment="Right" markup="none">
<font size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{CLASSE_PRINCIPAL}]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="37" splitType="Stretch">
<textField pattern="dd/MM/yyyy HH.mm" isBlankWhenNull="true">
<reportElement uuid="66455995-be07-4062-8234-ade8ccfd79c0" x="1" y="0" width="93" height="37" isPrintWhenDetailOverflows="true"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{dataAlteracao}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="151a46f2-5c54-4a0e-91c2-a49986a08cff" x="145" y="0" width="77" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="e873a0b8-5b07-4883-8be6-edf75307e9ab" x="94" y="0" width="51" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{idAuditado}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="d2f490c1-e807-4243-a3e0-b86229a83c6b" x="222" y="0" width="55" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{usuario}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="dcb305f9-8649-4440-a485-4ada6876b066" x="561" y="0" width="79" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorAnterior}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="acacd737-9c59-4893-ac3a-ab43c1909a69" x="640" y="0" width="60" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{classeAlterada}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="a3119d26-2d10-40c5-98dc-bf0f6be3fc25" x="277" y="0" width="77" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{tipoAlteracao}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="ccad4f84-243a-47cf-904a-15c4ba7feee4" x="354" y="0" width="70" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{tela}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="48f4dece-76dc-4445-89f3-73c0537c8bf9" x="424" y="0" width="77" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{campoAlterado}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00" isBlankWhenNull="true">
<reportElement uuid="d098d054-0eef-474a-91d3-c7ea9090ab74" x="501" y="0" width="60" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{valorAtual}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="182eb372-ed63-41a3-bf16-bfe1c4a97cd7" x="700" y="0" width="102" height="37" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{classePrincipal}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band/>
</columnFooter>
<lastPageFooter>
<band/>
</lastPageFooter>
<summary>
<band height="50">
<line>
<reportElement uuid="29cf051d-d1b2-4744-932b-9e8adb6b254d" x="1" y="0" width="801" height="1"/>
</line>
</band>
</summary>
<noData>
<band height="45">
<textField>
<reportElement uuid="6c28de84-ceae-409b-bde5-04f66cb9a805" x="1" y="12" width="801" height="20"/>
<textElement markup="none">
<font size="11" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$R{msg.noData}]]></textFieldExpression>
</textField>
</band>
</noData>
</jasperReport>

View File

@ -0,0 +1,107 @@
package com.rjconsultores.ventaboletos.relatorios.utilitarios;
import java.util.Date;
public class LogAuditoriaBean {
private String idAuditado;
private String empresa;
private String valorAnterior;
private String valorAtual;
private String campoAlterado;
private String classeAlterada;
private String classePrincipal;
private String tela;
private String tipoAlteracao;
private Date dataAlteracao;
private String usuario;
public String getIdAuditado() {
return idAuditado;
}
public void setIdAuditado(String idAuditado) {
this.idAuditado = idAuditado;
}
public String getEmpresa() {
return empresa;
}
public void setEmpresa(String empresa) {
this.empresa = empresa;
}
public String getValorAnterior() {
return valorAnterior;
}
public void setValorAnterior(String valorAnterior) {
this.valorAnterior = valorAnterior;
}
public String getValorAtual() {
return valorAtual;
}
public void setValorAtual(String valorAtual) {
this.valorAtual = valorAtual;
}
public String getCampoAlterado() {
return campoAlterado;
}
public void setCampoAlterado(String campoAlterado) {
this.campoAlterado = campoAlterado;
}
public String getClasseAlterada() {
return classeAlterada;
}
public void setClasseAlterada(String classeAlterada) {
this.classeAlterada = classeAlterada;
}
public String getClassePrincipal() {
return classePrincipal;
}
public void setClassePrincipal(String classePrincipal) {
this.classePrincipal = classePrincipal;
}
public String getTela() {
return tela;
}
public void setTela(String tela) {
this.tela = tela;
}
public String getTipoAlteracao() {
return tipoAlteracao;
}
public void setTipoAlteracao(String tipoAlteracao) {
this.tipoAlteracao = tipoAlteracao;
}
public Date getDataAlteracao() {
return dataAlteracao;
}
public void setDataAlteracao(Date dataAlteracao) {
this.dataAlteracao = dataAlteracao;
}
public String getUsuario() {
return usuario;
}
public void setUsuario(String usuario) {
this.usuario = usuario;
}
}

View File

@ -2,8 +2,13 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -13,11 +18,18 @@ import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox; import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component; 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.Datebox; import org.zkoss.zul.Datebox;
import org.zkoss.zul.Paging; import org.zkoss.zul.Paging;
import com.rjconsultores.ventaboletos.entidad.Empresa; import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estado;
import com.rjconsultores.ventaboletos.entidad.LogAuditoria; import com.rjconsultores.ventaboletos.entidad.LogAuditoria;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBPe;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBPeRejeitadoEnvioContingencia;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioBpeNumeracaoReuso;
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioLogAuditoria;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.service.LogAuditoriaService; import com.rjconsultores.ventaboletos.service.LogAuditoriaService;
import com.rjconsultores.ventaboletos.utilerias.DateUtil; import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@ -31,6 +43,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderLogAuditoria;
import com.trg.search.Filter; import com.trg.search.Filter;
import br.com.rjconsultores.auditador.enums.AuditadorTipoAlteracao; import br.com.rjconsultores.auditador.enums.AuditadorTipoAlteracao;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
@Controller("busquedaLogAuditoriaController") @Controller("busquedaLogAuditoriaController")
@Scope("prototype") @Scope("prototype")
@ -63,6 +76,8 @@ public class BusquedaLogAuditoriaController extends MyGenericForwardComposer {
private MyTextbox txtValorNovo; private MyTextbox txtValorNovo;
private MyTextbox txtValorAnterior; private MyTextbox txtValorAnterior;
private MyTextbox txtIdAuditado; private MyTextbox txtIdAuditado;
@Autowired
private DataSource dataSourceRead;
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
@ -79,7 +94,7 @@ public class BusquedaLogAuditoriaController extends MyGenericForwardComposer {
return lsEmpresa; return lsEmpresa;
} }
private void refreshLista() { private void refreshLista(boolean isGerarRelatorio) throws Exception {
HibernateSearchObject<LogAuditoria> sistemaBusqueda = new HibernateSearchObject<LogAuditoria>(LogAuditoria.class, pagingLogAuditoria.getPageSize()); HibernateSearchObject<LogAuditoria> sistemaBusqueda = new HibernateSearchObject<LogAuditoria>(LogAuditoria.class, pagingLogAuditoria.getPageSize());
Date dataInicio = dtInicio.getValue(); Date dataInicio = dtInicio.getValue();
@ -134,20 +149,89 @@ public class BusquedaLogAuditoriaController extends MyGenericForwardComposer {
sistemaBusqueda.addFilterEqual("activo", Boolean.TRUE); sistemaBusqueda.addFilterEqual("activo", Boolean.TRUE);
plwLogAuditoria.init(sistemaBusqueda, logAuditoriaList, pagingLogAuditoria); plwLogAuditoria.init(sistemaBusqueda, logAuditoriaList, pagingLogAuditoria);
if (logAuditoriaList.getData().length == 0) { if (logAuditoriaList.getData().length == 0) {
if(isGerarRelatorio){
throw new Exception(Labels.getLabel("MSG.ningunRegistroRelatorio"));
}else{
try { try {
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),Labels.getLabel("busquedaLogAuditoriaController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
Labels.getLabel("busquedaLogAuditoriaController.window.title"),
Messagebox.OK, Messagebox.INFORMATION);
} catch (InterruptedException ex) { } catch (InterruptedException ex) {
log.error("", ex); log.error("", ex);
} }
} }
}
} }
public void onClick$btnPesquisa(Event ev) { public void onClick$btnPesquisa(Event ev) throws Exception {
refreshLista(); refreshLista(false);
}
@SuppressWarnings("unchecked")
public void onClick$btnGerarRelatorio(Event ev) throws Exception {
try {
refreshLista(true);
} catch (Exception e) {
Messagebox.show(e.getMessage(), Labels.getLabel("busquedaLogAuditoriaController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
return;
}
Map<String, Object> parametros = new HashMap<String, Object>();
StringBuilder filtro = new StringBuilder();
parametros.put("DATA_FINAL", (java.util.Date) dtInicio.getValue());
parametros.put("DATA_INICIAL", (java.util.Date) dtFim.getValue());
parametros.put("NOME_RELATORIO", Labels.getLabel("busquedaLogAuditoriaController.window.title"));
parametros.put("USUARIO_ID", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
parametros.put("NOME_USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario());
filtro.append("Empresa: ");
Comboitem item = null;
if (cmbEmpresa.getSelectedItem() != null) {
item = cmbEmpresa.getSelectedItem();
if (item != null) {
Empresa empresa = (Empresa) item.getValue();
filtro.append(empresa.getNombempresa()).append(";");
}
} else {
filtro.append(" Todas; ");
}
if (cmbTela.getSelectedItem() != null) {
item = cmbTela.getSelectedItem();
if (item != null) {
filtro.append(cmbTela.getValue()).append(";");
}
} else {
filtro.append(" Todas; ");
}
if (cmbTipoAlteracao.getSelectedItem() != null) {
item = cmbTipoAlteracao.getSelectedItem();
if (item != null) {
filtro.append(cmbTipoAlteracao.getValue()).append(";");
}
} else {
filtro.append(" Todas; ");
}
parametros.put("FILTROS", filtro.toString());
Relatorio relatorio = null;
relatorio = new RelatorioLogAuditoria(parametros, dataSourceRead.getConnection(), logAuditoriaList.getListData());
@SuppressWarnings("rawtypes")
Map args = new HashMap();
args.put("relatorio", relatorio);
openWindow("/component/reportView.zul", Labels.getLabel("busquedaLogAuditoriaController.window.title"), args, MODAL);
} }
public List<AuditadorTipoAlteracao> getTipoAlteracaoList() { public List<AuditadorTipoAlteracao> getTipoAlteracaoList() {

View File

@ -9295,6 +9295,8 @@ busquedaLogAuditoriaController.lblValorAnterior = Valor Anterior
busquedaLogAuditoriaController.lblClasseAlterada = Clase cambiada busquedaLogAuditoriaController.lblClasseAlterada = Clase cambiada
busquedaLogAuditoriaController.lblClassePrincipal = Clase Principal busquedaLogAuditoriaController.lblClassePrincipal = Clase Principal
busquedaLogAuditoriaController.lblIdAuditado = ID Auditado busquedaLogAuditoriaController.lblIdAuditado = ID Auditado
busquedaLogAuditoriaController.lblGerarRelatorio = Generar Report
#DispositivoOperadorVendaEmbarcada #DispositivoOperadorVendaEmbarcada
dispositivoVendaEmbarcadaController.window.title= Operador por Dispositivo Venda Embarcada dispositivoVendaEmbarcadaController.window.title= Operador por Dispositivo Venda Embarcada

View File

@ -10013,6 +10013,7 @@ busquedaLogAuditoriaController.lblValorAnterior = Valor Anterior
busquedaLogAuditoriaController.lblClasseAlterada = Classe Alterada busquedaLogAuditoriaController.lblClasseAlterada = Classe Alterada
busquedaLogAuditoriaController.lblClassePrincipal = Classe Principal busquedaLogAuditoriaController.lblClassePrincipal = Classe Principal
busquedaLogAuditoriaController.lblIdAuditado = ID Auditado busquedaLogAuditoriaController.lblIdAuditado = ID Auditado
busquedaLogAuditoriaController.lblGerarRelatorio = Gerar Relatório
#DispositivoOperadorVendaEmbarcada #DispositivoOperadorVendaEmbarcada
dispositivoVendaEmbarcadaController.window.title= Operador por Dispositivo Venda Embarcada dispositivoVendaEmbarcadaController.window.title= Operador por Dispositivo Venda Embarcada

View File

@ -94,6 +94,7 @@
<toolbar> <toolbar>
<button id="btnPesquisa" image="/gui/img/find.png" <button id="btnPesquisa" image="/gui/img/find.png"
label="${c:l('tooltiptext.btnPesquisa')}"/> label="${c:l('tooltiptext.btnPesquisa')}"/>
<button id="btnGerarRelatorio" image="/gui/img/pdf.png" label="${c:l('busquedaLogAuditoriaController.lblGerarRelatorio')}"/>
</toolbar> </toolbar>
<paging id="pagingLogAuditoria" pageSize="20" /> <paging id="pagingLogAuditoria" pageSize="20" />