fixes bug#20486
dev:valdir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@104193 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6dadffaa65
commit
e13be9b031
|
@ -104,6 +104,10 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
} catch (Exception e) {
|
||||
log.debug(e.getMessage());
|
||||
}
|
||||
|
||||
if(!verificarFiltrosRelatorio()) {
|
||||
return;
|
||||
}
|
||||
|
||||
parametros.put("TIPOSERVICIO_ID", tipoServico);
|
||||
|
||||
|
@ -113,13 +117,13 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
parametros.put("DATA_INICIO", dataInicio);
|
||||
parametros.put("DATA_FINAL", dataFinal);
|
||||
|
||||
Empresa empresa = null;
|
||||
try {
|
||||
empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||
} catch (Exception e) {
|
||||
log.debug(e.getMessage());
|
||||
if(cmbEmpresa.getSelectedItem() != null && cmbEmpresa.getSelectedItem().getValue() != null) {
|
||||
Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||
parametros.put("EMPRESA", empresa);
|
||||
parametros.put("NOMBEMPRESA", empresa.getNombempresa());
|
||||
} else {
|
||||
parametros.put("NOMBEMPRESA", "TODOS");
|
||||
}
|
||||
parametros.put("EMPRESA", empresa);
|
||||
|
||||
GrupoRuta grupoRuta = null;
|
||||
try {
|
||||
|
@ -135,11 +139,6 @@ public class RelatorioLinhasHorarioController extends MyGenericForwardComposer {
|
|||
parametros.put("DESCGRUPO", "TODOS");
|
||||
}
|
||||
|
||||
if (empresa != null) {
|
||||
parametros.put("NOMBEMPRESA", empresa.getNombempresa());
|
||||
} else {
|
||||
parametros.put("NOMBEMPRESA", "TODOS");
|
||||
}
|
||||
|
||||
lsNumLinha = new ArrayList(Arrays.asList(linhaListSelList.getData()));
|
||||
lsNumServico = new ArrayList(Arrays.asList(servicoListSelList.getData()));
|
||||
|
@ -157,6 +156,17 @@ 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 {
|
||||
executarRelatorio();
|
||||
}
|
||||
|
|
|
@ -190,7 +190,8 @@
|
|||
<combobox id="cmbEmpresa"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
mold="rounded" buttonVisible="true" width="100%"
|
||||
model="@{winFiltroRelatorioLinhasHorario$composer.lsEmpresa}" />
|
||||
model="@{winFiltroRelatorioLinhasHorario$composer.lsEmpresa}"
|
||||
constraint="no empty" />
|
||||
|
||||
</row>
|
||||
|
||||
|
|
Loading…
Reference in New Issue