Commit c8181ab0 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release-1.3.1' into develop

parents 2663aa57 3a9d154d
Pipeline #6131 passed with stage
in 20 seconds
Journal des modifications
=========================
1.3.1 (?????????/01/2020)
------------------
- Le tribunal local compétent n'étant plus mentionné sur la convention de diffusion de la thèse, il n'est plus nécessaire
que chaque établissement le fournisse.
- Chaque établissement doit corriger l'adresse d'assistance et vérifier la véracité des adresses de contacts
"BU" et "Maison des doctorats".
1.3.0 (20/11/2019)
------------------
......@@ -11,6 +19,34 @@ Journal des modifications
Le contenu de ces tables est mis à jour par un script PHP à CRONer.
UNIVROUEN : assistance-sygal-univ-rouen@normandie-univ.fr :
------------------------------------
lynda.letetu@univ-rouen.fr
catherine.godard@univ-rouen.fr
marie.landry@univ-rouen.fr
coleen.boust@univ-rouen.fr
marion.ghislain@univ-rouen.fr
sandra.tamion@univ-rouen.fr
claire.leboeuf@univ-rouen.fr
philippe.aubry@univ-rouen.fr
mathieu.maubois@univ-rouen.fr
camille.henaux@univ-rouen.fr
UNIVLEHAVRE : assistance-sygal-univ-lehavre@normandie-univ.fr
------------------------------------
isabelle.thomas@univ-lehavre.fr
sandrine.conin@univ-lehavre.fr
christine.lebodo@univ-lehavre.fr
sophie.mandeville@univ-lehavre.fr
INSARouen : assistance-sygal-insa-rouen@normandie-univ.fr
------------------------------------
marie.briandy@insa-rouen.fr
rachel.maeght@insa-rouen.fr
julien.marchand@insa-rouen.fr
Groupe UNICAEN, derrière assistance-sygal-unicaen@normandie-univ.fr
v1.2.6 (12/11/2019)
-------------------
......
--
--
-- SyGAL
-- =====
--
-- Web Service d'import de données
-- -------------------------------
--
-- Vues Physalis propre à votre établissement, à personnaliser.
--
create or replace view SYGAL_VARIABLE_MANU as
select
'physalis' as source_id,
'EMAIL_ASSISTANCE' as id,
'EMAIL_ASSISTANCE' as cod_vap,
'Adresse mail de l''assistance utilisateur' as lib_vap,
'assistance-sygal@univ.fr' as par_vap, -----------------------------> à personnaliser
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
from dual
union all
select
'physalis' as source_id,
'EMAIL_BU' as id,
'EMAIL_BU' as cod_vap,
'Adresse mail de contact de la BU' as lib_vap,
'bu@univ.fr' as par_vap, ------------------------------------------> à personnaliser
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
from dual
union all
select
'physalis' as source_id,
'EMAIL_BDD' as id,
'EMAIL_BDD' as cod_vap,
'Adresse mail de contact du bureau des doctorats' as lib_vap,
'bdd@univ.fr' as par_vap, -----------------------------------------> à personnaliser
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
from dual
/
create view V_SYGAL_VARIABLE as
with tmp(cod_vap, lib_vap, par_vap) as (
select 'ETB_ART_ETB_LIB', 'Article du nom de l''etb de référence', 'L''' from dual union
select 'ETB_LIB', 'Nom de l''établissement de référence', 'Université de Caen Normandie' from dual union
select 'ETB_LIB_NOM_RESP', 'Nom du responsable de l''établissement', 'M. Pierre Denise' from dual union
select 'ETB_LIB_TIT_RESP', 'Titre du responsable de l''établissement', 'Le Président de l''université' from dual union
select 'EMAIL_ASSISTANCE', 'Adresse mail de l''assistance utilisateur', 'assistance-sygal@unicaen.fr' from dual union
select 'EMAIL_BU', 'Adresse mail de contact de la BU', 'scd.theses@unicaen.fr' from dual union
select 'EMAIL_BDD', 'Adresse mail de contact du bureau des doctorats', 'recherche.doctorat@unicaen.fr' from dual union
select 'TRIBUNAL_COMPETENT', 'Tribunal compétent', 'Le Tribunal Administratif de Caen' from dual
)
select
'physalis' as source_id, -- Id de la source
cod_vap as id,
cod_vap,
lib_vap,
par_vap,
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
from tmp
-- + variables définies manuellement :
union all
select
source_id,
id,
cod_vap,
lib_vap,
par_vap,
DATE_DEB_VALIDITE,
DATE_FIN_VALIDITE
from
V_SYGAL_VARIABLE_MANU
/
--
--
-- SyGAL
-- =====
--
-- Web Service d'import de données
-- -------------------------------
--
-- Tables à créer par chaque établissement.
--
create table SYGAL_ACTEUR
(
ID VARCHAR2(104),
SOURCE_ID VARCHAR2(50 char),
THESE_ID NUMBER(8),
ROLE_ID CHAR,
COD_ROJ_COMPL VARCHAR2(1 char),
LIB_ROJ_COMPL VARCHAR2(21),
COD_PER NUMBER(8),
INDIVIDU_ID VARCHAR2(4000),
ACTEUR_ETABLISSEMENT_ID VARCHAR2(8),
COD_PAY_ETB VARCHAR2(3),
LIB_PAY_ETB VARCHAR2(40),
COD_CPS VARCHAR2(10),
LIB_CPS VARCHAR2(40),
TEM_HAB_RCH_PER VARCHAR2(1) not null,
TEM_RAP_RECU VARCHAR2(1),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_DOCTORANT
(
SOURCE_ID VARCHAR2(50 char),
ID NUMBER(8),
INDIVIDU_ID NUMBER(8),
INE VARCHAR2(12),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_ECOLE_DOCT
(
SOURCE_ID VARCHAR2(50 char),
STRUCTURE_ID VARCHAR2(4),
ID VARCHAR2(4),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_ETABLISSEMENT
(
SOURCE_ID VARCHAR2(50 char),
STRUCTURE_ID VARCHAR2(8),
ID VARCHAR2(8),
CODE VARCHAR2(8),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_FINANCEMENT
(
ID NUMBER,
SOURCE_ID VARCHAR2(50 char),
THESE_ID NUMBER(8) not null,
ANNEE_ID VARCHAR2(4),
ORIGINE_FINANCEMENT_ID VARCHAR2(2),
COMPLEMENT_FINANCEMENT VARCHAR2(4000),
QUOTITE_FINANCEMENT NUMBER(3),
DATE_DEBUT_FINANCEMENT DATE,
DATE_FIN_FINANCEMENT DATE,
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_INDIVIDU
(
SOURCE_ID VARCHAR2(50 char),
TYPE VARCHAR2(9),
ID VARCHAR2(4000),
SUPANN_ID VARCHAR2(4000),
CIV VARCHAR2(5),
LIB_NOM_PAT_IND VARCHAR2(40),
LIB_NOM_USU_IND VARCHAR2(40),
LIB_PR1_IND VARCHAR2(20),
LIB_PR2_IND VARCHAR2(20),
LIB_PR3_IND VARCHAR2(20),
EMAIL VARCHAR2(4000),
DATE_NAI_IND DATE,
COD_PAY_NAT VARCHAR2(3),
LIB_NAT VARCHAR2(40),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_ORIGINE_FINANCEMENT
(
ID CHAR(2),
SOURCE_ID VARCHAR2(50 char),
COD_OFI CHAR(2),
LIC_OFI VARCHAR2(10),
LIB_OFI VARCHAR2(40),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_ROLE
(
SOURCE_ID VARCHAR2(50 char),
ID CHAR,
LIB_ROJ VARCHAR2(21),
LIC_ROJ VARCHAR2(10),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_STRUCTURE
(
SOURCE_ID VARCHAR2(50 char),
TYPE_STRUCTURE_ID VARCHAR2(15),
ID VARCHAR2(10),
SIGLE VARCHAR2(25),
LIBELLE VARCHAR2(100),
CODE_PAYS VARCHAR2(3),
LIBELLE_PAYS VARCHAR2(40),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_THESE_ANNEE_UNIV
(
SOURCE_ID VARCHAR2(50 char),
ID VARCHAR2(45),
THESE_ID NUMBER(8) not null,
ANNEE_UNIV VARCHAR2(4) not null,
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_TITRE_ACCES
(
SOURCE_ID VARCHAR2(50 char),
ID NUMBER(8) not null,
THESE_ID NUMBER(8) not null,
TITRE_ACCES_INTERNE_EXTERNE VARCHAR2(1),
LIBELLE_TITRE_ACCES VARCHAR2(120),
TYPE_ETB_TITRE_ACCES VARCHAR2(40),
LIBELLE_ETB_TITRE_ACCES VARCHAR2(100),
CODE_DEPT_TITRE_ACCES VARCHAR2(100),
CODE_PAYS_TITRE_ACCES VARCHAR2(3),
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_UNITE_RECH
(
SOURCE_ID VARCHAR2(50 char),
STRUCTURE_ID VARCHAR2(10) not null,
ID VARCHAR2(10) not null,
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_VARIABLE
(
SOURCE_ID VARCHAR2(50 char),
ID VARCHAR2(20),
COD_VAP VARCHAR2(20),
LIB_VAP VARCHAR2(47),
PAR_VAP VARCHAR2(100),
DATE_DEB_VALIDITE DATE,
DATE_FIN_VALIDITE DATE,
INSERTED_ON DATE default sysdate not null
)
/
create table SYGAL_THESE
(
SOURCE_ID VARCHAR2(50 char),
ID NUMBER(8) not null,
ETA_THS VARCHAR2(1),
DOCTORANT_ID NUMBER(8),
COD_DIS NUMBER(7),
LIB_INT1_DIS VARCHAR2(200),
LIB_THS VARCHAR2(800),
COD_LNG VARCHAR2(4),
DAT_DEB_THS DATE,
ECOLE_DOCT_ID VARCHAR2(4),
UNITE_RECH_ID VARCHAR2(10),
LIB_PAY VARCHAR2(40),
LIB_ETB_COT VARCHAR2(120),
TEM_AVENANT VARCHAR2(1),
DAT_PREV_SOU DATE,
TEM_SOU_AUT_THS VARCHAR2(1),
DAT_AUT_SOU_THS DATE,
DAT_SOU_THS DATE,
DAT_FIN_CFD_THS DATE,
COD_NEG_TRE VARCHAR2(1),
ETA_RPD_THS VARCHAR2(1),
CORRECTION_POSSIBLE VARCHAR2(11),
COD_ANU_PRM_IAE VARCHAR2(20),
INSERTED_ON DATE default sysdate not null
)
/
......@@ -6,7 +6,9 @@
-- Web Service d'import de données
-- -------------------------------
--
-- Vues Apogée propre à votre établissement, à personnaliser.
-- Vues Apogée propre à votre établissement.
--
-- ATTENTION: script à personnaliser!
--
--
......@@ -30,7 +32,7 @@ create view V_SYGAL_VARIABLE_MANU as
'apogee' as source_id,
'EMAIL_BU' as id,
'EMAIL_BU' as cod_vap,
'Adresse mail de contact de la BU' as lib_vap,
'Adresse mail de contact pour les aspects BU' as lib_vap,
'bu@univ.fr' as par_vap, ------------------------------------------> à personnaliser
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
......@@ -40,8 +42,8 @@ create view V_SYGAL_VARIABLE_MANU as
'apogee' as source_id,
'EMAIL_BDD' as id,
'EMAIL_BDD' as cod_vap,
'Adresse mail de contact du bureau des doctorats' as lib_vap,
'bdd@univ.fr' as par_vap, -----------------------------------------> à personnaliser
'Adresse mail de contact pour les aspects Doctorat' as lib_vap,
'doctorat@univ.fr' as par_vap, -----------------------------------------> à personnaliser
to_date('2017-01-01', 'YYYY-MM-DD') as DATE_DEB_VALIDITE,
to_date('9999-12-31', 'YYYY-MM-DD') as DATE_FIN_VALIDITE
from dual
......
......@@ -19,7 +19,7 @@ select
from dual
/
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ACTEUR" ("ID", "SOURCE_ID", "INDIVIDU_ID", "THESE_ID", "ACTEUR_ETABLISSEMENT_ID", "COD_PAY_ETB", "LIB_CPS", "LIB_PAY_ETB", "COD_PER", "COD_CPS", "ROLE_ID", "COD_ROJ_COMPL", "LIB_ROJ_COMPL", "TEM_HAB_RCH_PER", "TEM_RAP_RECU") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ACTEUR" ("ID", "SOURCE_ID", "INDIVIDU_ID", "THESE_ID", "ACTEUR_ETABLISSEMENT_ID", "COD_PAY_ETB", "LIB_CPS", "LIB_PAY_ETB", "COD_PER", "COD_CPS", "ROLE_ID", "COD_ROJ_COMPL", "LIB_ROJ_COMPL", "TEM_HAB_RCH_PER", "TEM_RAP_RECU") AS
SELECT
i.no_individu||2 || T.ID_THESE || ro.id as ID,
'physalis' as SOURCE_ID,
......@@ -187,18 +187,20 @@ left outer join API_SCOLARITE.SYGAL_ROLE_TMP ro on ro.ID = a.ass_id
WHERE-- T.ID_THESE = 13 -- a modifier
-- membre du jury sauf invité
ASS_ID_PERE = (select ass_id from GRHUM.ASSOCIATION where ass_code = 'D_JURY')
AND ASS_CODE != 'D_JR_INV';
AND ASS_CODE != 'D_JR_INV'
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_DOCTORANT" ("ID", "SOURCE_ID", "INDIVIDU_ID", "INE") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_DOCTORANT" ("ID", "SOURCE_ID", "INDIVIDU_ID", "INE") AS
select D.NO_INDIVIDU ||1 as ID , 'physalis' as SOURCE_ID, d.NO_INDIVIDU ||1 as INDIVIDU_ID , e.ETUD_CODE_INE as ine
from RECHERCHE.DOCTORANT d
left outer join grhum.etudiant e on d.ETUD_NUMERO = e.ETUD_NUMERO;
left outer join grhum.etudiant e on d.ETUD_NUMERO = e.ETUD_NUMERO
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ECOLE_DOCT" ("STRUCTURE_ID", "SOURCE_ID", "ID") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ECOLE_DOCT" ("STRUCTURE_ID", "SOURCE_ID", "ID") AS
SELECT
distinct
etab_cot.c_structure AS STRUCTURE_ID,
......@@ -217,11 +219,11 @@ LEFT OUTER JOIN GRHUM.ADRESSE AD_cot ON RPA_COT.ADR_ORDRE = AD_cot.ADR_ORDRE
LEFT OUTER JOIN GRHUM.PAYS P_cot ON P_cot.C_PAYS = AD_cot.C_PAYS
WHERE A_COT.ASS_CODE = 'D_ED_R'
;
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ETABLISSEMENT" ("STRUCTURE_ID", "SOURCE_ID", "ID", "CODE") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ETABLISSEMENT" ("STRUCTURE_ID", "SOURCE_ID", "ID", "CODE") AS
SELECT
distinct
etab_cot.c_structure AS STRUCTURE_ID,
......@@ -259,11 +261,11 @@ WHERE A_COT.ASS_CODE = 'D_COT_ETAB'
th.C_RNE as code
from RECHERCHE.MEMBRE_JURY_THESE th
where th.C_RNE is not null
;
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_FINANCEMENT" ("ID", "SOURCE_ID", "THESE_ID", "FINANCEUR", "QUOTITE_FINANCEMENT", "DATE_DEBUT_FINANCEMENT", "DATE_FIN_FINANCEMENT", "ANNEE_ID", "ORIGINE_FINANCEMENT_ID", "COMPLEMENT_FINANCEMENT") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_FINANCEMENT" ("ID", "SOURCE_ID", "THESE_ID", "FINANCEUR", "QUOTITE_FINANCEMENT", "DATE_DEBUT_FINANCEMENT", "DATE_FIN_FINANCEMENT", "ANNEE_ID", "ORIGINE_FINANCEMENT_ID", "COMPLEMENT_FINANCEMENT") AS
select id_these|| f.id_financement as ID ,
'physalis' as source_id,
id_these as these_id,
......@@ -305,13 +307,12 @@ left outer join recherche.doctorant_financeur f2 on f.ID_FINANCEMENT = f2.ID_FIN
left outer join grhum.repart_association ra2 on ra2.ras_id = f2.ras_id
left outer join grhum.personne p2 on p2.pers_id = ra2.pers_id
where typef.ID_SYGAL is not null and f.DATE_DEBUT_FINANCEMENT is not null;
where typef.ID_SYGAL is not null and f.DATE_DEBUT_FINANCEMENT is not null
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_INDIVIDU" ("ID", "TYPE", "SOURCE_ID", "CIV", "LIB_NOM_PAT_IND", "LIB_NOM_USU_IND", "LIB_PR1_IND", "LIB_PR2_IND", "LIB_PR3_IND", "EMAIL", "DATE_NAI_IND", "LIB_NAT", "COD_PAY_NAT", "SUPANN_ID") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_INDIVIDU" ("ID", "TYPE", "SOURCE_ID", "CIV", "LIB_NOM_PAT_IND", "LIB_NOM_USU_IND", "LIB_PR1_IND", "LIB_PR2_IND", "LIB_PR3_IND", "EMAIL", "DATE_NAI_IND", "LIB_NAT", "COD_PAY_NAT", "SUPANN_ID") AS
SELECT
distinct( i.no_individu) || 1 AS ID,
'doctorant' as TYPE,
......@@ -394,21 +395,18 @@ WHERE-- T.ID_THESE = 13 -- a modifier
AND ASS_CODE != 'D_JR_INV' --AND to_char(T.DATE_SOUTENANCE ,'YYYY')='2016'
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_MV_EMAIL" ("LAST_UPDATE", "ID", "EMAIL") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_MV_EMAIL" ("LAST_UPDATE", "ID", "EMAIL") AS
with tmp(LAST_UPDATE, ID, EMAIL) as (
select null, null, null from dual
)
select "LAST_UPDATE","ID","EMAIL" from tmp where 0=1;
select "LAST_UPDATE","ID","EMAIL" from tmp where 0=1
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ORIGINE_FINANCEMENT" ("ID", "SOURCE_ID", "COD_OFI", "LIC_OFI", "LIB_OFI") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ORIGINE_FINANCEMENT" ("ID", "SOURCE_ID", "COD_OFI", "LIC_OFI", "LIB_OFI") AS
with tmp(ID, SOURCE_ID, COD_OFI, LIC_OFI, LIB_OFI) as (
select '10', 'physalis', '10', 'SALARIE', 'Etudiant salarié' from dual union all
select '11', 'physalis', '11', 'SANS FIN', 'Sans financement' from dual union all
......@@ -444,14 +442,12 @@ AND ASS_CODE != 'D_JR_INV' --AND to_char(T.DATE_SOUTENANCE ,'YYYY')='2016'
select '42', 'physalis', '42', 'ORG FC', 'Financements Organismes FC' from dual union all
select '43', 'physalis', '43', 'ORG INTER', 'Organismes Internationaux' from dual
)
select "ID","SOURCE_ID","COD_OFI","LIC_OFI","LIB_OFI" from tmp;
select "ID","SOURCE_ID","COD_OFI","LIC_OFI","LIB_OFI" from tmp
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_PHYSALIS_FINANCEMENT" ("ID_PHYSALIS", "ID_SYGAL") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_PHYSALIS_FINANCEMENT" ("ID_PHYSALIS", "ID_SYGAL") AS
select RECHERCHE.TYPE_FINANCEMENT.ID_TYPE_FINANCEMENT as id_physalis ,
CASE RECHERCHE.TYPE_FINANCEMENT.ID_TYPE_FINANCEMENT
......@@ -486,14 +482,12 @@ WHEN 82 THEN 43
WHEN 83 THEN 31
else 11
end as id_sygal
from RECHERCHE.TYPE_FINANCEMENT;
from RECHERCHE.TYPE_FINANCEMENT
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ROLE" ("ID", "SOURCE_ID", "LIB_ROJ", "LIC_ROJ") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_ROLE" ("ID", "SOURCE_ID", "LIB_ROJ", "LIC_ROJ") AS
SELECT case ID
when 301 THEN 'D'
when 314 THEN 'K'
......@@ -505,14 +499,11 @@ from RECHERCHE.TYPE_FINANCEMENT;
end as ID,
"SOURCE_ID","LIB_ROJ","LIC_ROJ"
from sygal_role_tmp
;
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_STRUCTURE" ("SOURCE_ID", "TYPE_STRUCTURE_ID", "ID", "SIGLE", "LIBELLE", "CODE_PAYS", "LIBELLE_PAYS") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_STRUCTURE" ("SOURCE_ID", "TYPE_STRUCTURE_ID", "ID", "SIGLE", "LIBELLE", "CODE_PAYS", "LIBELLE_PAYS") AS
select
distinct
'physalis' as source_id,
......@@ -608,12 +599,11 @@ WHERE A_COT.ASS_CODE = 'D_LAB_THESE'
'FRANCE' as libelle_pays
from RECHERCHE.MEMBRE_JURY_THESE th left outer join grhum.rne r on th.c_rne = r.c_rne
where th.C_RNE is not null
;
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_THESE" ("ID", "SOURCE_ID", "DOCTORANT_ID", "COD_DIS", "DAT_DEB_THS", "DAT_FIN_CFD_THS", "DAT_PREV_SOU", "DAT_SOU_THS", "ETA_THS", "LIB_INT1_DIS", "LIB_THS", "UNITE_RECH_ID", "ECOLE_DOCT_ID", "COD_NEG_TRE", "CORRECTION_POSSIBLE", "DAT_AUT_SOU_THS", "LIB_ETB_COT", "LIB_PAY", "TEM_AVENANT", "TEM_SOU_AUT_THS", "COD_LNG", "ETA_RPD_THS", "COD_ANU_PRM_IAE") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_THESE" ("ID", "SOURCE_ID", "DOCTORANT_ID", "COD_DIS", "DAT_DEB_THS", "DAT_FIN_CFD_THS", "DAT_PREV_SOU", "DAT_SOU_THS", "ETA_THS", "LIB_INT1_DIS", "LIB_THS", "UNITE_RECH_ID", "ECOLE_DOCT_ID", "COD_NEG_TRE", "CORRECTION_POSSIBLE", "DAT_AUT_SOU_THS", "LIB_ETB_COT", "LIB_PAY", "TEM_AVENANT", "TEM_SOU_AUT_THS", "COD_LNG", "ETA_RPD_THS", "COD_ANU_PRM_IAE") AS
select ID,
SOURCE_ID,
DOCTORANT_ID,
......@@ -696,12 +686,12 @@ LEFT OUTER JOIN grhum.structure_ulr etab_cot2 on etab_cot2.pers_id = ra2.pers_id
LEFT OUTER JOIN ACCORDS.contrat_partenaire cp2 on cp2.con_ordre = con.con_ordre and cp2.pers_id = ra2.pers_id
WHERE A_COT1.ASS_CODE = 'D_ED_R' AND A_COT2.ASS_CODE = 'D_LAB_THESE' )
where rn = 1;
where rn = 1
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_THESE_ANNEE_UNIV" ("SOURCE_ID", "ID", "THESE_ID", "ANNEE_UNIV") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_THESE_ANNEE_UNIV" ("SOURCE_ID", "ID", "THESE_ID", "ANNEE_UNIV") AS
select
'physalis' as SOURCE_ID ,
th.ID_THESE||so.fann_key as ID,
......@@ -719,15 +709,12 @@ and ( so.FGRA_CODE='D' )
-- or so.FGRA_CODE is not null
order by id asc
--where rn = 1;
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_TITRE_ACCES" ("SOURCE_ID", "ID", "THESE_ID", "TYPE_ETB_TITRE_ACCES", "TITRE_ACCES_INTERNE_EXTERNE", "LIBELLE_TITRE_ACCES", "CODE_DEPT_TITRE_ACCES", "LIBELLE_ETB_TITRE_ACCES", "CODE_PAYS_TITRE_ACCES") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_TITRE_ACCES" ("SOURCE_ID", "ID", "THESE_ID", "TYPE_ETB_TITRE_ACCES", "TITRE_ACCES_INTERNE_EXTERNE", "LIBELLE_TITRE_ACCES", "CODE_DEPT_TITRE_ACCES", "LIBELLE_ETB_TITRE_ACCES", "CODE_PAYS_TITRE_ACCES") AS
select 'physalis' as source_id ,
ID,
these_id,
......@@ -764,18 +751,11 @@ from RECHERCHE.DOCTORANT e left outer join garnuche.historique h on e.etud_num
)
where rn = 1
--grant select on grhum.type_etablissement_ulr to api_scolarite
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_UNITE_RECH" ("STRUCTURE_ID", "SOURCE_ID", "ID") AS
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_UNITE_RECH" ("STRUCTURE_ID", "SOURCE_ID", "ID") AS
SELECT
distinct
etab_cot.c_structure AS STRUCTURE_ID,
......@@ -794,97 +774,4 @@ LEFT OUTER JOIN GRHUM.ADRESSE AD_cot ON RPA_COT.ADR_ORDRE = AD_cot.ADR_ORDRE
LEFT OUTER JOIN GRHUM.PAYS P_cot ON P_cot.C_PAYS = AD_cot.C_PAYS
WHERE A_COT.ASS_CODE = 'D_LAB_THESE'
;
--------------------------------------------------------------------------------
CREATE OR REPLACE FORCE EDITIONABLE VIEW "API_SCOLARITE"."V_SYGAL_VARIABLE" ("SOURCE_ID", "ID", "COD_VAP", "LIB_VAP", "PAR_VAP", "DATE_DEB_VALIDITE", "DATE_FIN_VALIDITE") AS
select
'physalis' as source_id,
'ETB_LIB' as id,
'ETB_LIB' as cod_vap,
'Nom de l''établissement de référence' as lib_vap,
'INSA Rouen Normandie' as par_vap,