Skip to content
Snippets Groups Projects
Commit 39967bd2 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Affectation fonctionnelle comme base pour le calcul de la chaine hiérarchique

parent ac083826
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,7 @@ class AgentController extends AbstractActionController ...@@ -130,7 +130,7 @@ class AgentController extends AbstractActionController
//Récupération des status //Récupération des status
$agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent); $agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent);
$agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent,true,false,false); $agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
$agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent); $agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent);
//Récupération des supérieures et autorités //Récupération des supérieures et autorités
......
...@@ -355,7 +355,7 @@ class AgentService { ...@@ -355,7 +355,7 @@ class AgentService {
if (!empty($liste)) return $liste; if (!empty($liste)) return $liste;
//checking structure //checking structure
$affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
if (count($affectationsPrincipales) !== 1) return []; //throw new LogicException("Plusieurs affectations principales pour l'agent ".$agent->getId() . ":".$agent->getDenomination()); if (count($affectationsPrincipales) !== 1) return []; //throw new LogicException("Plusieurs affectations principales pour l'agent ".$agent->getId() . ":".$agent->getDenomination());
$structure = $affectationsPrincipales[0]->getStructure(); $structure = $affectationsPrincipales[0]->getStructure();
...@@ -394,7 +394,7 @@ class AgentService { ...@@ -394,7 +394,7 @@ class AgentService {
if ($superieurs === null) $superieurs = $this->computeSuperieures($agent, $date); if ($superieurs === null) $superieurs = $this->computeSuperieures($agent, $date);
//checking structure //checking structure
$affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false); $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
$structure = null; $structure = null;
if (count($affectationsPrincipales) === 1) { if (count($affectationsPrincipales) === 1) {
$structure = $affectationsPrincipales[0]->getStructure()->getNiv2(); $structure = $affectationsPrincipales[0]->getStructure()->getNiv2();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment