| @@ 45-57 (lines=13) @@ | ||
| 42 | ->addOrderBy('a.nombre', 'ASC'); |
|
| 43 | } |
|
| 44 | ||
| 45 | public function findConPartesAunNoNotificadosPorUsuario(Usuario $usuario) |
|
| 46 | { |
|
| 47 | $orX = $this->getEntityManager()->createQueryBuilder() |
|
| 48 | ->expr()->orX() |
|
| 49 | ->add('p.usuario = :usuario') |
|
| 50 | ->add('a.grupo = :grupo'); |
|
| 51 | ||
| 52 | return $this->findConPartesAunNoNotificados() |
|
| 53 | ->innerJoin('AppBundle:Grupo', 'g', 'WITH', 'a.grupo = g') |
|
| 54 | ->andWhere($orX) |
|
| 55 | ->setParameter('grupo', $usuario->getTutoria()) |
|
| 56 | ->setParameter('usuario', $usuario); |
|
| 57 | } |
|
| 58 | ||
| 59 | public function findAllConPartesAunNoNotificados() |
|
| 60 | { |
|
| @@ 114-126 (lines=13) @@ | ||
| 111 | ->andWhere('p.fechaAviso IS NULL'); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function findNoNotificadosPorUsuarioOTutoria($usuario) |
|
| 115 | { |
|
| 116 | $orX = $this->getEntityManager()->createQueryBuilder() |
|
| 117 | ->expr()->orX() |
|
| 118 | ->add('p.usuario = :usuario') |
|
| 119 | ->add('a.grupo = :grupo'); |
|
| 120 | ||
| 121 | return $this->findNoNotificados() |
|
| 122 | ->innerJoin('AppBundle:Grupo', 'g', 'WITH', 'a.grupo = g') |
|
| 123 | ->andWhere($orX) |
|
| 124 | ->setParameter('usuario', $usuario) |
|
| 125 | ->setParameter('grupo', $usuario->getTutoria()); |
|
| 126 | } |
|
| 127 | ||
| 128 | public function findAllNoNotificadosPorUsuario($usuario) |
|
| 129 | { |
|