Commit 49b83229 authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Nouvelles tables de données mises à jour automatiquement...

parent 74447bda
<?php
$bdd = new \BddAdmin\Bdd(Config::get()['bdds']['deploy-local']);
$bdd->debug = true;
$bdd = new \BddAdmin\Bdd(Config::get()['bdds']['dev-local']);
//$bdd->debug = true;
$oa = new OseAdmin();
$oa->setBdd($bdd);
......@@ -10,11 +10,11 @@ $dataGen = new DataGen($oa);
$dataGen->update();
/*
/*
$bddp = new \BddAdmin\Bdd(Config::get()['bdds']['dev-local']);
$i = $bddp->select('SELECT * FROM formule order by libelle');
$i = $bddp->select('SELECT * FROM tbl order by ordre');
$indicateurs = [];
foreach( $i as $indic ){
......@@ -22,5 +22,5 @@ foreach( $i as $indic ){
}
var_dump($indicateurs);
file_put_contents($oa->getOseDir().'/data/formules.php', var_export($indicateurs,true));
file_put_contents($oa->getOseDir().'/data/tbl.php', var_export($indicateurs,true));
*/
\ No newline at end of file
......@@ -48,6 +48,20 @@ class DataGen
'title' => 'Plafonds',
'key' => 'CODE',
],
'TYPE_VOLUME_HORAIRE' => [
'title' => 'Types de volumes horaires',
],
'ETAT_VOLUME_HORAIRE' => [
'title' => 'États de volumes horaires',
],
'TYPE_VALIDATION' => [
'title' => 'Types de validation',
'key' => 'CODE',
],
'TBL' => [
'title' => 'Tableaux de bord',
'key' => 'TBL_NAME',
],
];
......@@ -70,7 +84,6 @@ class DataGen
'SCENARIO' => 'structure_id IS NULL',
'SOURCE' => "code='OSE'",
'TAUX_HORAIRE_HETD' => '',
'TBL' => '',
'TYPE_AGREMENT' => '',
'TYPE_AGREMENT_STATUT' => '',
'TYPE_CONTRAT' => '',
......@@ -78,8 +91,6 @@ class DataGen
'TYPE_INTERVENANT' => '',
'TYPE_INTERVENTION' => "code IN ('CM','TD','TP')",
'TYPE_RESSOURCE' => '',
'TYPE_VALIDATION' => '',
'TYPE_VOLUME_HORAIRE' => '',
'UTILISATEUR' => "username = '" . self::OSE_USER . "'",
'WF_ETAPE' => '',
'WF_ETAPE_DEP' => '',
......@@ -110,12 +121,14 @@ class DataGen
public function update()
{
foreach ($this->config as $table => $params) {
echo ' * ' . $params['title'] . ' ...'."\n"; // provisoire
//$this->oseAdmin->getConsole()->println(' * ' . $params['title'] . ' ...');
if (isset($params['title'])) {
echo ' * ' . $params['title'] . ' ...' . "\n"; // provisoire
//$this->oseAdmin->getConsole()->println(' * ' . $params['title'] . ' ...');
}
$data = $this->$table();
$this->oseAdmin->getBdd()->getTable($table)->merge(
$data,
$params['key'],
isset($params['key']) ? $params['key'] : 'ID',
isset($params['options']) ? $params['options'] : []
);
}
......@@ -204,12 +217,12 @@ class DataGen
public function PLAFOND()
{
$data = require $this->oseAdmin->getOseDir() . 'data/plafonds.php';
$data = require $this->oseAdmin->getOseDir() . 'data/plafonds.php';
$plafonds = [];
foreach( $data['plafonds'] as $code => $libelle ){
$plafond = [
'CODE' => $code,
foreach ($data['plafonds'] as $code => $libelle) {
$plafond = [
'CODE' => $code,
'LIBELLE' => $libelle,
];
$plafonds[] = $plafond;
......@@ -255,4 +268,38 @@ class DataGen
return $indicateurs;
}
public function TYPE_VOLUME_HORAIRE()
{
return require $this->oseAdmin->getOseDir() . 'data/types_volumes_horaires.php';
}
public function ETAT_VOLUME_HORAIRE()
{
return require $this->oseAdmin->getOseDir() . 'data/etats_volumes_horaires.php';
}
public function TBL()
{
return require $this->oseAdmin->getOseDir() . 'data/tbl.php';
}
public function TYPE_VALIDATION()
{
$data = require $this->oseAdmin->getOseDir() . 'data/type_validations.php';
$typesValidation = [];
foreach ($data as $CODE => $LIBELLE) {
$typesValidation[] = compact('CODE', 'LIBELLE');
}
return $typesValidation;
}
}
\ No newline at end of file
<?php
return [
[
'ID' => 1,
'CODE' => 'saisi',
'LIBELLE' => 'Saisi',
'ORDRE' => 1,
],
[
'ID' => 2,
'CODE' => 'valide',
'LIBELLE' => 'Validé',
'ORDRE' => 2,
],
[
'ID' => 3,
'CODE' => 'contrat-edite',
'LIBELLE' => 'Contrat édité',
'ORDRE' => 3,
],
[
'ID' => 4,
'CODE' => 'contrat-signe',
'LIBELLE' => 'Contrat signé',
'ORDRE' => 4,
],
];
\ No newline at end of file
......@@ -14,5 +14,6 @@ return [
'hetd' => 'Nombre maximum d\'heures équivalent TD par intervenant selon son statut',
'hc-hors-d71460' => 'Nombre d\'heures complémentaires maximum (hors rémunération au titre de l\'article d714-60 du code de l\'éducation)',
'ref-par-fonction-mere' => 'Heures max. de référentiel par intervenant et par type de fonction référentielle',
'hc-fi-hors-ead' => 'HETD max. en formation initiale hors EAD',
],
];
\ No newline at end of file
<?php
return [
[
'TBL_NAME' => 'chargens_seuils_def',
'TABLE_NAME' => 'TBL_CHARGENS_SEUILS_DEF',
'VIEW_NAME' => 'V_TBL_CHARGENS_SEUILS_DEF',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_CHARGENS_SEUILS_DEF__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 1,
'FEUILLE_DE_ROUTE' => false,
],
[
'TBL_NAME' => 'formule',
'TABLE_NAME' => null,
'VIEW_NAME' => null,
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => null,
'CUSTOM_CALCUL_PROC' => 'OSE_FORMULE.CALCULER_TBL',
'ORDRE' => 1,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'chargens',
'TABLE_NAME' => 'TBL_CHARGENS',
'VIEW_NAME' => 'V_TBL_CHARGENS',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_CHARGENS__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 1,
'FEUILLE_DE_ROUTE' => false,
],
[
'TBL_NAME' => 'dmep_liquidation',
'TABLE_NAME' => 'TBL_DMEP_LIQUIDATION',
'VIEW_NAME' => 'V_TBL_DMEP_LIQUIDATION',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_DMEP_LIQUIDATION__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 1,
'FEUILLE_DE_ROUTE' => false,
],
[
'TBL_NAME' => 'piece_jointe_demande',
'TABLE_NAME' => 'TBL_PIECE_JOINTE_DEMANDE',
'VIEW_NAME' => 'V_TBL_PIECE_JOINTE_DEMANDE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_PIECE_JOINTE_DEMANDE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 2,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'piece_jointe_fournie',
'TABLE_NAME' => 'TBL_PIECE_JOINTE_FOURNIE',
'VIEW_NAME' => 'V_TBL_PIECE_JOINTE_FOURNIE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_PIECE_JOINTE_FOURNIE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 3,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'agrement',
'TABLE_NAME' => 'TBL_AGREMENT',
'VIEW_NAME' => 'V_TBL_AGREMENT',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_AGREMENT__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 4,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'cloture_realise',
'TABLE_NAME' => 'TBL_CLOTURE_REALISE',
'VIEW_NAME' => 'V_TBL_CLOTURE_REALISE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_CLOTURE_REALISE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 5,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'contrat',
'TABLE_NAME' => 'TBL_CONTRAT',
'VIEW_NAME' => 'V_TBL_CONTRAT',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_CONTRAT__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 6,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'dossier',
'TABLE_NAME' => 'TBL_DOSSIER',
'VIEW_NAME' => 'V_TBL_DOSSIER',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_DOSSIER__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 7,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'paiement',
'TABLE_NAME' => 'TBL_PAIEMENT',
'VIEW_NAME' => 'V_TBL_PAIEMENT',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_PAIEMENT__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 8,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'piece_jointe',
'TABLE_NAME' => 'TBL_PIECE_JOINTE',
'VIEW_NAME' => 'V_TBL_PIECE_JOINTE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_PIECE_JOINTE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 9,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'service_saisie',
'TABLE_NAME' => 'TBL_SERVICE_SAISIE',
'VIEW_NAME' => 'V_TBL_SERVICE_SAISIE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_SERVICE_SAISIE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 10,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'service_referentiel',
'TABLE_NAME' => 'TBL_SERVICE_REFERENTIEL',
'VIEW_NAME' => 'V_TBL_SERVICE_REFERENTIEL',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_SERVICE_REFERENTIEL__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 11,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'validation_enseignement',
'TABLE_NAME' => 'TBL_VALIDATION_ENSEIGNEMENT',
'VIEW_NAME' => 'V_TBL_VALIDATION_ENSEIGNEMENT',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_VALIDATION_ENSEIGNEMENT_UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 12,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'validation_referentiel',
'TABLE_NAME' => 'TBL_VALIDATION_REFERENTIEL',
'VIEW_NAME' => 'V_TBL_VALIDATION_REFERENTIEL',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_VALIDATION_REFERENTIEL__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 13,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'service',
'TABLE_NAME' => 'TBL_SERVICE',
'VIEW_NAME' => 'V_TBL_SERVICE',
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => 'TBL_SERVICE__UN',
'CUSTOM_CALCUL_PROC' => null,
'ORDRE' => 14,
'FEUILLE_DE_ROUTE' => true,
],
[
'TBL_NAME' => 'workflow',
'TABLE_NAME' => null,
'VIEW_NAME' => null,
'SEQUENCE_NAME' => null,
'CONSTRAINT_NAME' => null,
'CUSTOM_CALCUL_PROC' => 'OSE_WORKFLOW.CALCULER_TBL',
'ORDRE' => 15,
'FEUILLE_DE_ROUTE' => true,
],
];
\ No newline at end of file
<?php
return [
'DONNEES_PERSO_PAR_COMP' => 'Validation des données personnelles',
'SERVICES_PAR_COMP' => 'Validation des enseignements',
'CONTRAT_PAR_COMP' => 'Validation du contrat ou avenant',
'PIECE_JOINTE' => 'Validation de pièce justificative',
'FICHIER' => 'Validation de fichier',
'REFERENTIEL' => 'Validation du référentiel',
'CLOTURE_REALISE' => 'Clôture de la saisie des enseignements réalisés',
];
\ No newline at end of file
<?php
return [
[
'ID' => 1,
'CODE' => 'PREVU',
'LIBELLE' => 'Prévisionnel',
'ORDRE' => 1,
],
[
'ID' => 2,
'CODE' => 'REALISE',
'LIBELLE' => 'Réalisé',
'ORDRE' => 2,
],
];
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment