fixes bug#21506

dev:
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@105152 d1611594-4594-4d17-8e1d-87c2c4800839
master
changelogweb 2021-01-27 11:50:16 +00:00
parent dcaecaf854
commit fb4f79864c
2 changed files with 15 additions and 24 deletions

View File

@ -114,10 +114,6 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
log.debug(e.getMessage()); log.debug(e.getMessage());
} }
if(!verificarFiltrosRelatorio()) {
return;
}
parametros.put("TIPOSERVICIO_ID", tipoServico); parametros.put("TIPOSERVICIO_ID", tipoServico);
Timestamp dataInicio = new Timestamp((DateUtil.inicioFecha((java.util.Date) this.datInicial.getValue()).getTime())); Timestamp dataInicio = new Timestamp((DateUtil.inicioFecha((java.util.Date) this.datInicial.getValue()).getTime()));
@ -131,13 +127,14 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
parametros.put("NOME_USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario().toString()); parametros.put("NOME_USUARIO", UsuarioLogado.getUsuarioLogado().getNombusuario().toString());
if(cmbEmpresa.getSelectedItem() != null && cmbEmpresa.getSelectedItem().getValue() != null) { Empresa empresa = null;
Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); try {
parametros.put("EMPRESA", empresa); empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
parametros.put("NOMBEMPRESA", empresa.getNombempresa()); } catch (Exception e) {
} else { log.debug(e.getMessage());
parametros.put("NOMBEMPRESA", "TODOS");
} }
parametros.put("EMPRESA", empresa);
GrupoRuta grupoRuta = null; GrupoRuta grupoRuta = null;
try { try {
@ -153,6 +150,12 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
parametros.put("DESCGRUPO", "TODOS"); parametros.put("DESCGRUPO", "TODOS");
} }
if (empresa != null) {
parametros.put("NOMBEMPRESA", empresa.getNombempresa());
} else {
parametros.put("NOMBEMPRESA", "TODOS");
}
lsNumLinha = new ArrayList(Arrays.asList(linhaListSelList.getData())); lsNumLinha = new ArrayList(Arrays.asList(linhaListSelList.getData()));
lsNumServico = new ArrayList(Arrays.asList(servicoListSelList.getData())); lsNumServico = new ArrayList(Arrays.asList(servicoListSelList.getData()));
@ -183,17 +186,6 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
} }
private boolean verificarFiltrosRelatorio() throws InterruptedException {
cmbEmpresa.getValue();
if(cmbEmpresa.getSelectedItem() == null || cmbEmpresa.getSelectedItem().getValue() == null) {
Messagebox.show(Labels.getLabel("MSG.Error.empresa.naoinformado"),
Labels.getLabel("relatorioLinhasHorarioController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
return false;
}
return true;
}
public void onClick$btnExecutarRelatorio(Event ev) throws Exception { public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
executarRelatorio(); executarRelatorio();
} }

View File

@ -219,8 +219,7 @@
<combobox id="cmbEmpresa" <combobox id="cmbEmpresa"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%" mold="rounded" buttonVisible="true" width="100%"
model="@{winFiltroRelatorioLinhasHorario$composer.lsEmpresa}" model="@{winFiltroRelatorioLinhasHorario$composer.lsEmpresa}"/>
constraint="no empty" />
</row> </row>