fixes bug#19632
qua: dev:Valdir Implementado relatório para mostrar caixa por órgão concedente pode filtrar por usuário e por agência. git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@102910 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f314c0eccc
commit
e2f55ce099
|
@ -1,7 +1,6 @@
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.relatorios;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -69,6 +68,9 @@ public class RelatorioCaixaOrgaoConcedenteController extends MyGenericForwardCom
|
||||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
if(!validaCampos()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.dataInicial.getValue() != null) {
|
if (this.dataInicial.getValue() != null) {
|
||||||
parametros.put("fecInicio", sdf.format(this.dataInicial.getValue()));
|
parametros.put("fecInicio", sdf.format(this.dataInicial.getValue()));
|
||||||
|
@ -77,19 +79,7 @@ public class RelatorioCaixaOrgaoConcedenteController extends MyGenericForwardCom
|
||||||
parametros.put("fecFinal", sdf.format(this.dataFinal.getValue()));
|
parametros.put("fecFinal", sdf.format(this.dataFinal.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((parametros.get("fecInicio") != null || parametros.get("fecFinal") != null) &&
|
|
||||||
((parametros.get("fecInicio") == null || parametros.get("fecFinal") == null))) {
|
|
||||||
Messagebox.show(Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
|
||||||
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DateUtil.compareOnlyDate(dataInicial.getValue()) >0 ) {
|
|
||||||
Messagebox.show(Labels.getLabel("relatorio.parametro.dataMenorDataAtual"),
|
|
||||||
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
|
||||||
}
|
|
||||||
if (cmbEmpresa.getSelectedIndex() != -1) {
|
if (cmbEmpresa.getSelectedIndex() != -1) {
|
||||||
parametros.put("empresa", ((Empresa) cmbEmpresa.getSelectedItem().getValue()).getEmpresaId());
|
parametros.put("empresa", ((Empresa) cmbEmpresa.getSelectedItem().getValue()).getEmpresaId());
|
||||||
parametros.put("nomb_empresa", ((Empresa) cmbEmpresa.getSelectedItem().getValue()).getNombempresa());
|
parametros.put("nomb_empresa", ((Empresa) cmbEmpresa.getSelectedItem().getValue()).getNombempresa());
|
||||||
|
@ -149,6 +139,48 @@ public class RelatorioCaixaOrgaoConcedenteController extends MyGenericForwardCom
|
||||||
openWindow("/component/reportView.zul",
|
openWindow("/component/reportView.zul",
|
||||||
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"), args, MODAL);
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"), args, MODAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean validaCampos() throws Exception{
|
||||||
|
if (dataInicial.getValue() == null || dataFinal.getValue() ==null ) {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.Error.invalida.dataInicialOuDataFinalNaoInformada"),
|
||||||
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(DateUtil.compareOnlyDate(dataInicial.getValue(), dataFinal.getValue() ) >0 ) {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.Error.invalida.dataInicialDepoisDataFinal"),
|
||||||
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(DateUtil.compareOnlyDate(dataInicial.getValue()) >0 ) {
|
||||||
|
Messagebox.show(Labels.getLabel("relatorio.parametro.dataMenorDataAtual"),
|
||||||
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmbEmpresa.getValue()==null || cmbEmpresa.getValue().isEmpty()) {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.Error.empresa.naoinformado"),
|
||||||
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(DateUtil.diferencaEntreDatasEmdias(dataInicial.getValue(), dataFinal.getValue()) > 30) {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.Error.data.maiorquelimite"),
|
||||||
|
Labels.getLabel("relatorioCaixaOrgaoConcedenteController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Empresa> getLsEmpresas() {
|
public List<Empresa> getLsEmpresas() {
|
||||||
|
|
|
@ -65,6 +65,8 @@ MSG.Error.invalida.intervaloInvalidoDias=dia(s).
|
||||||
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa=Esta agência não possui fechamento para esta empresa.
|
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa=Esta agência não possui fechamento para esta empresa.
|
||||||
MSG.ATIVADO=Ativado
|
MSG.ATIVADO=Ativado
|
||||||
MSG.DESATIVADO=Desativado
|
MSG.DESATIVADO=Desativado
|
||||||
|
MSG.Error.empresa.naoinformado = Empresa não informada
|
||||||
|
MSG.Error.data.maiorquelimite = Intervalo de datas deve ser menor que 30 dias
|
||||||
|
|
||||||
# Labels Default
|
# Labels Default
|
||||||
lb.id=ID
|
lb.id=ID
|
||||||
|
|
|
@ -64,6 +64,8 @@ MSG.Error.invalida.intervaloInvalidoDias = dia(s).
|
||||||
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa = Esta agência não possui fechamento para esta empresa.
|
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa = Esta agência não possui fechamento para esta empresa.
|
||||||
MSG.ATIVADO = Ativado
|
MSG.ATIVADO = Ativado
|
||||||
MSG.DESATIVADO = Desativado
|
MSG.DESATIVADO = Desativado
|
||||||
|
MSG.Error.empresa.naoinformado = Empresa não informada
|
||||||
|
MSG.Error.data.maiorquelimite = Intervalo de datas deve ser menor que 30 dias
|
||||||
|
|
||||||
# Labels Default
|
# Labels Default
|
||||||
lb.id = ID
|
lb.id = ID
|
||||||
|
|
|
@ -63,6 +63,8 @@ MSG.Error.necessita.puntoVenta = Ponto de Venda (Agência) Obrigatório
|
||||||
MSG.Error.invalida.intervaloInvalido = Intervalo inválido, o período de pesquisa deve ser de
|
MSG.Error.invalida.intervaloInvalido = Intervalo inválido, o período de pesquisa deve ser de
|
||||||
MSG.Error.invalida.intervaloInvalidoDias = dia(s).
|
MSG.Error.invalida.intervaloInvalidoDias = dia(s).
|
||||||
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa = Esta agência não possui fechamento para esta empresa.
|
MSG.Error.invalida.puntoVentaSemFechamentoParaEmpresa = Esta agência não possui fechamento para esta empresa.
|
||||||
|
MSG.Error.empresa.naoinformado = Empresa não informada
|
||||||
|
MSG.Error.data.maiorquelimite = Intervalo de datas deve ser menor que 30 dias
|
||||||
MSG.ATIVADO = Ativado
|
MSG.ATIVADO = Ativado
|
||||||
MSG.DESATIVADO = Desativado
|
MSG.DESATIVADO = Desativado
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue