Commit 00082e3c authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Exception gestion complétude (TBL_DOSSIER)

parent 144c710e
......@@ -71,7 +71,7 @@ class IntervenantDossierController extends AbstractController
$this->updateTableauxBord($intervenantDossier->getIntervenant());
}
$intervenantDossierValidation = $this->getServiceDossier()->getValidation($intervenant);
//$tblDossierIntervenant = $this->getServiceDossier()->getCompletude($intervenantDossier);
/* Initialisation du formulaire */
$form = $this->getIntervenantDossierForm($intervenant);
$form->bind($intervenantDossier);
......
......@@ -16,6 +16,7 @@ use Application\Service\Traits\IntervenantServiceAwareTrait;
use Application\Service\Traits\SourceServiceAwareTrait;
use Application\Service\Traits\StatutIntervenantServiceAwareTrait;
use Application\Service\Traits\ValidationServiceAwareTrait;
use Doctrine\ORM\NoResultException;
/**
* Description of Intervenant Dossier
......@@ -163,12 +164,16 @@ class DossierService extends AbstractEntityService
public function getCompletude(IntervenantDossier $intervenantDossier)
{
$qb = $this->getEntityManager()->getRepository('Application\Entity\Db\TblDossier')->createQueryBuilder('tbld');
$qb->where("tbld.intervenant = :intervenant");
$qb->setParameter('intervenant', $intervenantDossier->getIntervenant());
$tblDossierIntervenant = $qb->getQuery()->setMaxResults(1)->getSingleResult();;
try {
$tblDossierIntervenant = $qb->getQuery()->setMaxResults(1)->getSingleResult();;
} catch (NoResultException $e) {
throw new \Exception('Impossible de trouver la complétude du dossier dans tbl_dossier');
}
/**
* }
* @var TblDossier $tblDossierIntervenant
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment