Commit bbd70ab9 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Adptation v_export_service pour remonter l'étape réelle d'un élement mutualisé

parent 2d3a159b
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ SELECT
  fr.type_volume_horaire_id         type_volume_horaire_id,
  fr.etat_volume_horaire_id         etat_volume_horaire_id,
  NULL                              element_pedagogique_id,
  NULL                              etape_id,
  OSE_PARAMETRE.GET_ETABLISSEMENT   etablissement_id,
  NULL                              structure_aff_id,
  sr.structure_id                   structure_ens_id,
@@ -152,6 +153,7 @@ SELECT
  tvh.id                            type_volume_horaire_id,
  evh.id                            etat_volume_horaire_id,
  NULL                              element_pedagogique_id,
  NULL                              etape_id,
  OSE_PARAMETRE.GET_ETABLISSEMENT   etablissement_id,
  NULL                              structure_aff_id,
  NULL                              structure_ens_id,
@@ -313,7 +315,7 @@ FROM
  LEFT JOIN STRUCTURE                  sens ON sens.id  = NVL(t.structure_ens_id, ep.structure_id)
  LEFT JOIN periode                       p ON p.id     = t.periode_id
  LEFT JOIN SOURCE                      src ON src.id   = ep.source_id OR (ep.source_id IS NULL AND src.code = 'OSE')
  LEFT JOIN etape                       etp ON etp.id   = CASE WHEN t.etape_id IS NOT NULL THEN t.etape_id ELSE ep.etape_id
  LEFT JOIN etape                       etp ON etp.id   = CASE WHEN t.etape_id IS NOT NULL THEN t.etape_id ELSE ep.etape_id END
  LEFT JOIN type_formation               tf ON tf.id    = etp.type_formation_id AND tf.histo_destruction IS NULL
  LEFT JOIN groupe_type_formation       gtf ON gtf.id   = tf.groupe_id AND gtf.histo_destruction IS NULL
  LEFT JOIN v_formule_intervenant        fi ON fi.intervenant_id = i.id