Guest User

Untitled

a guest
Feb 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. ->addSelect('v')
  2. ->distinct()
  3. ->from('Entidades:Viaje', 'v')
  4. ->innerJoin('v.estadoViaje', 'ev')
  5. ->innerJoin('v.trayectos', 't')
  6. ->innerJoin('t.datosTrayecto', 'dt')
  7. ->innerJoin('dt.estadoTrayecto', 'et')
  8. //->innerJoin('v.viajesRutaEmpresa', 'vre')
  9. ->innerJoin('v.rutaEmpresa', 're')
  10. ->innerJoin('re.empresaSeccion', 'es')
  11. ->innerJoin('re.ruta', 'r')
  12. ->innerJoin('t.origen', 'l')
  13. ->where('es.id = :idEmpresaSeccion')
  14. ->andWhere('l.id = :idLugar')
  15. ->andWhere('ev.codigo <> :finalizado')
  16. ->andWhere('ev.codigo <> :cancelado')
  17. ->andWhere('et.codigo <> :carretera')
  18. ->andWhere('v.codigo LIKE :filtroViaje')
  19. ->andWhere('r.nombre LIKE :filtroRuta')
  20. ->setParameter('idEmpresaSeccion', $idEmpresaSeccion)
  21. ->setParameter('idLugar', $idLugar)
  22. ->setParameter('finalizado', "finalizado")
  23. ->setParameter('cancelado', "cancelado")
  24. ->setParameter('carretera', "carretera")
  25. ->setParameter('filtroViaje', "%" . $filtroViaje . "%")
  26. ->setParameter('filtroRuta', "%" . $filtroRuta . "%")
  27. ->orderBy("ev.codigo","ASC")
  28. ->addOrderBy("v.id", "ASC")
Add Comment
Please, Sign In to add comment