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

Gestion des volume_horaire_index

parent b05426ec
Loading
Loading
Loading
Loading
Loading
+77 −5
Changes for data/ddl/table/TBL_CONTRAT.php: 77 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ return [
            'precision'   => 126,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 32,
            'position'    => 31,
            'commentaire' => NULL,
        ],
        'TAUX_REMU_DATE'             => [
@@ -285,6 +285,18 @@ return [
            'position'    => 26,
            'commentaire' => NULL,
        ],
        'TAUX_REMU_MAJORE_DATE'      => [
            'name'        => 'TAUX_REMU_MAJORE_DATE',
            'type'        => 'date',
            'bdd-type'    => 'DATE',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 36,
            'commentaire' => NULL,
        ],
        'TAUX_REMU_MAJORE_ID'        => [
            'name'        => 'TAUX_REMU_MAJORE_ID',
            'type'        => 'int',
@@ -342,9 +354,57 @@ return [
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 36,
            'position'    => 35,
            'commentaire' => 'Nombre de volumes horaires signés',
        ],
        'TOTAL_HETD'                 => [
            'name'        => 'TOTAL_HETD',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 37,
            'commentaire' => NULL,
        ],
        'TOTAL_HEURES'               => [
            'name'        => 'TOTAL_HEURES',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 38,
            'commentaire' => NULL,
        ],
        'TOTAL_HEURES_FORMATION'     => [
            'name'        => 'TOTAL_HEURES_FORMATION',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 40,
            'commentaire' => NULL,
        ],
        'TOTAL_HEURES_PERIODE_ESSAI' => [
            'name'        => 'TOTAL_HEURES_PERIODE_ESSAI',
            'type'        => 'float',
            'bdd-type'    => 'FLOAT',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => 126,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 39,
            'commentaire' => NULL,
        ],
        'TP'                         => [
            'name'        => 'TP',
            'type'        => 'float',
@@ -402,7 +462,19 @@ return [
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 33,
            'position'    => 32,
            'commentaire' => NULL,
        ],
        'VOLUME_HORAIRE_INDEX'       => [
            'name'        => 'VOLUME_HORAIRE_INDEX',
            'type'        => 'int',
            'bdd-type'    => 'NUMBER',
            'length'      => 0,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 41,
            'commentaire' => NULL,
        ],
        'VOLUME_HORAIRE_MISSION_ID'  => [
@@ -414,7 +486,7 @@ return [
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 34,
            'position'    => 33,
            'commentaire' => NULL,
        ],
        'VOLUME_HORAIRE_REF_ID'      => [
@@ -426,7 +498,7 @@ return [
            'precision'   => NULL,
            'nullable'    => TRUE,
            'default'     => NULL,
            'position'    => 35,
            'position'    => 34,
            'commentaire' => NULL,
        ],
    ],
+12 −1
Changes for module/Contrat/src/Tbl/Process/ContratProcess.php: 12 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -904,9 +904,20 @@ class ContratProcess implements ProcessInterface
                        $ligne           = $this->extractContrat($contrat);
                        $this->tblData[] = array_change_key_case($ligne, CASE_UPPER); // avant migration postgresql
                    } else {
                        foreach ($contrat->volumesHoraires as $volumeHoraire) {
                        $vhs = $contrat->volumesHoraires;

                        usort($vhs, function (VolumeHoraire $a, VolumeHoraire $b) {
                            $aid = $a->volumeHoraireId.'-'.$a->volumeHoraireRefId.'-'.$a->volumeHoraireMissionId;
                            $bid = $b->volumeHoraireId.'-'.$b->volumeHoraireRefId.'-'.$b->volumeHoraireMissionId;

                            return $aid > $bid ? 1 : -1;
                        });
                        $vhIndex = 0;
                        foreach ($vhs as $volumeHoraire) {
                            $ligne           = $this->extractVolumeHoraire($volumeHoraire);
                            $ligne['volume_horaire_index'] = $vhIndex;
                            $this->tblData[] = array_change_key_case($ligne, CASE_UPPER); // avant migration postgresql
                            $vhIndex++;
                        }
                    }
                }