Commit c38c740b authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Modification pour permettre la remontée de plusieurs typeUO au niveau du...

Modification pour permettre la remontée de plusieurs typeUO au niveau du module export SIHAM (#41454)
parent 3ee75d6d
Loading
Loading
Loading
Loading
+10 −22
Changes for module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php: 10 added lines, 22 removed lines.
Original line number Diff line number Diff line
@@ -27,14 +27,12 @@ class SihamConnecteur implements ConnecteurRhInterface
    public Siham $siham;



    public function __construct(Siham $siham)
    {
        $this->siham = $siham;
    }



    public function rechercherIntervenantRh($nomUsuel = '', $prenom = '', $insee = ''): array
    {
        $params = [
@@ -65,7 +63,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?IntervenantRh
    {
        $agent = null;
@@ -125,7 +122,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererDonneesAdministrativesIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array
    {
        try {
@@ -160,7 +156,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererAffectationEnCoursIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array
    {
        $affectations = [];
@@ -187,7 +182,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererContratEnCoursIntervenantRh(Intervenant $intervenant): ?array
    {
        $contrats = [];
@@ -213,7 +207,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function synchroniserDonneesPersonnellesIntervenantRh(\Application\Entity\Db\Intervenant $intervenant, $datas): bool
    {
        try {
@@ -330,7 +323,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function trouverCodeRhByInsee(\Application\Entity\Db\Intervenant $intervenant): ?string
    {
        $intervenantDossier = $this->getServiceDossier()->getByIntervenant($intervenant);
@@ -353,7 +345,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function prendreEnChargeIntervenantRh(\Application\Entity\Db\Intervenant $intervenant, $datas): ?string
    {
        try {
@@ -528,7 +519,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function renouvellerIntervenantRH(\Application\Entity\Db\Intervenant $intervenant, $datas): ?string
    {
        try {
@@ -628,7 +618,6 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function cloreDossier(Intervenant $intervenant): ?bool
    {

@@ -658,67 +647,66 @@ class SihamConnecteur implements ConnecteurRhInterface
    }



    public function recupererListeUO(): ?array
    {
        /*On récupére les UO de type composante*/
        /*On récupére les UO avec le type paramétré*/
        $uo = [];
        $typeUO = $this->siham->getConfig()['code-type-structure-affectation'];
        $types = explode(',', $typeUO);
        //On boucle sur les différents types UO nécessaire au module export siham
        foreach ($types as $code) {
            $params = [
                'codeAdministration' => '',
                'listeUO'            => [[
                                         'typeUO' => $this->siham->getConfig()['code-type-structure-affectation'],
                    'typeUO' => $code,
                ]],
            ];

        $uo = $this->siham->recupererListeUO($params);
            $uo = array_merge($uo, $this->siham->recupererListeUO($params));
        }

        ksort($uo);
        
        return $uo;
    }



    public function recupererListePositions(): ?array
    {
        return $this->siham->recupererListePositions();
    }



    public function recupererListeEmplois(): ?array
    {
        return $this->siham->recupererListeEmplois();
    }



    public function recupererListeStatuts(): ?array
    {
        return $this->siham->recupererListeStatuts();
    }



    public function recupererListeModalites(): ?array
    {
        return $this->siham->recupererListeModalites();
    }



    public function recupererListeContrats(): ?array
    {
        return $this->siham->recupererListeContrats();
    }



    public function getConnecteurName(): string
    {
        return 'siham';
    }



    public function recupererFieldsetConnecteur(): Fieldset
    {
        $fieldset = new SihamFieldset('connecteurForm', []);