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

Ajout du champs RNSR & trie des EDs

parent 55f8ecbf
Loading
Loading
Loading
Loading
Loading
+1 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.UniteRecherche.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
    <field name="histoModification" type="datetime" column="HISTO_MODIFICATION" nullable="false"/>

    <field name="sourceCode" type="string" column="SOURCE_CODE" length="64" nullable="true"/>
    <field name="RNSR" type="string" column="RNSR_ID" length="64" nullable="true"/>

    <many-to-one field="source" target-entity="UnicaenImport\Entity\Db\Source">
      <join-columns>
+23 −0
Changes for module/Application/src/Application/Entity/Db/UniteRecherche.php: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ class UniteRecherche implements StructureConcreteInterface, HistoriqueAwareInter
     */
    protected $domaines;


    /** @var string RNSR */
    protected $RNSR;
    /**
     * UniteRecherche constructor.
     */
@@ -264,4 +267,24 @@ class UniteRecherche implements StructureConcreteInterface, HistoriqueAwareInter
        $this->domaines->removeElement($domaine);
        return $this;
    }

    /**
     * @return string
     */
    public function getRNSR()
    {
        return $this->RNSR;
    }

    /**
     * @param string $RNSR
     * @return UniteRecherche
     */
    public function setRNSR($RNSR)
    {
        $this->RNSR = $RNSR;
        return $this;
    }


}
 No newline at end of file
+2 −0
Changes for module/Application/src/Application/Form/Hydrator/UniteRechercheHydrator.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ class UniteRechercheHydrator extends DoctrineObject
        $data['libelle'] = $ur->getLibelle();
        $data['sigle'] = $ur->getSigle();
        $data['cheminLogo'] = $ur->getCheminLogo();
        $data['RNSR'] = $ur->getRNSR();

        return $data;
    }
@@ -38,6 +39,7 @@ class UniteRechercheHydrator extends DoctrineObject
        $object->setLibelle($data['libelle']);
        $object->setSigle($data['sigle']);
        $object->setCheminLogo($data['cheminLogo']);
        $object->setRNSR($data['RNSR']);

        return $object;
    }
+5 −0
Changes for module/Application/src/Application/Form/UniteRechercheForm.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@ class UniteRechercheForm extends Form
                new Text('sourceCode'))
                    ->setLabel("Code :")
        );
        $this
            ->add((
            new Text('RNSR'))
                ->setLabel("Identifiant RNSR :")
            );
        $this
            ->add((
        new File('cheminLogo'))
+7 −1
Changes for module/Application/src/Application/Service/Structure/StructureService.php: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -588,6 +588,7 @@ class StructureService extends BaseService
            ->leftJoin('structure.structureSubstituante', 'substitutionTo')
            ->andWhere('substitutionFrom.id IS NULL')
            ->andWhere('substitutionTo.id IS NULL OR pasHistorise(substitutionTo) != 1')
            ->orderBy('structure.libelle')
        ;

        $result = $qb->getQuery()->getResult();
@@ -596,16 +597,21 @@ class StructureService extends BaseService

    /** Les structures non substituées
     * @param string $type
     * @param string order
     * @param string $order
     * @return StructureConcreteInterface[]
     */
    public function getAllStructuresAffichablesByType($type, $order=null) {
        $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete')
            ->addSelect('structure')
            ->addSelect('substitutionTo')
            ->join('structureConcrete.structure', 'structure')
            ->leftJoin('structure.structureSubstituante', 'substitutionTo')
            ->andWhere('substitutionTo.id IS NULL OR pasHistorise(substitutionTo) != 1' )
            ;
        if ($order) $qb->orderBy('structure.'.$order);
        else {
            if ($type === TypeStructure::CODE_ECOLE_DOCTORALE) $qb->orderBy('structureConcrete.sourceCode');
        }

        $result = $qb->getQuery()->getResult();
        return $result;
Loading