daniel.zauli 2018-01-05 16:38:14 +00:00
parent dc153c5a9f
commit fcfccd2f42
2 changed files with 7 additions and 15 deletions

View File

@ -160,6 +160,12 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
sql.append(" WHERE ct.activo = 1 ");
sql.append(" and co.activo = 1 ");
sql.append(" and co.FECHORSALIDA >= :DATA_INICIAL and co.FECHORSALIDA <= :DATA_FINAL ");
sql.append((parametros.get("EMPRESA_ID") != null) ? " and e.empresa_id = :EMPRESA_ID " : "");
sql.append((parametros.get("RUTA_ID") != null) ? " and r.ruta_id = :RUTA_ID " : "");
sql.append((parametros.get("PARADA_ID") != null) ? " and co.origen_id = :PARADA_ID " : "");
sql.append((parametros.get("TIPO_SERVICO") != null) ? " and ts.tiposervicio_id = :TIPO_SERVICO " : "");
sql.append(" and co.CORRIDA_ID not in (select servico from vendidos ) ");
sql.append(" and co.activo = 1 and ct.activo = 1 and r.activo = 1 and e.activo = 1 and ori.activo = 1 and des.activo = 1 and ");

View File

@ -126,24 +126,10 @@ public class RelatorioDemandasController extends MyGenericForwardComposer {
}
}
public void onChange$cmbLinha(Event ev) throws Exception {
if (cmbLinha != null) {
Comboitem itemEmpresa = cmbLinha.getSelectedItem();
if (itemEmpresa != null) {
Ruta linha = (Ruta) itemEmpresa.getValue();
// mudar depois
lsOrigem = paradaService.obtenerOrigenPorRuta(linha);
BindingListModel listOrigemModel = new BindingListModelList(lsOrigem, true);
cmbOrigem.setValue("");
cmbOrigem.setModel(listOrigemModel);
}
}
}
@Override
public void doAfterCompose(Component comp) throws Exception {
lsEmpresa = empresaService.obtenerTodos();
lsOrigem = paradaService.obtenerTodos();
super.doAfterCompose(comp);
}