Loading module/Application/src/Application/Service/These/TheseService.php +36 −0 Changes for module/Application/src/Application/Service/These/TheseService.php: 36 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ use Application\Service\Notification\NotificationServiceAwareTrait; use Application\Service\UserContextService; use Application\Service\Validation\ValidationServiceAwareTrait; use Application\Service\Variable\VariableServiceAwareTrait; use Doctrine\DBAL\DBALException; use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use UnicaenApp\Exception\RuntimeException; Loading Loading @@ -108,6 +110,8 @@ class TheseService extends BaseService } /** * Recherche de thèses à l'aide de la vue matérialisée MV_RECHERCHE_THESE. * * @param string $text * @param integer $limit * Loading Loading @@ -144,7 +148,11 @@ class TheseService extends BaseService $orc = implode(' OR ', $orc); $sql .= ' AND (' . $orc . ') '; try { $stmt = $this->getEntityManager()->getConnection()->executeQuery($sql); } catch (DBALException $e) { throw new RuntimeException("Erreur rencontrée lors de la requête", null, $e); } $theses = []; while ($r = $stmt->fetch()) { Loading @@ -170,7 +178,11 @@ class TheseService extends BaseService $this->entityManager->persist($metadonnee); } try { $this->entityManager->flush($metadonnee); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -186,7 +198,11 @@ class TheseService extends BaseService $this->entityManager->persist($attestation); } try { $this->entityManager->flush($attestation); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -209,7 +225,11 @@ class TheseService extends BaseService $this->entityManager->remove($attestation); } try { $this->entityManager->flush($attestation); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -225,7 +245,11 @@ class TheseService extends BaseService $this->entityManager->persist($mel); } try { $this->entityManager->flush($mel); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -248,7 +272,11 @@ class TheseService extends BaseService $this->entityManager->remove($diffusion); } try { $this->entityManager->flush($diffusion); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading Loading @@ -280,7 +308,11 @@ class TheseService extends BaseService $fichier->setEstConforme($conforme); try { $this->entityManager->flush($fichier); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -296,7 +328,11 @@ class TheseService extends BaseService $this->entityManager->persist($rdvBu); } try { $this->entityManager->flush($rdvBu); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } // si tout est renseigné, on valide automatiquement if ($rdvBu->isInfosBuSaisies()) { Loading Loading
module/Application/src/Application/Service/These/TheseService.php +36 −0 Changes for module/Application/src/Application/Service/These/TheseService.php: 36 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ use Application\Service\Notification\NotificationServiceAwareTrait; use Application\Service\UserContextService; use Application\Service\Validation\ValidationServiceAwareTrait; use Application\Service\Variable\VariableServiceAwareTrait; use Doctrine\DBAL\DBALException; use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use UnicaenApp\Exception\RuntimeException; Loading Loading @@ -108,6 +110,8 @@ class TheseService extends BaseService } /** * Recherche de thèses à l'aide de la vue matérialisée MV_RECHERCHE_THESE. * * @param string $text * @param integer $limit * Loading Loading @@ -144,7 +148,11 @@ class TheseService extends BaseService $orc = implode(' OR ', $orc); $sql .= ' AND (' . $orc . ') '; try { $stmt = $this->getEntityManager()->getConnection()->executeQuery($sql); } catch (DBALException $e) { throw new RuntimeException("Erreur rencontrée lors de la requête", null, $e); } $theses = []; while ($r = $stmt->fetch()) { Loading @@ -170,7 +178,11 @@ class TheseService extends BaseService $this->entityManager->persist($metadonnee); } try { $this->entityManager->flush($metadonnee); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -186,7 +198,11 @@ class TheseService extends BaseService $this->entityManager->persist($attestation); } try { $this->entityManager->flush($attestation); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -209,7 +225,11 @@ class TheseService extends BaseService $this->entityManager->remove($attestation); } try { $this->entityManager->flush($attestation); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -225,7 +245,11 @@ class TheseService extends BaseService $this->entityManager->persist($mel); } try { $this->entityManager->flush($mel); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -248,7 +272,11 @@ class TheseService extends BaseService $this->entityManager->remove($diffusion); } try { $this->entityManager->flush($diffusion); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading Loading @@ -280,7 +308,11 @@ class TheseService extends BaseService $fichier->setEstConforme($conforme); try { $this->entityManager->flush($fichier); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } } /** Loading @@ -296,7 +328,11 @@ class TheseService extends BaseService $this->entityManager->persist($rdvBu); } try { $this->entityManager->flush($rdvBu); } catch (OptimisticLockException $e) { throw new RuntimeException("Erreur rencontrée lors de l'enregistrement", null, $e); } // si tout est renseigné, on valide automatiquement if ($rdvBu->isInfosBuSaisies()) { Loading