Commit dbe91671 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Nouvelle vue matérialisée MV_MODULATEUR

parent 4c5bada7
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ return [
                    'MV_EXT_DOTATION_LIQUIDATION',
                    'MV_EXT_ETAT_PAIEMENT',
                    'MV_LIEN',
                    'MV_MODULATEUR',
                ]],
                'package'            => ['excludes' => ['UCBN_LDAP', 'UNICAEN_IMPORT_AUTOGEN_PROCS__', 'OSE_ACTUL']],
            ],
+11 −0
Original line number Diff line number Diff line
SELECT
  ep.id                            element_pedagogique_id,
  MAX(m.ponderation_service_du)    ponderation_service_du,
  MAX(m.ponderation_service_compl) ponderation_service_compl
FROM
       element_pedagogique   ep
  JOIN element_modulateur    em ON em.element_id = ep.id
                               AND em.histo_destruction IS NULL
  JOIN modulateur             m ON m.id = em.modulateur_id
GROUP BY
  ep.id
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ use OffreFormation\Service\Traits\ElementModulateurServiceAwareTrait;
use OffreFormation\Service\Traits\ElementPedagogiqueServiceAwareTrait;
use OffreFormation\Service\Traits\VolumeHoraireEnsServiceAwareTrait;
use Paiement\Service\TauxRemuServiceAwareTrait;
use Unicaen\BddAdmin\BddAwareTrait;
use UnicaenImport\Service\Traits\SchemaServiceAwareTrait;

/**
@@ -37,6 +38,7 @@ class ElementPedagogiqueController extends AbstractController
    use StructureServiceAwareTrait;
    use SchemaServiceAwareTrait;
    use TauxRemuServiceAwareTrait;
    use BddAwareTrait;

    public function voirAction()
    {
@@ -97,6 +99,8 @@ class ElementPedagogiqueController extends AbstractController
            $this->getServiceElementPedagogique()->delete($element);
        });

        $this->getBdd()->materializedView()->refresh('MV_MODULATEUR');

        return compact('element', 'title', 'form');
    }

@@ -316,6 +320,9 @@ class ElementPedagogiqueController extends AbstractController
                    $element = $this->getServiceElementModulateur()->addElementModulateur($element, $datasPost[$name]);
                }
            }

            $this->getBdd()->materializedView()->refresh('MV_MODULATEUR');

            //Centres de coûts
            $centreCouts = [
                'fi' => $datasPost['fi'],
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace OffreFormation\Controller\Factory;

use OffreFormation\Controller\ElementPedagogiqueController;
use Psr\Container\ContainerInterface;
use Unicaen\BddAdmin\Bdd;
use UnicaenImport\Service\SchemaService;


@@ -20,6 +21,7 @@ class ElementPedagogiqueControllerFactory
        $renderer   = $container->get('ViewRenderer');
        $controller = new ElementPedagogiqueController($renderer);
        $controller->setServiceSchema($container->get(SchemaService::class));
        $controller->setBdd($container->get(Bdd::class));

        return $controller;
    }
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace OffreFormation\Controller\Factory;

use Psr\Container\ContainerInterface;
use OffreFormation\Controller\ModulateurController;
use Unicaen\BddAdmin\Bdd;


/**
@@ -25,7 +26,7 @@ class ModulateurControllerFactory
    {
        $controller = new ModulateurController;

        /* Injectez vos dépendances ICI */
        $controller->setBdd($container->get(Bdd::class));

        return $controller;
    }
Loading