Loading module/Application/src/Application/Controller/OffreFormationController.php +39 −1 Changes for module/Application/src/Application/Controller/OffreFormationController.php: 39 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Entity\Db\Etape; use Application\Entity\Db\GroupeTypeFormation; use Application\Entity\Db\TypeFormation; use Application\Entity\Db\TypeModulateur; use Application\Entity\Db\VolumeHoraireEns; use Application\Processus\Traits\ReconductionProcessusAwareTrait; use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; Loading Loading @@ -38,7 +39,6 @@ class OffreFormationController extends AbstractController use OffreFormationServiceAwareTrait; public function indexAction() { $this->initFilters(); Loading Loading @@ -107,8 +107,38 @@ class OffreFormationController extends AbstractController 'Effectifs FI actuels', 'Effectifs FA actuels', 'Effectifs FC actuels', 'Nbr heures CM', 'Nbr groupes CM', 'Nbr heures TD', 'Nbr groupes TD', 'Nbr heures TP', 'Nbr groupes TP', ]); foreach ($elements as $element) { $cm = '0'; $td = '0'; $tp = '0'; $cmGroupe = '0'; $tdGroupe = '0'; $tpGroupe = '0'; foreach ($element->getVolumeHoraireEns() as $vhe) { if ($vhe->getTypeIntervention()->getCode() == 'CM') { $cm = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $cmGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } if ($vhe->getTypeIntervention()->getCode() == 'TD') { $td = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $tdGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } if ($vhe->getTypeIntervention()->getCode() == 'TP') { $tp = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $tpGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } } $etape = $element->getEtape(); $effectifs = $element->getEffectifs(); $discipline = $element->getDiscipline(); Loading @@ -128,6 +158,12 @@ class OffreFormationController extends AbstractController $effectifs ? $effectifs->getFi() : null, $effectifs ? $effectifs->getFa() : null, $effectifs ? $effectifs->getFc() : null, $cm, $cmGroupe, $td, $tdGroupe, $tp, $tpGroupe, ]); } $csvModel->setFilename('offre-de-formation.csv'); Loading Loading @@ -319,6 +355,7 @@ class OffreFormationController extends AbstractController $this->em()->getFilters()->enable('annee')->init([ ElementPedagogique::class, Etape::class, ]); } Loading @@ -332,6 +369,7 @@ class OffreFormationController extends AbstractController TypeFormation::class, GroupeTypeFormation::class, TypeModulateur::class, VolumeHoraireEns::class, ]); } Loading module/Application/src/Application/Service/OffreFormationService.php +5 −4 Changes for module/Application/src/Application/Service/OffreFormationService.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ class OffreFormationService extends AbstractEntityService use LocalContextServiceAwareTrait; public function getEntityClass() { } Loading Loading @@ -55,13 +54,15 @@ class OffreFormationService extends AbstractEntityService partial e.{id,code,annee,libelle,sourceCode,niveau,histoDestruction}, partial tf.{id}, partial gtf.{id, libelleCourt, ordre}, partial ep.{id,code,libelle,sourceCode,etape,periode,tauxFoad,fi,fc,fa,tauxFi,tauxFc,tauxFa} partial ep.{id,code,libelle,sourceCode,etape,periode,tauxFoad,fi,fc,fa,tauxFi,tauxFc,tauxFa}, partial vme.{id,heures, groupes} FROM Application\Entity\Db\Etape e JOIN e.structure s JOIN e.typeFormation tf JOIN tf.groupe gtf LEFT JOIN e.elementPedagogique ep LEFT JOIN ep.volumeHoraireEns vme WHERE (s = :structure OR ep.structure = :structure) AND e.annee = :annee '; Loading Loading @@ -140,9 +141,9 @@ class OffreFormationService extends AbstractEntityService //Offre année en cours list($niveaux, $etapes, $elements) = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); //Offre année suivante list($niveauxN1, $etapesN1, $elementsN1) = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); //Organisation pour traitement dans la vue $codesEtapeN1 = []; Loading Loading
module/Application/src/Application/Controller/OffreFormationController.php +39 −1 Changes for module/Application/src/Application/Controller/OffreFormationController.php: 39 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Application\Entity\Db\Etape; use Application\Entity\Db\GroupeTypeFormation; use Application\Entity\Db\TypeFormation; use Application\Entity\Db\TypeModulateur; use Application\Entity\Db\VolumeHoraireEns; use Application\Processus\Traits\ReconductionProcessusAwareTrait; use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; Loading Loading @@ -38,7 +39,6 @@ class OffreFormationController extends AbstractController use OffreFormationServiceAwareTrait; public function indexAction() { $this->initFilters(); Loading Loading @@ -107,8 +107,38 @@ class OffreFormationController extends AbstractController 'Effectifs FI actuels', 'Effectifs FA actuels', 'Effectifs FC actuels', 'Nbr heures CM', 'Nbr groupes CM', 'Nbr heures TD', 'Nbr groupes TD', 'Nbr heures TP', 'Nbr groupes TP', ]); foreach ($elements as $element) { $cm = '0'; $td = '0'; $tp = '0'; $cmGroupe = '0'; $tdGroupe = '0'; $tpGroupe = '0'; foreach ($element->getVolumeHoraireEns() as $vhe) { if ($vhe->getTypeIntervention()->getCode() == 'CM') { $cm = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $cmGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } if ($vhe->getTypeIntervention()->getCode() == 'TD') { $td = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $tdGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } if ($vhe->getTypeIntervention()->getCode() == 'TP') { $tp = (!empty($vhe->getHeures())) ? $vhe->getHeures() : '0'; $tpGroupe = (!empty($vhe->getGroupes())) ? $vhe->getGroupes() : '0'; } } $etape = $element->getEtape(); $effectifs = $element->getEffectifs(); $discipline = $element->getDiscipline(); Loading @@ -128,6 +158,12 @@ class OffreFormationController extends AbstractController $effectifs ? $effectifs->getFi() : null, $effectifs ? $effectifs->getFa() : null, $effectifs ? $effectifs->getFc() : null, $cm, $cmGroupe, $td, $tdGroupe, $tp, $tpGroupe, ]); } $csvModel->setFilename('offre-de-formation.csv'); Loading Loading @@ -319,6 +355,7 @@ class OffreFormationController extends AbstractController $this->em()->getFilters()->enable('annee')->init([ ElementPedagogique::class, Etape::class, ]); } Loading @@ -332,6 +369,7 @@ class OffreFormationController extends AbstractController TypeFormation::class, GroupeTypeFormation::class, TypeModulateur::class, VolumeHoraireEns::class, ]); } Loading
module/Application/src/Application/Service/OffreFormationService.php +5 −4 Changes for module/Application/src/Application/Service/OffreFormationService.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ class OffreFormationService extends AbstractEntityService use LocalContextServiceAwareTrait; public function getEntityClass() { } Loading Loading @@ -55,13 +54,15 @@ class OffreFormationService extends AbstractEntityService partial e.{id,code,annee,libelle,sourceCode,niveau,histoDestruction}, partial tf.{id}, partial gtf.{id, libelleCourt, ordre}, partial ep.{id,code,libelle,sourceCode,etape,periode,tauxFoad,fi,fc,fa,tauxFi,tauxFc,tauxFa} partial ep.{id,code,libelle,sourceCode,etape,periode,tauxFoad,fi,fc,fa,tauxFi,tauxFc,tauxFa}, partial vme.{id,heures, groupes} FROM Application\Entity\Db\Etape e JOIN e.structure s JOIN e.typeFormation tf JOIN tf.groupe gtf LEFT JOIN e.elementPedagogique ep LEFT JOIN ep.volumeHoraireEns vme WHERE (s = :structure OR ep.structure = :structure) AND e.annee = :annee '; Loading Loading @@ -140,9 +141,9 @@ class OffreFormationService extends AbstractEntityService //Offre année en cours list($niveaux, $etapes, $elements) = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); [$niveaux, $etapes, $elements] = $this->getNeep($structure, $niveau, $etape, $anneeEnCours, $source); //Offre année suivante list($niveauxN1, $etapesN1, $elementsN1) = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); [$niveauxN1, $etapesN1, $elementsN1] = $this->getNeep($structure, $niveau, $etape, $anneeSuivante, $source); //Organisation pour traitement dans la vue $codesEtapeN1 = []; Loading