Commit 0d97f868 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Mise en place du dataset des pladonfs avec requêtes et numéros

parent 9093bfcb
Loading
Loading
Loading
Loading
+10 −5
Changes for admin/src/DataGen.php: 10 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -53,8 +53,9 @@ class DataGen
        ],
        [
            'table'   => 'PLAFOND',
            'context' => ['install'],
            'key'     => 'CODE',
            'context' => ['install', 'update'],
            'options' => ['update' => false, 'delete' => false],
            'key'     => 'NUMERO',
        ],
        [
            'table'   => 'PLAFOND_ETAT',
@@ -639,10 +640,14 @@ class DataGen
        $data     = require $this->oseAdmin->getOseDir() . 'data/plafonds.php';
        $plafonds = [];

        foreach ($data['plafonds'] as $code => $libelle) {
        foreach ($data['plafonds'] as $numero => $p) {
            $psql        = 'SELECT id FROM plafond_perimetre WHERE code = :code';
            $perimetreId = $this->oseAdmin->getBdd()->select($psql, ['code' => $p['perimetre']], ['fetch' => \BddAdmin\Bdd::FETCH_ONE])['ID'];
            $plafond     = [
                'CODE'    => $code,
                'LIBELLE' => $libelle,
                'NUMERO'               => $numero,
                'LIBELLE'              => $p['libelle'],
                'PLAFOND_PERIMETRE_ID' => $perimetreId,
                'REQUETE'              => $p['requete'],
            ];
            $plafonds[]  = $plafond;
        }
+15 −15
Changes for data/ddl/table/PLAFOND.php: 15 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -9,18 +9,6 @@ return [
    'commentaire' => NULL,
    'sequence'    => 'PLAFOND_ID_SEQ',
    'columns'     => [
        'CODE'                 => [
            'name'        => 'CODE',
            'type'        => 'string',
            'bdd-type'    => 'VARCHAR2',
            'length'      => 40,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 2,
            'commentaire' => NULL,
        ],
        'ID'                   => [
            'name'        => 'ID',
            'type'        => 'int',
@@ -42,7 +30,19 @@ return [
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 3,
            'position'    => 2,
            'commentaire' => NULL,
        ],
        'NUMERO'               => [
            'name'        => 'NUMERO',
            'type'        => 'int',
            'bdd-type'    => 'NUMBER',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => NULL,
            'position'    => 5,
            'commentaire' => NULL,
        ],
        'PLAFOND_PERIMETRE_ID' => [
@@ -54,7 +54,7 @@ return [
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 4,
            'position'    => 3,
            'commentaire' => NULL,
        ],
        'REQUETE'              => [
@@ -66,7 +66,7 @@ return [
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 5,
            'position'    => 4,
            'commentaire' => NULL,
        ],
    ],
+8
Changes for data/ddl/view/V_INDICATEUR_200.sql: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
CREATE OR REPLACE FORCE VIEW V_INDICATEUR_200 AS
SELECT
  i.id intervenant_id,
  i.structure_id
FROM
  intervenant i
WHERE
  i.irrecevable = 1
 No newline at end of file
+1 −1
Changes for data/ddl_columns_pos.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -1095,10 +1095,10 @@ return [
    ],
    'PLAFOND'                        => [
        'ID',
        'CODE',
        'LIBELLE',
        'PLAFOND_PERIMETRE_ID',
        'REQUETE',
        'NUMERO',
    ],
    'PLAFOND_APPLICATION'            => [
        'ID',
+11
Changes for data/plafonds-sql/10.sql: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
SELECT
  i.annee_id                          annee_id,
  fr.type_volume_horaire_id           type_volume_horaire_id,
  fr.intervenant_id                   intervenant_id,
  fr.heures_compl_fi + fr.heures_compl_fc + fr.heures_compl_fa + fr.heures_compl_referentiel heures,
  si.plafond_hc_hors_remu_fc          plafond
FROM
       intervenant                i
  JOIN statut_intervenant        si ON si.id = i.statut_id
  JOIN etat_volume_horaire      evh ON evh.code = 'saisi'
  JOIN formule_resultat          fr ON fr.intervenant_id = i.id AND fr.etat_volume_horaire_id = evh.id
 No newline at end of file
Loading