fix bug 0010578 - alterada as querys dos 2 layouts dos relatorios, para filtrar pelo origem
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@78705 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3b8653d53b
commit
fd4b482db1
|
@ -195,6 +195,10 @@ public class RelatorioDemandasDetalhado extends RelatorioDemandas {
|
|||
sql.append(" c.FECHORSALIDA >= :DATA_INICIAL ");
|
||||
sql.append(" AND c.FECHORSALIDA <= :DATA_FINAL ");
|
||||
sql.append(" and c.activo = 1 ");
|
||||
|
||||
if (parametros.get("PARADA_ID") != null) {
|
||||
sql.append(" AND p_origem.PARADA_ID = :PARADA_ID ");
|
||||
}
|
||||
|
||||
if (parametros.get("RUTA_ID") != null) {
|
||||
sql.append(" AND r.RUTA_ID = :RUTA_ID ");
|
||||
|
|
|
@ -84,6 +84,7 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
sql.append((parametros.get("RUTA_ID") != null) ? " and r.ruta_id = :RUTA_ID " : "");
|
||||
sql.append((parametros.get("EMPRESA_ID") != null) ? " and e.empresa_id = :EMPRESA_ID " : "");
|
||||
sql.append((parametros.get("PARADA_ID") != null) ? " and bo.origen_id = :PARADA_ID " : "");
|
||||
sql.append((parametros.get("PARADA_ID") != null) ? " and ori.parada_id =:PARADA_ID " : "");
|
||||
sql.append((parametros.get("TIPO_SERVICO") != null) ? " and ts.tiposervicio_id = :TIPO_SERVICO " : "");
|
||||
|
||||
if (parametros.get("HORA_INICIAL") != null && parametros.get("HORA_FINAL") != null) {
|
||||
|
@ -102,7 +103,7 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
} while (!dataInicial.after(dataFinal));
|
||||
sql.append(" ) ");
|
||||
}
|
||||
|
||||
|
||||
sql.append("group by co.feccorrida, co.fechorsalida, r.descruta, r.numruta, co.corrida_id, ct.plataforma, ");
|
||||
sql.append(" case when ((ori.indvisibleinternet is null or ori.indvisibleinternet = 1) ");
|
||||
sql.append(" and (des.indvisibleinternet is null or des.indvisibleinternet = 1)) then 'SIM' else 'NÃO' end, ");
|
||||
|
@ -164,6 +165,7 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
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("PARADA_ID") != null) ? " and ori.parada_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 ) ");
|
||||
|
|
Loading…
Reference in New Issue