Commit 398cdb77 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout des dates d'abandon et de transfert

parent 305b6285
......@@ -201,104 +201,105 @@ select distinct
and cod_etu is not null
/
create view V_SYGAL_THESE as
with inscription_administrative as (
create or replace view V_SYGAL_THESE as
with inscription_administrative as (
select distinct
ths.cod_ind,
iae.cod_dip,
iae.cod_vrs_vdi
ths.cod_ind,
iae.cod_dip,
iae.cod_vrs_vdi
from these_hdr_sout ths
join ins_adm_etp iae on iae.cod_ind = ths.cod_ind and ( iae.cod_dip, iae.cod_vrs_vdi ) in ( ( ths.cod_dip, ths.cod_vrs_vdi ), ( ths.cod_dip_anc, ths.cod_vrs_vdi_anc ) )
join diplome dip on dip.cod_dip = iae.cod_dip
join typ_diplome tpd on tpd.cod_tpd_etb = dip.cod_tpd_etb
join ins_adm_etp iae on iae.cod_ind = ths.cod_ind and ( iae.cod_dip, iae.cod_vrs_vdi ) in ( ( ths.cod_dip, ths.cod_vrs_vdi ), ( ths.cod_dip_anc, ths.cod_vrs_vdi_anc ) )
join diplome dip on dip.cod_dip = iae.cod_dip
join typ_diplome tpd on tpd.cod_tpd_etb = dip.cod_tpd_etb
where ths.cod_ths_trv = '1' -- Exclusion des travaux
and iae.eta_iae = 'E' -- Inscription administrative non annulee
and iae.eta_pmt_iae = 'P' -- Inscription administrative payee
and dip.cod_tpd_etb in ( '39', '40' )
and tpd.eta_ths_hdr_drt = 'T' -- Inscription en these
and tpd.tem_sante = 'N' -- Exclusion des theses d exercice
),
hierarchie_structures as (
select
cod_cmp_inf,
cod_cmp_sup
from cmp_cmp
where connect_by_isleaf = 1
connect by prior cod_cmp_sup = cod_cmp_inf
),
ancienne_these as (
select distinct
cod_ind,
cod_dip_anc,
cod_vrs_vdi_anc,
'A' eta_ths
from these_hdr_sout
where cod_ths_trv = '1'
and cod_dip_anc is not null
)
),
hierarchie_structures as (
select
cod_cmp_inf,
cod_cmp_sup
from cmp_cmp
where connect_by_isleaf = 1
connect by prior cod_cmp_sup = cod_cmp_inf
),
ancienne_these as (
select distinct
cod_ind,
cod_dip_anc,
cod_vrs_vdi_anc,
'A' eta_ths
from these_hdr_sout
where cod_ths_trv = '1'
and cod_dip_anc is not null
)
select
'apogee' as source_id, -- Id de la source
select
'apogee' as source_id, -- Id de la source
---------- Enregistrement de la these --------
ths.cod_ths as id, -- Identifiant de la these
case when ths.eta_ths = 'S' and nvl ( ths.dat_sou_ths, sysdate + 1 ) > sysdate
---------- Enregistrement de la these --------
ths.cod_ths as id, -- Identifiant de la these
case when ths.eta_ths = 'S' and nvl ( ths.dat_sou_ths, sysdate + 1 ) > sysdate
then 'E' else ths.eta_ths end eta_ths, -- Etat de la these (E=En cours, A=Abandonnee, S=Soutenue, U=Transferee)
ind.cod_etu as doctorant_id, -- Identifiant du doctorant
ths.cod_dis, -- Code discipline
dis.lib_int1_dis, -- Libellé discipline
ths.lib_ths, -- Titre de la these
ths.cod_lng, -- Code langue etrangere du titre
ths.dat_deb_ths, -- Date de 1ere inscription
null as cod_anu_prm_iae, -- DEPRECATED (cf. V_SYGAL_THESE_ANNEE_UNIV)
ind.cod_etu as doctorant_id, -- Identifiant du doctorant
ths.cod_dis, -- Code discipline
dis.lib_int1_dis, -- Libellé discipline
ths.lib_ths, -- Titre de la these
ths.cod_lng, -- Code langue etrangere du titre
ths.dat_deb_ths, -- Date de 1ere inscription
ths.dat_abandon, -- Date d'abandon
ths.dat_transfert_dep, -- Date de transfert
edo.cod_nat_edo as ecole_doct_id, -- Identifiant de l'ecole doctorale
ths.cod_eqr as unite_rech_id, -- Identifiant de l'unité de recherche principale
edo.cod_nat_edo as ecole_doct_id, -- Identifiant de l'ecole doctorale
ths.cod_eqr as unite_rech_id, -- Identifiant de l'unité de recherche principale
----------- Cotutelle ----------
pay.lib_pay, -- Denomination pays de cotutelle
nvl ( etb.lib_web_etb, etb.lib_etb ) lib_etb_cot, -- Denomination etablissement de cotutelle
ths.tem_avenant, -- Avenant a la convention de cotutelle (O/N)
----------- Cotutelle ----------
pay.lib_pay, -- Denomination pays de cotutelle
nvl ( etb.lib_web_etb, etb.lib_etb ) lib_etb_cot, -- Denomination etablissement de cotutelle
ths.tem_avenant, -- Avenant a la convention de cotutelle (O/N)
------- Organisation de la soutenance ------
ths.dat_prev_sou, -- Date previsionnelle de soutenance
ths.tem_sou_aut_ths, -- Soutenance autorisee (O/N/null)
ths.dat_aut_sou_ths, -- Date d autorisation de soutenance
ths.dat_sou_ths, -- Date de soutenance de la these
------- Organisation de la soutenance ------
ths.dat_prev_sou, -- Date previsionnelle de soutenance
ths.tem_sou_aut_ths, -- Soutenance autorisee (O/N/null)
ths.dat_aut_sou_ths, -- Date d autorisation de soutenance
ths.dat_sou_ths, -- Date de soutenance de la these
---------- Confidentialite --------
ths.dat_fin_cfd_ths, -- Date de fin de confidentialite de la these
---------- Confidentialite --------
ths.dat_fin_cfd_ths, -- Date de fin de confidentialite de la these
---------- Jury et resultats --------
tre.cod_neg_tre, -- Resultat positif (1) ou non (0)
ths.eta_rpd_ths, -- Reproduction de la these ( O=Oui / C=Oui avec corrections / N=Non )
decode(ths.eta_rpd_ths,
'N', 'obligatoire',
'C', 'facultative',
null) as correction_possible -- Témoin de corrections attendues
---------- Jury et resultats --------
tre.cod_neg_tre, -- Resultat positif (1) ou non (0)
ths.eta_rpd_ths, -- Reproduction de la these ( O=Oui / C=Oui avec corrections / N=Non )
decode(ths.eta_rpd_ths,
'N', 'obligatoire',
'C', 'facultative',
null) as correction_possible -- Témoin de corrections attendues
from inscription_administrative iae
join individu ind on ind.cod_ind = iae.cod_ind
join version_diplome vdi on vdi.cod_dip = iae.cod_dip and vdi.cod_vrs_vdi = iae.cod_vrs_vdi
join these_hdr_sout ths on ths.cod_ind = iae.cod_ind and ths.cod_dip = iae.cod_dip and ths.cod_vrs_vdi = iae.cod_vrs_vdi
left join ancienne_these anc on anc.cod_ind = ths.cod_ind and anc.cod_dip_anc = ths.cod_dip and anc.cod_vrs_vdi_anc = ths.cod_vrs_vdi and anc.eta_ths = ths.eta_ths
left join annee_uni ans on ans.cod_anu = ths.daa_fin_ths
left join ecole_doctorale edo on edo.cod_edo = ths.cod_edo
left join secteur_rch ser on ser.cod_ser = ths.cod_ser
left join equipe_rch eqr on eqr.cod_eqr = ths.cod_eqr
left join resultat_vdi rvi on rvi.cod_ind = iae.cod_ind and rvi.cod_dip = iae.cod_dip and rvi.cod_vrs_vdi = iae.cod_vrs_vdi and rvi.cod_ses = '0' and rvi.cod_adm = '1' and rvi.cod_tre is not null
left join annee_uni anr on anr.cod_anu = rvi.cod_anu
left join typ_resultat tre on tre.cod_tre = rvi.cod_tre
left join mention men on men.cod_men = rvi.cod_men
left join hierarchie_structures ccm on ccm.cod_cmp_inf = ths.cod_cmp
left join composante cmp on cmp.cod_cmp = nvl ( ccm.cod_cmp_sup, ths.cod_cmp )
left join diplome_sise dis on dis.cod_dis = ths.cod_dis
left join etablissement etb on etb.cod_etb = ths.cod_etb
left join pays pay on pay.cod_pay = ths.cod_pay
left join etablissement sou on sou.cod_etb = ths.cod_etb_sou
left join etablissement ori on ori.cod_etb = ths.cod_etb_origine
left join langue lng on lng.cod_lng = ths.cod_lng
where
from inscription_administrative iae
join individu ind on ind.cod_ind = iae.cod_ind
join version_diplome vdi on vdi.cod_dip = iae.cod_dip and vdi.cod_vrs_vdi = iae.cod_vrs_vdi
join these_hdr_sout ths on ths.cod_ind = iae.cod_ind and ths.cod_dip = iae.cod_dip and ths.cod_vrs_vdi = iae.cod_vrs_vdi
left join ancienne_these anc on anc.cod_ind = ths.cod_ind and anc.cod_dip_anc = ths.cod_dip and anc.cod_vrs_vdi_anc = ths.cod_vrs_vdi and anc.eta_ths = ths.eta_ths
left join annee_uni ans on ans.cod_anu = ths.daa_fin_ths
left join ecole_doctorale edo on edo.cod_edo = ths.cod_edo
left join secteur_rch ser on ser.cod_ser = ths.cod_ser
left join equipe_rch eqr on eqr.cod_eqr = ths.cod_eqr
left join resultat_vdi rvi on rvi.cod_ind = iae.cod_ind and rvi.cod_dip = iae.cod_dip and rvi.cod_vrs_vdi = iae.cod_vrs_vdi and rvi.cod_ses = '0' and rvi.cod_adm = '1' and rvi.cod_tre is not null
left join annee_uni anr on anr.cod_anu = rvi.cod_anu
left join typ_resultat tre on tre.cod_tre = rvi.cod_tre
left join mention men on men.cod_men = rvi.cod_men
left join hierarchie_structures ccm on ccm.cod_cmp_inf = ths.cod_cmp
left join composante cmp on cmp.cod_cmp = nvl ( ccm.cod_cmp_sup, ths.cod_cmp )
left join diplome_sise dis on dis.cod_dis = ths.cod_dis
left join etablissement etb on etb.cod_etb = ths.cod_etb
left join pays pay on pay.cod_pay = ths.cod_pay
left join etablissement sou on sou.cod_etb = ths.cod_etb_sou
left join etablissement ori on ori.cod_etb = ths.cod_etb_origine
left join langue lng on lng.cod_lng = ths.cod_lng
where
ths.cod_ths_trv = '1' and -- Exclusion des travaux
anc.cod_dip_anc is null
/
......
......@@ -25,5 +25,7 @@
<field name="resultat" type="string" column="COD_NEG_TRE" length="1" nullable="true"/>
<field name="etatReporduction" type="string" column="ETA_RPD_THS" length="1" nullable="true"/>
<field name="correctionAutorisee" type="string" column="CORRECTION_POSSIBLE" length="1" nullable="true"/>
<field name="dateAbandon" type="datetime" column="DAT_ABANDON" nullable="true"/>
<field name="dateTransfert" type="datetime" column="DAT_TRANSFERT_DEP" nullable="true"/>
</entity>
</doctrine-mapping>
......@@ -9,28 +9,30 @@ namespace ImportData\V1\Entity\Db;
*/
class These
{
protected $id;
protected $sourceId;
protected $etatThese;
protected $doctorantId;
protected $codeDiscipline;
protected $libDiscipline;
protected $title;
protected $codeLNG;
protected $datePremiereInsc;
protected $uniteRechId;
protected $ecoleDoctId;
protected $libPaysCotut;
protected $libEtabCotut;
protected $temAvenant;
protected $dateSoutenancePrev;
protected $temSoutenanceAutorisee;
protected $dateSoutenanceAutorisee;
protected $dateSoutenance;
protected $dateConfidFin;
protected $resultat;
protected $etatReporduction;
protected $correctionAutorisee;
private $id;
private $sourceId;
private $etatThese;
private $doctorantId;
private $codeDiscipline;
private $libDiscipline;
private $title;
private $codeLNG;
private $datePremiereInsc;
private $uniteRechId;
private $ecoleDoctId;
private $libPaysCotut;
private $libEtabCotut;
private $temAvenant;
private $dateSoutenancePrev;
private $temSoutenanceAutorisee;
private $dateSoutenanceAutorisee;
private $dateSoutenance;
private $dateConfidFin;
private $resultat;
private $etatReporduction;
private $correctionAutorisee;
private $dateAbandon;
private $dateTransfert;
/**
* @return mixed
......@@ -207,4 +209,20 @@ class These
{
return $this->correctionAutorisee;
}
/**
* @return mixed
*/
public function getDateAbandon()
{
return $this->dateAbandon;
}
/**
* @return mixed
*/
public function getDateTransfert()
{
return $this->dateTransfert;
}
}
Markdown is supported
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