Commit b997d578 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Modification changement signature setCreatedOn setInsertedOn

parent fe53f6b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ WITH d(CODE, LIBELLE, DESCRIPTION, VALEURS_POSSIBLES, ORDRE) AS (
    SELECT 'DISPLAY_RAISON', 'Affichage du bloc "Raison d''être du métier dans l''établissement"', null, 'Boolean',  30 UNION
    SELECT 'DISPLAY_MISSION', 'Affichage du bloc "Missions principales "', null, 'Boolean',  40 UNION
    SELECT 'DISPLAY_COMPETENCE', 'Affichage du bloc "Compétences"', null, 'Boolean', 50 UNION
    SELECT 'DISPLAY_COMPETENCE_SPECIFIQUE', 'Affichage du bloc "Compétences spécifiques"', null, 'Boolean', 55 UNION
    SELECT 'DISPLAY_APPLICATION', 'Affichage du bloc "Applications"', null, 'Boolean', 60 UNION
    SELECT 'DISPLAY_CONTEXTE', 'Affichage du bloc "Contexte et environnement de travail"', null, 'Boolean', 70 UNION
    SELECT 'CODE_FONCTION', 'Utilisation de code fonction', '<p>Le code fonction est une codification associ&eacute; au niveau associ&eacute; au poste li&eacute; &agrave; la fiche de poste utilis&eacute;e dans certains &eacute;tablissement.<br>Si ce param&egrave;tre est &agrave; la valeur <em>false</em> alors le code fonction n''est plus affich&eacute; sur la fiche de poste.</p>', 'Boolean', 10000
+4 −3
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ class AgentHierarchieController extends AbstractActionController
                                $this->getAgentAutoriteService()->restore($old);
                            } else {
                                $agentAutorite->setId($id);
                                $agentAutorite->setCreatedOn(new DateTime());
                                $agentAutorite->setInsertedOn(new DateTime());
                                $this->getAgentAutoriteService()->create($agentAutorite);
                            }
                        }
@@ -226,7 +226,7 @@ class AgentHierarchieController extends AbstractActionController
                                $this->getAgentSuperieurService()->restore($old);
                            } else {
                                $agentSuperieur->setId($id);
                                $agentSuperieur->setCreatedOn(new DateTime());
                                $agentSuperieur->setInsertedOn(new DateTime());
                                $this->getAgentSuperieurService()->create($agentSuperieur);
                            }
                        }
@@ -338,7 +338,8 @@ class AgentHierarchieController extends AbstractActionController
            if ($form->isValid()) {
                $id = $chaine->generateId();
                $chaine->setId($id);
                $chaine->setCreatedOn(new DateTime());
                $chaine->setSourceId("EMC2");
                $chaine->setInsertedOn(new DateTime());
                switch ($type) {
                    case 'superieur':
                        $this->getAgentSuperieurService()->create($chaine);
+3 −3
Original line number Diff line number Diff line
@@ -32,9 +32,9 @@ class AgentSuperieur implements HistoriqueAwareInterface, IsSynchronisableInterf

    public function generateId(): ?string
    {
        if ($this->getAgent() === null) { throw new RuntimeException("AgentSupeieur::generateId() : Agent manquant");}
        if ($this->getSuperieur() === null) { throw new RuntimeException("AgentSupeieur::generateId() : Superieur manquant");}
        if ($this->getDateDebut() === null) { throw new RuntimeException("AgentSupeieur::generateId() : Date de début manquant");}
        if ($this->getAgent() === null) { throw new RuntimeException("AgentSuperieur::generateId() : Agent manquant");}
        if ($this->getSuperieur() === null) { throw new RuntimeException("AgentSuperieur::generateId() : Superieur manquant");}
        if ($this->getDateDebut() === null) { throw new RuntimeException("AgentSuperieur::generateId() : Date de début manquant");}
        if ($this->sourceId === null) $this->sourceId = 'EMC2';
        $id = $this->sourceId . "-". $this->getAgent()->getId() . "-" . $this->getSuperieur()->getId() . "-". $this->getDateDebut()->format('dmYHi');
        return $id;
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ class AgentAutoriteService
        }
        $id = $autorite->generateId();
        $autorite->setId($id);
        $autorite->setCreatedOn(new DateTime());
        $autorite->setInsertedOn(new DateTime());

        $this->create($autorite);
    }
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ class AgentSuperieurService
        }
        $id = $superieur->generateId();
        $superieur->setId($id);
        $superieur->setCreatedOn(new DateTime());
        $superieur->setInsertedOn(new DateTime());

        $this->create($superieur);
    }