diff --git "a/code/Cr\303\251er un administrateur local.php" "b/code/Cr\303\251er un administrateur local.php" index dbe424268518905705d462a0757f28428d2afd18..1f86b4c365a065eff27a44178b745d1c41a1f2b5 100644 --- "a/code/Cr\303\251er un administrateur local.php" +++ "b/code/Cr\303\251er un administrateur local.php" @@ -1,6 +1,7 @@ <?php use Application\Service\ContextService; +use Application\Service\SourceService; function creerAdmin($sl, array $admin) { @@ -11,8 +12,8 @@ function creerAdmin($sl, array $admin) /** @var \Application\Service\ContextService $serviceContext */ $serviceContext = $sl->get(ContextService::class); - /** @var \Application\Service\Source $serviceSource */ - $serviceSource = $sl->get('applicationSource'); + /** @var \Application\Service\SourceService $serviceSource */ + $serviceSource = $sl->get(SourceService::class); $nom = $admin['nom']; diff --git a/data/Sql/Versions/v_1.3.2.sql b/data/Sql/Versions/v_1.3.2.sql index 43eee0297aeb4af46edfdc0e028a487503fc00c1..49381319de93393b104ebce26c85728d39897b14 100644 --- a/data/Sql/Versions/v_1.3.2.sql +++ b/data/Sql/Versions/v_1.3.2.sql @@ -2,7 +2,7 @@ -- * à faire AVANT avoir mis à jour le code source * -- -- ********************************************************************* -- -BEGIN DBMS_SCHEDULER.disable(name=>'"OSE"."OSE_SRC_SYNC"', force => TRUE); END; +BEGIN DBMS_SCHEDULER.disable(name=>'"OSE"."OSE_SRC_SYNC"', force => TRUE); END; / @@ -27,7 +27,7 @@ ALTER TABLE "OSE"."NOTIFICATION_INDICATEUR" MODIFY ("FREQUENCE" NUMBER(*,0)); --Nouveau TABLE --FORMULE_RESULTAT_VH --------------------------- - CREATE TABLE "OSE"."FORMULE_RESULTAT_VH" + CREATE TABLE "OSE"."FORMULE_RESULTAT_VH" ( "ID" NUMBER(*,0) NOT NULL ENABLE, "FORMULE_RESULTAT_ID" NUMBER(*,0) NOT NULL ENABLE, "VOLUME_HORAIRE_ID" NUMBER(*,0) NOT NULL ENABLE, @@ -46,10 +46,10 @@ ALTER TABLE "OSE"."NOTIFICATION_INDICATEUR" MODIFY ("FREQUENCE" NUMBER(*,0)); --Modifié VIEW --V_TMP_WF --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" +CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" ( "ID", "SOURCE_CODE", "NB_COMP", "NB_AGREM" - ) AS - WITH + ) AS + WITH composantes_enseign AS ( -- composantes d'enseignement par intervenant SELECT DISTINCT i.ID, i.source_code, s.structure_ens_id @@ -64,17 +64,17 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = 'CONSEIL_RESTREINT' - ), + ), v_agrement AS ( -- nombres de composantes d'enseignement et d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, - ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, + SELECT DISTINCT i.ID, i.source_code, + ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT "ID","SOURCE_CODE","NB_COMP","NB_AGREM" @@ -87,10 +87,10 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" --Nouveau VIEW --V_RECAP_SERVICE_PREVIS --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_RECAP_SERVICE_PREVIS" +CREATE OR REPLACE FORCE VIEW "OSE"."V_RECAP_SERVICE_PREVIS" ( "ID", "INTERVENANT_ID", "NOM_USUEL", "SOURCE_CODE", "ANNEE_ID", "SERVICE_STATUTAIRE", "MODIF_SERVICE", "LIBELLE_STRUCTURE", "CODE_EP", "LIBELLE_EP", "HAS_MODULATEUR", "NON_PAYABLE", "CODE_PERIODE", "ORDRE_PERIODE", "CODE_TI", "ORDRE_TI", "HEURES" - ) AS - select + ) AS + select vh.id, i.id intervenant_id, i.nom_usuel, @@ -122,7 +122,7 @@ join type_intervention ti on vh.type_intervention_id = ti.id and ti.histo_destru left join v_formule_service fs on fs.id = s.id and (fs.ponderation_service_compl <> 1 or fs.ponderation_service_du <> 1) -- NB: fs.id est l'id du service left join v_formule_service_modifie fsm on fsm.intervenant_id = i.id and fsm.annee_id = s.annee_id where vh.histo_destructeur_id is null -group by +group by vh.id, i.id, i.nom_usuel, @@ -139,13 +139,13 @@ group by p.ordre, ti.code, ti.ordre; - + / --------------------------- --Modifié PACKAGE --OSE_DIVERS --------------------------- -CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS +CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION INTERVENANT_HAS_PRIVILEGE( intervenant_id NUMERIC, privilege_name VARCHAR2 ) RETURN NUMERIC; @@ -162,7 +162,7 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION STRUCTURE_DANS_STRUCTURE( structure_testee NUMERIC, structure_cible NUMERIC ) RETURN NUMERIC; FUNCTION STR_REDUCE( str CLOB ) RETURN CLOB; - + FUNCTION LIKED( haystack CLOB, needle CLOB ) RETURN NUMERIC; FUNCTION COMPRISE_ENTRE( date_debut DATE, date_fin DATE DEFAULT NULL, date_obs DATE DEFAULT SYSDATE ) RETURN NUMERIC; @@ -172,9 +172,9 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION VOLUME_HORAIRE_VALIDE( volume_horaire_id NUMERIC ) RETURN NUMERIC; FUNCTION CALCUL_TAUX_FI( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; - + FUNCTION CALCUL_TAUX_FC( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; - + FUNCTION CALCUL_TAUX_FA( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; FUNCTION STRUCTURE_UNIV_GET_ID RETURN NUMERIC; @@ -264,7 +264,7 @@ FUNCTION STRUCTURE_DANS_STRUCTURE( structure_testee NUMERIC, structure_cible NUM RESULTAT NUMERIC; BEGIN IF structure_testee = structure_cible THEN RETURN 1; END IF; - + select count(*) into resultat from structure WHERE structure.id = structure_testee @@ -330,7 +330,7 @@ BEGIN ba := fa; nt := bi + bc + ba; END IF; - + IF nt = 0 THEN -- toujours au cas ou... bi := 1; bc := 0; @@ -369,7 +369,7 @@ BEGIN CALCUL_TAUX( eff_fi, eff_fc, eff_fa, fi, fc, fa, ri, rc, ra, arrondi ); RETURN ri; END; - + FUNCTION CALCUL_TAUX_FC( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT IS ri FLOAT; rc FLOAT; @@ -378,7 +378,7 @@ BEGIN CALCUL_TAUX( eff_fi, eff_fc, eff_fa, fi, fc, fa, ri, rc, ra, arrondi ); RETURN rc; END; - + FUNCTION CALCUL_TAUX_FA( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT IS ri FLOAT; rc FLOAT; @@ -402,14 +402,14 @@ END; END OSE_DIVERS; / - + --------------------------- --Modifié VIEW --V_NIVEAU_FORMATION --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_NIVEAU_FORMATION" +CREATE OR REPLACE FORCE VIEW "OSE"."V_NIVEAU_FORMATION" ( "ID", "CODE", "LIBELLE_LONG", "NIVEAU", "GROUPE_TYPE_FORMATION_ID" - ) AS + ) AS SELECT DISTINCT ose_divers.niveau_formation_id_calc( gtf.id, gtf.pertinence_niveau, e.niveau ) id, gtf.libelle_court || e.niveau code, @@ -425,41 +425,41 @@ WHERE AND ose_divers.niveau_formation_id_calc( gtf.id, gtf.pertinence_niveau, e.niveau ) IS NOT NULL ORDER BY gtf.libelle_long, e.niveau; - + --------------------------- --Nouveau VIEW --ADRESSE_INTERVENANT_PRINC --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."ADRESSE_INTERVENANT_PRINC" +CREATE OR REPLACE FORCE VIEW "OSE"."ADRESSE_INTERVENANT_PRINC" ( "ID", "INTERVENANT_ID", "PRINCIPALE", "TEL_DOMICILE", "MENTION_COMPLEMENTAIRE", "BATIMENT", "NO_VOIE", "NOM_VOIE", "LOCALITE", "CODE_POSTAL", "VILLE", "PAYS_CODE_INSEE", "PAYS_LIBELLE", "SOURCE_ID", "SOURCE_CODE", "VALIDITE_DEBUT", "VALIDITE_FIN", "HISTO_CREATION", "HISTO_CREATEUR_ID", "HISTO_MODIFICATION", "HISTO_MODIFICATEUR_ID", "HISTO_DESTRUCTION", "HISTO_DESTRUCTEUR_ID", "TO_STRING" - ) AS - select + ) AS + select a."ID",a."INTERVENANT_ID",a."PRINCIPALE",a."TEL_DOMICILE",a."MENTION_COMPLEMENTAIRE",a."BATIMENT",a."NO_VOIE",a."NOM_VOIE",a."LOCALITE",a."CODE_POSTAL",a."VILLE",a."PAYS_CODE_INSEE",a."PAYS_LIBELLE",a."SOURCE_ID",a."SOURCE_CODE",a."VALIDITE_DEBUT",a."VALIDITE_FIN",a."HISTO_CREATION",a."HISTO_CREATEUR_ID",a."HISTO_MODIFICATION",a."HISTO_MODIFICATEUR_ID",a."HISTO_DESTRUCTION",a."HISTO_DESTRUCTEUR_ID", -- concaténation des éléments non null séparés par ', ' trim(trim(',' from replace(', ' || nvl(a.no_voie,'#') || ', ' || nvl(a.nom_voie,'#') || ', ' || nvl(a.batiment,'#') || ', ' || nvl(a.mention_complementaire,'#'), ', #', ''))) || -- saut de ligne complet - chr(13) || chr(10) || + chr(13) || chr(10) || -- concaténation des éléments non null séparés par ', ' trim(trim(',' from replace(', ' || nvl(a.localite,'#') || ', ' || nvl(a.code_postal,'#') || ', ' || nvl(a.ville,'#') || ', ' || nvl(a.pays_libelle,'#'), ', #', ''))) to_string from adresse_intervenant a where id in ( -- on ne retient que l'adresse principale si elle existe ou sinon la première adresse trouvée - select id + select id from ( -- attribution d'un rang par intervenant aux adresses pour avoir la principale (éventuelle) en n°1 select id, dense_rank() over(partition by intervenant_id order by principale desc) rang from adresse_intervenant - ) + ) where rang = 1 ); - + --------------------------- --Nouveau VIEW --V_INDIC_DIFF_DOSSIER --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" +CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" ( "ID", "NOM_USUEL", "ADRESSE_DOSSIER", "ADRESSE_IMPORT", "RIB_DOSSIER", "RIB_IMPORT", "NOM_USUEL_DOSSIER", "NOM_USUEL_IMPORT", "PRENOM_DOSSIER", "PRENOM_IMPORT" - ) AS - select + ) AS + select i.id, i.nom_usuel, case when d.adresse <> a.to_string then d.adresse else null end adresse_dossier, @@ -478,11 +478,11 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" --Nouveau VIEW --V_BERTRAND --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" +CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" ( "INTERVENANT_ID", "SOURCE_CODE", "NOM_USUEL", "LIBELLE_STR", "CODE_EP", "LIBELLE_EP", "HAS_MODULATEUR", "CODE_PERIODE", "CODE_TI", "PAYABLE", "HEURES", "GROUPING_EP", "GROUPING_PERIODE", "GROUPING_PAYABLE", "GROUPING_ID" - ) AS + ) AS with tmp as ( - select + select i.id intervenant_id, i.source_code, i.nom_usuel, @@ -508,7 +508,7 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" left join v_formule_service_modifie fsm on fsm.intervenant_id = i.id and fsm.annee_id = s.annee_id where vh.histo_destructeur_id is null ) -select +select intervenant_id, source_code, nom_usuel, @@ -520,20 +520,20 @@ select code_ti, /*decode(grouping(payable), 1, 'Total payable ou non', payable) as*/ payable, sum(heures) heures, - grouping(libelle_ep) as grouping_ep, - grouping(code_periode) as grouping_periode, + grouping(libelle_ep) as grouping_ep, + grouping(code_periode) as grouping_periode, grouping(payable) as grouping_payable, grouping_id(libelle_str, libelle_ep, code_periode, payable) as grouping_id from tmp --where source_code = '3948' group by intervenant_id, source_code, nom_usuel, code_ti, cube(libelle_str, (code_ep, libelle_ep, has_modulateur), code_periode, payable) -having +having -- grouping_id(libelle_ep, code_periode, payable) in (0,5,7) equivaut aux 3 lignes suivantes : grouping(libelle_str) = 0 and grouping(libelle_ep) = 0 and grouping(code_periode) = 0 and grouping(payable) = 0 or -- totaux détails (grouping_id = 0) grouping(libelle_str) = 0 and grouping(libelle_ep) = 1 and grouping(code_periode) = 0 and grouping(payable) = 1 or -- totaux tout EP et payable confondus (grouping_id = 5) grouping(libelle_str) = 0 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 or -- totaux tout EP, période et payable confondus (grouping_id = 7) - grouping(libelle_str) = 1 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 -- totaux tout Structure, EP, période et payable confondus (grouping_id = 15) -order by + grouping(libelle_str) = 1 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 -- totaux tout StructureService, EP, période et payable confondus (grouping_id = 15) +order by nom_usuel, libelle_str, code_periode, libelle_ep, libelle_ep, code_ti, payable desc; --------------------------- --Modifié TRIGGER @@ -558,7 +558,7 @@ END; BEGIN service_id := CASE WHEN deleting THEN :OLD.service_id ELSE :NEW.service_id END; SELECT s.intervenant_id into intervenant_id from service s where id = service_id; - ose_workflow.add_intervenant_to_update (intervenant_id); + ose_workflow.add_intervenant_to_update (intervenant_id); END; / --------------------------- @@ -579,7 +579,7 @@ END; AFTER INSERT OR DELETE OR UPDATE ON "OSE"."SERVICE" REFERENCING FOR EACH ROW BEGIN - ose_workflow.add_intervenant_to_update (CASE WHEN deleting THEN :OLD.intervenant_id ELSE :NEW.intervenant_id END); + ose_workflow.add_intervenant_to_update (CASE WHEN deleting THEN :OLD.intervenant_id ELSE :NEW.intervenant_id END); END; / --------------------------- @@ -600,12 +600,12 @@ END; raise_application_error(-20101, 'Il est impossible d''associer un motif de non paiement à un intervenant vacataire ou BIATSS.'); END IF; END IF; - + IF :NEW.motif_non_paiement_id IS NOT NULL AND :NEW.contrat_id IS NOT NULL THEN raise_application_error(-20101, 'Les heures ayant un motif de non paiement ne peuvent faire l''objet d''une contractualisation'); END IF; - modified := + modified := NVL(:NEW.id,0) <> NVL(:OLD.id,0) OR NVL(:NEW.type_volume_horaire_id,0) <> NVL(:OLD.type_volume_horaire_id,0) OR NVL(:NEW.service_id,0) <> NVL(:OLD.service_id,0) @@ -617,7 +617,7 @@ END; OR NVL(:NEW.histo_createur_id,0) <> NVL(:OLD.histo_createur_id,0) OR NVL(:NEW.histo_destruction,SYSDATE) <> NVL(:OLD.histo_destruction,SYSDATE) OR NVL(:NEW.histo_destructeur_id,0) <> NVL(:OLD.histo_destructeur_id,0); - + SELECT COUNT(*) INTO @@ -628,7 +628,7 @@ END; WHERE V.HISTO_DESTRUCTION IS NULL AND vvh.VOLUME_HORAIRE_ID = :NEW.ID; - + IF modified AND 0 <> has_validation THEN raise_application_error(-20101, 'Il est impossible de modifier des heures déjà validées.'); END IF; @@ -648,27 +648,27 @@ END; --Modifié PACKAGE --OSE_FORMULE --------------------------- -CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS +CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS TYPE t_intervenant IS RECORD ( structure_id NUMERIC, heures_service_statutaire FLOAT DEFAULT 0, heures_service_modifie FLOAT DEFAULT 0 ); - + TYPE t_type_etat_vh IS RECORD ( type_volume_horaire_id NUMERIC, etat_volume_horaire_id NUMERIC ); TYPE t_lst_type_etat_vh IS TABLE OF t_type_etat_vh INDEX BY PLS_INTEGER; - + TYPE t_referentiel IS RECORD ( id NUMERIC, structure_id NUMERIC, heures FLOAT DEFAULT 0 ); TYPE t_lst_referentiel IS TABLE OF t_referentiel INDEX BY PLS_INTEGER; - + TYPE t_service IS RECORD ( id NUMERIC, taux_fi FLOAT DEFAULT 1, @@ -680,7 +680,7 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS structure_ens_id NUMERIC ); TYPE t_lst_service IS TABLE OF t_service INDEX BY PLS_INTEGER; - + TYPE t_volume_horaire IS RECORD ( id NUMERIC, service_id NUMERIC, @@ -704,13 +704,13 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS FUNCTION NOUVEAU_RESULTAT RETURN formule_resultat%rowtype; FUNCTION ENREGISTRER_RESULTAT( fr formule_resultat%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_SERVICE RETURN formule_resultat_service%rowtype; FUNCTION ENREGISTRER_RESULTAT_SERVICE( fs formule_resultat_service%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_VH RETURN formule_resultat_vh%rowtype; FUNCTION ENREGISTRER_RESULTAT_VH( fvh formule_resultat_vh%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_REF RETURN formule_resultat_referentiel%rowtype; FUNCTION ENREGISTRER_RESULTAT_REF( fr formule_resultat_referentiel%rowtype ) RETURN NUMERIC; @@ -735,14 +735,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS */ PROCEDURE Add_Intervenant_To_Update (p_intervenant_id NUMERIC) IS - BEGIN + BEGIN MERGE INTO wf_tmp_intervenant t USING dual ON (t.intervenant_id = p_intervenant_id) WHEN NOT MATCHED THEN INSERT (INTERVENANT_ID) VALUES (p_intervenant_id); END; - + /** * Parcours des intervenants dont il faut regénérer la progression dans le workflow */ - PROCEDURE Update_Intervenants_Etapes + PROCEDURE Update_Intervenants_Etapes IS BEGIN FOR ti IN (SELECT distinct * FROM wf_tmp_intervenant) LOOP @@ -750,14 +750,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS END LOOP; DELETE FROM wf_tmp_intervenant; END; - + /** * Regénère la progression dans le workflow de tous les intervenants dont le statut autorise la saisie de service. */ - PROCEDURE Update_All_Intervenants_Etapes + PROCEDURE Update_All_Intervenants_Etapes IS - CURSOR intervenant_cur IS - SELECT i.* FROM intervenant i + CURSOR intervenant_cur IS + SELECT i.* FROM intervenant i JOIN statut_intervenant si ON si.id = i.statut_id AND si.histo_destruction IS NULL AND si.peut_saisir_service = 1 WHERE i.histo_destruction IS NULL; BEGIN @@ -767,11 +767,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS ose_workflow.Update_Intervenant_Etapes(intervenant_rec.id); END LOOP; END; - + /** * Regénère la progression complète dans le workflow d'un intervenant. */ - PROCEDURE Update_Intervenant_Etapes (p_intervenant_id NUMERIC) + PROCEDURE Update_Intervenant_Etapes (p_intervenant_id NUMERIC) IS structures_ids T_LIST_STRUCTURE_ID; structure_id NUMERIC; @@ -786,7 +786,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- RAZ progression. -- DELETE FROM wf_intervenant_etape ie WHERE ie.intervenant_id = p_intervenant_id; - + -- -- Parcours des étapes. -- @@ -799,7 +799,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS inner join wf_etape ed on ed.id = ee.depart_etape_id inner join wf_etape ea on ea.id = ee.arrivee_etape_id where ea.code <> 'FIN' - connect by ee.depart_etape_id = prior ee.arrivee_etape_id + connect by ee.depart_etape_id = prior ee.arrivee_etape_id start with ed.code = 'DEBUT' --UNION --select e.* from wf_etape e where e.code = 'FIN' @@ -815,10 +815,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS EXECUTE IMMEDIATE 'BEGIN :res := ' || etape_rec.PERTIN_FUNC || '(:1); END;' USING OUT pertinente, p_intervenant_id; --DBMS_OUTPUT.put_line (etape_rec.libelle || ' --> ' || etape_rec.PERTIN_FUNC || ' returned ' || pertinente); END IF; - IF pertinente = 0 THEN + IF pertinente = 0 THEN CONTINUE; END IF; - + -- -- La règle (fonction) de franchissement prend 2 arguments : l'id de l'intervenant (null interdit) et l'id de la structure (null accepté). -- Cette règle sera exécutée une fois avec un id de structure null (ce qui se traduit par "peu importe la structure"), puis @@ -832,17 +832,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IF etape_rec.STRUCTURE_DEPENDANT = 1 THEN ose_workflow.fetch_structures_ens_ids(p_intervenant_id, structures_ids); END IF; - + -- - -- Dans la progression de l'intervenant, une même étape peut figurer plusieurs fois : une fois avec un id de structure null - -- (ce qui se traduit par "peu importe la structure") + autant de fois qu'il existe de structures d'enseignement dans le cas où + -- Dans la progression de l'intervenant, une même étape peut figurer plusieurs fois : une fois avec un id de structure null + -- (ce qui se traduit par "peu importe la structure") + autant de fois qu'il existe de structures d'enseignement dans le cas où -- l'étape est déclinable par structure. -- FOR i IN 0 .. structures_ids.COUNT - 1 LOOP structure_id := structures_ids(i); --DBMS_OUTPUT.put_line (etape_rec.libelle || ' : structures_ids('||i||') := ' || structure_id); - + -- -- Interrogation de la règle de franchissement de l'étape. -- @@ -852,14 +852,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS EXECUTE IMMEDIATE 'BEGIN :res := ' || etape_rec.FRANCH_FUNC || '(:1, :2); END;' USING OUT franchie, p_intervenant_id, structure_id; --DBMS_OUTPUT.put_line (etape_rec.FRANCH_FUNC || ' returned ' || franchie); END IF; - + atteignable := 1; - + -- -- Si l'étape courante n'a pas encore été trouvée. -- - IF courante_trouvee = 0 THEN - IF franchie = 1 THEN + IF courante_trouvee = 0 THEN + IF franchie = 1 THEN courante := 0; ELSE -- l'étape marquée "courante" est la 1ère étape non franchie @@ -870,7 +870,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- Si l'étape courante a été trouvée et que l'on se situe dessus. -- ELSIF courante_trouvee = etape_rec.id THEN - IF franchie = 1 THEN + IF franchie = 1 THEN courante := 0; ELSE courante := 1; @@ -882,19 +882,19 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS courante := 0; atteignable := 0; END IF; - + -- -- Ecriture dans la table. -- - INSERT INTO wf_intervenant_etape (id, intervenant_id, etape_id, structure_id, courante, franchie, atteignable, ordre) + INSERT INTO wf_intervenant_etape (id, intervenant_id, etape_id, structure_id, courante, franchie, atteignable, ordre) SELECT wf_intervenant_etape_id_seq.nextval, p_intervenant_id, etape_rec.id, structure_id, courante, franchie, atteignable, ordre FROM DUAL; - + ordre := ordre + 1; END LOOP; - + END LOOP; END; - + /** * */ @@ -904,17 +904,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS BEGIN i := structures_ids.COUNT; FOR d IN ( - SELECT distinct structure_ens_id FROM service s + SELECT distinct structure_ens_id FROM service s WHERE s.intervenant_id = p_intervenant_id AND S.ANNEE_ID = OSE_PARAMETRE.GET_ANNEE() AND S.HISTO_DESTRUCTION IS NULL ) LOOP structures_ids(i) := d.structure_ens_id; i := i + 1; END LOOP; END; - - + + /******************** Règles métiers de pertinence et de franchissement des étapes ********************/ - + /** * */ @@ -922,12 +922,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_dossier INTO res FROM statut_intervenant si - JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_dossier INTO res FROM statut_intervenant si + JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -935,12 +935,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_service INTO res FROM statut_intervenant si - JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_service INTO res FROM statut_intervenant si + JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -949,20 +949,20 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; BEGIN IF p_structure_id IS NULL THEN - SELECT count(*) INTO res FROM service s + SELECT count(*) INTO res FROM service s JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id AND ep.histo_destruction IS NULL JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); ELSE - SELECT count(*) INTO res FROM service s - JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id + SELECT count(*) INTO res FROM service s + JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id JOIN etape e ON e.id = ep.etape_id WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee() AND s.structure_ens_id = p_structure_id; END IF; RETURN CASE WHEN res > 0 THEN 1 ELSE 0 END; END; - + /** * */ @@ -970,11 +970,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_referentiel INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_referentiel INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -982,13 +982,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_piece_jointe_statut tpjs - JOIN statut_intervenant si on tpjs.statut_intervenant_id = si.id + SELECT count(*) INTO res FROM type_piece_jointe_statut tpjs + JOIN statut_intervenant si on tpjs.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -996,15 +996,15 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_agrement_statut tas + SELECT count(*) INTO res FROM type_agrement_statut tas JOIN type_agrement ta ON ta.id = tas.type_agrement_id AND ta.code = 'CONSEIL_RESTREINT' JOIN statut_intervenant si on tas.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id - WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 + WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 AND i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1012,15 +1012,15 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_agrement_statut tas + SELECT count(*) INTO res FROM type_agrement_statut tas JOIN type_agrement ta ON ta.id = tas.type_agrement_id AND ta.code = 'CONSEIL_ACADEMIQUE' JOIN statut_intervenant si on tas.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id - WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 + WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 AND i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1028,18 +1028,18 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_avoir_contrat INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_avoir_contrat INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ FUNCTION service_valide (p_intervenant_id NUMERIC, p_structure_id NUMERIC DEFAULT NULL) RETURN NUMERIC IS - CURSOR service_cur IS - SELECT s.* FROM service s + CURSOR service_cur IS + SELECT s.* FROM service s JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL JOIN v_volume_horaire_etat vhe ON vhe.volume_horaire_id = vh.id JOIN etat_volume_horaire evh ON evh.id = vhe.etat_volume_horaire_id AND evh.ordre >= ( SELECT min(ordre) FROM etat_volume_horaire WHERE code = 'valide' ) @@ -1047,16 +1047,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); -- -- autre version : sans utilisation de la vue v_volume_horaire_etat --- CURSOR service_cur IS --- SELECT s.* FROM service s +-- CURSOR service_cur IS +-- SELECT s.* FROM service s -- JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id AND ep.histo_destruction IS NULL -- JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL -- JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL -- JOIN VALIDATION_VOL_HORAIRE vvh on VVH.VOLUME_HORAIRE_ID = vh.id -- JOIN validation v on VVH.VALIDATION_ID = v.id AND V.HISTO_DESTRUCTION is null -- WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); --- CURSOR service_cur IS --- SELECT s.* FROM service s +-- CURSOR service_cur IS +-- SELECT s.* FROM service s -- JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL -- JOIN v_volume_horaire_etat vhe ON vhe.volume_horaire_id = vh.id -- JOIN etat_volume_horaire evh ON evh.id = vhe.etat_volume_horaire_id AND evh.ordre < ( SELECT min(ordre) FROM etat_volume_horaire WHERE code = 'valide' ) @@ -1107,9 +1107,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM validation v - JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'DONNEES_PERSO_PAR_COMP' - WHERE v.histo_destruction IS NULL + SELECT count(*) INTO res FROM validation v + JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'DONNEES_PERSO_PAR_COMP' + WHERE v.histo_destruction IS NULL AND v.intervenant_id = p_intervenant_id; RETURN res; END; @@ -1121,9 +1121,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM validation v - JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'REFERENTIEL' - WHERE v.histo_destruction IS NULL + SELECT count(*) INTO res FROM validation v + JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'REFERENTIEL' + WHERE v.histo_destruction IS NULL AND v.intervenant_id = p_intervenant_id; RETURN res; END; @@ -1136,7 +1136,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; BEGIN SELECT count(*) INTO res FROM ( - WITH + WITH ATTENDU_OBLIGATOIRE AS ( -- nombres de pj OBLIGATOIRES pour chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) TOTAL_HEURES, count(tpjs.id) NB /*+ materialize */ @@ -1144,12 +1144,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) LEFT JOIN V_PJ_HEURES vheures ON vheures.INTERVENANT_ID = I.ID WHERE tpjs.OBLIGATOIRE = 1 AND (tpjs.SEUIL_HETD IS NULL OR COALESCE(vheures.TOTAL_HEURES, 0) >= tpjs.SEUIL_HETD) GROUP BY I.ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) - ), + ), FOURNI_OBLIGATOIRE AS ( -- nombres de pj OBLIGATOIRES FOURNIES par chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, count(tpjAttendu.ID) NB /*+ materialize */ @@ -1157,7 +1157,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN TYPE_PIECE_JOINTE tpjAttendu ON tpjs.TYPE_PIECE_JOINTE_ID = tpjAttendu.ID AND (tpjAttendu.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN PIECE_JOINTE pj ON d.ID = pj.DOSSIER_ID AND (pj.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN pj.VALIDITE_DEBUT AND COALESCE(pj.VALIDITE_FIN, SYSDATE)) INNER JOIN TYPE_PIECE_JOINTE tpjFourni ON pj.TYPE_PIECE_JOINTE_ID = tpjFourni.ID AND (tpjFourni.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN tpjFourni.VALIDITE_DEBUT AND COALESCE(tpjFourni.VALIDITE_FIN, SYSDATE)) @@ -1168,7 +1168,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- %s AND pj.VALIDATION_ID IS NOT NULL -- %s GROUP BY I.ID, I.SOURCE_CODE - ), + ), ATTENDU_FACULTATIF AS ( -- nombres de pj FACULTATIVES pour chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) TOTAL_HEURES, count(tpjs.id) NB /*+ materialize */ @@ -1176,11 +1176,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) LEFT JOIN V_PJ_HEURES vheures ON vheures.INTERVENANT_ID = I.ID WHERE (tpjs.OBLIGATOIRE = 0 OR tpjs.OBLIGATOIRE = 1 AND tpjs.SEUIL_HETD IS NOT NULL AND COALESCE(vheures.TOTAL_HEURES, 0) < tpjs.SEUIL_HETD) GROUP BY I.ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) - ), + ), FOURNI_FACULTATIF AS ( -- nombres de pj FACULTATIVES FOURNIES par chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, count(tpjAttendu.ID) NB /*+ materialize */ @@ -1188,7 +1188,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN TYPE_PIECE_JOINTE tpjAttendu ON tpjs.TYPE_PIECE_JOINTE_ID = tpjAttendu.ID AND (tpjAttendu.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN PIECE_JOINTE pj ON d.ID = pj.DOSSIER_ID AND (pj.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN pj.VALIDITE_DEBUT AND COALESCE(pj.VALIDITE_FIN, SYSDATE)) INNER JOIN TYPE_PIECE_JOINTE tpjFourni ON pj.TYPE_PIECE_JOINTE_ID = tpjFourni.ID AND (tpjFourni.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN tpjFourni.VALIDITE_DEBUT AND COALESCE(tpjFourni.VALIDITE_FIN, SYSDATE)) @@ -1197,14 +1197,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS AND tpjFourni.ID = tpjAttendu.ID GROUP BY I.ID, I.SOURCE_CODE ) - SELECT - COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) ID, - COALESCE(AO.SOURCE_CODE, AF.SOURCE_CODE) SOURCE_CODE, - COALESCE(AO.TOTAL_HEURES, AF.TOTAL_HEURES) TOTAL_HEURES, - COALESCE(AO.NB, 0) NB_PJ_OBLIG_ATTENDU, - COALESCE(FO.NB, 0) NB_PJ_OBLIG_FOURNI, - COALESCE(AF.NB, 0) NB_PJ_FACUL_ATTENDU, - COALESCE(FF.NB, 0) NB_PJ_FACUL_FOURNI + SELECT + COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) ID, + COALESCE(AO.SOURCE_CODE, AF.SOURCE_CODE) SOURCE_CODE, + COALESCE(AO.TOTAL_HEURES, AF.TOTAL_HEURES) TOTAL_HEURES, + COALESCE(AO.NB, 0) NB_PJ_OBLIG_ATTENDU, + COALESCE(FO.NB, 0) NB_PJ_OBLIG_FOURNI, + COALESCE(AF.NB, 0) NB_PJ_FACUL_ATTENDU, + COALESCE(FF.NB, 0) NB_PJ_FACUL_FOURNI FROM ATTENDU_OBLIGATOIRE AO FULL OUTER JOIN ATTENDU_FACULTATIF AF ON AF.INTERVENANT_ID = AO.INTERVENANT_ID LEFT JOIN FOURNI_OBLIGATOIRE FO ON FO.INTERVENANT_ID = AO.INTERVENANT_ID @@ -1212,7 +1212,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS WHERE COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) = p_intervenant_id ) WHERE NB_PJ_OBLIG_ATTENDU <= NB_PJ_OBLIG_FOURNI; - + RETURN res; END; @@ -1224,7 +1224,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; code VARCHAR2(64) := 'CONSEIL_RESTREINT'; BEGIN - WITH + WITH composantes_enseign AS ( -- composantes d'enseignement par intervenant SELECT DISTINCT i.ID, i.source_code, s.structure_ens_id @@ -1240,18 +1240,18 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = code AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND A.structure_id = p_structure_id) - ), + ), v_agrement AS ( -- nombres de composantes d'enseignement et d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, - ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, + SELECT DISTINCT i.ID, i.source_code, + ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT COUNT(*) INTO res @@ -1259,12 +1259,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS WHERE ( -- si aucune structure précise n'est spécifiée, on ne retient que les intervenants qui ont au moins un d'agrément CR p_structure_id IS NULL AND nb_agrem > 0 - OR + OR -- si une structure précise est spécifiée, on ne retient que les intervenants qui ont (au moins) autant d'agréments CR que de composantes d'enseignement - p_structure_id IS NOT NULL AND v.nb_comp <= nb_agrem - ) + p_structure_id IS NOT NULL AND v.nb_comp <= nb_agrem + ) AND v.id = p_intervenant_id ; - + RETURN res; END; @@ -1276,30 +1276,30 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; v_code VARCHAR2(64) := 'CONSEIL_ACADEMIQUE'; BEGIN - WITH + WITH agrements_oblig_exist AS ( -- agréments obligatoires obtenus par intervenant et structure SELECT i.ID, i.source_code, A.type_agrement_id, A.ID agrement_id, A.structure_id FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = v_code - ), + ), v_agrement AS ( -- nombres d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, + SELECT DISTINCT i.ID, i.source_code, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT COUNT(*) INTO res FROM v_agrement v WHERE nb_agrem > 0 AND v.id = p_intervenant_id ; - + RETURN res; END; @@ -1310,14 +1310,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res + SELECT count(*) INTO res FROM contrat c JOIN validation v ON c.validation_id = v.id AND v.histo_destruction IS NULL - WHERE c.HISTO_DESTRUCTION IS NULL + WHERE c.HISTO_DESTRUCTION IS NULL AND c.intervenant_id = p_intervenant_id - AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND c.STRUCTURE_ID = p_structure_id) + AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND c.STRUCTURE_ID = p_structure_id) AND ROWNUM = 1; - + RETURN res; END; @@ -1334,7 +1334,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS valeurs t_valeurs, total_service t_valeurs, total FLOAT - ); + ); TYPE t_tableaux IS TABLE OF t_tableau INDEX BY PLS_INTEGER; t t_tableaux; @@ -1348,10 +1348,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS tab t_tableau; BEGIN tab := t(tab_index); - + ose_test.echo( 'Intervenant id = ' || resultat.intervenant_id ); ose_test.echo( 'Tableau numéro ' || tab_index ); - + id := ose_formule.d_service.FIRST; LOOP EXIT WHEN id IS NULL; dbms_output.put( 'Service id=' || lpad(id,6,' ') || ' Total=' || lpad(tab.total_service(id),10,' ') || ', data = ' ); @@ -1360,17 +1360,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id2 IS NULL; IF ose_formule.d_volume_horaire(id2).type_volume_horaire_id = resultat.type_volume_horaire_id AND ose_formule.d_volume_horaire(id2).etat_volume_horaire_ordre >= resultat.etat_volume_horaire_id AND ose_formule.d_volume_horaire(id2).service_id = id THEN - + dbms_output.put( lpad(tab.valeurs(id2),10,' ') || ' | ' ); - + END IF; id2 := ose_formule.d_volume_horaire.NEXT(id2); END LOOP; dbms_output.new_line; id := ose_formule.d_service.NEXT(id); END LOOP; - - + + ose_test.echo( 'TOTAL = ' || LPAD(tab.total, 10, ' ') ); END; @@ -1390,7 +1390,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) <> NVL(s.structure_aff_id,0) AND s.taux_fc < 1 THEN RETURN vh.heures; ELSE @@ -1402,7 +1402,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) = NVL(s.structure_aff_id,0) AND s.taux_fc = 1 THEN RETURN vh.heures; ELSE @@ -1414,13 +1414,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) <> NVL(s.structure_aff_id,0) AND s.taux_fc = 1 THEN RETURN vh.heures; ELSE RETURN 0; END IF; - END; + END; FUNCTION C_15( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN @@ -1458,12 +1458,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(12).valeurs(vh.id) * vh.taux_service_du; END; - + FUNCTION C_23( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(13).valeurs(vh.id) * vh.taux_service_du; END; - + FUNCTION C_24( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(14).valeurs(vh.id) * vh.taux_service_du; @@ -1473,12 +1473,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(15).valeurs( fr.id ); END; - + FUNCTION C_26( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN t(16).valeurs( fr.id ); END; - + FUNCTION C_27( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN t(17).valeurs( fr.id ); @@ -1503,7 +1503,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN GREATEST( service_restant_du(33) - t(24).total, 0 ); END; - + FUNCTION C_35 RETURN FLOAT IS BEGIN RETURN GREATEST( service_restant_du(34) - t(25).total, 0 ); @@ -1536,7 +1536,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_43( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN IF t(23).total > 0 THEN @@ -1545,7 +1545,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_44( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN IF t(24).total > 0 THEN @@ -1572,7 +1572,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_47( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN IF t(27).total > 0 THEN @@ -1611,11 +1611,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN LEAST( service_restant_du(35), t(26).total ) * t(46).valeurs(fr.id); END; - + FUNCTION C_57( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN LEAST( service_restant_du(36), t(27).total ) * t(47).valeurs(fr.id); - END; + END; FUNCTION C_61( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN @@ -1733,7 +1733,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 1 - t(66).valeurs(fr.id); END IF; END; - + FUNCTION C_77( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN IF service_restant_du(37) > 0 THEN @@ -1742,7 +1742,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 1 - t(67).valeurs(fr.id); END IF; END; - + FUNCTION C_81( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(11).valeurs(vh.id) * vh.taux_service_compl * t(71).valeurs(vh.id); @@ -1757,7 +1757,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(13).valeurs(vh.id) * vh.taux_service_compl * t(73).valeurs(vh.id); END; - + FUNCTION C_84( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(14).valeurs(vh.id) * vh.taux_service_compl * t(74).valeurs(vh.id); @@ -1789,7 +1789,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN t(83).valeurs(vh.id); END IF; END; - + FUNCTION C_94( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN @@ -1799,14 +1799,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN t(84).valeurs(vh.id) * s.ponderation_service_compl; ELSE RETURN t(84).valeurs(vh.id); - END IF; + END IF; END; FUNCTION C_101( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN t(81).valeurs(vh.id) * ( s.taux_fi + s.taux_fa ); END; @@ -1814,23 +1814,23 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN t(82).valeurs(vh.id) * ( s.taux_fi + s.taux_fa ); END; - + FUNCTION C_103( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN (t(93).valeurs(vh.id) + t(81).valeurs(vh.id)) * s.taux_fc; END; - + FUNCTION C_104( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN (t(94).valeurs(vh.id) + t(82).valeurs(vh.id)) * s.taux_fc; END; @@ -1968,7 +1968,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = P_CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN resultat.service := resultat.service + ose_formule.d_volume_horaire( id ).heures; END IF; @@ -1990,7 +1990,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS 93, 94, 101, 102, 103, 104 ) THEN - t(current_tableau).total := 0; + t(current_tableau).total := 0; id2 := ose_formule.d_service.FIRST; LOOP EXIT WHEN id2 IS NULL; t(current_tableau).total_service(id2) := 0; @@ -2000,13 +2000,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = P_CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN CALCUL_VOLUME_HORAIRE( current_tableau, id ); END IF; id := ose_formule.d_volume_horaire.NEXT(id); END LOOP; - + ELSIF current_tableau IN ( -- calcul des services restants dus 31, 32, 33, 34, 35, 36, 37 ) THEN @@ -2082,7 +2082,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN res_vh := ose_formule.nouveau_resultat_vh; res_vh.formule_resultat_id := resultat.id; @@ -2094,7 +2094,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS res_vh.service_assure := res_vh.heures_service + res_vh.heures_compl_fi + res_vh.heures_compl_fa + res_vh.heures_compl_fc; dev_null := ose_formule.ENREGISTRER_RESULTAT_VH( res_vh ); END IF; - id := ose_formule.d_volume_horaire.NEXT(id); + id := ose_formule.d_volume_horaire.NEXT(id); END LOOP; -- répartition des résultats par service référentiel @@ -2150,13 +2150,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS frm.INTERVENANT_ID = DEMANDE_CALCUL.INTERVENANT_ID AND frm.ANNEE_ID = DEMANDE_CALCUL.ANNEE_ID ) - WHEN NOT MATCHED THEN INSERT ( + WHEN NOT MATCHED THEN INSERT ( ID, - INTERVENANT_ID, + INTERVENANT_ID, ANNEE_ID ) VALUES ( FORMULE_RESULTAT_MAJ_ID_SEQ.NEXTVAL, - DEMANDE_CALCUL.INTERVENANT_ID, + DEMANDE_CALCUL.INTERVENANT_ID, DEMANDE_CALCUL.ANNEE_ID ); END; @@ -2188,16 +2188,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS a_id := OSE_PARAMETRE.GET_ANNEE; FOR mp IN ( SELECT DISTINCT - intervenant_id - FROM + intervenant_id + FROM service s JOIN intervenant i ON i.id = s.intervenant_id AND 1 = ose_divers.comprise_entre( i.histo_creation, i.histo_destruction, ose_formule.get_date_obs ) WHERE 1 = ose_divers.comprise_entre( s.histo_creation, s.histo_destruction, ose_formule.get_date_obs ) AND s.annee_id = a_id - + UNION - + SELECT DISTINCT intervenant_id FROM @@ -2253,14 +2253,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS id NUMERIC; BEGIN MERGE INTO formule_resultat tfr USING dual ON ( - + tfr.intervenant_id = fr.intervenant_id AND tfr.annee_id = fr.annee_id AND tfr.type_volume_horaire_id = fr.type_volume_horaire_id AND tfr.etat_volume_horaire_id = fr.etat_volume_horaire_id - + ) WHEN MATCHED THEN UPDATE SET - + service_du = fr.service_du, enseignements = fr.enseignements, service = fr.service, @@ -2275,9 +2275,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS sous_service = fr.sous_service, a_payer = fr.a_payer, to_delete = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, INTERVENANT_ID, ANNEE_ID, @@ -2297,9 +2297,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS SOUS_SERVICE, A_PAYER, TO_DELETE - + ) VALUES ( - + FORMULE_RESULTAT_ID_SEQ.NEXTVAL, fr.intervenant_id, fr.annee_id, @@ -2319,9 +2319,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fr.sous_service, fr.a_payer, 0 - + ); - + SELECT id INTO id FROM formule_resultat tfr WHERE tfr.intervenant_id = fr.intervenant_id AND tfr.annee_id = fr.annee_id @@ -2345,28 +2345,28 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fs.heures_compl_fc := 0; RETURN fs; END; - + FUNCTION ENREGISTRER_RESULTAT_SERVICE( fs formule_resultat_service%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN MERGE INTO formule_resultat_service tfs USING dual ON ( - + tfs.formule_resultat_id = fs.formule_resultat_id AND tfs.service_id = fs.service_id ) WHEN MATCHED THEN UPDATE SET - + service_assure = fs.service_assure, heures_service = fs.heures_service, heures_compl_fi = fs.heures_compl_fi, heures_compl_fa = fs.heures_compl_fa, heures_compl_fc = fs.heures_compl_fc, TO_DELETE = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, FORMULE_RESULTAT_ID, SERVICE_ID, @@ -2388,16 +2388,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fs.heures_compl_fa, fs.heures_compl_fc, 0 - + ); - + SELECT id INTO id FROM formule_resultat_service tfs WHERE tfs.formule_resultat_id = fs.formule_resultat_id AND tfs.service_id = fs.service_id; RETURN id; END; - - + + FUNCTION NOUVEAU_RESULTAT_VH RETURN formule_resultat_vh%rowtype IS fvh formule_resultat_vh%rowtype; BEGIN @@ -2411,28 +2411,28 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fvh.heures_compl_fc := 0; RETURN fvh; END; - + FUNCTION ENREGISTRER_RESULTAT_VH( fvh formule_resultat_vh%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN MERGE INTO formule_resultat_vh tfvh USING dual ON ( - + tfvh.formule_resultat_id = fvh.formule_resultat_id AND tfvh.volume_horaire_id = fvh.volume_horaire_id ) WHEN MATCHED THEN UPDATE SET - + service_assure = fvh.service_assure, heures_service = fvh.heures_service, heures_compl_fi = fvh.heures_compl_fi, heures_compl_fa = fvh.heures_compl_fa, heures_compl_fc = fvh.heures_compl_fc, TO_DELETE = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, FORMULE_RESULTAT_ID, VOLUME_HORAIRE_ID, @@ -2454,16 +2454,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fvh.heures_compl_fa, fvh.heures_compl_fc, 0 - + ); - + SELECT id INTO id FROM formule_resultat_vh tfvh WHERE tfvh.formule_resultat_id = fvh.formule_resultat_id AND tfvh.volume_horaire_id = fvh.volume_horaire_id; RETURN id; END; - - + + FUNCTION NOUVEAU_RESULTAT_REF RETURN formule_resultat_referentiel%rowtype IS fr formule_resultat_referentiel%rowtype; BEGIN @@ -2475,9 +2475,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fr.heures_compl_referentiel := 0; RETURN fr; END; - - - + + + FUNCTION ENREGISTRER_RESULTAT_REF( fr formule_resultat_referentiel%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN @@ -2518,11 +2518,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS SELECT id INTO id FROM formule_resultat_referentiel tfr WHERE tfr.formule_resultat_id = fr.formule_resultat_id AND tfr.service_referentiel_id = fr.service_referentiel_id; - + RETURN id; END; - - + + PROCEDURE POPULATE_INTERVENANT( INTERVENANT_ID NUMERIC, ANNEE_ID NUMERIC, d_intervenant OUT t_intervenant ) IS BEGIN @@ -2546,12 +2546,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS WHERE fsm.intervenant_id = POPULATE_INTERVENANT.INTERVENANT_ID AND fsm.annee_id = POPULATE_INTERVENANT.ANNEE_ID; - + EXCEPTION WHEN NO_DATA_FOUND THEN d_intervenant.structure_id := null; d_intervenant.heures_service_statutaire := null; END; - + PROCEDURE POPULATE_REFERENTIEL( INTERVENANT_ID NUMERIC, ANNEE_ID NUMERIC, d_referentiel OUT t_lst_referentiel ) IS i PLS_INTEGER; @@ -2581,10 +2581,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS -- ose_test.echo('id = ' || i ); ose_test.echo('structure_id = ' || liste_referentiel( i ).structure_id ); ose_test.echo('heures = ' || liste_referentiel( i ).heures ); - + i := liste_referentiel.NEXT(i); END LOOP;*/ - + END; @@ -2654,7 +2654,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS PROCEDURE POPULATE_TYPE_ETAT_VH( d_volume_horaire t_lst_volume_horaire, d_type_etat_vh OUT t_lst_type_etat_vh ) IS TYPE t_ordres IS TABLE OF NUMERIC INDEX BY PLS_INTEGER; - + ordres_found t_ordres; ordres_exists t_ordres; type_volume_horaire_id PLS_INTEGER; @@ -2683,7 +2683,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS END IF; id := d_volume_horaire.NEXT(id); END LOOP; - + -- peuplement des t_lst_type_etat_vh type_volume_horaire_id := ordres_found.FIRST; LOOP EXIT WHEN type_volume_horaire_id IS NULL; @@ -2695,10 +2695,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS END IF; etat_volume_horaire_ordre := ordres_exists.NEXT(etat_volume_horaire_ordre); END LOOP; - + type_volume_horaire_id := ordres_found.NEXT(type_volume_horaire_id); END LOOP; - + END; @@ -2736,11 +2736,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS id := d_type_etat_vh.FIRST; LOOP EXIT WHEN id IS NULL; -- délégation du calcul à la formule choisie (à des fins de paramétrage) - EXECUTE IMMEDIATE + EXECUTE IMMEDIATE 'BEGIN ' || package_name || '.' || function_name || '( :1, :2, :3, :4 ); END;' USING INTERVENANT_ID, ANNEE_ID, d_type_etat_vh(id).type_volume_horaire_id, d_type_etat_vh(id).etat_volume_horaire_id; - + id := d_type_etat_vh.NEXT(id); END LOOP; END IF; @@ -2764,9 +2764,9 @@ BEGIN OSE_FORMULE.CALCULER_TOUT; END; --Nouveau VIEW --V_TBL_SERVICE --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE" +CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE" ( "ID", "SERVICE_ID", "INTERVENANT_ID", "TYPE_INTERVENANT_ID", "ANNEE_ID", "TYPE_VOLUME_HORAIRE_ID", "ETAT_VOLUME_HORAIRE_ID", "ETABLISSEMENT_ID", "STRUCTURE_AFF_ID", "STRUCTURE_ENS_ID", "NIVEAU_FORMATION_ID", "ETAPE_ID", "ELEMENT_PEDAGOGIQUE_ID", "PERIODE_ID", "TYPE_INTERVENTION_ID", "INTERVENANT_CODE", "INTERVENANT_NOM", "INTERVENANT_STATUT_LIBELLE", "INTERVENANT_TYPE_CODE", "INTERVENANT_TYPE_LIBELLE", "SERVICE_STRUCTURE_AFF_LIBELLE", "SERVICE_STRUCTURE_ENS_LIBELLE", "ETABLISSEMENT_LIBELLE", "ETAPE_CODE", "ETAPE_LIBELLE", "ELEMENT_CODE", "ELEMENT_LIBELLE", "COMMENTAIRES", "PERIODE_LIBELLE", "ELEMENT_PONDERATION_COMPL", "ELEMENT_SOURCE_LIBELLE", "HEURES", "HEURES_REF", "HEURES_NON_PAYEES", "HEURES_SERVICE_STATUTAIRE", "HEURES_SERVICE_DU_MODIFIE", "HETD", "HETD_SOLDE" - ) AS + ) AS WITH t AS ( SELECT 'vh_' || vh.id id, s.id service_id, @@ -2780,7 +2780,7 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE" s.structure_ens_id structure_ens_id, vh.periode_id periode_id, vh.type_intervention_id type_intervention_id, - + vh.heures heures, 0 heures_non_payees, 0 heures_ref, @@ -2809,14 +2809,14 @@ SELECT s.structure_ens_id structure_ens_id, vh.periode_id periode_id, vh.type_intervention_id type_intervention_id, - + vh.heures heures, 1 heures_non_payees, 0 heures_ref, 0 hetd, fr.heures_solde hetd_solde, null commentaires - + FROM volume_horaire vh JOIN service s ON s.id = vh.service_id @@ -2842,14 +2842,14 @@ SELECT sr.structure_id structure_ens_id, NULL periode_id, NULL type_intervention_id, - + 0 heures, 0 heures_non_payees, sr.heures heures_ref, frr.service_assure hetd, fr.heures_solde hetd_solde, sr.commentaires commentaires - + FROM formule_resultat_referentiel frr JOIN formule_resultat fr ON fr.id = frr.formule_resultat_id @@ -2859,7 +2859,7 @@ SELECT t.id id, t.service_id service_id, i.id intervenant_id, - ti.id type_intervenant_id, + ti.id type_intervenant_id, t.annee_id annee_id, t.type_volume_horaire_id type_volume_horaire_id, t.etat_volume_horaire_id etat_volume_horaire_id, @@ -2871,7 +2871,7 @@ SELECT ep.id element_pedagogique_id, t.periode_id periode_id, t.type_intervention_id type_intervention_id, - + i.source_code intervenant_code, i.nom_usuel || ' ' || i.prenom intervenant_nom, si.libelle intervenant_statut_libelle, @@ -2889,7 +2889,7 @@ SELECT p.libelle_court periode_libelle, CASE WHEN fs.ponderation_service_compl = 1 THEN NULL ELSE fs.ponderation_service_compl END element_ponderation_compl, src.libelle element_source_libelle, - + t.heures heures, t.heures_ref heures_ref, t.heures_non_payees heures_non_payees, @@ -2901,8 +2901,8 @@ SELECT FROM t JOIN intervenant i ON i.id = t.intervenant_id AND ose_divers.comprise_entre( i.histo_creation, i.histo_destruction ) = 1 - JOIN statut_intervenant si ON si.id = i.statut_id - JOIN type_intervenant ti ON ti.id = si.type_intervenant_id + JOIN statut_intervenant si ON si.id = i.statut_id + JOIN type_intervenant ti ON ti.id = si.type_intervenant_id JOIN etablissement etab ON etab.id = t.etablissement_id LEFT JOIN structure saff ON saff.id = NVL(t.structure_aff_id, i.structure_id) AND ti.code = 'P' LEFT JOIN structure sens ON sens.id = t.structure_ens_id @@ -2922,5 +2922,5 @@ FROM -- ********************************************************************* -- -BEGIN DBMS_SCHEDULER.enable(name=>'"OSE"."OSE_SRC_SYNC"'); END; +BEGIN DBMS_SCHEDULER.enable(name=>'"OSE"."OSE_SRC_SYNC"'); END; / \ No newline at end of file diff --git a/data/Sql/Versions/v_1.3.3.sql b/data/Sql/Versions/v_1.3.3.sql index b2c5200cd25b7ae3f88e5cb21b3cb88b14f2f811..b5d0e858924e61a1a093f16e480e70400b29aad0 100644 --- a/data/Sql/Versions/v_1.3.3.sql +++ b/data/Sql/Versions/v_1.3.3.sql @@ -2,7 +2,7 @@ -- * à faire AVANT avoir mis à jour le code source * -- -- ********************************************************************* -- -BEGIN DBMS_SCHEDULER.disable(name=>'"OSE"."OSE_SRC_SYNC"', force => TRUE); END; +BEGIN DBMS_SCHEDULER.disable(name=>'"OSE"."OSE_SRC_SYNC"', force => TRUE); END; / @@ -27,7 +27,7 @@ ALTER TABLE "OSE"."NOTIFICATION_INDICATEUR" MODIFY ("FREQUENCE" NUMBER(*,0)); --Nouveau TABLE --FORMULE_RESULTAT_VH --------------------------- - CREATE TABLE "OSE"."FORMULE_RESULTAT_VH" + CREATE TABLE "OSE"."FORMULE_RESULTAT_VH" ( "ID" NUMBER(*,0) NOT NULL ENABLE, "FORMULE_RESULTAT_ID" NUMBER(*,0) NOT NULL ENABLE, "VOLUME_HORAIRE_ID" NUMBER(*,0) NOT NULL ENABLE, @@ -46,10 +46,10 @@ ALTER TABLE "OSE"."NOTIFICATION_INDICATEUR" MODIFY ("FREQUENCE" NUMBER(*,0)); --Modifié VIEW --V_TMP_WF --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" +CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" ( "ID", "SOURCE_CODE", "NB_COMP", "NB_AGREM" - ) AS - WITH + ) AS + WITH composantes_enseign AS ( -- composantes d'enseignement par intervenant SELECT DISTINCT i.ID, i.source_code, s.structure_ens_id @@ -64,17 +64,17 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = 'CONSEIL_RESTREINT' - ), + ), v_agrement AS ( -- nombres de composantes d'enseignement et d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, - ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, + SELECT DISTINCT i.ID, i.source_code, + ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT "ID","SOURCE_CODE","NB_COMP","NB_AGREM" @@ -85,9 +85,9 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TMP_WF" --Modifié VIEW --V_TBL_SERVICE_RESUME_VH --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE_RESUME_VH" +CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE_RESUME_VH" ( "SERVICE_ID", "ANNEE_ID", "TYPE_VOLUME_HORAIRE_ID", "ETAT_VOLUME_HORAIRE_ORDRE", "TYPE_INTERVENANT_ID", "STRUCTURE_AFF_ID", "INTERVENANT_ID", "STRUCTURE_ENS_ID", "NIVEAU_FORMATION_ID", "ETAPE_ID", "ELEMENT_PEDAGOGIQUE_ID", "TYPE_INTERVENTION_ID", "HEURES" - ) AS + ) AS SELECT s.id service_id, s.annee_id annee_id, @@ -108,7 +108,7 @@ FROM JOIN v_volume_horaire_etat vhe ON vhe.volume_horaire_id = vh.id JOIN formule_resultat fr ON fr.intervenant_id = s.intervenant_id AND fr.annee_id = s.annee_id AND fr.etat_volume_horaire_id = vhe.etat_volume_horaire_id AND fr.type_volume_horaire_id = vh.type_volume_horaire_id JOIN intervenant i ON i.id = s.intervenant_id AND ose_divers.comprise_entre( i.histo_creation, i.histo_destruction ) = 1 - JOIN type_intervenant ti ON ti.id = i.type_id + JOIN type_intervenant ti ON ti.id = i.type_id JOIN structure saff ON saff.id = s.structure_aff_id JOIN etablissement etab ON etab.id = s.etablissement_id JOIN etat_volume_horaire evh ON evh.id = vhe.etat_volume_horaire_id @@ -123,10 +123,10 @@ WHERE --Nouveau VIEW --V_RECAP_SERVICE_PREVIS --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_RECAP_SERVICE_PREVIS" +CREATE OR REPLACE FORCE VIEW "OSE"."V_RECAP_SERVICE_PREVIS" ( "ID", "INTERVENANT_ID", "NOM_USUEL", "SOURCE_CODE", "ANNEE_ID", "SERVICE_STATUTAIRE", "MODIF_SERVICE", "LIBELLE_STRUCTURE", "CODE_EP", "LIBELLE_EP", "HAS_MODULATEUR", "NON_PAYABLE", "CODE_PERIODE", "ORDRE_PERIODE", "CODE_TI", "ORDRE_TI", "HEURES" - ) AS - select + ) AS + select vh.id, i.id intervenant_id, i.nom_usuel, @@ -158,7 +158,7 @@ join type_intervention ti on vh.type_intervention_id = ti.id and ti.histo_destru left join v_formule_service fs on fs.id = s.id and (fs.ponderation_service_compl <> 1 or fs.ponderation_service_du <> 1) -- NB: fs.id est l'id du service left join v_formule_service_modifie fsm on fsm.intervenant_id = i.id and fsm.annee_id = s.annee_id where vh.histo_destructeur_id is null -group by +group by vh.id, i.id, i.nom_usuel, @@ -175,13 +175,13 @@ group by p.ordre, ti.code, ti.ordre; - + / --------------------------- --Modifié PACKAGE --OSE_DIVERS --------------------------- -CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS +CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION INTERVENANT_HAS_PRIVILEGE( intervenant_id NUMERIC, privilege_name VARCHAR2 ) RETURN NUMERIC; @@ -198,7 +198,7 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION STRUCTURE_DANS_STRUCTURE( structure_testee NUMERIC, structure_cible NUMERIC ) RETURN NUMERIC; FUNCTION STR_REDUCE( str CLOB ) RETURN CLOB; - + FUNCTION LIKED( haystack CLOB, needle CLOB ) RETURN NUMERIC; FUNCTION COMPRISE_ENTRE( date_debut DATE, date_fin DATE DEFAULT NULL, date_obs DATE DEFAULT SYSDATE ) RETURN NUMERIC; @@ -208,9 +208,9 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_DIVERS" AS FUNCTION VOLUME_HORAIRE_VALIDE( volume_horaire_id NUMERIC ) RETURN NUMERIC; FUNCTION CALCUL_TAUX_FI( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; - + FUNCTION CALCUL_TAUX_FC( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; - + FUNCTION CALCUL_TAUX_FA( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT; FUNCTION STRUCTURE_UNIV_GET_ID RETURN NUMERIC; @@ -300,7 +300,7 @@ FUNCTION STRUCTURE_DANS_STRUCTURE( structure_testee NUMERIC, structure_cible NUM RESULTAT NUMERIC; BEGIN IF structure_testee = structure_cible THEN RETURN 1; END IF; - + select count(*) into resultat from structure WHERE structure.id = structure_testee @@ -366,7 +366,7 @@ BEGIN ba := fa; nt := bi + bc + ba; END IF; - + IF nt = 0 THEN -- toujours au cas ou... bi := 1; bc := 0; @@ -405,7 +405,7 @@ BEGIN CALCUL_TAUX( eff_fi, eff_fc, eff_fa, fi, fc, fa, ri, rc, ra, arrondi ); RETURN ri; END; - + FUNCTION CALCUL_TAUX_FC( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT IS ri FLOAT; rc FLOAT; @@ -414,7 +414,7 @@ BEGIN CALCUL_TAUX( eff_fi, eff_fc, eff_fa, fi, fc, fa, ri, rc, ra, arrondi ); RETURN rc; END; - + FUNCTION CALCUL_TAUX_FA( eff_fi FLOAT, eff_fc FLOAT, eff_fa FLOAT, fi NUMERIC, fc NUMERIC, fa NUMERIC, arrondi NUMERIC DEFAULT 15 ) RETURN FLOAT IS ri FLOAT; rc FLOAT; @@ -438,14 +438,14 @@ END; END OSE_DIVERS; / - + --------------------------- --Modifié VIEW --V_NIVEAU_FORMATION --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_NIVEAU_FORMATION" +CREATE OR REPLACE FORCE VIEW "OSE"."V_NIVEAU_FORMATION" ( "ID", "CODE", "LIBELLE_LONG", "NIVEAU", "GROUPE_TYPE_FORMATION_ID" - ) AS + ) AS SELECT DISTINCT ose_divers.niveau_formation_id_calc( gtf.id, gtf.pertinence_niveau, e.niveau ) id, gtf.libelle_court || e.niveau code, @@ -461,41 +461,41 @@ WHERE AND ose_divers.niveau_formation_id_calc( gtf.id, gtf.pertinence_niveau, e.niveau ) IS NOT NULL ORDER BY gtf.libelle_long, e.niveau; - + --------------------------- --Nouveau VIEW --ADRESSE_INTERVENANT_PRINC --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."ADRESSE_INTERVENANT_PRINC" +CREATE OR REPLACE FORCE VIEW "OSE"."ADRESSE_INTERVENANT_PRINC" ( "ID", "INTERVENANT_ID", "PRINCIPALE", "TEL_DOMICILE", "MENTION_COMPLEMENTAIRE", "BATIMENT", "NO_VOIE", "NOM_VOIE", "LOCALITE", "CODE_POSTAL", "VILLE", "PAYS_CODE_INSEE", "PAYS_LIBELLE", "SOURCE_ID", "SOURCE_CODE", "VALIDITE_DEBUT", "VALIDITE_FIN", "HISTO_CREATION", "HISTO_CREATEUR_ID", "HISTO_MODIFICATION", "HISTO_MODIFICATEUR_ID", "HISTO_DESTRUCTION", "HISTO_DESTRUCTEUR_ID", "TO_STRING" - ) AS - select + ) AS + select a."ID",a."INTERVENANT_ID",a."PRINCIPALE",a."TEL_DOMICILE",a."MENTION_COMPLEMENTAIRE",a."BATIMENT",a."NO_VOIE",a."NOM_VOIE",a."LOCALITE",a."CODE_POSTAL",a."VILLE",a."PAYS_CODE_INSEE",a."PAYS_LIBELLE",a."SOURCE_ID",a."SOURCE_CODE",a."VALIDITE_DEBUT",a."VALIDITE_FIN",a."HISTO_CREATION",a."HISTO_CREATEUR_ID",a."HISTO_MODIFICATION",a."HISTO_MODIFICATEUR_ID",a."HISTO_DESTRUCTION",a."HISTO_DESTRUCTEUR_ID", -- concaténation des éléments non null séparés par ', ' trim(trim(',' from replace(', ' || nvl(a.no_voie,'#') || ', ' || nvl(a.nom_voie,'#') || ', ' || nvl(a.batiment,'#') || ', ' || nvl(a.mention_complementaire,'#'), ', #', ''))) || -- saut de ligne complet - chr(13) || chr(10) || + chr(13) || chr(10) || -- concaténation des éléments non null séparés par ', ' trim(trim(',' from replace(', ' || nvl(a.localite,'#') || ', ' || nvl(a.code_postal,'#') || ', ' || nvl(a.ville,'#') || ', ' || nvl(a.pays_libelle,'#'), ', #', ''))) to_string from adresse_intervenant a where id in ( -- on ne retient que l'adresse principale si elle existe ou sinon la première adresse trouvée - select id + select id from ( -- attribution d'un rang par intervenant aux adresses pour avoir la principale (éventuelle) en n°1 select id, dense_rank() over(partition by intervenant_id order by principale desc) rang from adresse_intervenant - ) + ) where rang = 1 ); - + --------------------------- --Nouveau VIEW --V_INDIC_DIFF_DOSSIER --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" +CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" ( "ID", "NOM_USUEL", "ADRESSE_DOSSIER", "ADRESSE_IMPORT", "RIB_DOSSIER", "RIB_IMPORT", "NOM_USUEL_DOSSIER", "NOM_USUEL_IMPORT", "PRENOM_DOSSIER", "PRENOM_IMPORT" - ) AS - select + ) AS + select i.id, i.nom_usuel, case when d.adresse <> a.to_string then d.adresse else null end adresse_dossier, @@ -514,11 +514,11 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_INDIC_DIFF_DOSSIER" --Nouveau VIEW --V_BERTRAND --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" +CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" ( "INTERVENANT_ID", "SOURCE_CODE", "NOM_USUEL", "LIBELLE_STR", "CODE_EP", "LIBELLE_EP", "HAS_MODULATEUR", "CODE_PERIODE", "CODE_TI", "PAYABLE", "HEURES", "GROUPING_EP", "GROUPING_PERIODE", "GROUPING_PAYABLE", "GROUPING_ID" - ) AS + ) AS with tmp as ( - select + select i.id intervenant_id, i.source_code, i.nom_usuel, @@ -544,7 +544,7 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_BERTRAND" left join v_formule_service_modifie fsm on fsm.intervenant_id = i.id and fsm.annee_id = s.annee_id where vh.histo_destructeur_id is null ) -select +select intervenant_id, source_code, nom_usuel, @@ -556,20 +556,20 @@ select code_ti, /*decode(grouping(payable), 1, 'Total payable ou non', payable) as*/ payable, sum(heures) heures, - grouping(libelle_ep) as grouping_ep, - grouping(code_periode) as grouping_periode, + grouping(libelle_ep) as grouping_ep, + grouping(code_periode) as grouping_periode, grouping(payable) as grouping_payable, grouping_id(libelle_str, libelle_ep, code_periode, payable) as grouping_id from tmp --where source_code = '3948' group by intervenant_id, source_code, nom_usuel, code_ti, cube(libelle_str, (code_ep, libelle_ep, has_modulateur), code_periode, payable) -having +having -- grouping_id(libelle_ep, code_periode, payable) in (0,5,7) equivaut aux 3 lignes suivantes : grouping(libelle_str) = 0 and grouping(libelle_ep) = 0 and grouping(code_periode) = 0 and grouping(payable) = 0 or -- totaux détails (grouping_id = 0) grouping(libelle_str) = 0 and grouping(libelle_ep) = 1 and grouping(code_periode) = 0 and grouping(payable) = 1 or -- totaux tout EP et payable confondus (grouping_id = 5) grouping(libelle_str) = 0 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 or -- totaux tout EP, période et payable confondus (grouping_id = 7) - grouping(libelle_str) = 1 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 -- totaux tout Structure, EP, période et payable confondus (grouping_id = 15) -order by + grouping(libelle_str) = 1 and grouping(libelle_ep) = 1 and grouping(code_periode) = 1 and grouping(payable) = 1 -- totaux tout StructureService, EP, période et payable confondus (grouping_id = 15) +order by nom_usuel, libelle_str, code_periode, libelle_ep, libelle_ep, code_ti, payable desc; --------------------------- --Modifié TRIGGER @@ -594,7 +594,7 @@ END; BEGIN service_id := CASE WHEN deleting THEN :OLD.service_id ELSE :NEW.service_id END; SELECT s.intervenant_id into intervenant_id from service s where id = service_id; - ose_workflow.add_intervenant_to_update (intervenant_id); + ose_workflow.add_intervenant_to_update (intervenant_id); END; / --------------------------- @@ -615,7 +615,7 @@ END; AFTER INSERT OR DELETE OR UPDATE ON "OSE"."SERVICE" REFERENCING FOR EACH ROW BEGIN - ose_workflow.add_intervenant_to_update (CASE WHEN deleting THEN :OLD.intervenant_id ELSE :NEW.intervenant_id END); + ose_workflow.add_intervenant_to_update (CASE WHEN deleting THEN :OLD.intervenant_id ELSE :NEW.intervenant_id END); END; / --------------------------- @@ -636,12 +636,12 @@ END; raise_application_error(-20101, 'Il est impossible d''associer un motif de non paiement à un intervenant vacataire ou BIATSS.'); END IF; END IF; - + IF :NEW.motif_non_paiement_id IS NOT NULL AND :NEW.contrat_id IS NOT NULL THEN raise_application_error(-20101, 'Les heures ayant un motif de non paiement ne peuvent faire l''objet d''une contractualisation'); END IF; - modified := + modified := NVL(:NEW.id,0) <> NVL(:OLD.id,0) OR NVL(:NEW.type_volume_horaire_id,0) <> NVL(:OLD.type_volume_horaire_id,0) OR NVL(:NEW.service_id,0) <> NVL(:OLD.service_id,0) @@ -653,7 +653,7 @@ END; OR NVL(:NEW.histo_createur_id,0) <> NVL(:OLD.histo_createur_id,0) OR NVL(:NEW.histo_destruction,SYSDATE) <> NVL(:OLD.histo_destruction,SYSDATE) OR NVL(:NEW.histo_destructeur_id,0) <> NVL(:OLD.histo_destructeur_id,0); - + SELECT COUNT(*) INTO @@ -664,7 +664,7 @@ END; WHERE V.HISTO_DESTRUCTION IS NULL AND vvh.VOLUME_HORAIRE_ID = :NEW.ID; - + IF modified AND 0 <> has_validation THEN raise_application_error(-20101, 'Il est impossible de modifier des heures déjà validées.'); END IF; @@ -684,27 +684,27 @@ END; --Modifié PACKAGE --OSE_FORMULE --------------------------- -CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS +CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS TYPE t_intervenant IS RECORD ( structure_id NUMERIC, heures_service_statutaire FLOAT DEFAULT 0, heures_service_modifie FLOAT DEFAULT 0 ); - + TYPE t_type_etat_vh IS RECORD ( type_volume_horaire_id NUMERIC, etat_volume_horaire_id NUMERIC ); TYPE t_lst_type_etat_vh IS TABLE OF t_type_etat_vh INDEX BY PLS_INTEGER; - + TYPE t_referentiel IS RECORD ( id NUMERIC, structure_id NUMERIC, heures FLOAT DEFAULT 0 ); TYPE t_lst_referentiel IS TABLE OF t_referentiel INDEX BY PLS_INTEGER; - + TYPE t_service IS RECORD ( id NUMERIC, taux_fi FLOAT DEFAULT 1, @@ -716,7 +716,7 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS structure_ens_id NUMERIC ); TYPE t_lst_service IS TABLE OF t_service INDEX BY PLS_INTEGER; - + TYPE t_volume_horaire IS RECORD ( id NUMERIC, service_id NUMERIC, @@ -740,13 +740,13 @@ CREATE OR REPLACE PACKAGE "OSE"."OSE_FORMULE" AS FUNCTION NOUVEAU_RESULTAT RETURN formule_resultat%rowtype; FUNCTION ENREGISTRER_RESULTAT( fr formule_resultat%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_SERVICE RETURN formule_resultat_service%rowtype; FUNCTION ENREGISTRER_RESULTAT_SERVICE( fs formule_resultat_service%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_VH RETURN formule_resultat_vh%rowtype; FUNCTION ENREGISTRER_RESULTAT_VH( fvh formule_resultat_vh%rowtype ) RETURN NUMERIC; - + FUNCTION NOUVEAU_RESULTAT_REF RETURN formule_resultat_referentiel%rowtype; FUNCTION ENREGISTRER_RESULTAT_REF( fr formule_resultat_referentiel%rowtype ) RETURN NUMERIC; @@ -771,14 +771,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS */ PROCEDURE Add_Intervenant_To_Update (p_intervenant_id NUMERIC) IS - BEGIN + BEGIN MERGE INTO wf_tmp_intervenant t USING dual ON (t.intervenant_id = p_intervenant_id) WHEN NOT MATCHED THEN INSERT (INTERVENANT_ID) VALUES (p_intervenant_id); END; - + /** * Parcours des intervenants dont il faut regénérer la progression dans le workflow */ - PROCEDURE Update_Intervenants_Etapes + PROCEDURE Update_Intervenants_Etapes IS BEGIN FOR ti IN (SELECT distinct * FROM wf_tmp_intervenant) LOOP @@ -786,14 +786,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS END LOOP; DELETE FROM wf_tmp_intervenant; END; - + /** * Regénère la progression dans le workflow de tous les intervenants dont le statut autorise la saisie de service. */ - PROCEDURE Update_All_Intervenants_Etapes + PROCEDURE Update_All_Intervenants_Etapes IS - CURSOR intervenant_cur IS - SELECT i.* FROM intervenant i + CURSOR intervenant_cur IS + SELECT i.* FROM intervenant i JOIN statut_intervenant si ON si.id = i.statut_id AND si.histo_destruction IS NULL AND si.peut_saisir_service = 1 WHERE i.histo_destruction IS NULL; BEGIN @@ -803,11 +803,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS ose_workflow.Update_Intervenant_Etapes(intervenant_rec.id); END LOOP; END; - + /** * Regénère la progression complète dans le workflow d'un intervenant. */ - PROCEDURE Update_Intervenant_Etapes (p_intervenant_id NUMERIC) + PROCEDURE Update_Intervenant_Etapes (p_intervenant_id NUMERIC) IS structures_ids T_LIST_STRUCTURE_ID; structure_id NUMERIC; @@ -822,7 +822,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- RAZ progression. -- DELETE FROM wf_intervenant_etape ie WHERE ie.intervenant_id = p_intervenant_id; - + -- -- Parcours des étapes. -- @@ -835,7 +835,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS inner join wf_etape ed on ed.id = ee.depart_etape_id inner join wf_etape ea on ea.id = ee.arrivee_etape_id where ea.code <> 'FIN' - connect by ee.depart_etape_id = prior ee.arrivee_etape_id + connect by ee.depart_etape_id = prior ee.arrivee_etape_id start with ed.code = 'DEBUT' --UNION --select e.* from wf_etape e where e.code = 'FIN' @@ -851,10 +851,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS EXECUTE IMMEDIATE 'BEGIN :res := ' || etape_rec.PERTIN_FUNC || '(:1); END;' USING OUT pertinente, p_intervenant_id; --DBMS_OUTPUT.put_line (etape_rec.libelle || ' --> ' || etape_rec.PERTIN_FUNC || ' returned ' || pertinente); END IF; - IF pertinente = 0 THEN + IF pertinente = 0 THEN CONTINUE; END IF; - + -- -- La règle (fonction) de franchissement prend 2 arguments : l'id de l'intervenant (null interdit) et l'id de la structure (null accepté). -- Cette règle sera exécutée une fois avec un id de structure null (ce qui se traduit par "peu importe la structure"), puis @@ -868,17 +868,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IF etape_rec.STRUCTURE_DEPENDANT = 1 THEN ose_workflow.fetch_structures_ens_ids(p_intervenant_id, structures_ids); END IF; - + -- - -- Dans la progression de l'intervenant, une même étape peut figurer plusieurs fois : une fois avec un id de structure null - -- (ce qui se traduit par "peu importe la structure") + autant de fois qu'il existe de structures d'enseignement dans le cas où + -- Dans la progression de l'intervenant, une même étape peut figurer plusieurs fois : une fois avec un id de structure null + -- (ce qui se traduit par "peu importe la structure") + autant de fois qu'il existe de structures d'enseignement dans le cas où -- l'étape est déclinable par structure. -- FOR i IN 0 .. structures_ids.COUNT - 1 LOOP structure_id := structures_ids(i); --DBMS_OUTPUT.put_line (etape_rec.libelle || ' : structures_ids('||i||') := ' || structure_id); - + -- -- Interrogation de la règle de franchissement de l'étape. -- @@ -888,14 +888,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS EXECUTE IMMEDIATE 'BEGIN :res := ' || etape_rec.FRANCH_FUNC || '(:1, :2); END;' USING OUT franchie, p_intervenant_id, structure_id; --DBMS_OUTPUT.put_line (etape_rec.FRANCH_FUNC || ' returned ' || franchie); END IF; - + atteignable := 1; - + -- -- Si l'étape courante n'a pas encore été trouvée. -- - IF courante_trouvee = 0 THEN - IF franchie = 1 THEN + IF courante_trouvee = 0 THEN + IF franchie = 1 THEN courante := 0; ELSE -- l'étape marquée "courante" est la 1ère étape non franchie @@ -906,7 +906,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- Si l'étape courante a été trouvée et que l'on se situe dessus. -- ELSIF courante_trouvee = etape_rec.id THEN - IF franchie = 1 THEN + IF franchie = 1 THEN courante := 0; ELSE courante := 1; @@ -918,19 +918,19 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS courante := 0; atteignable := 0; END IF; - + -- -- Ecriture dans la table. -- - INSERT INTO wf_intervenant_etape (id, intervenant_id, etape_id, structure_id, courante, franchie, atteignable, ordre) + INSERT INTO wf_intervenant_etape (id, intervenant_id, etape_id, structure_id, courante, franchie, atteignable, ordre) SELECT wf_intervenant_etape_id_seq.nextval, p_intervenant_id, etape_rec.id, structure_id, courante, franchie, atteignable, ordre FROM DUAL; - + ordre := ordre + 1; END LOOP; - + END LOOP; END; - + /** * */ @@ -940,17 +940,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS BEGIN i := structures_ids.COUNT; FOR d IN ( - SELECT distinct structure_ens_id FROM service s + SELECT distinct structure_ens_id FROM service s WHERE s.intervenant_id = p_intervenant_id AND S.ANNEE_ID = OSE_PARAMETRE.GET_ANNEE() AND S.HISTO_DESTRUCTION IS NULL ) LOOP structures_ids(i) := d.structure_ens_id; i := i + 1; END LOOP; END; - - + + /******************** Règles métiers de pertinence et de franchissement des étapes ********************/ - + /** * */ @@ -958,12 +958,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_dossier INTO res FROM statut_intervenant si - JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_dossier INTO res FROM statut_intervenant si + JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -971,12 +971,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_service INTO res FROM statut_intervenant si - JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_service INTO res FROM statut_intervenant si + JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -985,20 +985,20 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; BEGIN IF p_structure_id IS NULL THEN - SELECT count(*) INTO res FROM service s + SELECT count(*) INTO res FROM service s JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id AND ep.histo_destruction IS NULL JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); ELSE - SELECT count(*) INTO res FROM service s - JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id + SELECT count(*) INTO res FROM service s + JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id JOIN etape e ON e.id = ep.etape_id WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee() AND s.structure_ens_id = p_structure_id; END IF; RETURN CASE WHEN res > 0 THEN 1 ELSE 0 END; END; - + /** * */ @@ -1006,11 +1006,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_saisir_referentiel INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_saisir_referentiel INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1018,13 +1018,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_piece_jointe_statut tpjs - JOIN statut_intervenant si on tpjs.statut_intervenant_id = si.id + SELECT count(*) INTO res FROM type_piece_jointe_statut tpjs + JOIN statut_intervenant si on tpjs.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1032,15 +1032,15 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_agrement_statut tas + SELECT count(*) INTO res FROM type_agrement_statut tas JOIN type_agrement ta ON ta.id = tas.type_agrement_id AND ta.code = 'CONSEIL_RESTREINT' JOIN statut_intervenant si on tas.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id - WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 + WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 AND i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1048,15 +1048,15 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM type_agrement_statut tas + SELECT count(*) INTO res FROM type_agrement_statut tas JOIN type_agrement ta ON ta.id = tas.type_agrement_id AND ta.code = 'CONSEIL_ACADEMIQUE' JOIN statut_intervenant si on tas.statut_intervenant_id = si.id JOIN intervenant i ON i.statut_id = si.id - WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 + WHERE tas.PREMIER_RECRUTEMENT = i.PREMIER_RECRUTEMENT AND tas.OBLIGATOIRE = 1 AND i.id = p_intervenant_id; RETURN res; END; - + /** * */ @@ -1064,18 +1064,18 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT si.peut_avoir_contrat INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id + SELECT si.peut_avoir_contrat INTO res FROM statut_intervenant si JOIN intervenant i ON i.statut_id = si.id WHERE i.id = p_intervenant_id; RETURN res; END; - + /** * */ FUNCTION service_valide (p_intervenant_id NUMERIC, p_structure_id NUMERIC DEFAULT NULL) RETURN NUMERIC IS - CURSOR service_cur IS - SELECT s.* FROM service s + CURSOR service_cur IS + SELECT s.* FROM service s JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL JOIN v_volume_horaire_etat vhe ON vhe.volume_horaire_id = vh.id JOIN etat_volume_horaire evh ON evh.id = vhe.etat_volume_horaire_id AND evh.ordre >= ( SELECT min(ordre) FROM etat_volume_horaire WHERE code = 'valide' ) @@ -1083,16 +1083,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); -- -- autre version : sans utilisation de la vue v_volume_horaire_etat --- CURSOR service_cur IS --- SELECT s.* FROM service s +-- CURSOR service_cur IS +-- SELECT s.* FROM service s -- JOIN element_pedagogique ep on ep.id = s.element_pedagogique_id AND ep.histo_destruction IS NULL -- JOIN etape e ON e.id = ep.etape_id AND e.histo_destruction IS NULL -- JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL -- JOIN VALIDATION_VOL_HORAIRE vvh on VVH.VOLUME_HORAIRE_ID = vh.id -- JOIN validation v on VVH.VALIDATION_ID = v.id AND V.HISTO_DESTRUCTION is null -- WHERE s.intervenant_id = p_intervenant_id AND s.annee_id = ose_parametre.get_annee(); --- CURSOR service_cur IS --- SELECT s.* FROM service s +-- CURSOR service_cur IS +-- SELECT s.* FROM service s -- JOIN volume_horaire vh ON vh.service_id = s.id AND vh.histo_destruction IS NULL -- JOIN v_volume_horaire_etat vhe ON vhe.volume_horaire_id = vh.id -- JOIN etat_volume_horaire evh ON evh.id = vhe.etat_volume_horaire_id AND evh.ordre < ( SELECT min(ordre) FROM etat_volume_horaire WHERE code = 'valide' ) @@ -1143,9 +1143,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM validation v - JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'DONNEES_PERSO_PAR_COMP' - WHERE v.histo_destruction IS NULL + SELECT count(*) INTO res FROM validation v + JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'DONNEES_PERSO_PAR_COMP' + WHERE v.histo_destruction IS NULL AND v.intervenant_id = p_intervenant_id; RETURN res; END; @@ -1157,9 +1157,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res FROM validation v - JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'REFERENTIEL' - WHERE v.histo_destruction IS NULL + SELECT count(*) INTO res FROM validation v + JOIN type_validation tv ON tv.id = v.type_validation_id AND tv.code = 'REFERENTIEL' + WHERE v.histo_destruction IS NULL AND v.intervenant_id = p_intervenant_id; RETURN res; END; @@ -1172,7 +1172,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; BEGIN SELECT count(*) INTO res FROM ( - WITH + WITH ATTENDU_OBLIGATOIRE AS ( -- nombres de pj OBLIGATOIRES pour chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) TOTAL_HEURES, count(tpjs.id) NB /*+ materialize */ @@ -1180,12 +1180,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) LEFT JOIN V_PJ_HEURES vheures ON vheures.INTERVENANT_ID = I.ID WHERE tpjs.OBLIGATOIRE = 1 AND (tpjs.SEUIL_HETD IS NULL OR COALESCE(vheures.TOTAL_HEURES, 0) >= tpjs.SEUIL_HETD) GROUP BY I.ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) - ), + ), FOURNI_OBLIGATOIRE AS ( -- nombres de pj OBLIGATOIRES FOURNIES par chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, count(tpjAttendu.ID) NB /*+ materialize */ @@ -1193,7 +1193,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN TYPE_PIECE_JOINTE tpjAttendu ON tpjs.TYPE_PIECE_JOINTE_ID = tpjAttendu.ID AND (tpjAttendu.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN PIECE_JOINTE pj ON d.ID = pj.DOSSIER_ID AND (pj.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN pj.VALIDITE_DEBUT AND COALESCE(pj.VALIDITE_FIN, SYSDATE)) INNER JOIN TYPE_PIECE_JOINTE tpjFourni ON pj.TYPE_PIECE_JOINTE_ID = tpjFourni.ID AND (tpjFourni.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN tpjFourni.VALIDITE_DEBUT AND COALESCE(tpjFourni.VALIDITE_FIN, SYSDATE)) @@ -1204,7 +1204,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS -- %s AND pj.VALIDATION_ID IS NOT NULL -- %s GROUP BY I.ID, I.SOURCE_CODE - ), + ), ATTENDU_FACULTATIF AS ( -- nombres de pj FACULTATIVES pour chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) TOTAL_HEURES, count(tpjs.id) NB /*+ materialize */ @@ -1212,11 +1212,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) LEFT JOIN V_PJ_HEURES vheures ON vheures.INTERVENANT_ID = I.ID WHERE (tpjs.OBLIGATOIRE = 0 OR tpjs.OBLIGATOIRE = 1 AND tpjs.SEUIL_HETD IS NOT NULL AND COALESCE(vheures.TOTAL_HEURES, 0) < tpjs.SEUIL_HETD) GROUP BY I.ID, I.SOURCE_CODE, COALESCE(vheures.TOTAL_HEURES, 0) - ), + ), FOURNI_FACULTATIF AS ( -- nombres de pj FACULTATIVES FOURNIES par chaque intervenant SELECT I.ID INTERVENANT_ID, I.SOURCE_CODE, count(tpjAttendu.ID) NB /*+ materialize */ @@ -1224,7 +1224,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS INNER JOIN INTERVENANT I ON IE.ID = I.ID AND (I.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN DOSSIER d ON IE.DOSSIER_ID = d.ID AND (d.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN STATUT_INTERVENANT si ON d.STATUT_ID = si.ID AND (si.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN si.VALIDITE_DEBUT AND COALESCE(si.VALIDITE_FIN, SYSDATE)) - INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) + INNER JOIN TYPE_PIECE_JOINTE_STATUT tpjs ON si.ID = tpjs.STATUT_INTERVENANT_ID AND (tpjs.PREMIER_RECRUTEMENT = d.PREMIER_RECRUTEMENT) AND (tpjs.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN TYPE_PIECE_JOINTE tpjAttendu ON tpjs.TYPE_PIECE_JOINTE_ID = tpjAttendu.ID AND (tpjAttendu.HISTO_DESTRUCTEUR_ID IS NULL) INNER JOIN PIECE_JOINTE pj ON d.ID = pj.DOSSIER_ID AND (pj.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN pj.VALIDITE_DEBUT AND COALESCE(pj.VALIDITE_FIN, SYSDATE)) INNER JOIN TYPE_PIECE_JOINTE tpjFourni ON pj.TYPE_PIECE_JOINTE_ID = tpjFourni.ID AND (tpjFourni.HISTO_DESTRUCTEUR_ID IS NULL AND SYSDATE BETWEEN tpjFourni.VALIDITE_DEBUT AND COALESCE(tpjFourni.VALIDITE_FIN, SYSDATE)) @@ -1233,14 +1233,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS AND tpjFourni.ID = tpjAttendu.ID GROUP BY I.ID, I.SOURCE_CODE ) - SELECT - COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) ID, - COALESCE(AO.SOURCE_CODE, AF.SOURCE_CODE) SOURCE_CODE, - COALESCE(AO.TOTAL_HEURES, AF.TOTAL_HEURES) TOTAL_HEURES, - COALESCE(AO.NB, 0) NB_PJ_OBLIG_ATTENDU, - COALESCE(FO.NB, 0) NB_PJ_OBLIG_FOURNI, - COALESCE(AF.NB, 0) NB_PJ_FACUL_ATTENDU, - COALESCE(FF.NB, 0) NB_PJ_FACUL_FOURNI + SELECT + COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) ID, + COALESCE(AO.SOURCE_CODE, AF.SOURCE_CODE) SOURCE_CODE, + COALESCE(AO.TOTAL_HEURES, AF.TOTAL_HEURES) TOTAL_HEURES, + COALESCE(AO.NB, 0) NB_PJ_OBLIG_ATTENDU, + COALESCE(FO.NB, 0) NB_PJ_OBLIG_FOURNI, + COALESCE(AF.NB, 0) NB_PJ_FACUL_ATTENDU, + COALESCE(FF.NB, 0) NB_PJ_FACUL_FOURNI FROM ATTENDU_OBLIGATOIRE AO FULL OUTER JOIN ATTENDU_FACULTATIF AF ON AF.INTERVENANT_ID = AO.INTERVENANT_ID LEFT JOIN FOURNI_OBLIGATOIRE FO ON FO.INTERVENANT_ID = AO.INTERVENANT_ID @@ -1248,7 +1248,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS WHERE COALESCE(AO.INTERVENANT_ID, AF.INTERVENANT_ID) = p_intervenant_id ) WHERE NB_PJ_OBLIG_ATTENDU <= NB_PJ_OBLIG_FOURNI; - + RETURN res; END; @@ -1260,7 +1260,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; code VARCHAR2(64) := 'CONSEIL_RESTREINT'; BEGIN - WITH + WITH composantes_enseign AS ( -- composantes d'enseignement par intervenant SELECT DISTINCT i.ID, i.source_code, s.structure_ens_id @@ -1276,18 +1276,18 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = code AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND A.structure_id = p_structure_id) - ), + ), v_agrement AS ( -- nombres de composantes d'enseignement et d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, - ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, + SELECT DISTINCT i.ID, i.source_code, + ( select count(*) from COMPOSANTES_ENSEIGN ce where ce.id = i.id ) nb_comp, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT COUNT(*) INTO res @@ -1295,12 +1295,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS WHERE ( -- si aucune structure précise n'est spécifiée, on ne retient que les intervenants qui ont au moins un d'agrément CR p_structure_id IS NULL AND nb_agrem > 0 - OR + OR -- si une structure précise est spécifiée, on ne retient que les intervenants qui ont (au moins) autant d'agréments CR que de composantes d'enseignement - p_structure_id IS NOT NULL AND v.nb_comp <= nb_agrem - ) + p_structure_id IS NOT NULL AND v.nb_comp <= nb_agrem + ) AND v.id = p_intervenant_id ; - + RETURN res; END; @@ -1312,30 +1312,30 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS res NUMERIC; v_code VARCHAR2(64) := 'CONSEIL_ACADEMIQUE'; BEGIN - WITH + WITH agrements_oblig_exist AS ( -- agréments obligatoires obtenus par intervenant et structure SELECT i.ID, i.source_code, A.type_agrement_id, A.ID agrement_id, A.structure_id FROM agrement A INNER JOIN type_agrement ta ON A.type_agrement_id = ta.ID AND (ta.histo_destructeur_id IS NULL) INNER JOIN intervenant i ON A.intervenant_id = i.ID AND (i.histo_destructeur_id IS NULL) - INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id - AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) + INNER JOIN type_agrement_statut tas ON i.statut_id = tas.statut_intervenant_id AND ta.ID = tas.type_agrement_id + AND i.premier_recrutement = tas.premier_recrutement AND tas.obligatoire = 1 AND (tas.histo_destructeur_id IS NULL) WHERE A.histo_destructeur_id IS NULL AND ta.code = v_code - ), + ), v_agrement AS ( -- nombres d'agrément obligatoires fournis par intervenant - SELECT DISTINCT i.ID, i.source_code, + SELECT DISTINCT i.ID, i.source_code, ( select count(*) from AGREMENTS_OBLIG_EXIST ao where ao.id = i.id ) nb_agrem - FROM intervenant i + FROM intervenant i WHERE i.histo_destructeur_id IS NULL ) SELECT COUNT(*) INTO res FROM v_agrement v WHERE nb_agrem > 0 AND v.id = p_intervenant_id ; - + RETURN res; END; @@ -1346,14 +1346,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_WORKFLOW" AS IS res NUMERIC; BEGIN - SELECT count(*) INTO res + SELECT count(*) INTO res FROM contrat c JOIN validation v ON c.validation_id = v.id AND v.histo_destruction IS NULL - WHERE c.HISTO_DESTRUCTION IS NULL + WHERE c.HISTO_DESTRUCTION IS NULL AND c.intervenant_id = p_intervenant_id - AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND c.STRUCTURE_ID = p_structure_id) + AND (p_structure_id IS NULL OR p_structure_id IS NOT NULL AND c.STRUCTURE_ID = p_structure_id) AND ROWNUM = 1; - + RETURN res; END; @@ -1370,7 +1370,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS valeurs t_valeurs, total_service t_valeurs, total FLOAT - ); + ); TYPE t_tableaux IS TABLE OF t_tableau INDEX BY PLS_INTEGER; t t_tableaux; @@ -1384,10 +1384,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS tab t_tableau; BEGIN tab := t(tab_index); - + ose_test.echo( 'Intervenant id = ' || resultat.intervenant_id ); ose_test.echo( 'Tableau numéro ' || tab_index ); - + id := ose_formule.d_service.FIRST; LOOP EXIT WHEN id IS NULL; dbms_output.put( 'Service id=' || lpad(id,6,' ') || ' Total=' || lpad(tab.total_service(id),10,' ') || ', data = ' ); @@ -1396,17 +1396,17 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id2 IS NULL; IF ose_formule.d_volume_horaire(id2).type_volume_horaire_id = resultat.type_volume_horaire_id AND ose_formule.d_volume_horaire(id2).etat_volume_horaire_ordre >= resultat.etat_volume_horaire_id AND ose_formule.d_volume_horaire(id2).service_id = id THEN - + dbms_output.put( lpad(tab.valeurs(id2),10,' ') || ' | ' ); - + END IF; id2 := ose_formule.d_volume_horaire.NEXT(id2); END LOOP; dbms_output.new_line; id := ose_formule.d_service.NEXT(id); END LOOP; - - + + ose_test.echo( 'TOTAL = ' || LPAD(tab.total, 10, ' ') ); END; @@ -1426,7 +1426,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) <> NVL(s.structure_aff_id,0) AND s.taux_fc < 1 THEN RETURN vh.heures; ELSE @@ -1438,7 +1438,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) = NVL(s.structure_aff_id,0) AND s.taux_fc = 1 THEN RETURN vh.heures; ELSE @@ -1450,13 +1450,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + IF NVL(s.structure_ens_id,0) <> NVL(s.structure_aff_id,0) AND s.taux_fc = 1 THEN RETURN vh.heures; ELSE RETURN 0; END IF; - END; + END; FUNCTION C_15( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN @@ -1494,12 +1494,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(12).valeurs(vh.id) * vh.taux_service_du; END; - + FUNCTION C_23( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(13).valeurs(vh.id) * vh.taux_service_du; END; - + FUNCTION C_24( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(14).valeurs(vh.id) * vh.taux_service_du; @@ -1509,12 +1509,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(15).valeurs( fr.id ); END; - + FUNCTION C_26( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN t(16).valeurs( fr.id ); END; - + FUNCTION C_27( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN t(17).valeurs( fr.id ); @@ -1539,7 +1539,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN GREATEST( service_restant_du(33) - t(24).total, 0 ); END; - + FUNCTION C_35 RETURN FLOAT IS BEGIN RETURN GREATEST( service_restant_du(34) - t(25).total, 0 ); @@ -1572,7 +1572,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_43( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN IF t(23).total > 0 THEN @@ -1581,7 +1581,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_44( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN IF t(24).total > 0 THEN @@ -1608,7 +1608,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 0; END IF; END; - + FUNCTION C_47( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN IF t(27).total > 0 THEN @@ -1647,11 +1647,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN LEAST( service_restant_du(35), t(26).total ) * t(46).valeurs(fr.id); END; - + FUNCTION C_57( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN RETURN LEAST( service_restant_du(36), t(27).total ) * t(47).valeurs(fr.id); - END; + END; FUNCTION C_61( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN @@ -1769,7 +1769,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 1 - t(66).valeurs(fr.id); END IF; END; - + FUNCTION C_77( fr ose_formule.t_referentiel ) RETURN FLOAT IS BEGIN IF service_restant_du(37) > 0 THEN @@ -1778,7 +1778,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN 1 - t(67).valeurs(fr.id); END IF; END; - + FUNCTION C_81( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(11).valeurs(vh.id) * vh.taux_service_compl * t(71).valeurs(vh.id); @@ -1793,7 +1793,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS BEGIN RETURN t(13).valeurs(vh.id) * vh.taux_service_compl * t(73).valeurs(vh.id); END; - + FUNCTION C_84( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS BEGIN RETURN t(14).valeurs(vh.id) * vh.taux_service_compl * t(74).valeurs(vh.id); @@ -1825,7 +1825,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN t(83).valeurs(vh.id); END IF; END; - + FUNCTION C_94( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN @@ -1835,14 +1835,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS RETURN t(84).valeurs(vh.id) * s.ponderation_service_compl; ELSE RETURN t(84).valeurs(vh.id); - END IF; + END IF; END; FUNCTION C_101( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN t(81).valeurs(vh.id) * ( s.taux_fi + s.taux_fa ); END; @@ -1850,23 +1850,23 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN t(82).valeurs(vh.id) * ( s.taux_fi + s.taux_fa ); END; - + FUNCTION C_103( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN (t(93).valeurs(vh.id) + t(81).valeurs(vh.id)) * s.taux_fc; END; - + FUNCTION C_104( vh ose_formule.t_volume_horaire ) RETURN FLOAT IS s ose_formule.t_service; BEGIN s := ose_formule.d_service( vh.service_id ); - + RETURN (t(94).valeurs(vh.id) + t(82).valeurs(vh.id)) * s.taux_fc; END; @@ -2004,7 +2004,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = P_CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN resultat.service := resultat.service + ose_formule.d_volume_horaire( id ).heures; END IF; @@ -2026,7 +2026,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS 93, 94, 101, 102, 103, 104 ) THEN - t(current_tableau).total := 0; + t(current_tableau).total := 0; id2 := ose_formule.d_service.FIRST; LOOP EXIT WHEN id2 IS NULL; t(current_tableau).total_service(id2) := 0; @@ -2036,13 +2036,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = P_CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN CALCUL_VOLUME_HORAIRE( current_tableau, id ); END IF; id := ose_formule.d_volume_horaire.NEXT(id); END LOOP; - + ELSIF current_tableau IN ( -- calcul des services restants dus 31, 32, 33, 34, 35, 36, 37 ) THEN @@ -2118,7 +2118,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS LOOP EXIT WHEN id IS NULL; IF ose_formule.d_volume_horaire(id).type_volume_horaire_id = CALCUL_RESULTAT_V2.TYPE_VOLUME_HORAIRE_ID - AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE + AND ose_formule.d_volume_horaire(id).etat_volume_horaire_ordre >= EVH_ORDRE THEN res_vh := ose_formule.nouveau_resultat_vh; res_vh.formule_resultat_id := resultat.id; @@ -2130,7 +2130,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."UNICAEN_OSE_FORMULE" AS res_vh.service_assure := res_vh.heures_service + res_vh.heures_compl_fi + res_vh.heures_compl_fa + res_vh.heures_compl_fc; dev_null := ose_formule.ENREGISTRER_RESULTAT_VH( res_vh ); END IF; - id := ose_formule.d_volume_horaire.NEXT(id); + id := ose_formule.d_volume_horaire.NEXT(id); END LOOP; -- répartition des résultats par service référentiel @@ -2186,13 +2186,13 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS frm.INTERVENANT_ID = DEMANDE_CALCUL.INTERVENANT_ID AND frm.ANNEE_ID = DEMANDE_CALCUL.ANNEE_ID ) - WHEN NOT MATCHED THEN INSERT ( + WHEN NOT MATCHED THEN INSERT ( ID, - INTERVENANT_ID, + INTERVENANT_ID, ANNEE_ID ) VALUES ( FORMULE_RESULTAT_MAJ_ID_SEQ.NEXTVAL, - DEMANDE_CALCUL.INTERVENANT_ID, + DEMANDE_CALCUL.INTERVENANT_ID, DEMANDE_CALCUL.ANNEE_ID ); END; @@ -2224,16 +2224,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS a_id := OSE_PARAMETRE.GET_ANNEE; FOR mp IN ( SELECT DISTINCT - intervenant_id - FROM + intervenant_id + FROM service s JOIN intervenant i ON i.id = s.intervenant_id AND 1 = ose_divers.comprise_entre( i.histo_creation, i.histo_destruction, ose_formule.get_date_obs ) WHERE 1 = ose_divers.comprise_entre( s.histo_creation, s.histo_destruction, ose_formule.get_date_obs ) AND s.annee_id = a_id - + UNION - + SELECT DISTINCT intervenant_id FROM @@ -2289,14 +2289,14 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS id NUMERIC; BEGIN MERGE INTO formule_resultat tfr USING dual ON ( - + tfr.intervenant_id = fr.intervenant_id AND tfr.annee_id = fr.annee_id AND tfr.type_volume_horaire_id = fr.type_volume_horaire_id AND tfr.etat_volume_horaire_id = fr.etat_volume_horaire_id - + ) WHEN MATCHED THEN UPDATE SET - + service_du = fr.service_du, enseignements = fr.enseignements, service = fr.service, @@ -2311,9 +2311,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS sous_service = fr.sous_service, a_payer = fr.a_payer, to_delete = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, INTERVENANT_ID, ANNEE_ID, @@ -2333,9 +2333,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS SOUS_SERVICE, A_PAYER, TO_DELETE - + ) VALUES ( - + FORMULE_RESULTAT_ID_SEQ.NEXTVAL, fr.intervenant_id, fr.annee_id, @@ -2355,9 +2355,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fr.sous_service, fr.a_payer, 0 - + ); - + SELECT id INTO id FROM formule_resultat tfr WHERE tfr.intervenant_id = fr.intervenant_id AND tfr.annee_id = fr.annee_id @@ -2381,28 +2381,28 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fs.heures_compl_fc := 0; RETURN fs; END; - + FUNCTION ENREGISTRER_RESULTAT_SERVICE( fs formule_resultat_service%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN MERGE INTO formule_resultat_service tfs USING dual ON ( - + tfs.formule_resultat_id = fs.formule_resultat_id AND tfs.service_id = fs.service_id ) WHEN MATCHED THEN UPDATE SET - + service_assure = fs.service_assure, heures_service = fs.heures_service, heures_compl_fi = fs.heures_compl_fi, heures_compl_fa = fs.heures_compl_fa, heures_compl_fc = fs.heures_compl_fc, TO_DELETE = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, FORMULE_RESULTAT_ID, SERVICE_ID, @@ -2424,16 +2424,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fs.heures_compl_fa, fs.heures_compl_fc, 0 - + ); - + SELECT id INTO id FROM formule_resultat_service tfs WHERE tfs.formule_resultat_id = fs.formule_resultat_id AND tfs.service_id = fs.service_id; RETURN id; END; - - + + FUNCTION NOUVEAU_RESULTAT_VH RETURN formule_resultat_vh%rowtype IS fvh formule_resultat_vh%rowtype; BEGIN @@ -2447,28 +2447,28 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fvh.heures_compl_fc := 0; RETURN fvh; END; - + FUNCTION ENREGISTRER_RESULTAT_VH( fvh formule_resultat_vh%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN MERGE INTO formule_resultat_vh tfvh USING dual ON ( - + tfvh.formule_resultat_id = fvh.formule_resultat_id AND tfvh.volume_horaire_id = fvh.volume_horaire_id ) WHEN MATCHED THEN UPDATE SET - + service_assure = fvh.service_assure, heures_service = fvh.heures_service, heures_compl_fi = fvh.heures_compl_fi, heures_compl_fa = fvh.heures_compl_fa, heures_compl_fc = fvh.heures_compl_fc, TO_DELETE = 0 - + WHEN NOT MATCHED THEN INSERT ( - + ID, FORMULE_RESULTAT_ID, VOLUME_HORAIRE_ID, @@ -2490,16 +2490,16 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fvh.heures_compl_fa, fvh.heures_compl_fc, 0 - + ); - + SELECT id INTO id FROM formule_resultat_vh tfvh WHERE tfvh.formule_resultat_id = fvh.formule_resultat_id AND tfvh.volume_horaire_id = fvh.volume_horaire_id; RETURN id; END; - - + + FUNCTION NOUVEAU_RESULTAT_REF RETURN formule_resultat_referentiel%rowtype IS fr formule_resultat_referentiel%rowtype; BEGIN @@ -2511,9 +2511,9 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS fr.heures_compl_referentiel := 0; RETURN fr; END; - - - + + + FUNCTION ENREGISTRER_RESULTAT_REF( fr formule_resultat_referentiel%rowtype ) RETURN NUMERIC IS id NUMERIC; BEGIN @@ -2554,11 +2554,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS SELECT id INTO id FROM formule_resultat_referentiel tfr WHERE tfr.formule_resultat_id = fr.formule_resultat_id AND tfr.service_referentiel_id = fr.service_referentiel_id; - + RETURN id; END; - - + + PROCEDURE POPULATE_INTERVENANT( INTERVENANT_ID NUMERIC, ANNEE_ID NUMERIC, d_intervenant OUT t_intervenant ) IS BEGIN @@ -2582,12 +2582,12 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS WHERE fsm.intervenant_id = POPULATE_INTERVENANT.INTERVENANT_ID AND fsm.annee_id = POPULATE_INTERVENANT.ANNEE_ID; - + EXCEPTION WHEN NO_DATA_FOUND THEN d_intervenant.structure_id := null; d_intervenant.heures_service_statutaire := null; END; - + PROCEDURE POPULATE_REFERENTIEL( INTERVENANT_ID NUMERIC, ANNEE_ID NUMERIC, d_referentiel OUT t_lst_referentiel ) IS i PLS_INTEGER; @@ -2617,10 +2617,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS -- ose_test.echo('id = ' || i ); ose_test.echo('structure_id = ' || liste_referentiel( i ).structure_id ); ose_test.echo('heures = ' || liste_referentiel( i ).heures ); - + i := liste_referentiel.NEXT(i); END LOOP;*/ - + END; @@ -2690,7 +2690,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS PROCEDURE POPULATE_TYPE_ETAT_VH( d_volume_horaire t_lst_volume_horaire, d_type_etat_vh OUT t_lst_type_etat_vh ) IS TYPE t_ordres IS TABLE OF NUMERIC INDEX BY PLS_INTEGER; - + ordres_found t_ordres; ordres_exists t_ordres; type_volume_horaire_id PLS_INTEGER; @@ -2719,7 +2719,7 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS END IF; id := d_volume_horaire.NEXT(id); END LOOP; - + -- peuplement des t_lst_type_etat_vh type_volume_horaire_id := ordres_found.FIRST; LOOP EXIT WHEN type_volume_horaire_id IS NULL; @@ -2731,10 +2731,10 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS END IF; etat_volume_horaire_ordre := ordres_exists.NEXT(etat_volume_horaire_ordre); END LOOP; - + type_volume_horaire_id := ordres_found.NEXT(type_volume_horaire_id); END LOOP; - + END; @@ -2772,11 +2772,11 @@ CREATE OR REPLACE PACKAGE BODY "OSE"."OSE_FORMULE" AS id := d_type_etat_vh.FIRST; LOOP EXIT WHEN id IS NULL; -- délégation du calcul à la formule choisie (à des fins de paramétrage) - EXECUTE IMMEDIATE + EXECUTE IMMEDIATE 'BEGIN ' || package_name || '.' || function_name || '( :1, :2, :3, :4 ); END;' USING INTERVENANT_ID, ANNEE_ID, d_type_etat_vh(id).type_volume_horaire_id, d_type_etat_vh(id).etat_volume_horaire_id; - + id := d_type_etat_vh.NEXT(id); END LOOP; END IF; @@ -2800,9 +2800,9 @@ BEGIN OSE_FORMULE.CALCULER_TOUT; END; --Modifié VIEW --V_TBL_SERVICE_EXPORT --------------------------- -CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE_EXPORT" +CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE_EXPORT" ( "ID", "SERVICE_ID", "INTERVENANT_ID", "TYPE_INTERVENANT_ID", "ANNEE_ID", "TYPE_VOLUME_HORAIRE_ID", "ETAT_VOLUME_HORAIRE_ID", "ETABLISSEMENT_ID", "STRUCTURE_AFF_ID", "STRUCTURE_ENS_ID", "NIVEAU_FORMATION_ID", "ETAPE_ID", "ELEMENT_PEDAGOGIQUE_ID", "PERIODE_ID", "TYPE_INTERVENTION_ID", "INTERVENANT_CODE", "INTERVENANT_NOM", "INTERVENANT_STATUT_LIBELLE", "INTERVENANT_TYPE_LIBELLE", "SERVICE_STRUCTURE_AFF_LIBELLE", "SERVICE_STRUCTURE_ENS_LIBELLE", "ETABLISSEMENT_LIBELLE", "ETAPE_CODE", "ETAPE_LIBELLE", "ELEMENT_CODE", "ELEMENT_LIBELLE", "COMMENTAIRES", "PERIODE_LIBELLE", "ELEMENT_PONDERATION_COMPL", "ELEMENT_SOURCE_LIBELLE", "HEURES", "HEURES_REF", "HEURES_NON_PAYEES", "HEURES_SERVICE_STATUTAIRE", "HEURES_SERVICE_DU_MODIFIE", "HETD", "HETD_SOLDE" - ) AS + ) AS WITH t AS ( SELECT 'vh_' || vh.id id, s.id service_id, @@ -2816,7 +2816,7 @@ CREATE OR REPLACE FORCE VIEW "OSE"."V_TBL_SERVICE_EXPORT" s.structure_ens_id structure_ens_id, vh.periode_id periode_id, vh.type_intervention_id type_intervention_id, - + vh.heures heures, 0 heures_non_payees, 0 heures_ref, @@ -2845,14 +2845,14 @@ SELECT s.structure_ens_id structure_ens_id, vh.periode_id periode_id, vh.type_intervention_id type_intervention_id, - + 0 heures, vh.heures heures_non_payees, 0 heures_ref, 0 hetd, 0 hetd_solde, null commentaires - + FROM volume_horaire vh JOIN service s ON s.id = vh.service_id @@ -2876,14 +2876,14 @@ SELECT sr.structure_id structure_ens_id, NULL periode_id, NULL type_intervention_id, - + 0 heures, 0 heures_non_payees, sr.heures heures_ref, frr.service_assure hetd, fr.heures_solde hetd_solde, sr.commentaires commentaires - + FROM formule_resultat_referentiel frr JOIN formule_resultat fr ON fr.id = frr.formule_resultat_id @@ -2893,7 +2893,7 @@ SELECT t.id id, t.service_id service_id, i.id intervenant_id, - ti.id type_intervenant_id, + ti.id type_intervenant_id, t.annee_id annee_id, t.type_volume_horaire_id type_volume_horaire_id, t.etat_volume_horaire_id etat_volume_horaire_id, @@ -2905,7 +2905,7 @@ SELECT ep.id element_pedagogique_id, t.periode_id periode_id, t.type_intervention_id type_intervention_id, - + i.source_code intervenant_code, i.nom_usuel || ' ' || i.prenom intervenant_nom, si.libelle intervenant_statut_libelle, @@ -2922,7 +2922,7 @@ SELECT p.libelle_court periode_libelle, CASE WHEN fs.ponderation_service_compl = 1 THEN NULL ELSE fs.ponderation_service_compl END element_ponderation_compl, src.libelle element_source_libelle, - + t.heures heures, t.heures_ref heures_ref, t.heures_non_payees heures_non_payees, @@ -2934,8 +2934,8 @@ SELECT FROM t JOIN intervenant i ON i.id = t.intervenant_id AND ose_divers.comprise_entre( i.histo_creation, i.histo_destruction ) = 1 - JOIN statut_intervenant si ON si.id = i.statut_id - JOIN type_intervenant ti ON ti.id = si.type_intervenant_id + JOIN statut_intervenant si ON si.id = i.statut_id + JOIN type_intervenant ti ON ti.id = si.type_intervenant_id JOIN etablissement etab ON etab.id = t.etablissement_id LEFT JOIN structure saff ON saff.id = NVL(t.structure_aff_id, i.structure_id) AND ti.code = 'P' LEFT JOIN structure sens ON sens.id = t.structure_ens_id @@ -2954,5 +2954,5 @@ FROM -- ********************************************************************* -- -BEGIN DBMS_SCHEDULER.enable(name=>'"OSE"."OSE_SRC_SYNC"'); END; +BEGIN DBMS_SCHEDULER.enable(name=>'"OSE"."OSE_SRC_SYNC"'); END; / \ No newline at end of file diff --git a/module/Application/autoload_classmap.php b/module/Application/autoload_classmap.php index acc7e8e8ba2a6a37f71b9cfbe110b2f125dc8f2a..c3f5f89c99628c0b0ef92cd14817542baa6a4262 100644 --- a/module/Application/autoload_classmap.php +++ b/module/Application/autoload_classmap.php @@ -457,15 +457,15 @@ return array( 'Application\Service\MiseEnPaiementIntervenantStructure' => __DIR__ . '/src/Application/Service/MiseEnPaiementIntervenantStructure.php', 'Application\Service\Pays' => __DIR__ . '/src/Application/Service/Pays.php', 'Application\Service\ContextService' => __DIR__ . '/src/Application/Service/ContextService.php', - 'Application\Service\MotifModificationServiceDu' => __DIR__ . '/src/Application/Service/MotifModificationServiceDu.php', - 'Application\Service\DisciplineService' => __DIR__ . '/src/Application/Service/DisciplineService.php', - 'Application\Service\Annee' => __DIR__ . '/src/Application/Service/Annee.php', - 'Application\Service\TypeVolumeHoraire' => __DIR__ . '/src/Application/Service/TypeVolumeHoraire.php', - 'Application\Service\Structure' => __DIR__ . '/src/Application/Service/Structure.php', - 'Application\Service\Perimetre' => __DIR__ . '/src/Application/Service/Perimetre.php', - 'Application\Service\PieceJointe' => __DIR__ . '/src/Application/Service/PieceJointe.php', - 'Application\Service\TypeFormation' => __DIR__ . '/src/Application/Service/TypeFormation.php', - 'Application\Service\Intervenant' => __DIR__ . '/src/Application/Service/Intervenant.php', + 'Application\Service\MotifModificationServiceDu' => __DIR__ . '/src/Application/Service/MotifModificationServiceDu.php', + 'Application\Service\DisciplineService' => __DIR__ . '/src/Application/Service/DisciplineService.php', + 'Application\Service\AnneeService' => __DIR__ . '/src/Application/Service/AnneeService.php', + 'Application\Service\TypeVolumeHoraire' => __DIR__ . '/src/Application/Service/TypeVolumeHoraire.php', + 'Application\Service\StructureService' => __DIR__ . '/src/Application/Service/StructureService.php', + 'Application\Service\Perimetre' => __DIR__ . '/src/Application/Service/Perimetre.php', + 'Application\Service\PieceJointe' => __DIR__ . '/src/Application/Service/PieceJointe.php', + 'Application\Service\TypeFormation' => __DIR__ . '/src/Application/Service/TypeFormation.php', + 'Application\Service\Intervenant' => __DIR__ . '/src/Application/Service/Intervenant.php', 'Application\Service\MotifNonPaiement' => __DIR__ . '/src/Application/Service/MotifNonPaiement.php', 'Application\Service\TypeHeures' => __DIR__ . '/src/Application/Service/TypeHeures.php', 'Application\Service\FormuleVolumeHoraire' => __DIR__ . '/src/Application/Service/FormuleVolumeHoraire.php', @@ -491,39 +491,39 @@ return array( 'Application\Service\Traits\WfEtapeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/WfEtapeAwareTrait.php', 'Application\Service\Traits\MotifNonPaiementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/MotifNonPaiementAwareTrait.php', 'Application\Service\Traits\FormuleServiceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleServiceServiceAwareTrait.php', - 'Application\Service\Traits\EtatVolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtatVolumeHoraireAwareTrait.php', - 'Application\Service\Traits\IndicateurServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/IndicateurServiceAwareTrait.php', - 'Application\Service\Traits\EtablissementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtablissementAwareTrait.php', - 'Application\Service\Traits\StructureAwareTrait' => __DIR__ . '/src/Application/Service/Traits/StructureAwareTrait.php', - 'Application\Service\Traits\FormuleVolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleVolumeHoraireAwareTrait.php', - 'Application\Service\Traits\TypeContratAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeContratAwareTrait.php', - 'Application\Service\Traits\TypeValidationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeValidationAwareTrait.php', + 'Application\Service\Traits\EtatVolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtatVolumeHoraireAwareTrait.php', + 'Application\Service\Traits\IndicateurServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/IndicateurServiceAwareTrait.php', + 'Application\Service\Traits\EtablissementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtablissementAwareTrait.php', + 'Application\Service\Traits\StructureServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/StructureServiceAwareTrait.php', + 'Application\Service\Traits\FormuleVolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleVolumeHoraireAwareTrait.php', + 'Application\Service\Traits\TypeContratAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeContratAwareTrait.php', + 'Application\Service\Traits\TypeValidationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeValidationAwareTrait.php', 'Application\Service\Traits\TypeAgrementStatutAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeAgrementStatutAwareTrait.php', 'Application\Service\Traits\TypePieceJointeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypePieceJointeAwareTrait.php', 'Application\Service\Traits\FormuleServiceModifieAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleServiceModifieAwareTrait.php', 'Application\Service\Traits\VolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/VolumeHoraireAwareTrait.php', 'Application\Service\Traits\FonctionReferentielAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FonctionReferentielAwareTrait.php', 'Application\Service\Traits\TypeRessourceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeRessourceServiceAwareTrait.php', - 'Application\Service\Traits\PieceJointeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PieceJointeAwareTrait.php', - 'Application\Service\Traits\NotificationIndicateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/NotificationIndicateurAwareTrait.php', - 'Application\Service\Traits\ParametresAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ParametresAwareTrait.php', - 'Application\Service\Traits\SourceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/SourceAwareTrait.php', - 'Application\Service\Traits\GroupeTypeFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/GroupeTypeFormationAwareTrait.php', - 'Application\Service\Traits\ServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ServiceAwareTrait.php', - 'Application\Service\Traits\TypeModulateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeModulateurAwareTrait.php', + 'Application\Service\Traits\PieceJointeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PieceJointeAwareTrait.php', + 'Application\Service\Traits\NotificationIndicateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/NotificationIndicateurAwareTrait.php', + 'Application\Service\Traits\ParametresAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ParametresAwareTrait.php', + 'Application\Service\Traits\SourceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/SourceServiceAwareTrait.php', + 'Application\Service\Traits\GroupeTypeFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/GroupeTypeFormationAwareTrait.php', + 'Application\Service\Traits\ServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ServiceAwareTrait.php', + 'Application\Service\Traits\TypeModulateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeModulateurAwareTrait.php', 'Application\Service\Traits\MiseEnPaiementIntervenantStructureAwareTrait' => __DIR__ . '/src/Application/Service/Traits/MiseEnPaiementIntervenantStructureAwareTrait.php', 'Application\Service\Traits\ValidationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ValidationAwareTrait.php', 'Application\Service\Traits\TypePieceJointeStatutAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypePieceJointeStatutAwareTrait.php', 'Application\Service\Traits\CheminPedagogiqueAwareTrait' => __DIR__ . '/src/Application/Service/Traits/CheminPedagogiqueAwareTrait.php', 'Application\Service\Traits\TypeHeuresAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeHeuresAwareTrait.php', 'Application\Service\Traits\ServiceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ServiceServiceAwareTrait.php', - 'Application\Service\Traits\PaysAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PaysAwareTrait.php', - 'Application\Service\Traits\DisciplineServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DisciplineServiceAwareTrait.php', - 'Application\Service\Traits\DotationServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DotationServiceAwareTrait.php', - 'Application\Service\Traits\AgrementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AgrementAwareTrait.php', - 'Application\Service\Traits\DepartementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DepartementAwareTrait.php', - 'Application\Service\Traits\TypeStructureAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeStructureAwareTrait.php', - 'Application\Service\Traits\FormuleResultatServiceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleResultatServiceServiceAwareTrait.php', + 'Application\Service\Traits\PaysAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PaysAwareTrait.php', + 'Application\Service\Traits\DisciplineServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DisciplineServiceAwareTrait.php', + 'Application\Service\Traits\DotationServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DotationServiceAwareTrait.php', + 'Application\Service\Traits\AgrementServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AgrementServiceAwareTrait.php', + 'Application\Service\Traits\DepartementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DepartementAwareTrait.php', + 'Application\Service\Traits\TypeStructureAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeStructureAwareTrait.php', + 'Application\Service\Traits\FormuleResultatServiceServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleResultatServiceServiceAwareTrait.php', 'Application\Service\Traits\ContratAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ContratAwareTrait.php', 'Application\Service\Traits\DossierAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DossierAwareTrait.php', 'Application\Service\Traits\CentreCoutAwareTrait' => __DIR__ . '/src/Application/Service/Traits/CentreCoutAwareTrait.php', @@ -538,15 +538,15 @@ return array( 'Application\Service\Traits\ServiceAPayerAwareTrait' => __DIR__ . '/src/Application/Service/Traits/ServiceAPayerAwareTrait.php', 'Application\Service\Traits\LocalContextAwareTrait' => __DIR__ . '/src/Application/Service/Traits/LocalContextAwareTrait.php', 'Application\Service\Traits\FormuleResultatVolumeHoraireReferentielAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleResultatVolumeHoraireReferentielAwareTrait.php', - 'Application\Service\Traits\DomaineFonctionnelAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DomaineFonctionnelAwareTrait.php', - 'Application\Service\Traits\EtapeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtapeAwareTrait.php', - 'Application\Service\Traits\NiveauFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/NiveauFormationAwareTrait.php', - 'Application\Service\Traits\AffectationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AffectationAwareTrait.php', - 'Application\Service\Traits\WfEtapeDepServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/WfEtapeDepServiceAwareTrait.php', - 'Application\Service\Traits\AnneeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AnneeAwareTrait.php', - 'Application\Service\Traits\TypeFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeFormationAwareTrait.php', - 'Application\Service\Traits\FormuleIntervenantAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleIntervenantAwareTrait.php', - 'Application\Service\Traits\TypeIntervenantAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeIntervenantAwareTrait.php', + 'Application\Service\Traits\DomaineFonctionnelAwareTrait' => __DIR__ . '/src/Application/Service/Traits/DomaineFonctionnelAwareTrait.php', + 'Application\Service\Traits\EtapeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/EtapeAwareTrait.php', + 'Application\Service\Traits\NiveauFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/NiveauFormationAwareTrait.php', + 'Application\Service\Traits\AffectationServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AffectationServiceAwareTrait.php', + 'Application\Service\Traits\WfEtapeDepServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/WfEtapeDepServiceAwareTrait.php', + 'Application\Service\Traits\AnneeServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/AnneeServiceAwareTrait.php', + 'Application\Service\Traits\TypeFormationAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeFormationAwareTrait.php', + 'Application\Service\Traits\FormuleIntervenantAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleIntervenantAwareTrait.php', + 'Application\Service\Traits\TypeIntervenantAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeIntervenantAwareTrait.php', 'Application\Service\Traits\FormuleResultatServiceReferentielAwareTrait' => __DIR__ . '/src/Application/Service/Traits/FormuleResultatServiceReferentielAwareTrait.php', 'Application\Service\Traits\PrivilegeAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PrivilegeAwareTrait.php', 'Application\Service\Traits\PilotageServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PilotageServiceAwareTrait.php', @@ -559,13 +559,13 @@ return array( 'Application\Service\Traits\TblPieceJointeServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TblPieceJointeServiceAwareTrait.php', 'Application\Service\Traits\PrivilegeServiceAwareTrait' => __DIR__ . '/src/Application/Service/Traits/PrivilegeServiceAwareTrait.php', 'Application\Service\Traits\TypeVolumeHoraireAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeVolumeHoraireAwareTrait.php', - 'Application\Service\Traits\UtilisateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/UtilisateurAwareTrait.php', - 'Application\Service\Traits\TypeAgrementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeAgrementAwareTrait.php', - 'Application\Service\NotificationIndicateur' => __DIR__ . '/src/Application/Service/NotificationIndicateur.php', - 'Application\Service\Affectation' => __DIR__ . '/src/Application/Service/Affectation.php', - 'Application\Service\StatutIntervenant' => __DIR__ . '/src/Application/Service/StatutIntervenant.php', - 'Application\Service\GroupeTypeFormation' => __DIR__ . '/src/Application/Service/GroupeTypeFormation.php', - 'Application\Service\Contrat' => __DIR__ . '/src/Application/Service/Contrat.php', + 'Application\Service\Traits\UtilisateurAwareTrait' => __DIR__ . '/src/Application/Service/Traits/UtilisateurAwareTrait.php', + 'Application\Service\Traits\TypeAgrementAwareTrait' => __DIR__ . '/src/Application/Service/Traits/TypeAgrementAwareTrait.php', + 'Application\Service\NotificationIndicateur' => __DIR__ . '/src/Application/Service/NotificationIndicateur.php', + 'Application\Service\AffectationService' => __DIR__ . '/src/Application/Service/AffectationService.php', + 'Application\Service\StatutIntervenant' => __DIR__ . '/src/Application/Service/StatutIntervenant.php', + 'Application\Service\GroupeTypeFormation' => __DIR__ . '/src/Application/Service/GroupeTypeFormation.php', + 'Application\Service\Contrat' => __DIR__ . '/src/Application/Service/Contrat.php', 'Application\Service\TypeStructure' => __DIR__ . '/src/Application/Service/TypeStructure.php', 'Application\Service\MiseEnPaiement' => __DIR__ . '/src/Application/Service/MiseEnPaiement.php', 'Application\Service\Utilisateur' => __DIR__ . '/src/Application/Service/Utilisateur.php', @@ -597,13 +597,13 @@ return array( 'Application\Service\TypeIntervention' => __DIR__ . '/src/Application/Service/TypeIntervention.php', 'Application\Service\TypeIntervenant' => __DIR__ . '/src/Application/Service/TypeIntervenant.php', 'Application\Service\FormuleResultatServiceReferentiel' => __DIR__ . '/src/Application/Service/FormuleResultatServiceReferentiel.php', - 'Application\Service\AbstractService' => __DIR__ . '/src/Application/Service/AbstractService.php', - 'Application\Service\TypeAgrementStatut' => __DIR__ . '/src/Application/Service/TypeAgrementStatut.php', - 'Application\Service\FonctionReferentiel' => __DIR__ . '/src/Application/Service/FonctionReferentiel.php', - 'Application\Service\Agrement' => __DIR__ . '/src/Application/Service/Agrement.php', - 'Application\Service\Personnel' => __DIR__ . '/src/Application/Service/Personnel.php', + 'Application\Service\AbstractService' => __DIR__ . '/src/Application/Service/AbstractService.php', + 'Application\Service\TypeAgrementStatut' => __DIR__ . '/src/Application/Service/TypeAgrementStatut.php', + 'Application\Service\FonctionReferentiel' => __DIR__ . '/src/Application/Service/FonctionReferentiel.php', + 'Application\Service\AgrementService' => __DIR__ . '/src/Application/Service/AgrementService.php', + 'Application\Service\Personnel' => __DIR__ . '/src/Application/Service/Personnel.php', 'Application\Service\ElementModulateur' => __DIR__ . '/src/Application/Service/ElementModulateur.php', - 'Application\Service\Source' => __DIR__ . '/src/Application/Service/Source.php', + 'Application\Service\SourceService' => __DIR__ . '/src/Application/Service/SourceService.php', 'Application\Service\FormuleIntervenant' => __DIR__ . '/src/Application/Service/FormuleIntervenant.php', 'Application\Service\WfEtape' => __DIR__ . '/src/Application/Service/WfEtape.php', 'Application\Service\TypePieceJointeStatutService' => __DIR__ . '/src/Application/Service/TypePieceJointeStatutService.php', diff --git a/module/Application/config/aaa_module.config.php b/module/Application/config/aaa_module.config.php index b22f0e41137767e0b19f5780ae78667a80970c90..77ae39949a9fc664446a4f8b6d6c5c69b585ca26 100755 --- a/module/Application/config/aaa_module.config.php +++ b/module/Application/config/aaa_module.config.php @@ -130,22 +130,22 @@ return [ ], 'service_manager' => [ 'invokables' => [ - 'ApplicationAnnee' => Service\Annee::class, - Service\ContextService::class => Service\ContextService::class, - 'ApplicationLocalContext' => Service\LocalContext::class, - 'ApplicationParametres' => Service\Parametres::class, - 'ApplicationUtilisateur' => Service\Utilisateur::class, - 'ApplicationTypeIntervention' => Service\TypeIntervention::class, - 'ApplicationSource' => Service\Source::class, - 'ApplicationAffectation' => Service\Affectation::class, - 'ApplicationRole' => Service\Role::class, - 'ApplicationPays' => Service\Pays::class, - 'ApplicationDepartement' => Service\Departement::class, - 'applicationFichier' => Service\FichierService::class, - 'applicationTauxHoraireHETD' => Service\TauxHoraireHETDService::class, - 'dbEvent' => Service\DbEventService::class, - 'UnicaenAuth\Service\Privilege' => Service\PrivilegeService::class, - 'assertionInformation' => Assertion\InformationAssertion::class, + Service\AnneeService::class => Service\AnneeService::class, + Service\ContextService::class => Service\ContextService::class, + 'ApplicationLocalContext' => Service\LocalContext::class, + 'ApplicationParametres' => Service\Parametres::class, + 'ApplicationUtilisateur' => Service\Utilisateur::class, + 'ApplicationTypeIntervention' => Service\TypeIntervention::class, + Service\SourceService::class => Service\SourceService::class, + Service\AffectationService::class => Service\AffectationService::class, + 'ApplicationRole' => Service\Role::class, + 'ApplicationPays' => Service\Pays::class, + 'ApplicationDepartement' => Service\Departement::class, + 'applicationFichier' => Service\FichierService::class, + 'applicationTauxHoraireHETD' => Service\TauxHoraireHETDService::class, + 'dbEvent' => Service\DbEventService::class, + 'UnicaenAuth\Service\Privilege' => Service\PrivilegeService::class, + 'assertionInformation' => Assertion\InformationAssertion::class, ], 'factories' => [ 'navigation' => Service\NavigationFactoryFactory::class, diff --git a/module/Application/config/agrement.config.php b/module/Application/config/agrement.config.php index 19a371392ee51bcede7d85019190822823d133ae..81e3aad46abef1875e7ef2087b8d9dd270fda2f2 100644 --- a/module/Application/config/agrement.config.php +++ b/module/Application/config/agrement.config.php @@ -20,46 +20,46 @@ return [ 'intervenant' => '[0-9]*', ], 'defaults' => [ - 'controller' => 'Agrement', + 'controller' => 'AgrementService', 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ - 'conseil-academique' => [ + 'conseil-academique' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/conseil-academique', - 'defaults' => [ - 'action' => 'lister', + 'route' => '/conseil-academique', + 'defaults' => [ + 'action' => 'lister', 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], ], ], - 'conseil-restreint' => [ + 'conseil-restreint' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/conseil-restreint', - 'defaults' => [ - 'action' => 'lister', + 'route' => '/conseil-restreint', + 'defaults' => [ + 'action' => 'lister', 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], ], ], - 'ajouter' => [ + 'ajouter' => [ 'type' => 'Segment', 'options' => [ 'route' => '/:typeAgrement/ajouter[/:structure]', 'constraints' => [ 'typeAgrement' => '[0-9]*', - 'structure' => '[0-9]*', + 'structure' => '[0-9]*', ], 'defaults' => [ 'action' => 'saisir', ], ], ], - 'voir' => [ + 'voir' => [ 'type' => 'Segment', 'options' => [ 'route' => '/voir/:agrement', @@ -71,7 +71,7 @@ return [ ], ], ], - 'saisir' => [ + 'saisir' => [ 'type' => 'Segment', 'options' => [ 'route' => '/saisir/[:agrement]', @@ -83,7 +83,7 @@ return [ ], ], ], - 'supprimer' => [ + 'supprimer' => [ 'type' => 'Segment', 'options' => [ 'route' => '/supprimer/[:agrement]', @@ -106,37 +106,37 @@ return [ 'options' => [ 'route' => '/agrement', 'defaults' => [ - 'controller' => 'Agrement', + 'controller' => 'AgrementService', 'action' => 'index', ], ], 'may_terminate' => true, 'child_routes' => [ - 'conseil-academique' => [ + 'conseil-academique' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/conseil-academique', - 'defaults' => [ - 'action' => 'saisir-lot', + 'route' => '/conseil-academique', + 'defaults' => [ + 'action' => 'saisir-lot', 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE, ], ], ], - 'conseil-restreint' => [ + 'conseil-restreint' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/conseil-restreint', - 'defaults' => [ - 'action' => 'saisir-lot', + 'route' => '/conseil-restreint', + 'defaults' => [ + 'action' => 'saisir-lot', 'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT, ], ], ], - 'export-csv' => [ + 'export-csv' => [ 'type' => 'Literal', 'options' => [ - 'route' => '/export-csv', - 'defaults' => [ + 'route' => '/export-csv', + 'defaults' => [ 'action' => 'export-csv', ], ], @@ -207,7 +207,7 @@ return [ 'resource' => PrivilegeController::getResourceId('Application\Controller\Agrement', 'saisir-lot'), 'visible' => 'AssertionAgrement', ], - 'export-csv' => [ + 'export-csv' => [ 'label' => 'Export CSV', 'description' => 'Export CSV des agrément donnés ou en attente', 'title' => 'Export CSV', @@ -249,12 +249,12 @@ return [ 'controller' => 'Application\Controller\Agrement', 'action' => ['export-csv'], 'privileges' => [ - Privileges::AGREMENT_EXPORT_CSV + Privileges::AGREMENT_EXPORT_CSV, ], ], [ 'controller' => 'Application\Controller\Agrement', - 'action' => ['supprimer'], + 'action' => ['supprimer'], 'privileges' => [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, @@ -265,8 +265,8 @@ return [ ], 'resource_providers' => [ 'BjyAuthorize\Provider\Resource\Config' => [ - 'Agrement' => [], - 'TblAgrement' => [], + 'AgrementService' => [], + 'TblAgrement' => [], ], ], 'rule_providers' => [ @@ -277,9 +277,9 @@ return [ Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION, Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION, Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION, - Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION + Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION, ], - 'resources' => ['TblAgrement', 'Agrement', 'Structure'], + 'resources' => ['TblAgrement', 'AgrementService', 'StructureService'], 'assertion' => 'AssertionAgrement', ], ], @@ -293,7 +293,7 @@ return [ ], 'service_manager' => [ 'invokables' => [ - 'ApplicationAgrement' => Service\Agrement::class, + Service\AgrementService::class => Service\AgrementService::class, 'ApplicationTblAgrement' => Service\TblAgrementService::class, 'ApplicationTypeAgrement' => Service\TypeAgrement::class, 'ApplicationTypeAgrementStatut' => Service\TypeAgrementStatut::class, diff --git a/module/Application/config/budget.config.php b/module/Application/config/budget.config.php index a19c56f8e9e2327f88d3cee525009b089d57de83..5089700f0c06dda5712a1b24853acb6f6df011fc 100644 --- a/module/Application/config/budget.config.php +++ b/module/Application/config/budget.config.php @@ -250,7 +250,7 @@ return [ Privileges::BUDGET_EDITION_ENGAGEMENT_COMPOSANTE, Privileges::BUDGET_EDITION_ENGAGEMENT_ETABLISSEMENT, ], - 'resources' => ['Dotation', 'Structure', 'TypeRessource'], + 'resources' => ['Dotation', 'StructureService', 'TypeRessource'], 'assertion' => 'assertionBudget', ], ], diff --git a/module/Application/config/chargens.config.php b/module/Application/config/chargens.config.php index 9146f4b85b00e68bace807eb245fc2a2c8e7d6d0..91012f99ede2bcb5a6ed3d00ca5a68c3a9c1262e 100644 --- a/module/Application/config/chargens.config.php +++ b/module/Application/config/chargens.config.php @@ -331,7 +331,7 @@ return [ 'allow' => [ [ 'privileges' => ChargensAssertion::SCENARIO_EDITION, - 'resources' => ['Scenario', 'Structure'], + 'resources' => ['Scenario', 'StructureService'], 'assertion' => 'AssertionChargens', ], [ @@ -339,7 +339,7 @@ return [ Privileges::CHARGENS_SEUIL_ETABLISSEMENT_EDITION, Privileges::CHARGENS_SEUIL_COMPOSANTE_EDITION, ], - 'resources' => ['Structure'], + 'resources' => ['StructureService'], 'assertion' => 'AssertionChargens', ], ], diff --git a/module/Application/config/modulateur.config.php b/module/Application/config/modulateur.config.php index 63c0d3d0d53242101567fcfaa90e0cecb2c3a82e..53bcfeea559e3e40506d523cefd835cf91538f2e 100644 --- a/module/Application/config/modulateur.config.php +++ b/module/Application/config/modulateur.config.php @@ -123,7 +123,7 @@ return [ 'allow' => [ [ 'privileges' => Privileges::MODULATEUR_VISUALISATION, - 'resources' => ['TypeModulateur', 'Structure'], + 'resources' => ['TypeModulateur', 'StructureService'], 'assertion' => 'assertionModulateur', ], ], diff --git a/module/Application/config/offre-formation.config.php b/module/Application/config/offre-formation.config.php index 0225b67ec4c6d713c5c4a99098f0aa58146ad472..371d4d5b569a27e21025886b90768f8d61c68c0d 100644 --- a/module/Application/config/offre-formation.config.php +++ b/module/Application/config/offre-formation.config.php @@ -292,32 +292,32 @@ return [ 'allow' => [ [ 'privileges' => Privileges::ODF_ELEMENT_EDITION, - 'resources' => ['ElementPedagogique', 'Structure'], + 'resources' => ['ElementPedagogique', 'StructureService'], 'assertion' => 'AssertionOffreDeFormation', ], [ 'privileges' => Privileges::ODF_ETAPE_EDITION, - 'resources' => ['Etape', 'Structure'], + 'resources' => ['Etape', 'StructureService'], 'assertion' => 'AssertionOffreDeFormation', ], [ 'privileges' => Privileges::ODF_CENTRES_COUT_EDITION, - 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'CentreCoutEp'], + 'resources' => ['Etape', 'StructureService', 'ElementPedagogique', 'CentreCoutEp'], 'assertion' => 'AssertionOffreDeFormation', ], [ 'privileges' => Privileges::ODF_MODULATEURS_EDITION, - 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'ElementModulateur'], + 'resources' => ['Etape', 'StructureService', 'ElementPedagogique', 'ElementModulateur'], 'assertion' => 'AssertionOffreDeFormation', ], [ 'privileges' => Privileges::ODF_TAUX_MIXITE_EDITION, - 'resources' => ['Etape', 'Structure', 'ElementPedagogique'], + 'resources' => ['Etape', 'StructureService', 'ElementPedagogique'], 'assertion' => 'AssertionOffreDeFormation', ], [ 'privileges' => Privileges::ODF_ELEMENT_VH_EDITION, - 'resources' => ['Etape', 'Structure', 'ElementPedagogique','VolumeHoraireEns','TypeIntervention'], + 'resources' => ['Etape', 'StructureService', 'ElementPedagogique','VolumeHoraireEns','TypeIntervention'], 'assertion' => 'AssertionOffreDeFormation', ], ], diff --git a/module/Application/config/service.config.php b/module/Application/config/service.config.php index dcfe5c381ff1f715bb0f6268c22803f0a4aada0d..3892706ac5a9d91de30976f0f2db1f51a389cfb2 100644 --- a/module/Application/config/service.config.php +++ b/module/Application/config/service.config.php @@ -462,16 +462,16 @@ return [ ], 'service_manager' => [ 'invokables' => [ - 'ApplicationService' => Service\ServiceService::class, - 'ApplicationServiceReferentiel' => Service\ServiceReferentiel::class, - 'ApplicationFonctionReferentiel' => Service\FonctionReferentiel::class, - 'ApplicationPeriode' => Service\Periode::class, - 'ApplicationMotifNonPaiement' => Service\MotifNonPaiement::class, - 'ApplicationModificationServiceDu' => Service\ModificationServiceDu::class, - 'ApplicationCampagneSaisie' => Service\CampagneSaisieService::class, - 'assertionService' => Assertion\ServiceAssertion::class, - 'processusService' => Processus\ServiceProcessus::class, - 'processusServiceReferentiel' => Processus\ServiceReferentielProcessus::class, + 'ApplicationService' => Service\ServiceService::class, + 'ApplicationServiceReferentiel' => Service\ServiceReferentiel::class, + 'ApplicationFonctionReferentiel' => Service\FonctionReferentiel::class, + 'ApplicationPeriode' => Service\Periode::class, + 'ApplicationMotifNonPaiement' => Service\MotifNonPaiement::class, + 'ApplicationModificationServiceDu' => Service\ModificationServiceDu::class, + Service\CampagneSaisieService::class => Service\CampagneSaisieService::class, + 'assertionService' => Assertion\ServiceAssertion::class, + 'processusService' => Processus\ServiceProcessus::class, + 'processusServiceReferentiel' => Processus\ServiceReferentielProcessus::class, ], ], 'hydrators' => [ diff --git a/module/Application/config/structure.config.php b/module/Application/config/structure.config.php index eb79a6cbe1e8e9bd603c761ca37dafd8bcc61076..64119a76d829c7181d2738eaccee3ba413f0ed38 100644 --- a/module/Application/config/structure.config.php +++ b/module/Application/config/structure.config.php @@ -3,28 +3,28 @@ namespace Application; return [ - 'router' => [ + 'router' => [ 'routes' => [ 'structure' => [ - 'type' => 'Literal', - 'options' => [ - 'route' => '/structure', + 'type' => 'Literal', + 'options' => [ + 'route' => '/structure', 'defaults' => [ - '__NAMESPACE__' => 'Application\Controller', - 'controller' => 'Structure', + '__NAMESPACE__' => 'Application\Controller', + 'controller' => 'StructureService', 'action' => 'index', ], ], 'may_terminate' => true, - 'child_routes' => [ - 'modifier' => [ + 'child_routes' => [ + 'modifier' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/modifier/:id', + 'route' => '/modifier/:id', 'constraints' => [ 'id' => '[0-9]*', ], - 'defaults' => [ + 'defaults' => [ 'action' => 'modifier', ], ], @@ -38,15 +38,15 @@ return [ ], ], ], - 'default' => [ + 'default' => [ 'type' => 'Segment', 'options' => [ - 'route' => '/:action[/:id]', + 'route' => '/:action[/:id]', 'constraints' => [ 'action' => '[a-zA-Z][a-zA-Z0-9_-]*', 'id' => '[0-9]*', ], - 'defaults' => [ + 'defaults' => [ 'action' => 'index', ], ], @@ -55,25 +55,25 @@ return [ ], ], ], - 'navigation' => [ + 'navigation' => [ 'default' => [ 'home' => [ 'pages' => [ 'structure' => [ - 'label' => 'Structures', - 'title' => "Gestion des structures", - 'route' => 'structure', - 'visible' => false, - 'params' => [ + 'label' => 'Structures', + 'title' => "Gestion des structures", + 'route' => 'structure', + 'visible' => false, + 'params' => [ 'action' => 'index', ], - 'pages' => [ + 'pages' => [ 'voir' => [ - 'label' => "Voir", - 'title' => "Voir une structure", - 'route' => 'structure', + 'label' => "Voir", + 'title' => "Voir une structure", + 'route' => 'structure', 'visible' => false, - 'pages' => [], + 'pages' => [], ], ], ], @@ -81,42 +81,42 @@ return [ ], ], ], - 'bjyauthorize' => [ - 'guards' => [ + 'bjyauthorize' => [ + 'guards' => [ 'BjyAuthorize\Guard\Controller' => [ [ 'controller' => 'Application\Controller\Structure', - 'action' => ['voir', 'apercevoir'], - 'roles' => ['user'] + 'action' => ['voir', 'apercevoir'], + 'roles' => ['user'], ], [ 'controller' => 'Application\Controller\Structure', - 'action' => ['index', 'choisir', 'recherche'], - 'roles' => ['user'] + 'action' => ['index', 'choisir', 'recherche'], + 'roles' => ['user'], ], ], ], 'resource_providers' => [ 'BjyAuthorize\Provider\Resource\Config' => [ - 'Structure' => [], + 'StructureService' => [], ], ], ], - 'controllers' => [ + 'controllers' => [ 'invokables' => [ - 'Application\Controller\Structure' => Controller\StructureController::class, + 'Application\Controller\Structure' => Controller\StructureController::class, ], ], 'service_manager' => [ 'invokables' => [ - 'ApplicationPersonnel' => Service\Personnel::class, - 'ApplicationStructure' => Service\Structure::class, - 'ApplicationTypeStructure' => Service\TypeStructure::class, - ] + 'ApplicationPersonnel' => Service\Personnel::class, + Service\StructureService::class => Service\StructureService::class, + 'ApplicationTypeStructure' => Service\TypeStructure::class, + ], ], - 'view_helpers' => [ + 'view_helpers' => [ 'invokables' => [ - 'structure' => View\Helper\StructureViewHelper::class, + 'structure' => View\Helper\StructureViewHelper::class, ], ], ]; diff --git a/module/Application/src/Application/Controller/AgrementController.php b/module/Application/src/Application/Controller/AgrementController.php index be0fc1a20e57f148ac78dfb44696df75d52534f2..ba10d141aaa24368476ee9f430bb8b3af69f4926 100644 --- a/module/Application/src/Application/Controller/AgrementController.php +++ b/module/Application/src/Application/Controller/AgrementController.php @@ -9,10 +9,11 @@ use Application\Entity\Db\TblWorkflow; use Application\Entity\Db\TypeAgrement; use Application\Form\Agrement\Traits\SaisieAwareTrait; use Application\Provider\Privilege\Privileges; -use Application\Service\Traits\AgrementAwareTrait; +use Application\Service\AgrementService; +use Application\Service\Traits\AgrementServiceAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\ServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TblAgrementServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; use UnicaenApp\View\Model\CsvModel; @@ -28,12 +29,12 @@ use Application\Service\Traits\ContextServiceAwareTrait; class AgrementController extends AbstractController { use TblAgrementServiceAwareTrait; - use AgrementAwareTrait; + use AgrementServiceAwareTrait; use IntervenantAwareTrait; use ServiceAwareTrait; use ContextServiceAwareTrait; use SaisieAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use WorkflowServiceAwareTrait; @@ -97,7 +98,7 @@ class AgrementController extends AbstractController $qb = $this->getServiceTblAgrement()->finderByTypeAgrement($typeAgrement); $this->getServiceTblAgrement()->finderByIntervenant($intervenant, $qb); - $this->getServiceTblAgrement()->leftJoin('applicationAgrement', $qb, 'agrement', true); + $this->getServiceTblAgrement()->leftJoin(AgrementService::class, $qb, 'agrement', true); $tas = $this->getServiceTblAgrement()->getList($qb); /* @var $tas TblAgrement[] */ diff --git a/module/Application/src/Application/Controller/BudgetController.php b/module/Application/src/Application/Controller/BudgetController.php index 3f4ab2abf3d9d0b9d67069b055b181e814b2b63c..e3b6dd3f28fa9b2a7c217ce238872c6cb160a44e 100644 --- a/module/Application/src/Application/Controller/BudgetController.php +++ b/module/Application/src/Application/Controller/BudgetController.php @@ -5,19 +5,19 @@ namespace Application\Controller; use Application\Entity\Db\Dotation; use Application\Entity\Db\Structure; use Application\Form\Budget\Traits\DotationSaisieFormAwareTrait; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\FormuleResultatAwareTrait; use Application\Entity\Db\TypeRessource; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\DotationServiceAwareTrait; use Application\Service\Traits\MiseEnPaiementAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeRessourceServiceAwareTrait; use UnicaenApp\View\Model\CsvModel; use Zend\Form\Element\Select; use Application\Entity\Db\TypeDotation; use Application\Service\Traits\TypeDotationServiceAwareTrait; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Application\Exception\DbException; use Application\Form\Budget\Traits\TypeDotationSaisieFormAwareTrait; @@ -27,17 +27,17 @@ use Application\Form\Budget\Traits\TypeDotationSaisieFormAwareTrait; */ class BudgetController extends AbstractController { - use StructureAwareTrait; + use StructureServiceAwareTrait; use ContextServiceAwareTrait; use TypeRessourceServiceAwareTrait; use DotationServiceAwareTrait; use FormuleResultatAwareTrait; use DotationSaisieFormAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; use MiseEnPaiementAwareTrait; use TypeDotationServiceAwareTrait; use TypeDotationSaisieFormAwareTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; @@ -269,9 +269,9 @@ class BudgetController extends AbstractController 'intervenant-grade-libelle' => 'Grade', 'intervenant-discipline-code' => 'Discipline intervenant (Code)', 'intervenant-discipline-libelle' => 'Discipline intervenant', - 'service-structure-aff-libelle' => 'Structure d\'affectation', + 'service-structure-aff-libelle' => 'StructureService d\'affectation', - 'service-structure-ens-libelle' => 'Structure d\'enseignement', + 'service-structure-ens-libelle' => 'StructureService d\'enseignement', 'groupe-type-formation-libelle' => 'Groupe de type de formation', 'type-formation-libelle' => 'Type de formation', 'etape-niveau' => 'Niveau', @@ -285,7 +285,7 @@ class BudgetController extends AbstractController 'element-taux-fc' => 'Taux FC', 'element-taux-fa' => 'Taux FA', 'commentaires' => 'Commentaires', - 'element-source-libelle' => 'Source enseignement', + 'element-source-libelle' => 'SourceService enseignement', 'type-ressource-libelle' => 'Enveloppe', 'centre-couts-code' => 'Centre de coûts ou EOTP (code)', diff --git a/module/Application/src/Application/Controller/ChargensController.php b/module/Application/src/Application/Controller/ChargensController.php index 33ab3040e9caa21a90346ca3aec90b62fe9d8a50..272b3ba82f8adadb1504342cf783bbcb257342c3 100644 --- a/module/Application/src/Application/Controller/ChargensController.php +++ b/module/Application/src/Application/Controller/ChargensController.php @@ -15,7 +15,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\ScenarioServiceAwareTrait; use Application\Service\Traits\SeuilChargeServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use BjyAuthorize\Exception\UnAuthorizedException; use UnicaenApp\Util; use UnicaenApp\View\Model\CsvModel; @@ -33,7 +33,7 @@ class ChargensController extends AbstractController { use ChargensProviderAwareTrait; use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EtapeAwareTrait; use ScenarioServiceAwareTrait; use FiltreFormAwareTrait; @@ -461,8 +461,8 @@ class ChargensController extends AbstractController 'intervenant_statut_libelle' => 'Statut intervenant', 'intervenant_type_code' => 'Type d\'intervenant (Code)', 'intervenant_type_libelle' => 'Type d\'intervenant', - 'structure_aff_libelle' => 'Structure d\'affectation', - 'structure_ens_libelle' => 'Structure d\'enseignement', + 'structure_aff_libelle' => 'StructureService d\'affectation', + 'structure_ens_libelle' => 'StructureService d\'enseignement', 'groupe_type_formation_libelle' => 'Groupe de type de formation', 'type_formation_libelle' => 'Type de formation', 'etape_niveau' => 'Niveau', @@ -473,7 +473,7 @@ class ChargensController extends AbstractController 'element_taux_fi' => 'Taux FI', 'element_taux_fc' => 'Taux FC', 'element_taux_fa' => 'Taux FA', - 'element_source_libelle' => 'Source enseignement', + 'element_source_libelle' => 'SourceService enseignement', 'periode' => 'Période', 'type_intervention_code' => 'Type d\'intervention', 'heures_service' => 'Heures (service)', diff --git a/module/Application/src/Application/Controller/DisciplineController.php b/module/Application/src/Application/Controller/DisciplineController.php index 54265ddc9ef4dce0d83c295328024cf4063455d0..2354abaececb611a6c2521c5c89ca91ce13b9750 100644 --- a/module/Application/src/Application/Controller/DisciplineController.php +++ b/module/Application/src/Application/Controller/DisciplineController.php @@ -6,7 +6,7 @@ use Application\Entity\Db\Discipline; use Application\Form\Traits\DisciplineFormAwareTrait; use Application\Service\Traits\DisciplineServiceAwareTrait; use Application\Service\Traits\ParametresAwareTrait; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Application\Exception\DbException; @@ -18,7 +18,7 @@ use Application\Exception\DbException; class DisciplineController extends AbstractController { use DisciplineServiceAwareTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; use DisciplineFormAwareTrait; use ParametresAwareTrait; diff --git a/module/Application/src/Application/Controller/DroitsController.php b/module/Application/src/Application/Controller/DroitsController.php index 983f3e4cf0d1b236547df96a04c638d527c66ca4..2d96d9c1dd356f5cd0b1a226eabfd25c86f9fcdc 100644 --- a/module/Application/src/Application/Controller/DroitsController.php +++ b/module/Application/src/Application/Controller/DroitsController.php @@ -5,13 +5,13 @@ namespace Application\Controller; use Application\Entity\Db\Affectation; use Application\Entity\Db\Role; use Application\Form\Droits\Traits\AffectationFormAwareTrait; -use Application\Service\Traits\AffectationAwareTrait; +use Application\Service\Traits\AffectationServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\PersonnelAwareTrait; use Application\Service\Traits\RoleAwareTrait; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Application\Service\Traits\StatutIntervenantAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Form\Droits\Traits\RoleFormAwareTrait; use UnicaenAuth\Service\Traits\PrivilegeServiceAwareTrait; use Application\Entity\Db\StatutIntervenant; @@ -29,10 +29,10 @@ class DroitsController extends AbstractController use RoleAwareTrait; use StatutIntervenantAwareTrait; use PrivilegeServiceAwareTrait; - use AffectationAwareTrait; - use StructureAwareTrait; + use AffectationServiceAwareTrait; + use StructureServiceAwareTrait; use PersonnelAwareTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; use RoleFormAwareTrait; use AffectationFormAwareTrait; use ContextServiceAwareTrait; diff --git a/module/Application/src/Application/Controller/IndexController.php b/module/Application/src/Application/Controller/IndexController.php index fe6a4e73363bb6461712f4d2c6de7481749c5725..6c1d40cfc18b88c98e660aa10b9b7a7bb5e17425 100755 --- a/module/Application/src/Application/Controller/IndexController.php +++ b/module/Application/src/Application/Controller/IndexController.php @@ -14,7 +14,7 @@ use Zend\View\Model\ViewModel; class IndexController extends AbstractController { use \Application\Service\Traits\ContextServiceAwareTrait; - use \Application\Service\Traits\AnneeAwareTrait; + use \Application\Service\Traits\AnneeServiceAwareTrait; use IntervenantAwareTrait; use UserContextServiceAwareTrait; diff --git a/module/Application/src/Application/Controller/IndicateurController.php b/module/Application/src/Application/Controller/IndicateurController.php index e59c2500d923e6090024315bf82fdebefef33384..901b447ab8b8f8f2d126813fcdf523f4ea4af5f4 100644 --- a/module/Application/src/Application/Controller/IndicateurController.php +++ b/module/Application/src/Application/Controller/IndicateurController.php @@ -7,7 +7,7 @@ use Application\Entity\Db\Intervenant; use Application\Entity\Db\Structure; use Application\Processus\Traits\IndicateurProcessusAwareTrait; use Application\Entity\Db\Indicateur; -use Application\Service\Traits\AffectationAwareTrait; +use Application\Service\Traits\AffectationServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\DossierAwareTrait; use Application\Service\Traits\IndicateurServiceAwareTrait; @@ -38,7 +38,7 @@ class IndicateurController extends AbstractController use IntervenantAwareTrait; use ContextServiceAwareTrait; use NotificationIndicateurAwareTrait; - use AffectationAwareTrait; + use AffectationServiceAwareTrait; use IndicateurProcessusAwareTrait; use DossierAwareTrait; use TypeVolumeHoraireAwareTrait; diff --git a/module/Application/src/Application/Controller/OffreFormationController.php b/module/Application/src/Application/Controller/OffreFormationController.php index ef397553d1fd25813ff631c60b38b9d5233cc967..b554d7565f586733ec3bb583235ab981485140ab 100644 --- a/module/Application/src/Application/Controller/OffreFormationController.php +++ b/module/Application/src/Application/Controller/OffreFormationController.php @@ -13,7 +13,7 @@ use Application\Service\Traits\ElementPedagogiqueAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; use Application\Service\Traits\NiveauEtapeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\View\Model\CsvModel; use Zend\Session\Container; @@ -27,7 +27,7 @@ class OffreFormationController extends AbstractController { use ContextServiceAwareTrait; use LocalContextAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ElementPedagogiqueAwareTrait; use EtapeAwareTrait; use NiveauEtapeAwareTrait; diff --git a/module/Application/src/Application/Controller/PaiementController.php b/module/Application/src/Application/Controller/PaiementController.php index 78145bde98b8d889aaa37f9e1320a65c1c00c32c..b3353233647757e642c0c96e459b8c00dcb026e2 100644 --- a/module/Application/src/Application/Controller/PaiementController.php +++ b/module/Application/src/Application/Controller/PaiementController.php @@ -21,7 +21,7 @@ use Application\Service\Traits\PeriodeAwareTrait; use Application\Service\Traits\PersonnelAwareTrait; use Application\Service\Traits\ServiceAPayerAwareTrait; use Application\Service\Traits\ServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeIntervenantAwareTrait; use Application\Service\Traits\TypeRessourceServiceAwareTrait; use Application\Service\Traits\WorkflowServiceAwareTrait; @@ -39,7 +39,7 @@ class PaiementController extends AbstractController use ContextServiceAwareTrait; use IntervenantAwareTrait; use ServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use PersonnelAwareTrait; use PeriodeAwareTrait; use MiseEnPaiementAwareTrait; diff --git a/module/Application/src/Application/Controller/ParametreController.php b/module/Application/src/Application/Controller/ParametreController.php index 5de9960ac5c8927db03a6213bcecf96a902f80f0..e312b4ece587a4d0bc37f87a6bfe9118e9f2d09f 100755 --- a/module/Application/src/Application/Controller/ParametreController.php +++ b/module/Application/src/Application/Controller/ParametreController.php @@ -6,7 +6,7 @@ use Application\Form\CampagneSaisieFieldset; use Application\Form\Traits\CampagneSaisieFormAwareTrait; use Application\Form\Traits\ParametresFormAwareTrait; use Application\Provider\Privilege\Privileges; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\CampagneSaisieServiceAwareTrait; use Application\Service\Traits\EtablissementAwareTrait; use Application\Service\Traits\ParametresAwareTrait; @@ -27,7 +27,7 @@ class ParametreController extends AbstractController use ParametresAwareTrait; use EtablissementAwareTrait; use PersonnelAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; use TypeIntervenantAwareTrait; use TypeVolumeHoraireAwareTrait; use CampagneSaisieServiceAwareTrait; @@ -103,7 +103,7 @@ class ParametreController extends AbstractController $this->getServiceCampagneSaisie()->save($campagne); } }); - } + } } } diff --git a/module/Application/src/Application/Controller/PilotageController.php b/module/Application/src/Application/Controller/PilotageController.php index 2fd88d33f04a4cdfe741783791b2c23a0dbbb074..b6d6b85c74395896a2ebd7ff5893244712f5d8d8 100644 --- a/module/Application/src/Application/Controller/PilotageController.php +++ b/module/Application/src/Application/Controller/PilotageController.php @@ -32,7 +32,7 @@ class PilotageController extends AbstractController 'Année', 'État', 'Type d\'heures', - 'Structure', + 'StructureService', 'Intervenant (type)', 'Intervenant (code)', 'Intervenant', diff --git a/module/Application/src/Application/Controller/RechercheController.php b/module/Application/src/Application/Controller/RechercheController.php index 29e806aa6e9fd9cc62a39a7ce984c70dbbe2995c..efd352db14646731ac4861c5ea6cc254aed622f1 100644 --- a/module/Application/src/Application/Controller/RechercheController.php +++ b/module/Application/src/Application/Controller/RechercheController.php @@ -4,6 +4,7 @@ namespace Application\Controller; use Application\Constants; use Application\Processus\Traits\IntervenantProcessusAwareTrait; +use Application\Service\StructureService; use Application\Service\Traits\PersonnelAwareTrait; use Zend\View\Model\JsonModel; @@ -59,7 +60,7 @@ class RechercheController extends AbstractController } $qb = $this->getServicePersonnel()->finderByTerm($term); - $this->getServicePersonnel()->join('applicationStructure', $qb, 'structure'); + $this->getServicePersonnel()->join(StructureService::class, $qb, 'structure'); $personnels = $this->getServicePersonnel()->getList($qb); $result = []; diff --git a/module/Application/src/Application/Controller/ServiceController.php b/module/Application/src/Application/Controller/ServiceController.php index d1882bf8eecd527e61d9607997296544e214c4d6..a93c515d83e2a430b01b4df9255f9123054983e3 100644 --- a/module/Application/src/Application/Controller/ServiceController.php +++ b/module/Application/src/Application/Controller/ServiceController.php @@ -33,7 +33,7 @@ use Application\Service\Traits\TypeInterventionAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\ServiceReferentielAwareTrait; use Application\Service\Traits\EtatVolumeHoraireAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\PeriodeAwareTrait; @@ -54,7 +54,7 @@ class ServiceController extends AbstractController use IntervenantAwareTrait; use ServiceReferentielAwareTrait; use EtatVolumeHoraireAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EtapeAwareTrait; use PeriodeAwareTrait; use LocalContextAwareTrait; diff --git a/module/Application/src/Application/Controller/StructureController.php b/module/Application/src/Application/Controller/StructureController.php index 06629e63696469e0403c228843db4ad9b5c1198d..43d86f3cb74693bf36930c24a489d1e23fb707b3 100644 --- a/module/Application/src/Application/Controller/StructureController.php +++ b/module/Application/src/Application/Controller/StructureController.php @@ -14,7 +14,7 @@ use Zend\View\Model\JsonModel; class StructureController extends AbstractController { use \Application\Service\Traits\ContextServiceAwareTrait; - use \Application\Service\Traits\StructureAwareTrait; + use \Application\Service\Traits\StructureServiceAwareTrait; @@ -83,10 +83,10 @@ class StructureController extends AbstractController throw new LogicException("Aucun identifiant de structure spécifié."); } if (!($structure = $this->getServiceStructure()->get($id))) { - throw new RuntimeException("Structure '$id' spécifiée introuvable."); + throw new RuntimeException("StructureService '$id' spécifiée introuvable."); } - $title = "Structure"; + $title = "StructureService"; return compact('structure', 'title'); } diff --git a/module/Application/src/Application/Controller/UtilisateurController.php b/module/Application/src/Application/Controller/UtilisateurController.php index 86d1088f89eaf4285e5b709e8e12b5b672a41b98..7401c814a67857d2921c778e95ff36309d739a5e 100644 --- a/module/Application/src/Application/Controller/UtilisateurController.php +++ b/module/Application/src/Application/Controller/UtilisateurController.php @@ -6,7 +6,7 @@ use Application\Acl\Role; use UnicaenAuth\Controller\UtilisateurController as BaseController; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; /** * @@ -16,7 +16,7 @@ use Application\Service\Traits\StructureAwareTrait; class UtilisateurController extends BaseController { use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; /** diff --git a/module/Application/src/Application/Entity/Db/Affectation.php b/module/Application/src/Application/Entity/Db/Affectation.php index 32e1023fa180ccfa170a5fa6bc5d666d17f6ada2..446e72941b56500be8ba23b30dfbeed3f20b2ad4 100644 --- a/module/Application/src/Application/Entity/Db/Affectation.php +++ b/module/Application/src/Application/Entity/Db/Affectation.php @@ -9,7 +9,7 @@ use UnicaenImport\Entity\Db\Traits\ImportAwareTrait; /** - * Affectation + * AffectationService */ class Affectation implements HistoriqueAwareInterface, ImportAwareInterface { diff --git a/module/Application/src/Application/Entity/Db/Agrement.php b/module/Application/src/Application/Entity/Db/Agrement.php index a74a7c1d325e50c74506666155fc3d9c1ec90d98..6771d17271ed8b835b63615167c65e335d0b28e8 100644 --- a/module/Application/src/Application/Entity/Db/Agrement.php +++ b/module/Application/src/Application/Entity/Db/Agrement.php @@ -8,7 +8,7 @@ use UnicaenApp\Entity\HistoriqueAwareTrait; use Zend\Permissions\Acl\Resource\ResourceInterface; /** - * Agrement + * AgrementService */ class Agrement implements HistoriqueAwareInterface, ResourceInterface { @@ -216,7 +216,7 @@ class Agrement implements HistoriqueAwareInterface, ResourceInterface */ public function getResourceId() { - return 'Agrement'; + return 'AgrementService'; } diff --git a/module/Application/src/Application/Entity/Db/Annee.php b/module/Application/src/Application/Entity/Db/Annee.php index 8446fbe56bb2a772350da030db6f34243f7bc86f..50d1a4481d18d99bc8c68bd92d82d228c8a48e20 100644 --- a/module/Application/src/Application/Entity/Db/Annee.php +++ b/module/Application/src/Application/Entity/Db/Annee.php @@ -3,7 +3,7 @@ namespace Application\Entity\Db; /** - * Annee + * AnneeService */ class Annee { diff --git a/module/Application/src/Application/Entity/Db/NotificationIndicateur.php b/module/Application/src/Application/Entity/Db/NotificationIndicateur.php index 97b0a181af09b346cadcaa3084d1f083aaca8e18..c44f3b73b7fc53ccc88cbb38f8cd65f44061b928 100644 --- a/module/Application/src/Application/Entity/Db/NotificationIndicateur.php +++ b/module/Application/src/Application/Entity/Db/NotificationIndicateur.php @@ -305,7 +305,7 @@ class NotificationIndicateur { $infos = "Abonnement : " . $this->getDateAbonnement()->format(Constants::DATETIME_FORMAT); - $infos .= "<br />Structure : " . ($this->getAffectation()->getStructure() ?: "aucune"); + $infos .= "<br />StructureService : " . ($this->getAffectation()->getStructure() ?: "aucune"); if (($dernNotif = $this->getDateDernNotif())) { $infos .= "<br />Dernière notification : " . $dernNotif->format(Constants::DATETIME_FORMAT); diff --git a/module/Application/src/Application/Entity/Db/Structure.php b/module/Application/src/Application/Entity/Db/Structure.php index d7ffabf9eac44ca2ea957ea2a9c2d4d15c0824a6..719f2e48b90a569f96ebdceacc1a32d8f6e2b209 100644 --- a/module/Application/src/Application/Entity/Db/Structure.php +++ b/module/Application/src/Application/Entity/Db/Structure.php @@ -14,7 +14,7 @@ use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; /** - * Structure + * StructureService */ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAwareInterface, ObjectManagerAware { @@ -496,7 +496,7 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw */ public function getResourceId() { - return 'Structure'; + return 'StructureService'; } diff --git a/module/Application/src/Application/Entity/Db/Traits/AffectationAwareTrait.php b/module/Application/src/Application/Entity/Db/Traits/AffectationAwareTrait.php index 41838ae2f10b04f371dbc1f0e738659853886dc4..0b6d2ebec5b977a76c7276ed60cc2ddd7fd65ee5 100755 --- a/module/Application/src/Application/Entity/Db/Traits/AffectationAwareTrait.php +++ b/module/Application/src/Application/Entity/Db/Traits/AffectationAwareTrait.php @@ -5,7 +5,7 @@ namespace Application\Entity\Db\Traits; use Application\Entity\Db\Affectation; /** - * Description of AffectationAwareTrait + * Description of AffectationServiceAwareTrait * * @author UnicaenCode */ diff --git a/module/Application/src/Application/Entity/Db/Traits/AgrementAwareTrait.php b/module/Application/src/Application/Entity/Db/Traits/AgrementAwareTrait.php index f1bf276aa51e8d335f4c9ca6d819eb631bc0b561..54e9d95abe13c35b32b1d3e784a3d2f485d6696e 100755 --- a/module/Application/src/Application/Entity/Db/Traits/AgrementAwareTrait.php +++ b/module/Application/src/Application/Entity/Db/Traits/AgrementAwareTrait.php @@ -5,7 +5,7 @@ namespace Application\Entity\Db\Traits; use Application\Entity\Db\Agrement; /** - * Description of AgrementAwareTrait + * Description of AgrementServiceAwareTrait * * @author UnicaenCode */ diff --git a/module/Application/src/Application/Entity/Db/Traits/AnneeAwareTrait.php b/module/Application/src/Application/Entity/Db/Traits/AnneeAwareTrait.php index 29f393e2a06a8c155635c5cb0b0f83fb12e57de6..a3a0b6f71efddd58fb6c21f76061593349966cef 100755 --- a/module/Application/src/Application/Entity/Db/Traits/AnneeAwareTrait.php +++ b/module/Application/src/Application/Entity/Db/Traits/AnneeAwareTrait.php @@ -5,7 +5,7 @@ namespace Application\Entity\Db\Traits; use Application\Entity\Db\Annee; /** - * Description of AnneeAwareTrait + * Description of AnneeServiceAwareTrait * * @author UnicaenCode */ diff --git a/module/Application/src/Application/Entity/Db/Traits/StructureAwareTrait.php b/module/Application/src/Application/Entity/Db/Traits/StructureAwareTrait.php index e9f4ac1f14ca5b02c04b9c49d05eba93c21cb653..40be017a4fff26e19d57a3ece74dc7342504a68d 100755 --- a/module/Application/src/Application/Entity/Db/Traits/StructureAwareTrait.php +++ b/module/Application/src/Application/Entity/Db/Traits/StructureAwareTrait.php @@ -5,7 +5,7 @@ namespace Application\Entity\Db\Traits; use Application\Entity\Db\Structure; /** - * Description of StructureAwareTrait + * Description of StructureServiceAwareTrait * * @author UnicaenCode */ diff --git a/module/Application/src/Application/Entity/Service/Recherche.php b/module/Application/src/Application/Entity/Service/Recherche.php index 19d4170035e0b81c254811e456bce95ad600e6f9..a97cdf6eb48347bb545a405284ac96eac90bac6a 100644 --- a/module/Application/src/Application/Entity/Service/Recherche.php +++ b/module/Application/src/Application/Entity/Service/Recherche.php @@ -40,14 +40,14 @@ implements use EtatVolumeHoraireAwareTrait; /** - * Structure d'affectation + * StructureService d'affectation * * @var \Application\Entity\Db\Structure */ protected $structureAff; /** - * Structure d'enseignement + * StructureService d'enseignement * * @var \Application\Entity\Db\Structure */ diff --git a/module/Application/src/Application/Form/Chargens/FiltreForm.php b/module/Application/src/Application/Form/Chargens/FiltreForm.php index 6d35a611a73b1ca6b09edfe889a0466dec5f7fc8..0c2dedf53925ba65e8f0202faf65192d221ac598 100755 --- a/module/Application/src/Application/Form/Chargens/FiltreForm.php +++ b/module/Application/src/Application/Form/Chargens/FiltreForm.php @@ -9,7 +9,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\ScenarioServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Util; @@ -21,7 +21,7 @@ use UnicaenApp\Util; class FiltreForm extends AbstractForm { use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EtapeAwareTrait; use ScenarioServiceAwareTrait; @@ -72,7 +72,7 @@ class FiltreForm extends AbstractForm 'empty_option' => "(Toutes)", 'disable_inarray_validator' => true, 'label_attributes' => [ - 'title' => "Structure gestionnaire de la formation", + 'title' => "StructureService gestionnaire de la formation", ], 'value_options' => Util::collectionAsOptions($this->structures), ], diff --git a/module/Application/src/Application/Form/Chargens/ScenarioForm.php b/module/Application/src/Application/Form/Chargens/ScenarioForm.php index bed5e81a49c1b5848f57fae78b42b9650fde557e..40dc2b6cd233db5cc78bcbfb027a57865a0e0d31 100755 --- a/module/Application/src/Application/Form/Chargens/ScenarioForm.php +++ b/module/Application/src/Application/Form/Chargens/ScenarioForm.php @@ -5,7 +5,7 @@ namespace Application\Form\Chargens; use Application\Entity\Db\Scenario; use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Util; use Zend\Stdlib\Hydrator\HydratorInterface; @@ -18,7 +18,7 @@ use Zend\Stdlib\Hydrator\HydratorInterface; class ScenarioForm extends AbstractForm { use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; /** * @var Structure[] @@ -58,7 +58,7 @@ class ScenarioForm extends AbstractForm 'empty_option' => "- Aucune -", 'disable_inarray_validator' => true, 'label_attributes' => [ - 'title' => "Structure gestionnaire de l'enseignement", + 'title' => "StructureService gestionnaire de l'enseignement", ], 'value_options' => Util::collectionAsOptions($this->structures), ], @@ -119,7 +119,7 @@ class ScenarioForm extends AbstractForm class ScenarioFormHydrator implements HydratorInterface { - use StructureAwareTrait; + use StructureServiceAwareTrait; diff --git a/module/Application/src/Application/Form/Droits/AffectationForm.php b/module/Application/src/Application/Form/Droits/AffectationForm.php index c893d1200ad799e27179bd969d2c996f58cc9229..fd883978d22664645aea9e1e3b9c23f79ae9640c 100644 --- a/module/Application/src/Application/Form/Droits/AffectationForm.php +++ b/module/Application/src/Application/Form/Droits/AffectationForm.php @@ -7,7 +7,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\PersonnelAwareTrait; use Application\Service\Traits\RoleAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Form\Element\SearchAndSelect; use Zend\Form; use UnicaenApp\Util; @@ -20,7 +20,7 @@ use Zend\Stdlib\Hydrator\HydratorInterface; */ class AffectationForm extends AbstractForm { - use StructureAwareTrait; + use StructureServiceAwareTrait; use PersonnelAwareTrait; use RoleAwareTrait; use ContextServiceAwareTrait; @@ -82,7 +82,7 @@ class AffectationForm extends AbstractForm 'type' => 'Select', 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', 'value_options' => Util::collectionAsOptions($structures) ], ] ); @@ -127,7 +127,7 @@ class AffectationForm extends AbstractForm class AffectationFormHydrator implements HydratorInterface { - use StructureAwareTrait; + use StructureServiceAwareTrait; use RoleAwareTrait; use PersonnelAwareTrait; diff --git a/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php b/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php index dad19bd0e4405d44be1cc862f36082f945a5ae69..01a87da0fdcd59c369387e75bb07a725df320e1f 100755 --- a/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php +++ b/module/Application/src/Application/Form/FonctionReferentiel/FonctionReferentielSaisieForm.php @@ -4,7 +4,7 @@ namespace Application\Form\FonctionReferentiel; use Application\Form\AbstractForm; use Application\Service\Traits\DomaineFonctionnelAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Zend\Form\Element\Csrf; use Zend\Stdlib\Hydrator\HydratorInterface; use Application\Service\Traits\ContextServiceAwareTrait; @@ -17,7 +17,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; class FonctionReferentielSaisieForm extends AbstractForm { use DomaineFonctionnelAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ContextServiceAwareTrait; public function init() @@ -72,7 +72,7 @@ class FonctionReferentielSaisieForm extends AbstractForm $this->add([ 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', ], 'attributes' => [ 'class' => 'selectpicker', @@ -154,7 +154,7 @@ class FonctionReferentielSaisieForm extends AbstractForm class FonctionReferentielHydrator implements HydratorInterface { use DomaineFonctionnelAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; /** * Hydrate $object with the provided $data. diff --git a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueRechercheFieldset.php b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueRechercheFieldset.php index 1b5d9233c01f7d991ab064e9813a4103b39c9ebe..205cb10440210c31bacfbeeaa08c9d3e4eed6844 100644 --- a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueRechercheFieldset.php +++ b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueRechercheFieldset.php @@ -64,12 +64,12 @@ class ElementPedagogiqueRechercheFieldset extends AbstractFieldset implements En 'empty_option' => "(Toutes)", 'disable_inarray_validator' => true, 'label_attributes' => [ - 'title' => "Structure gestionnaire de l'enseignement", + 'title' => "StructureService gestionnaire de l'enseignement", ], ], 'attributes' => [ 'id' => 'structure', - 'title' => "Structure gestionnaire de l'enseignement", + 'title' => "StructureService gestionnaire de l'enseignement", 'class' => 'element-pedagogique element-pedagogique-structure input-sm selectpicker', 'data-width' => "100%", 'data-live-search' => "true", diff --git a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php index 5ef3114ddb9d618567bab49e262861832a2e664a..4f22480fa573d378f1add8c81973c30473924320 100644 --- a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php +++ b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php @@ -8,7 +8,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; use Application\Service\Traits\PeriodeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Zend\Stdlib\Hydrator\HydratorInterface; /** @@ -21,7 +21,7 @@ class ElementPedagogiqueSaisie extends AbstractForm use LocalContextAwareTrait; use EtapeAwareTrait; use PeriodeAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; @@ -136,7 +136,7 @@ class ElementPedagogiqueSaisie extends AbstractForm $this->add([ 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', ], 'attributes' => [ 'class' => 'selectpicker', @@ -246,7 +246,7 @@ class ElementPedagogiqueSaisieHydrator implements HydratorInterface { use EtapeAwareTrait; use PeriodeAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; diff --git a/module/Application/src/Application/Form/OffreFormation/EtapeSaisie.php b/module/Application/src/Application/Form/OffreFormation/EtapeSaisie.php index dbad124d145225773575468676c6f8e6ba8ea910..e10fc8acd19c6f58c58246f0fbfee2e845e0ff6b 100644 --- a/module/Application/src/Application/Form/OffreFormation/EtapeSaisie.php +++ b/module/Application/src/Application/Form/OffreFormation/EtapeSaisie.php @@ -6,7 +6,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\DomaineFonctionnelAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeFormationAwareTrait; use Zend\Stdlib\Hydrator\HydratorInterface; @@ -19,7 +19,7 @@ class EtapeSaisie extends AbstractForm { use ContextServiceAwareTrait; use LocalContextAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use DomaineFonctionnelAwareTrait; use TypeFormationAwareTrait; @@ -89,7 +89,7 @@ class EtapeSaisie extends AbstractForm $this->add([ 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', ], 'attributes' => [ 'class' => 'selectpicker', @@ -257,7 +257,7 @@ class EtapeSaisie extends AbstractForm */ class EtapeSaisieHydrator implements HydratorInterface { - use StructureAwareTrait; + use StructureServiceAwareTrait; use DomaineFonctionnelAwareTrait; use TypeFormationAwareTrait; diff --git a/module/Application/src/Application/Form/Paiement/MiseEnPaiementRechercheForm.php b/module/Application/src/Application/Form/Paiement/MiseEnPaiementRechercheForm.php index 845d099b9affefcb89a120c157d5032a58103a4a..bc9e3dfee1c58bb1610fbf03361f1d0dc6c62f39 100644 --- a/module/Application/src/Application/Form/Paiement/MiseEnPaiementRechercheForm.php +++ b/module/Application/src/Application/Form/Paiement/MiseEnPaiementRechercheForm.php @@ -7,7 +7,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\PeriodeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeIntervenantAwareTrait; use Zend\Stdlib\Hydrator\HydratorInterface; @@ -214,7 +214,7 @@ class MiseEnPaiementRechercheFormHydrator implements HydratorInterface { use IntervenantAwareTrait; use PeriodeAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use TypeIntervenantAwareTrait; diff --git a/module/Application/src/Application/Form/ParametresForm.php b/module/Application/src/Application/Form/ParametresForm.php index 9e57fab1484676cd0999fd89cebcbc427a548710..bafdc55d4fff8f5e36e807e5eada332c1cf55210 100755 --- a/module/Application/src/Application/Form/ParametresForm.php +++ b/module/Application/src/Application/Form/ParametresForm.php @@ -2,7 +2,7 @@ namespace Application\Form; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\DomaineFonctionnelAwareTrait; use Application\Service\Traits\ScenarioServiceAwareTrait; use Application\Service\Traits\UtilisateurAwareTrait; @@ -17,7 +17,7 @@ use UnicaenApp\Util; */ class ParametresForm extends AbstractForm { - use AnneeAwareTrait; + use AnneeServiceAwareTrait; use DomaineFonctionnelAwareTrait; use UtilisateurAwareTrait; use ScenarioServiceAwareTrait; diff --git a/module/Application/src/Application/Form/PieceJointe/ModifierTypePieceJointeStatutForm.php b/module/Application/src/Application/Form/PieceJointe/ModifierTypePieceJointeStatutForm.php index 4fa43fe10edb35d287ad02a52f95edb2c3843e93..39989316798586a2976c46e5772adaa1d5141503 100644 --- a/module/Application/src/Application/Form/PieceJointe/ModifierTypePieceJointeStatutForm.php +++ b/module/Application/src/Application/Form/PieceJointe/ModifierTypePieceJointeStatutForm.php @@ -7,7 +7,7 @@ use Application\Form\AbstractForm; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\TypePieceJointeStatutAwareTrait; use Zend\Form\Element\Csrf; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Zend\Stdlib\Hydrator\HydratorInterface; use UnicaenApp\Util; @@ -19,7 +19,7 @@ use UnicaenApp\Util; */ class ModifierTypePieceJointeStatutForm extends AbstractForm { - use AnneeAwareTrait; + use AnneeServiceAwareTrait; use ContextServiceAwareTrait; use TypePieceJointeStatutAwareTrait; @@ -228,7 +228,7 @@ class ModifierTypePieceJointeStatutForm extends AbstractForm class TypePieceJointeStatutHydrator implements HydratorInterface { - use AnneeAwareTrait; + use AnneeServiceAwareTrait; diff --git a/module/Application/src/Application/Form/Plafond/PlafondApplicationForm.php b/module/Application/src/Application/Form/Plafond/PlafondApplicationForm.php index 3fac17556cf72d09810a42efa8bc6afb6cc29dd8..c84050a4d5c54dc555f3805d461aae62fbc5ce0c 100755 --- a/module/Application/src/Application/Form/Plafond/PlafondApplicationForm.php +++ b/module/Application/src/Application/Form/Plafond/PlafondApplicationForm.php @@ -7,10 +7,10 @@ use Application\Entity\Db\PlafondApplication; use Application\Entity\Db\PlafondEtat; use Application\Entity\Db\Structure; use Application\Form\AbstractForm; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\PlafondEtatServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Util; use Zend\Stdlib\Hydrator\HydratorInterface; @@ -22,8 +22,8 @@ use Zend\Stdlib\Hydrator\HydratorInterface; */ class PlafondApplicationForm extends AbstractForm { - use StructureAwareTrait; - use AnneeAwareTrait; + use StructureServiceAwareTrait; + use AnneeServiceAwareTrait; use PlafondEtatServiceAwareTrait; use ContextServiceAwareTrait; @@ -53,7 +53,7 @@ class PlafondApplicationForm extends AbstractForm $this->add([ 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', 'empty_option' => "Valable pour tout l'établissement", 'value_options' => Util::collectionAsOptions($this->getStructures()), ], @@ -158,8 +158,8 @@ class PlafondApplicationForm extends AbstractForm class PlafondApplicationFormHydrator implements HydratorInterface { - use StructureAwareTrait; - use AnneeAwareTrait; + use StructureServiceAwareTrait; + use AnneeServiceAwareTrait; use PlafondEtatServiceAwareTrait; diff --git a/module/Application/src/Application/Form/Service/RechercheForm.php b/module/Application/src/Application/Form/Service/RechercheForm.php index 3e6094954ff1b2e4fcddead33555fe8267a5d529..719a810a256a94b8447e08cd6454515aa64bd536 100644 --- a/module/Application/src/Application/Form/Service/RechercheForm.php +++ b/module/Application/src/Application/Form/Service/RechercheForm.php @@ -17,7 +17,7 @@ use Application\Provider\Privilege\Privileges; use Application\Service\Traits\EtatVolumeHoraireAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\NiveauEtapeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeIntervenantAwareTrait; use Application\Service\Traits\TypeVolumeHoraireAwareTrait; use UnicaenApp\Service\EntityManagerAwareInterface; @@ -38,7 +38,7 @@ use Zend\Stdlib\Hydrator\HydratorInterface; class RechercheForm extends AbstractForm implements EntityManagerAwareInterface { use EntityManagerAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use TypeIntervenantAwareTrait; use TypeVolumeHoraireAwareTrait; use EtatVolumeHoraireAwareTrait; @@ -155,15 +155,15 @@ class RechercheForm extends AbstractForm implements EntityManagerAwareInterface $this->add([ 'name' => 'structure-aff', 'options' => [ - 'label' => "Structure d'affectation:", + 'label' => "StructureService d'affectation:", 'empty_option' => "(Toutes)", 'disable_inarray_validator' => true, 'label_attributes' => [ - 'title' => "Structure gestionnaire de l'enseignement", + 'title' => "StructureService gestionnaire de l'enseignement", ], ], 'attributes' => [ - 'title' => "Structure gestionnaire de l'enseignement", + 'title' => "StructureService gestionnaire de l'enseignement", 'class' => 'input-sm', ], 'type' => 'Select', diff --git a/module/Application/src/Application/Form/Service/SaisieFieldset.php b/module/Application/src/Application/Form/Service/SaisieFieldset.php index 8010fec199c48a21b30c0f8e1930a442857d9c9e..3a846571e133907a1a59f631975258bbd70bd355 100644 --- a/module/Application/src/Application/Form/Service/SaisieFieldset.php +++ b/module/Application/src/Application/Form/Service/SaisieFieldset.php @@ -10,7 +10,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; use Application\Service\Traits\NiveauEtapeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Form\Element\SearchAndSelect; use Application\Entity\Db\Etablissement; use UnicaenAuth\Service\Traits\AuthorizeServiceAwareTrait; @@ -33,7 +33,7 @@ class SaisieFieldset extends AbstractFieldset use LocalContextAwareTrait; use EtapeAwareTrait; use NiveauEtapeAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ElementPedagogiqueRechercheFieldsetAwareTrait; use AuthorizeServiceAwareTrait; diff --git a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php index e338ca9a1e34acaf08f72fcd540c22052483ef79..84dc301347d519410d79a5a73dd43c7b37ea92c8 100644 --- a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php +++ b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php @@ -7,7 +7,7 @@ use Application\Form\AbstractFieldset; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\FonctionReferentielAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Form\Element\SearchAndSelect; use UnicaenApp\Service\EntityManagerAwareInterface; use Zend\Filter\PregReplace; @@ -29,7 +29,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter { use ContextServiceAwareTrait; use LocalContextAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use FonctionReferentielAwareTrait; use EntityManagerAwareTrait; @@ -70,10 +70,10 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter $this->add([ 'name' => 'structure', 'options' => [ - 'label' => "Structure :", + 'label' => "StructureService :", ], 'attributes' => [ - 'title' => "Structure concernée", + 'title' => "StructureService concernée", 'class' => 'fonction-referentiel fonction-referentiel-structure input-sm', ], 'type' => 'Select', @@ -216,7 +216,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter return null; } - // recherche de la Structure sélectionnée + // recherche de la StructureService sélectionnée $structures = $this->getStructures(); $value = $this->get('structure')->getValue(); $structureSaisie = isset($structures[$value]) ? $structures[$value] : null; @@ -238,7 +238,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter $callback = function () use ($structureSaisie, $structureFonction) { return $structureSaisie === $structureFonction; }; - $message = sprintf("Structure obligatoire : '%s'", $structureFonction); + $message = sprintf("StructureService obligatoire : '%s'", $structureFonction); } $v = new Callback($callback); diff --git a/module/Application/src/Application/Form/TypeIntervention/TypeInterventionSaisieForm.php b/module/Application/src/Application/Form/TypeIntervention/TypeInterventionSaisieForm.php index e8e7d3131ff4a4a166c356ff7238b21d985225e4..6cb3e9427165a30b7f20c22ecafd46ae8e92c389 100644 --- a/module/Application/src/Application/Form/TypeIntervention/TypeInterventionSaisieForm.php +++ b/module/Application/src/Application/Form/TypeIntervention/TypeInterventionSaisieForm.php @@ -7,7 +7,7 @@ use Zend\Form\Element\Csrf; use Zend\Stdlib\Hydrator\HydratorInterface; use Application\Filter\FloatFromString; use Application\Filter\StringFromFloat; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use UnicaenApp\Util; /** @@ -18,7 +18,7 @@ use UnicaenApp\Util; class TypeInterventionSaisieForm extends AbstractForm { use \Application\Entity\Db\Traits\TypeInterventionAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; public function init() { @@ -180,7 +180,7 @@ class TypeInterventionSaisieForm extends AbstractForm class TypeInterventionHydrator implements HydratorInterface { use TypeInterventionAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; /** * Hydrate $object with the provided $data. diff --git a/module/Application/src/Application/Form/TypeIntervention/TypeInterventionStructureSaisieForm.php b/module/Application/src/Application/Form/TypeIntervention/TypeInterventionStructureSaisieForm.php index d3065c38bb272687f6eb641497196d2e5ba1d5c8..c0909a5eab2e0ddb45159e6fa571028630853439 100644 --- a/module/Application/src/Application/Form/TypeIntervention/TypeInterventionStructureSaisieForm.php +++ b/module/Application/src/Application/Form/TypeIntervention/TypeInterventionStructureSaisieForm.php @@ -4,11 +4,11 @@ namespace Application\Form\TypeIntervention; use Application\Form\AbstractForm; use Application\Service\Traits\TypeInterventionAwareTrait; use Application\Service\Traits\TypeInterventionStructureServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Zend\Form\Element\Csrf; use Zend\Stdlib\Hydrator\HydratorInterface; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use UnicaenApp\Util; use UnicaenApp\Service\EntityManagerAwareTrait; @@ -20,9 +20,9 @@ use UnicaenApp\Service\EntityManagerAwareTrait; class TypeInterventionStructureSaisieForm extends AbstractForm { use \Application\Entity\Db\Traits\TypeInterventionStructureAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ContextServiceAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; @@ -40,7 +40,7 @@ class TypeInterventionStructureSaisieForm extends AbstractForm $this->add([ 'name' => 'structure', 'options' => [ - 'label' => 'Structure', + 'label' => 'StructureService', ], 'attributes' => [ 'class' => 'selectpicker', @@ -138,9 +138,9 @@ class TypeInterventionStructureHydrator implements HydratorInterface { use TypeInterventionStructureServiceAwareTrait; use TypeInterventionAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EntityManagerAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; diff --git a/module/Application/src/Application/Processus/Intervenant/SuppressionDataProcessus.php b/module/Application/src/Application/Processus/Intervenant/SuppressionDataProcessus.php index 39e017347844ecc13b55f5c1ebef6d083ff41914..143bf93ca0bd19066b24b321314b50a4739f2419 100644 --- a/module/Application/src/Application/Processus/Intervenant/SuppressionDataProcessus.php +++ b/module/Application/src/Application/Processus/Intervenant/SuppressionDataProcessus.php @@ -14,7 +14,7 @@ use Application\Entity\Db\Service; use Application\Entity\Db\ServiceReferentiel; use Application\Entity\Db\VolumeHoraire; use Application\Entity\Db\VolumeHoraireReferentiel; -use Application\Service\Traits\AgrementAwareTrait; +use Application\Service\Traits\AgrementServiceAwareTrait; use Application\Service\Traits\ContratAwareTrait; use Application\Service\Traits\DbEventServiceAwareTrait; use Application\Service\Traits\DossierAwareTrait; @@ -41,7 +41,7 @@ class SuppressionDataProcessus use MiseEnPaiementAwareTrait; use FichierServiceAwareTrait; use PieceJointeAwareTrait; - use AgrementAwareTrait; + use AgrementServiceAwareTrait; use VolumeHoraireAwareTrait; use VolumeHoraireReferentielAwareTrait; use ServiceServiceAwareTrait; @@ -176,8 +176,8 @@ class SuppressionDataProcessus } /* Agréments */ - if (isset($entities['Agrement'])) { - foreach ($entities['Agrement'] as $v) { + if (isset($entities['AgrementService'])) { + foreach ($entities['AgrementService'] as $v) { $this->getServiceAgrement()->delete($v->getEntity(), false); } } diff --git a/module/Application/src/Application/Processus/ServiceProcessus.php b/module/Application/src/Application/Processus/ServiceProcessus.php index a811b34624cf9f7fb4c610389a5e4e499702fb5b..285db7c127a896aa27503280600744344558ff51 100755 --- a/module/Application/src/Application/Processus/ServiceProcessus.php +++ b/module/Application/src/Application/Processus/ServiceProcessus.php @@ -9,7 +9,7 @@ use Application\Service\Traits\ElementPedagogiqueAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\PeriodeAwareTrait; use Application\Service\Traits\ServiceServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\VolumeHoraireAwareTrait; @@ -24,7 +24,7 @@ class ServiceProcessus extends AbstractProcessus use ServiceServiceAwareTrait; use VolumeHoraireAwareTrait; use ElementPedagogiqueAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EtapeAwareTrait; use PeriodeAwareTrait; diff --git a/module/Application/src/Application/Provider/Chargens/ChargensProvider.php b/module/Application/src/Application/Provider/Chargens/ChargensProvider.php index f123820b43e5c54fc5ca76c777e1e722ee2912a4..dbea7152527a8adc35fa9b52610cc76f872b3299 100644 --- a/module/Application/src/Application/Provider/Chargens/ChargensProvider.php +++ b/module/Application/src/Application/Provider/Chargens/ChargensProvider.php @@ -11,7 +11,7 @@ use Application\Entity\Db\Structure; use Application\Entity\Db\Traits\StructureAwareTrait; use Application\Entity\Db\TypeHeures; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Application\Service\Traits\TypeHeuresAwareTrait; use BjyAuthorize\Service\Authorize; use UnicaenTbl\Service\Traits\TableauBordServiceAwareTrait; @@ -19,7 +19,7 @@ use UnicaenTbl\Service\Traits\TableauBordServiceAwareTrait; class ChargensProvider { use BddConnecteurAwareTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; use ContextServiceAwareTrait; use StructureAwareTrait; use TypeHeuresAwareTrait; diff --git a/module/Application/src/Application/Provider/Role/RoleProvider.php b/module/Application/src/Application/Provider/Role/RoleProvider.php index a75bf2b45f5b303bb28b31f0ed4a385aaa21c73c..399f50b94d63441b635faf050bfb665dc31ae988 100644 --- a/module/Application/src/Application/Provider/Role/RoleProvider.php +++ b/module/Application/src/Application/Provider/Role/RoleProvider.php @@ -3,7 +3,7 @@ namespace Application\Provider\Role; use Application\Entity\Db\Affectation; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\PersonnelAwareTrait; use BjyAuthorize\Provider\Role\ProviderInterface; @@ -43,7 +43,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface protected $roles; /** - * @var StructureEntity + * @var Structure */ protected $structureSelectionnee; @@ -213,7 +213,7 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface - public function setStructureSelectionnee(StructureEntity $structureSelectionnee = null) + public function setStructureSelectionnee(Structure $structureSelectionnee = null) { $this->structureSelectionnee = $structureSelectionnee; diff --git a/module/Application/src/Application/Service/Affectation.php b/module/Application/src/Application/Service/AffectationService.php similarity index 86% rename from module/Application/src/Application/Service/Affectation.php rename to module/Application/src/Application/Service/AffectationService.php index 87b3b3cc01dc8912b0c735cca9a9ff1a2b1d8e6d..8db20f720ebfd042521fa481c29610714351e5fe 100644 --- a/module/Application/src/Application/Service/Affectation.php +++ b/module/Application/src/Application/Service/AffectationService.php @@ -3,18 +3,18 @@ namespace Application\Service; use Application\Acl\Role as RoleAcl; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Doctrine\ORM\QueryBuilder; -use Application\Entity\Db\Affectation as EntityAffectation; +use Application\Entity\Db\Affectation; /** - * Description of Affectation + * Description of AffectationService * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> */ -class Affectation extends AbstractEntityService +class AffectationService extends AbstractEntityService { - use SourceAwareTrait; + use SourceServiceAwareTrait; /** * retourne la classe des entités @@ -24,7 +24,7 @@ class Affectation extends AbstractEntityService */ public function getEntityClass() { - return EntityAffectation::class; + return Affectation::class; } /** @@ -40,7 +40,7 @@ class Affectation extends AbstractEntityService /** * Sauvegarde une entité * - * @param EntityAffectation $entity + * @param Affectation $entity * @throws \RuntimeException * @return mixed */ @@ -61,7 +61,7 @@ class Affectation extends AbstractEntityService /** * @param RoleAcl|null $role * - * @return null|EntityAffectation + * @return null|Affectation */ public function getByRole( RoleAcl $role = null ) { @@ -72,7 +72,7 @@ class Affectation extends AbstractEntityService if (!$role->getPersonnel()) return null; $this->getEntityManager()->getFilters()->enable('historique')->init([ - EntityAffectation::class, + Affectation::class, ]); return $this->getRepo()->findOneBy([ diff --git a/module/Application/src/Application/Service/Agrement.php b/module/Application/src/Application/Service/AgrementService.php similarity index 90% rename from module/Application/src/Application/Service/Agrement.php rename to module/Application/src/Application/Service/AgrementService.php index a62b13ea79b00f1d644392012fd660df56b48e08..7f977237ac896bfb1c4482e9dfcf398bdef9e76c 100644 --- a/module/Application/src/Application/Service/Agrement.php +++ b/module/Application/src/Application/Service/AgrementService.php @@ -3,17 +3,17 @@ namespace Application\Service; use Doctrine\ORM\QueryBuilder; -use Application\Entity\Db\Agrement as AgrementEntity; -use Application\Entity\Db\Annee as AnneeEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Agrement; +use Application\Entity\Db\Annee; +use Application\Entity\Db\Structure; /** - * Description of Agrement + * Description of AgrementService * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> */ -class Agrement extends AbstractEntityService +class AgrementService extends AbstractEntityService { /** @@ -24,7 +24,7 @@ class Agrement extends AbstractEntityService */ public function getEntityClass() { - return AgrementEntity::class; + return Agrement::class; } @@ -44,7 +44,7 @@ class Agrement extends AbstractEntityService /** * Sauvegarde une entité * - * @param AgrementEntity $entity + * @param Agrement $entity * * @throws \RuntimeException * @return mixed @@ -80,7 +80,7 @@ class Agrement extends AbstractEntityService - public function getExportCsvData(AnneeEntity $annee, StructureEntity $structure = null) + public function getExportCsvData(Annee $annee, Structure $structure = null) { $params = ['annee' => $annee->getId()]; @@ -94,7 +94,7 @@ class Agrement extends AbstractEntityService $res = [ 'head' => [ 'annee' => 'Année', - 'structure-libelle' => 'Structure d\'affectation', + 'structure-libelle' => 'StructureService d\'affectation', 'intervenant-code' => 'Code intervenant', 'intervenant-nom-usuel' => 'Nom usuel', 'intervenant-nom-patronymique' => 'Nom patronymique', diff --git a/module/Application/src/Application/Service/Annee.php b/module/Application/src/Application/Service/AnneeService.php similarity index 79% rename from module/Application/src/Application/Service/Annee.php rename to module/Application/src/Application/Service/AnneeService.php index f877e7bbf65b4028caee466836778707b8f7be51..e09f6699937ba4eb6d69fb6fc2c98a9b0db35370 100644 --- a/module/Application/src/Application/Service/Annee.php +++ b/module/Application/src/Application/Service/AnneeService.php @@ -4,18 +4,18 @@ namespace Application\Service; use UnicaenApp\Traits\SessionContainerTrait; use Doctrine\ORM\QueryBuilder; -use Application\Entity\Db\Annee as AnneeEntity; +use Application\Entity\Db\Annee; /** - * Description of Annee + * Description of AnneeService * - * @method AnneeEntity get($id) - * @method AnneeEntity[] getList(\Doctrine\ORM\QueryBuilder $qb = null, $alias = null) - * @method AnneeEntity newEntity() + * @method Annee get($id) + * @method Annee[] getList(\Doctrine\ORM\QueryBuilder $qb = null, $alias = null) + * @method Annee newEntity() * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> */ -class Annee extends AbstractEntityService +class AnneeService extends AbstractEntityService { use SessionContainerTrait; @@ -27,7 +27,7 @@ class Annee extends AbstractEntityService */ public function getEntityClass() { - return AnneeEntity::class; + return Annee::class; } @@ -47,12 +47,12 @@ class Annee extends AbstractEntityService /** * Retourne l'année N - x. * - * @param AnneeEntity $annee Année de référence + * @param Annee $annee Année de référence * @param int $x Entier supérieur ou égal à zéro * - * @return AnneeEntity + * @return Annee */ - public function getNmoins(AnneeEntity $annee, $x) + public function getNmoins(Annee $annee, $x) { return $this->get($annee->getId() - (int)$x); } @@ -61,11 +61,11 @@ class Annee extends AbstractEntityService /** * - * @param AnneeEntity $annee + * @param Annee $annee * - * @return AnneeEntity + * @return Annee */ - public function getPrecedente(AnneeEntity $annee) + public function getPrecedente(Annee $annee) { return $this->get($annee->getId() - 1); } @@ -74,11 +74,11 @@ class Annee extends AbstractEntityService /** * - * @param AnneeEntity $annee + * @param Annee $annee * - * @return AnneeEntity + * @return Annee */ - public function getSuivante(AnneeEntity $annee) + public function getSuivante(Annee $annee) { return $this->get($annee->getId() + 1); } diff --git a/module/Application/src/Application/Service/CentreCoutEp.php b/module/Application/src/Application/Service/CentreCoutEp.php index 4b7c0efb2716b7cd75f1bc8b17b8b28325d1a464..a690b5b1db46d4e13010f53bfd6c1d0b0c8f3426 100644 --- a/module/Application/src/Application/Service/CentreCoutEp.php +++ b/module/Application/src/Application/Service/CentreCoutEp.php @@ -4,7 +4,7 @@ namespace Application\Service; use Application\Entity\Db\CentreCoutEp as CentreCoutEpEntity; use Application\Provider\Privilege\Privileges; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use BjyAuthorize\Exception\UnAuthorizedException; /** @@ -14,7 +14,7 @@ use BjyAuthorize\Exception\UnAuthorizedException; */ class CentreCoutEp extends AbstractEntityService { - use SourceAwareTrait; + use SourceServiceAwareTrait; /** * retourne la classe des entités diff --git a/module/Application/src/Application/Service/CheminPedagogique.php b/module/Application/src/Application/Service/CheminPedagogique.php index 9ce43f869950765389819f6e48aeb71d5cc1b2cb..56ddf74c42bbf4c1a0594a35848de757fe2e4978 100644 --- a/module/Application/src/Application/Service/CheminPedagogique.php +++ b/module/Application/src/Application/Service/CheminPedagogique.php @@ -1,7 +1,7 @@ <?php namespace Application\Service; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; /** * Description of CheminPedagogique @@ -10,7 +10,7 @@ use Application\Service\Traits\SourceAwareTrait; */ class CheminPedagogique extends AbstractEntityService { - use SourceAwareTrait; + use SourceServiceAwareTrait; /** * retourne la classe des entités @@ -28,7 +28,7 @@ class CheminPedagogique extends AbstractEntityService * * @return string */ - public function getAlias() + public function getAlias() { return 'cp'; } diff --git a/module/Application/src/Application/Service/ContextService.php b/module/Application/src/Application/Service/ContextService.php index c4e27212914b94ece3c9607564c1f3db00ac52f5..7892e8e41beecacecaafdf8a480d570718405f29 100644 --- a/module/Application/src/Application/Service/ContextService.php +++ b/module/Application/src/Application/Service/ContextService.php @@ -4,8 +4,8 @@ namespace Application\Service; use Application\Acl\Role; use Application\Entity\Db\Etablissement as EntityEtablissement; -use Application\Entity\Db\Annee as AnneeEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Annee; +use Application\Entity\Db\Structure; use Application\Entity\Db\Utilisateur as UtilisateurEntity; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\PersonnelAwareTrait; @@ -21,10 +21,10 @@ use UnicaenAuth\Service\Traits\UserContextServiceAwareTrait; class ContextService extends AbstractService { use Traits\EtablissementAwareTrait; - use Traits\AnneeAwareTrait; + use Traits\AnneeServiceAwareTrait; use Traits\IntervenantAwareTrait; use Traits\ParametresAwareTrait; - use Traits\StructureAwareTrait; + use Traits\StructureServiceAwareTrait; use SessionContainerTrait; use UserContextServiceAwareTrait; use PersonnelAwareTrait; @@ -43,7 +43,7 @@ class ContextService extends AbstractService protected $etablissement; /** - * @var AnneeEntity + * @var Annee */ protected $annee; @@ -58,12 +58,12 @@ class ContextService extends AbstractService protected $intervenant = false; /** - * @var AnneeEntity + * @var Annee */ protected $anneePrecedente; /** - * @var AnneeEntity + * @var Annee */ protected $anneeSuivante; @@ -73,7 +73,7 @@ class ContextService extends AbstractService protected $dateObservation; /** - * @var StructureEntity + * @var Structure */ protected $structure; @@ -263,7 +263,7 @@ class ContextService extends AbstractService * - celle mémorisée en session (car sélectionnée par l'utilisateur) si elle existe ; * - ou sinon celle spécifiée dans les paramètres de l'appli. * - * @return AnneeEntity + * @return Annee */ public function getAnnee() { @@ -286,7 +286,7 @@ class ContextService extends AbstractService * * @param int $x Entier supérieur ou égal à zéro * - * @return AnneeEntity + * @return Annee */ public function getAnneeNmoins($x) { @@ -297,7 +297,7 @@ class ContextService extends AbstractService /** * - * @return AnneeEntity + * @return Annee */ public function getAnneePrecedente() { @@ -312,7 +312,7 @@ class ContextService extends AbstractService /** * - * @return AnneeEntity + * @return Annee */ public function getAnneeSuivante() { @@ -327,12 +327,12 @@ class ContextService extends AbstractService /** * - * @param AnneeEntity $annee + * @param Annee $annee * @param boolean $updateParametres * * @return self */ - public function setAnnee(AnneeEntity $annee, $updateParametres = false) + public function setAnnee(Annee $annee, $updateParametres = false) { $this->annee = $annee; $this->getSessionContainer()->annee = $annee->getId(); @@ -382,7 +382,7 @@ class ContextService extends AbstractService /** * - * @return StructureEntity + * @return Structure */ public function getStructure($initializing = false) { @@ -410,14 +410,14 @@ class ContextService extends AbstractService /** * - * @param StructureEntity $structure + * @param Structure $structure * @param boolean $updateParametres * * @return self */ public function setStructure($structure) { - if ($structure instanceof StructureEntity) { + if ($structure instanceof Structure) { $this->structure = $structure; $this->getSessionContainer()->structure = $structure->getId(); } else { @@ -436,11 +436,11 @@ class ContextService extends AbstractService * On considère que s'il existe des intervenants pour l'année spécifiée, alors * l'application était opérationnelle. * - * @param AnneeEntity $annee + * @param Annee $annee * * @return boolean */ - public function applicationExists(AnneeEntity $annee) + public function applicationExists(Annee $annee) { $sql = " SELECT diff --git a/module/Application/src/Application/Service/DisciplineService.php b/module/Application/src/Application/Service/DisciplineService.php index 0f2682250f64e391cc0d6eae86cb67823fbaf762..f413bdca23fd70141d155555d3f4875b985bf01a 100644 --- a/module/Application/src/Application/Service/DisciplineService.php +++ b/module/Application/src/Application/Service/DisciplineService.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\Discipline as DisciplineEntity; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Doctrine\ORM\QueryBuilder; use UnicaenApp\Traits\SessionContainerTrait; @@ -15,7 +15,7 @@ use UnicaenApp\Traits\SessionContainerTrait; class DisciplineService extends AbstractEntityService { use SessionContainerTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; diff --git a/module/Application/src/Application/Service/DotationService.php b/module/Application/src/Application/Service/DotationService.php index e88b889b7dc0f0a762cae5dc6d68f9bf243b2040..b0fa87bd8eeeae64f2dc72f05e27acf9142f489f 100644 --- a/module/Application/src/Application/Service/DotationService.php +++ b/module/Application/src/Application/Service/DotationService.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\Dotation; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TypeRessource; use Application\Service\Traits\TypeRessourceServiceAwareTrait; use Application\Util; @@ -84,7 +84,7 @@ class DotationService extends AbstractEntityService - public function getDotations(StructureEntity $structure) + public function getDotations(Structure $structure) { $annee = $this->getServiceContext()->getAnnee(); $ac1 = $annee->getId(); diff --git a/module/Application/src/Application/Service/ElementPedagogique.php b/module/Application/src/Application/Service/ElementPedagogique.php index c3b544d6c2679b24682d1d0dc20d506742939267..7fc550669c9ba901b9e1f08dd268124b83f22fdb 100644 --- a/module/Application/src/Application/Service/ElementPedagogique.php +++ b/module/Application/src/Application/Service/ElementPedagogique.php @@ -6,11 +6,11 @@ use Application\Entity\Db\ElementTauxRegimes; use Application\Provider\Privilege\Privileges; use Application\Service\Traits\CheminPedagogiqueAwareTrait; use Application\Service\Traits\ElementModulateurAwareTrait; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use BjyAuthorize\Exception\UnAuthorizedException; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\ElementPedagogique as ElementPedagogiqueEntity; -use Application\Entity\Db\Annee as AnneeEntity; +use Application\Entity\Db\Annee; /** * Description of ElementPedagogique @@ -21,7 +21,7 @@ class ElementPedagogique extends AbstractEntityService { use CheminPedagogiqueAwareTrait; use ElementModulateurAwareTrait; - use SourceAwareTrait; + use SourceServiceAwareTrait; @@ -57,7 +57,7 @@ class ElementPedagogique extends AbstractEntityService * <p>Paramètres possibles :</p> * <i>term</i> : Texte recherché<br /> * <i>limit</i> : Nombre de résultats maxi<br /> - * <i>structure</i> : Structure concernée sous forme d'une entité<br /> + * <i>structure</i> : StructureService concernée sous forme d'une entité<br /> * <i>niveau</i> : Niveau, i.e. CONCAT(gtf.libelle_court, e.niveau), ex: L1, M2<br /> * <i>etape</i> : Etape concernée sous forme d'une entité<br /> * <i>element</i> : Élément concerné sous forme d'une entité<br /> @@ -165,11 +165,11 @@ where rang = 1 /** * * @param string $sourceCode - * @param AnneeEntity $annee + * @param Annee $annee * * @return ElementPedagogiqueEntity */ - public function getBySourceCode($sourceCode, AnneeEntity $annee = null) + public function getBySourceCode($sourceCode, Annee $annee = null) { if (null == $sourceCode) return null; diff --git a/module/Application/src/Application/Service/Etape.php b/module/Application/src/Application/Service/Etape.php index 099f315acb546ae3d79e743e60471f571b06bd45..3a0ac8df601d4ed9b5af85ef9879416725d0518b 100644 --- a/module/Application/src/Application/Service/Etape.php +++ b/module/Application/src/Application/Service/Etape.php @@ -5,7 +5,7 @@ namespace Application\Service; use Application\Provider\Privilege\Privileges; use Application\Service\Traits\ContextServiceAwareTrait; use Application\Service\Traits\GroupeTypeFormationAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeFormationAwareTrait; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\Etape as EtapeEntity; @@ -21,11 +21,11 @@ use Application\Entity\Db\Etape as EtapeEntity; class Etape extends AbstractEntityService { use Traits\LocalContextAwareTrait; - use Traits\SourceAwareTrait; + use Traits\SourceServiceAwareTrait; use Traits\ElementModulateurAwareTrait; use TypeFormationAwareTrait; use GroupeTypeFormationAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ContextServiceAwareTrait; diff --git a/module/Application/src/Application/Service/FormuleResultat.php b/module/Application/src/Application/Service/FormuleResultat.php index ac14121cc14e9bdf4451c259dbf1c9c83356eef4..3d4e495b92108d291c3f3d81e8f9bb08e2e5a032 100644 --- a/module/Application/src/Application/Service/FormuleResultat.php +++ b/module/Application/src/Application/Service/FormuleResultat.php @@ -1,7 +1,7 @@ <?php namespace Application\Service; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; /** * Description of FormuleResultat @@ -40,12 +40,12 @@ class FormuleResultat extends AbstractEntityService * Retourne le volume d'heures prévisionnelles faites pour une structure donnée, en année universitaire (par défaut) * ou bien par année civile en appliquant la règle des 4/10 / 6/10. * - * @param StructureEntity $structure + * @param Structure $structure * * @return float * @throws \Doctrine\DBAL\DBALException */ - public function getTotalPrevisionnelValide(StructureEntity $structure = null) + public function getTotalPrevisionnelValide(Structure $structure = null) { if (!$structure) return $this->getTotalPrevisionnelValideWS(); // on ByPasse!!! diff --git a/module/Application/src/Application/Service/IndicateurService.php b/module/Application/src/Application/Service/IndicateurService.php index e8d9700e86cdda1f85a93d60dfd320393ea069b8..d1a260aa2b020b9310872ecf6a43a0894a4c3e76 100644 --- a/module/Application/src/Application/Service/IndicateurService.php +++ b/module/Application/src/Application/Service/IndicateurService.php @@ -5,7 +5,7 @@ namespace Application\Service; use Application\Service\Traits\IntervenantAwareTrait; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\Indicateur; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; /** @@ -87,9 +87,9 @@ class IndicateurService extends AbstractEntityService /** * @param integer|Indicateur $indicateur Indicateur concerné - * @param StructureEntity|null $structure + * @param Structure|null $structure */ - public function getCount(Indicateur $indicateur, StructureEntity $structure = null) + public function getCount(Indicateur $indicateur, Structure $structure = null) { $key = $indicateur->getNumero().'_'.($structure ? $structure->getId() : '0'); @@ -110,7 +110,7 @@ class IndicateurService extends AbstractEntityService * * @return Indicateur\AbstractIndicateur[] */ - public function getResult(Indicateur $indicateur, StructureEntity $structure = null) + public function getResult(Indicateur $indicateur, Structure $structure = null) { $qb = $this->getBaseQueryBuilder($indicateur, $structure); diff --git a/module/Application/src/Application/Service/Interfaces/AffectationAwareInterface.php b/module/Application/src/Application/Service/Interfaces/AffectationAwareInterface.php index 8701967742df0442687c3f131b72358f6faf2d96..6ee1556e0b6a9c86da8a514e546f6baee2f77010 100755 --- a/module/Application/src/Application/Service/Interfaces/AffectationAwareInterface.php +++ b/module/Application/src/Application/Service/Interfaces/AffectationAwareInterface.php @@ -2,7 +2,7 @@ namespace Application\Service\Interfaces; -use Application\Service\Affectation; +use Application\Service\AffectationService; use RuntimeException; /** @@ -13,10 +13,11 @@ use RuntimeException; interface AffectationAwareInterface { /** - * @param Affectation $serviceAffectation + * @param AffectationService $serviceAffectation + * * @return self */ - public function setServiceAffectation( Affectation $serviceAffectation ); + public function setServiceAffectation(AffectationService $serviceAffectation ); diff --git a/module/Application/src/Application/Service/Interfaces/AgrementAwareInterface.php b/module/Application/src/Application/Service/Interfaces/AgrementAwareInterface.php index efddf209e05c40cc7c971f4d291cf644ff92bd76..5834d414bb3706440676c16edc91822b4fcac6c7 100755 --- a/module/Application/src/Application/Service/Interfaces/AgrementAwareInterface.php +++ b/module/Application/src/Application/Service/Interfaces/AgrementAwareInterface.php @@ -2,7 +2,7 @@ namespace Application\Service\Interfaces; -use Application\Service\Agrement; +use Application\Service\AgrementService; use RuntimeException; /** @@ -13,10 +13,11 @@ use RuntimeException; interface AgrementAwareInterface { /** - * @param Agrement $serviceAgrement + * @param AgrementService $serviceAgrement + * * @return self */ - public function setServiceAgrement( Agrement $serviceAgrement ); + public function setServiceAgrement(AgrementService $serviceAgrement ); diff --git a/module/Application/src/Application/Service/Interfaces/AnneeAwareInterface.php b/module/Application/src/Application/Service/Interfaces/AnneeAwareInterface.php index cc253c6dc03e24348377afe8cdbdf18f28cc4de2..9426ddd48dab1021257f9f62d7ba5faacb2afeed 100755 --- a/module/Application/src/Application/Service/Interfaces/AnneeAwareInterface.php +++ b/module/Application/src/Application/Service/Interfaces/AnneeAwareInterface.php @@ -2,7 +2,7 @@ namespace Application\Service\Interfaces; -use Application\Service\Annee; +use Application\Service\AnneeService; use RuntimeException; /** @@ -13,10 +13,11 @@ use RuntimeException; interface AnneeAwareInterface { /** - * @param Annee $serviceAnnee + * @param AnneeService $serviceAnnee + * * @return self */ - public function setServiceAnnee( Annee $serviceAnnee ); + public function setServiceAnnee(AnneeService $serviceAnnee ); diff --git a/module/Application/src/Application/Service/Interfaces/SourceAwareInterface.php b/module/Application/src/Application/Service/Interfaces/SourceAwareInterface.php index 6bb89b43632ac50767236e92d5383d4421273a60..b17d4faa8cb782a169d2fccc8ac3cf520169b2fc 100755 --- a/module/Application/src/Application/Service/Interfaces/SourceAwareInterface.php +++ b/module/Application/src/Application/Service/Interfaces/SourceAwareInterface.php @@ -2,7 +2,7 @@ namespace Application\Service\Interfaces; -use Application\Service\Source; +use Application\Service\SourceService; use RuntimeException; /** @@ -13,10 +13,11 @@ use RuntimeException; interface SourceAwareInterface { /** - * @param Source $serviceSource + * @param SourceService $serviceSource + * * @return self */ - public function setServiceSource( Source $serviceSource ); + public function setServiceSource(SourceService $serviceSource ); diff --git a/module/Application/src/Application/Service/Interfaces/StructureAwareInterface.php b/module/Application/src/Application/Service/Interfaces/StructureAwareInterface.php index ef4e2d85a3fcde210624423ffbcaf89c7c2e3d7e..df5664a6e46327f412df354333413827a9a020d2 100755 --- a/module/Application/src/Application/Service/Interfaces/StructureAwareInterface.php +++ b/module/Application/src/Application/Service/Interfaces/StructureAwareInterface.php @@ -2,7 +2,7 @@ namespace Application\Service\Interfaces; -use Application\Service\Structure; +use Application\Service\StructureService; use RuntimeException; /** @@ -13,10 +13,11 @@ use RuntimeException; interface StructureAwareInterface { /** - * @param Structure $serviceStructure + * @param StructureService $serviceStructure + * * @return self */ - public function setServiceStructure( Structure $serviceStructure ); + public function setServiceStructure(StructureService $serviceStructure ); diff --git a/module/Application/src/Application/Service/Intervenant.php b/module/Application/src/Application/Service/Intervenant.php index a3dd7b1b096e53708e192ce9ef2ffa6b03017a66..4e04c749e3c7bf77d1ecabb1312109b816353325 100644 --- a/module/Application/src/Application/Service/Intervenant.php +++ b/module/Application/src/Application/Service/Intervenant.php @@ -3,9 +3,9 @@ namespace Application\Service; use Application\Entity\Db\Intervenant as IntervenantEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\Periode as PeriodeEntity; -use Application\Entity\Db\Annee as AnneeEntity; +use Application\Entity\Db\Annee; use Application\Entity\Db\TypeIntervenant as TypeIntervenantService; use Application\Filter\StringFromFloat; use Application\Service\Traits\MiseEnPaiementAwareTrait; @@ -68,11 +68,11 @@ class Intervenant extends AbstractEntityService /** * * @param string $sourceCode - * @param AnneeEntity $annee + * @param Annee $annee * * @return IntervenantEntity */ - public function getBySourceCode($sourceCode, AnneeEntity $annee = null, $autoImport = true) + public function getBySourceCode($sourceCode, Annee $annee = null, $autoImport = true) { if (null == $sourceCode) return null; @@ -117,7 +117,7 @@ class Intervenant extends AbstractEntityService - public function finderByMiseEnPaiement(StructureEntity $structure = null, PeriodeEntity $periode = null, QueryBuilder $qb = null, $alias = null) + public function finderByMiseEnPaiement(Structure $structure = null, PeriodeEntity $periode = null, QueryBuilder $qb = null, $alias = null) { $serviceMIS = $this->getServiceMiseEnPaiementIntervenantStructure(); diff --git a/module/Application/src/Application/Service/LocalContext.php b/module/Application/src/Application/Service/LocalContext.php index 5232a94331e144c56a159a4bd34753afcc7506ff..2b444882fc9f1d9fcc84d65cbbeac863955f27e0 100644 --- a/module/Application/src/Application/Service/LocalContext.php +++ b/module/Application/src/Application/Service/LocalContext.php @@ -6,11 +6,10 @@ use Application\Service\Traits\ElementPedagogiqueAwareTrait; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\NiveauEtapeAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use UnicaenApp\Traits\SessionContainerTrait; -use Zend\Session\Container; use Application\Entity\Db\Intervenant as EntityIntervenant; -use Application\Entity\Db\Structure as EntityStructure; +use Application\Entity\Db\Structure; use Application\Entity\Db\Etape as EntityEtape; use Application\Entity\NiveauEtape as EntityNiveauEtape; use Application\Entity\Db\ElementPedagogique as EntityElementPedagogique; @@ -24,7 +23,7 @@ use Application\Entity\Db\ElementPedagogique as EntityElementPedagogique; class LocalContext extends AbstractService { use IntervenantAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use EtapeAwareTrait; use ElementPedagogiqueAwareTrait; use NiveauEtapeAwareTrait; @@ -38,7 +37,7 @@ class LocalContext extends AbstractService protected $intervenant; /** - * @var EntityStructure + * @var Structure */ protected $structure; @@ -77,13 +76,13 @@ class LocalContext extends AbstractService /** - * @return EntityStructure + * @return Structure */ public function getStructure() { if (empty($this->structure)) { $this->structure = $this->getSessionContainer()->structure; - if ($this->structure && !$this->structure instanceof EntityStructure) { + if ($this->structure && !$this->structure instanceof Structure) { $this->structure = $this->getServiceStructure()->get($this->structure); } } @@ -162,11 +161,11 @@ class LocalContext extends AbstractService /** * - * @param EntityStructure $structure + * @param Structure $structure * * @return self */ - public function setStructure(EntityStructure $structure = null) + public function setStructure(Structure $structure = null) { $this->structure = $structure; $this->getSessionContainer()->structure = $structure ? $structure->getId() : null; diff --git a/module/Application/src/Application/Service/MiseEnPaiement.php b/module/Application/src/Application/Service/MiseEnPaiement.php index f1a575c598af4269ddf33bf846e4dbb3d3d05c33..0dc6674243eb31abd6a51f59addb90e2a5dad5a3 100644 --- a/module/Application/src/Application/Service/MiseEnPaiement.php +++ b/module/Application/src/Application/Service/MiseEnPaiement.php @@ -6,7 +6,7 @@ use Application\Entity\Db\MiseEnPaiement as MiseEnPaiementEntity; use Application\Entity\Db\ServiceAPayerInterface; use Application\Entity\Db\TypeIntervenant as TypeIntervenantEntity; use Application\Entity\Paiement\MiseEnPaiementRecherche; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\Periode as PeriodeEntity; use Application\Service\Traits\CentreCoutAwareTrait; use Application\Service\Traits\DomaineFonctionnelAwareTrait; @@ -102,7 +102,7 @@ class MiseEnPaiement extends AbstractEntityService - public function finderByStructure(StructureEntity $structure, QueryBuilder $qb = null, $alias = null) + public function finderByStructure(Structure $structure, QueryBuilder $qb = null, $alias = null) { $serviceMIS = $this->getServiceMiseEnPaiementIntervenantStructure(); @@ -185,7 +185,7 @@ class MiseEnPaiement extends AbstractEntityService $conditions['intervenant_id'] = 'intervenant_id IN (' . implode(',', $iIdList) . ')'; } - if ($options['composante'] instanceof StructureEntity) { + if ($options['composante'] instanceof Structure) { $conditions['composante'] = "structure_id = " . (int)$options['composante']->getId(); } @@ -295,7 +295,7 @@ class MiseEnPaiement extends AbstractEntityService $conditions['intervenant_id'] = 'intervenant_id IN (' . implode(',', $iIdList) . ')'; } - if ($options['composante'] instanceof StructureEntity) { + if ($options['composante'] instanceof Structure) { $conditions['composante'] = "structure_id = " . (int)$options['composante']->getId(); } @@ -377,7 +377,7 @@ class MiseEnPaiement extends AbstractEntityService $conditions['intervenant_id'] = 'intervenant_id IN (' . implode(',', $iIdList) . ')'; } - if ($options['composante'] instanceof StructureEntity) { + if ($options['composante'] instanceof Structure) { $conditions['composante'] = "structure_id = " . (int)$options['composante']->getId(); } @@ -461,7 +461,7 @@ class MiseEnPaiement extends AbstractEntityService * * @return array */ - public function getTableauBord(StructureEntity $structure = null) + public function getTableauBord(Structure $structure = null) { $annee = $this->getServiceContext()->getAnnee(); $data = []; @@ -540,12 +540,12 @@ class MiseEnPaiement extends AbstractEntityService * Il retourne le nb d'heures demandées en paiement par type de ressource pour une structure donnée * et pour l'année courante * - * Format de retour : [Structure.id][TypeRessource.id] = (float)Heures + * Format de retour : [StructureService.id][TypeRessource.id] = (float)Heures * ou [TypeRessource.id] = (float)Heures * * Si la structure n'est pas spécifiée alors on retourne le tableau pour chaque structure. * - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return array * @throws \Doctrine\DBAL\DBALException @@ -555,7 +555,7 @@ class MiseEnPaiement extends AbstractEntityService if (empty($structure)) return $this->getTblLiquidationMS(); if (is_array($structure)) return $this->getTblLiquidationMS($structure); - if (! $structure instanceof StructureEntity){ + if (! $structure instanceof Structure){ throw new RuntimeException('La structure fournie n\'est pas uns entité'); } @@ -657,12 +657,12 @@ class MiseEnPaiement extends AbstractEntityService /** * - * @param StructureEntity $structure + * @param Structure $structure * @param \Application\Entity\Db\Intervenant[] $intervenants * @param PeriodeEntity $periodePaiement * @param \DateTime $dateMiseEnPaiement */ - public function mettreEnPaiement(StructureEntity $structure, $intervenants, PeriodeEntity $periodePaiement, \DateTime $dateMiseEnPaiement) + public function mettreEnPaiement(Structure $structure, $intervenants, PeriodeEntity $periodePaiement, \DateTime $dateMiseEnPaiement) { list($qb, $alias) = $this->initQuery(); $this->finderByEtat(MiseEnPaiementEntity::A_METTRE_EN_PAIEMENT, $qb); diff --git a/module/Application/src/Application/Service/ModificationServiceDu.php b/module/Application/src/Application/Service/ModificationServiceDu.php index 6009c161550b8aaec8b08ab5ec0beb328f5bbba1..844cdba5ccef5f74440e6dbef03b7c15e6b8211e 100644 --- a/module/Application/src/Application/Service/ModificationServiceDu.php +++ b/module/Application/src/Application/Service/ModificationServiceDu.php @@ -3,8 +3,8 @@ namespace Application\Service; use Doctrine\ORM\QueryBuilder; -use Application\Entity\Db\Annee as AnneeEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Annee; +use Application\Entity\Db\Structure; /** @@ -87,7 +87,7 @@ class ModificationServiceDu extends AbstractEntityService - public function getExportCsvData(AnneeEntity $annee, StructureEntity $structure = null) + public function getExportCsvData(Annee $annee, Structure $structure = null) { $params = ['annee' => $annee->getId()]; @@ -101,7 +101,7 @@ class ModificationServiceDu extends AbstractEntityService $res = [ 'head' => [ 'annee' => 'Année', - 'structure-libelle' => 'Structure d\'affectation', + 'structure-libelle' => 'StructureService d\'affectation', 'intervenant-code' => 'Code intervenant', 'intervenant-nom-usuel' => 'Nom usuel', 'intervenant-nom-patronymique' => 'Nom patronymique', diff --git a/module/Application/src/Application/Service/NotificationIndicateur.php b/module/Application/src/Application/Service/NotificationIndicateur.php index 2867e90fe773f25f4b6a22fb151b8ba21c3b3ee2..e2aecd3536d8a48359d43400e43d62f1cfef32ed 100644 --- a/module/Application/src/Application/Service/NotificationIndicateur.php +++ b/module/Application/src/Application/Service/NotificationIndicateur.php @@ -2,10 +2,10 @@ namespace Application\Service; -use Application\Entity\Db\Affectation as AffectationEntity; +use Application\Entity\Db\Affectation; use Application\Entity\Db\Indicateur as IndicateurEntity; use Application\Entity\Db\NotificationIndicateur as NotificationIndicateurEntity; -use Application\Service\Traits\AffectationAwareTrait; +use Application\Service\Traits\AffectationServiceAwareTrait; use Application\Service\Traits\IndicateurServiceAwareTrait; use LogicException; use DateTime; @@ -23,7 +23,7 @@ use Doctrine\ORM\QueryBuilder; */ class NotificationIndicateur extends AbstractEntityService { - use AffectationAwareTrait; + use AffectationServiceAwareTrait; use IndicateurServiceAwareTrait; /** @@ -67,7 +67,7 @@ class NotificationIndicateur extends AbstractEntityService * @param string $frequence * @return NotificationIndicateurEntity */ - public function abonner(IndicateurEntity $indicateur, $frequence=null, $inHome=false, AffectationEntity $affectation = null) + public function abonner(IndicateurEntity $indicateur, $frequence=null, $inHome=false, Affectation $affectation = null) { if ($frequence && !array_key_exists($frequence, NotificationIndicateurEntity::$frequences)) { throw new LogicException("Fréquence spécifiée inconnue: $frequence."); diff --git a/module/Application/src/Application/Service/Periode.php b/module/Application/src/Application/Service/Periode.php index b1a10a9687eb3fed503a5be8c8745d2228e58780..64b2ccd2170468d01a5d988aa59698e89e856a92 100644 --- a/module/Application/src/Application/Service/Periode.php +++ b/module/Application/src/Application/Service/Periode.php @@ -2,7 +2,7 @@ namespace Application\Service; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\Periode as PeriodeEntity; use Application\Service\Traits\IntervenantAwareTrait; @@ -118,7 +118,7 @@ class Periode extends AbstractEntityService - public function finderByMiseEnPaiement(StructureEntity $structure = null, QueryBuilder $qb = null, $alias = null) + public function finderByMiseEnPaiement(Structure $structure = null, QueryBuilder $qb = null, $alias = null) { $serviceMIS = $this->getServiceMiseEnPaiementIntervenantStructure(); diff --git a/module/Application/src/Application/Service/ServiceReferentiel.php b/module/Application/src/Application/Service/ServiceReferentiel.php index 2cd6e25651455f7147a695b56a4343d13a746674..1820a933450a040874dd7760e42a7906461aa8ba 100644 --- a/module/Application/src/Application/Service/ServiceReferentiel.php +++ b/module/Application/src/Application/Service/ServiceReferentiel.php @@ -7,13 +7,13 @@ use Application\Provider\Privilege\Privileges; use Application\Service\Traits\EtatVolumeHoraireAwareTrait; use Application\Service\Traits\FonctionReferentielAwareTrait; use Application\Service\Traits\IntervenantAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeVolumeHoraireAwareTrait; use Application\Service\Traits\VolumeHoraireReferentielAwareTrait; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\Intervenant as IntervenantEntity; use Application\Entity\Db\ServiceReferentiel as ServiceReferentielEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TypeVolumeHoraire as TypeVolumeHoraireEntity; @@ -26,7 +26,7 @@ use Application\Entity\Db\TypeVolumeHoraire as TypeVolumeHoraireEntity; class ServiceReferentiel extends AbstractEntityService { use IntervenantAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use FonctionReferentielAwareTrait; use TypeVolumeHoraireAwareTrait; use EtatVolumeHoraireAwareTrait; @@ -134,7 +134,7 @@ class ServiceReferentiel extends AbstractEntityService * * @param IntervenantEntity $intervenant * @param FonctionReferentielEntity $fonction - * @param StructureEntity $structure + * @param Structure $structure * @param string $commentaires * * @return null|\Application\Entity\Db\ServiceReferentiel @@ -142,7 +142,7 @@ class ServiceReferentiel extends AbstractEntityService public function getBy( IntervenantEntity $intervenant, FonctionReferentielEntity $fonction, - StructureEntity $structure, + Structure $structure, $commentaires=null ) { @@ -368,7 +368,7 @@ class ServiceReferentiel extends AbstractEntityService $qb = $this->select(['id', 'fonction', 'structure', 'commentaires']); //@formatter:off $this->join('applicationFonctionReferentiel', $qb, 'fonctionReferentiel', true); - $this->Join('applicationStructure', $qb, 'structure', true); + $this->Join(StructureService::class, $qb, 'structure', true); $this->Join($sVolumeHoraireReferentiel, $qb, 'volumeHoraireReferentiel',true); //@formatter:on diff --git a/module/Application/src/Application/Service/ServiceService.php b/module/Application/src/Application/Service/ServiceService.php index b26d17c746e6ae2cc5e4fdb28cd18a39f1734476..63c100998dc96d56b9a62ef35396d39b70d97bc4 100644 --- a/module/Application/src/Application/Service/ServiceService.php +++ b/module/Application/src/Application/Service/ServiceService.php @@ -9,7 +9,7 @@ use Application\Entity\Db\EtatVolumeHoraire as EtatVolumeHoraireEntity; use Application\Entity\Db\Intervenant as IntervenantEntity; use Application\Entity\Db\Service as ServiceEntity; use Application\Entity\Db\Service; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TypeIntervention as TypeInterventionEntity; use Application\Entity\Db\TypeIntervenant as TypeIntervenantEntity; use Application\Entity\Db\TypeVolumeHoraire as TypeVolumeHoraireEntity; @@ -25,7 +25,7 @@ use Application\Service\Traits\IntervenantAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; use Application\Service\Traits\PeriodeAwareTrait; use Application\Service\Traits\StatutIntervenantAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeIntervenantAwareTrait; use Application\Service\Traits\TypeInterventionAwareTrait; use Application\Service\Traits\TypeVolumeHoraireAwareTrait; @@ -49,7 +49,7 @@ class ServiceService extends AbstractEntityService use ElementPedagogiqueAwareTrait; use EtapeAwareTrait; use IntervenantAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use TypeInterventionAwareTrait; use EtatVolumeHoraireAwareTrait; use TypeVolumeHoraireAwareTrait; @@ -455,12 +455,12 @@ class ServiceService extends AbstractEntityService * - la structure d'enseignement (champ 'structure_ens') est la structure spécifiée; * - la structure d'affectation (champ 'structure_aff') est la structure spécifiée; * - * @param StructureEntity $structure + * @param Structure $structure * @param QueryBuilder|null $queryBuilder * * @return QueryBuilder */ - public function finderByComposante(StructureEntity $structure, QueryBuilder $qb = null, $alias = null) + public function finderByComposante(Structure $structure, QueryBuilder $qb = null, $alias = null) { list($qb, $alias) = $this->initQuery($qb, $alias); @@ -488,12 +488,12 @@ class ServiceService extends AbstractEntityService /** * Utile pour la recherche de services * - * @param StructureEntity $structure + * @param Structure $structure * @param QueryBuilder|null $queryBuilder * * @return QueryBuilder */ - public function finderByStructureAff(StructureEntity $structure, QueryBuilder $qb = null, $alias = null) + public function finderByStructureAff(Structure $structure, QueryBuilder $qb = null, $alias = null) { list($qb, $alias) = $this->initQuery($qb, $alias); @@ -511,12 +511,12 @@ class ServiceService extends AbstractEntityService /** * Utile pour la recherche de services * - * @param StructureEntity $structure + * @param Structure $structure * @param QueryBuilder|null $queryBuilder * * @return QueryBuilder */ - public function finderByStructureEns(StructureEntity $structure, QueryBuilder $qb = null, $alias = null) + public function finderByStructureEns(Structure $structure, QueryBuilder $qb = null, $alias = null) { list($qb, $alias) = $this->initQuery($qb, $alias); @@ -828,7 +828,7 @@ class ServiceService extends AbstractEntityService if ($c8 = $recherche->getStructureAff()) $conditions['structure_aff_id'] = '(structure_aff_id = -1 OR structure_aff_id = ' . $c8->getId() . ')'; if ($c9 = $recherche->getStructureEns()) $conditions['structure_ens_id'] = '(structure_ens_id = -1 OR structure_ens_id = ' . $c9->getId() . ')'; - if ($options['composante'] instanceof StructureEntity) { + if ($options['composante'] instanceof Structure) { $id = (int)$options['composante']->getId(); $conditions['composante'] = "(structure_aff_id = -1 OR structure_aff_id = $id OR structure_ens_id = -1 OR structure_ens_id = $id)"; } @@ -987,9 +987,9 @@ class ServiceService extends AbstractEntityService 'intervenant-discipline-libelle' => 'Discipline intervenant', 'heures-service-statutaire' => 'Service statutaire', 'heures-service-du-modifie' => 'Modification de service du', - 'service-structure-aff-libelle' => 'Structure d\'affectation', + 'service-structure-aff-libelle' => 'StructureService d\'affectation', - 'service-structure-ens-libelle' => 'Structure d\'enseignement', + 'service-structure-ens-libelle' => 'StructureService d\'enseignement', 'groupe-type-formation-libelle' => 'Groupe de type de formation', 'type-formation-libelle' => 'Type de formation', 'etape-niveau' => 'Niveau', @@ -1004,7 +1004,7 @@ class ServiceService extends AbstractEntityService 'element-taux-fa' => 'Taux FA', 'commentaires' => 'Commentaires', 'element-ponderation-compl' => 'Majoration', - 'element-source-libelle' => 'Source enseignement', + 'element-source-libelle' => 'SourceService enseignement', 'periode-libelle' => 'Période', 'heures-non-payees' => 'Heures non payées', ]; diff --git a/module/Application/src/Application/Service/SeuilChargeService.php b/module/Application/src/Application/Service/SeuilChargeService.php index 5f46b1534ba9ae209efdd89ddd3a5dc9de1e1e6a..8a8c3e680801c8ac137c201e0492f9bcc6a3dbbd 100755 --- a/module/Application/src/Application/Service/SeuilChargeService.php +++ b/module/Application/src/Application/Service/SeuilChargeService.php @@ -5,13 +5,13 @@ namespace Application\Service; use Application\Entity\Db\GroupeTypeFormation as GroupeTypeFormationEntity; use Application\Entity\Db\Scenario; use Application\Entity\Db\SeuilCharge; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TypeIntervention as TypeInterventionEntity; use Application\Provider\Privilege\Privileges; use Application\Service\Traits\GroupeTypeFormationAwareTrait; use Application\Service\Traits\ScenarioServiceAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\TypeInterventionAwareTrait; use Doctrine\ORM\QueryBuilder; use UnicaenTbl\Service\Traits\TableauBordServiceAwareTrait; @@ -29,7 +29,7 @@ use UnicaenTbl\Service\Traits\TableauBordServiceAwareTrait; class SeuilChargeService extends AbstractEntityService { use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; use ScenarioServiceAwareTrait; use GroupeTypeFormationAwareTrait; use TypeInterventionAwareTrait; @@ -67,7 +67,7 @@ class SeuilChargeService extends AbstractEntityService /** * @param Scenario|integer $scenario - * @param StructureEntity|integer|null $structure + * @param Structure|integer|null $structure * @param GroupeTypeFormationEntity|integer|null $groupeTypeFormation * @param TypeInterventionEntity|integer $typeIntervention * @@ -93,7 +93,7 @@ class SeuilChargeService extends AbstractEntityService /** * @param Scenario|integer $scenario - * @param StructureEntity|integer|null $structure + * @param Structure|integer|null $structure * @param GroupeTypeFormationEntity|integer|null $groupeTypeFormation * @param TypeInterventionEntity|integer $typeIntervention * @param integer|null $dedoublement @@ -112,7 +112,7 @@ class SeuilChargeService extends AbstractEntityService if (!$scenario instanceof Scenario) { $scenario = $this->getServiceScenario()->get($scenario); } - if (!$structure instanceof StructureEntity) { + if (!$structure instanceof Structure) { $structure = $this->getServiceStructure()->get($structure); } if (!$groupeTypeFormation instanceof GroupeTypeFormationEntity) { diff --git a/module/Application/src/Application/Service/Source.php b/module/Application/src/Application/Service/SourceService.php similarity index 94% rename from module/Application/src/Application/Service/Source.php rename to module/Application/src/Application/Service/SourceService.php index b717e82f6ceab5e6b315faa96aa85d8f234ea11f..436710b79055a8ee315a6cc120b8778550c578c1 100644 --- a/module/Application/src/Application/Service/Source.php +++ b/module/Application/src/Application/Service/SourceService.php @@ -6,11 +6,11 @@ use Doctrine\ORM\QueryBuilder; use UnicaenImport\Entity\Db\Source as SourceEntity; /** - * Description of Source + * Description of SourceService * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> */ -class Source extends AbstractEntityService +class SourceService extends AbstractEntityService { const CODE_SOURCE_OSE = 'OSE'; const CODE_SOURCE_TEST = 'Test'; diff --git a/module/Application/src/Application/Service/StatutIntervenant.php b/module/Application/src/Application/Service/StatutIntervenant.php index 763288f037daa38f854e9afb28c0e75f7d1af829..b05619efcff899bd23a58e53f4fd4b7fc5020b38 100644 --- a/module/Application/src/Application/Service/StatutIntervenant.php +++ b/module/Application/src/Application/Service/StatutIntervenant.php @@ -2,7 +2,7 @@ namespace Application\Service; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Doctrine\ORM\QueryBuilder; /** @@ -12,7 +12,7 @@ use Doctrine\ORM\QueryBuilder; */ class StatutIntervenant extends AbstractEntityService { - use SourceAwareTrait; + use SourceServiceAwareTrait; /** * retourne la classe des entités * diff --git a/module/Application/src/Application/Service/Structure.php b/module/Application/src/Application/Service/StructureService.php similarity index 93% rename from module/Application/src/Application/Service/Structure.php rename to module/Application/src/Application/Service/StructureService.php index f6ec4dbcd9050f23336a026e4e5ed937b0874bd3..8d6f2b60d51489c094f22c7c40ad06de1877f063 100644 --- a/module/Application/src/Application/Service/Structure.php +++ b/module/Application/src/Application/Service/StructureService.php @@ -8,21 +8,21 @@ use Application\Service\Traits\MiseEnPaiementIntervenantStructureAwareTrait; use Application\Service\Traits\ServiceAwareTrait; use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\Query\Expr\Func; -use Application\Entity\Db\Structure as EntityStructure; +use Application\Entity\Db\Structure; /** - * Description of Structure + * Description of StructureService * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> * - * @method EntityStructure get($id) - * @method EntityStructure[] getList(\Doctrine\ORM\QueryBuilder $qb = null, $alias = null) - * @method EntityStructure newEntity() + * @method Structure get($id) + * @method Structure[] getList(\Doctrine\ORM\QueryBuilder $qb = null, $alias = null) + * @method Structure newEntity() */ -class Structure extends AbstractEntityService +class StructureService extends AbstractEntityService { - use Traits\AffectationAwareTrait; + use Traits\AffectationServiceAwareTrait; use ServiceAwareTrait; use IntervenantAwareTrait; use MiseEnPaiementAwareTrait; @@ -38,7 +38,7 @@ class Structure extends AbstractEntityService */ public function getEntityClass() { - return EntityStructure::class; + return Structure::class; } @@ -58,7 +58,7 @@ class Structure extends AbstractEntityService /** * Retourne la structure racine (i.e. qui n'a pas de structure parente). * - * @return EntityStructure + * @return Structure */ public function getRacine() { @@ -74,13 +74,13 @@ class Structure extends AbstractEntityService * Sinon, on recherche les personnes ayant un rôle spécifique dans la structure, en remontant la hiérarchie * des structures mères tant que personne n'est trouvé (et si demandé). * - * @param \Application\Entity\Db\Structure $structure Structure concernée + * @param \Application\Entity\Db\Structure $structure StructureService concernée * @param boolean $remonterStructures Remonter les structures mères tant que personne n'est * trouvé ? * * @return string[] mail => nom */ - public function getMailsContact(EntityStructure $structure, $remonterStructures = true) + public function getMailsContact(Structure $structure, $remonterStructures = true) { if ($structure->getContactPj()) { return [$structure->getContactPj()]; @@ -151,7 +151,7 @@ class Structure extends AbstractEntityService * * @return \Doctrine\ORM\QueryBuilder */ - public function finderByStructure(EntityStructure $structure, QueryBuilder $qb = null, $alias = null) + public function finderByStructure(Structure $structure, QueryBuilder $qb = null, $alias = null) { list($qb, $alias) = $this->initQuery($qb, $alias); diff --git a/module/Application/src/Application/Service/Traits/AffectationAwareTrait.php b/module/Application/src/Application/Service/Traits/AffectationServiceAwareTrait.php similarity index 58% rename from module/Application/src/Application/Service/Traits/AffectationAwareTrait.php rename to module/Application/src/Application/Service/Traits/AffectationServiceAwareTrait.php index 48221501fab6efc134d78659400743767bcc3402..30f884be71fd94cdd7393395c963614fddce9045 100644 --- a/module/Application/src/Application/Service/Traits/AffectationAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/AffectationServiceAwareTrait.php @@ -2,28 +2,28 @@ namespace Application\Service\Traits; -use Application\Service\Affectation; +use Application\Service\AffectationService; /** - * Description of AffectationAwareTrait + * Description of AffectationServiceAwareTrait * * @author UnicaenCode */ -trait AffectationAwareTrait +trait AffectationServiceAwareTrait { /** - * @var Affectation + * @var AffectationService */ private $serviceAffectation; /** - * @param Affectation $serviceAffectation + * @param AffectationService $serviceAffectation * * @return self */ - public function setServiceAffectation(Affectation $serviceAffectation) + public function setServiceAffectation(AffectationService $serviceAffectation) { $this->serviceAffectation = $serviceAffectation; @@ -33,12 +33,12 @@ trait AffectationAwareTrait /** - * @return Affectation + * @return AffectationService */ public function getServiceAffectation() { if (empty($this->serviceAffectation)) { - $this->serviceAffectation = \Application::$container->get('ApplicationAffectation'); + $this->serviceAffectation = \Application::$container->get(AffectationService::class); } return $this->serviceAffectation; diff --git a/module/Application/src/Application/Service/Traits/AgrementAwareTrait.php b/module/Application/src/Application/Service/Traits/AgrementServiceAwareTrait.php similarity index 60% rename from module/Application/src/Application/Service/Traits/AgrementAwareTrait.php rename to module/Application/src/Application/Service/Traits/AgrementServiceAwareTrait.php index 6dc00127867f4e9453fbf4a921d07cf6ebb07219..4edfb2237702884a73d9f28a4978d6c36d655ae2 100644 --- a/module/Application/src/Application/Service/Traits/AgrementAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/AgrementServiceAwareTrait.php @@ -2,28 +2,28 @@ namespace Application\Service\Traits; -use Application\Service\Agrement; +use Application\Service\AgrementService; /** - * Description of AgrementAwareTrait + * Description of AgrementServiceAwareTrait * * @author UnicaenCode */ -trait AgrementAwareTrait +trait AgrementServiceAwareTrait { /** - * @var Agrement + * @var AgrementService */ private $serviceAgrement; /** - * @param Agrement $serviceAgrement + * @param AgrementService $serviceAgrement * * @return self */ - public function setServiceAgrement(Agrement $serviceAgrement) + public function setServiceAgrement(AgrementService $serviceAgrement) { $this->serviceAgrement = $serviceAgrement; @@ -33,12 +33,12 @@ trait AgrementAwareTrait /** - * @return Agrement + * @return AgrementService */ public function getServiceAgrement() { if (empty($this->serviceAgrement)) { - $this->serviceAgrement = \Application::$container->get('ApplicationAgrement'); + $this->serviceAgrement = \Application::$container->get(AgrementService::class); } return $this->serviceAgrement; diff --git a/module/Application/src/Application/Service/Traits/AnneeAwareTrait.php b/module/Application/src/Application/Service/Traits/AnneeServiceAwareTrait.php similarity index 62% rename from module/Application/src/Application/Service/Traits/AnneeAwareTrait.php rename to module/Application/src/Application/Service/Traits/AnneeServiceAwareTrait.php index d43a078d8dbacdcdbc1cc3b3e43714af6d57e5c9..f269e422196e3cbae98a4a05185ea21faf33c79e 100644 --- a/module/Application/src/Application/Service/Traits/AnneeAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/AnneeServiceAwareTrait.php @@ -2,28 +2,28 @@ namespace Application\Service\Traits; -use Application\Service\Annee; +use Application\Service\AnneeService; /** - * Description of AnneeAwareTrait + * Description of AnneeServiceAwareTrait * * @author UnicaenCode */ -trait AnneeAwareTrait +trait AnneeServiceAwareTrait { /** - * @var Annee + * @var AnneeService */ private $serviceAnnee; /** - * @param Annee $serviceAnnee + * @param AnneeService $serviceAnnee * * @return self */ - public function setServiceAnnee(Annee $serviceAnnee) + public function setServiceAnnee(AnneeService $serviceAnnee) { $this->serviceAnnee = $serviceAnnee; @@ -33,12 +33,12 @@ trait AnneeAwareTrait /** - * @return Annee + * @return AnneeService */ public function getServiceAnnee() { if (empty($this->serviceAnnee)) { - $this->serviceAnnee = \Application::$container->get('ApplicationAnnee'); + $this->serviceAnnee = \Application::$container->get(AnneeService::class); } return $this->serviceAnnee; diff --git a/module/Application/src/Application/Service/Traits/CampagneSaisieServiceAwareTrait.php b/module/Application/src/Application/Service/Traits/CampagneSaisieServiceAwareTrait.php index 4cb5b0f45419561e36a58b156a8f3175816840c4..00ff5fe0b99bebe11ae6f8a75a109ef2bb09e65a 100755 --- a/module/Application/src/Application/Service/Traits/CampagneSaisieServiceAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/CampagneSaisieServiceAwareTrait.php @@ -38,7 +38,7 @@ trait CampagneSaisieServiceAwareTrait public function getServiceCampagneSaisie() { if (empty($this->serviceCampagneSaisie)) { - $this->serviceCampagneSaisie = \Application::$container->get('applicationCampagneSaisie'); + $this->serviceCampagneSaisie = \Application::$container->get(CampagneSaisieService::class); } return $this->serviceCampagneSaisie; diff --git a/module/Application/src/Application/Service/Traits/SourceAwareTrait.php b/module/Application/src/Application/Service/Traits/SourceServiceAwareTrait.php similarity index 61% rename from module/Application/src/Application/Service/Traits/SourceAwareTrait.php rename to module/Application/src/Application/Service/Traits/SourceServiceAwareTrait.php index ad769cd8cfd753bfc7369a7b29614919dd097ad4..6803b6299fe652f97352ed8fa2ba0722870fe16d 100644 --- a/module/Application/src/Application/Service/Traits/SourceAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/SourceServiceAwareTrait.php @@ -2,28 +2,28 @@ namespace Application\Service\Traits; -use Application\Service\Source; +use Application\Service\SourceService; /** - * Description of SourceAwareTrait + * Description of SourceServiceAwareTrait * * @author UnicaenCode */ -trait SourceAwareTrait +trait SourceServiceAwareTrait { /** - * @var Source + * @var SourceService */ private $serviceSource; /** - * @param Source $serviceSource + * @param SourceService $serviceSource * * @return self */ - public function setServiceSource(Source $serviceSource) + public function setServiceSource(SourceService $serviceSource) { $this->serviceSource = $serviceSource; @@ -33,12 +33,12 @@ trait SourceAwareTrait /** - * @return Source + * @return SourceService */ public function getServiceSource() { if (empty($this->serviceSource)) { - $this->serviceSource = \Application::$container->get('ApplicationSource'); + $this->serviceSource = \Application::$container->get(SourceService::class); } return $this->serviceSource; diff --git a/module/Application/src/Application/Service/Traits/StructureAwareTrait.php b/module/Application/src/Application/Service/Traits/StructureServiceAwareTrait.php similarity index 59% rename from module/Application/src/Application/Service/Traits/StructureAwareTrait.php rename to module/Application/src/Application/Service/Traits/StructureServiceAwareTrait.php index bdacb1fd64a795c9096b9afe64bf77aeaa7bda00..65c5721f8f61e736850d2968ac045866f2a4cbb6 100644 --- a/module/Application/src/Application/Service/Traits/StructureAwareTrait.php +++ b/module/Application/src/Application/Service/Traits/StructureServiceAwareTrait.php @@ -2,28 +2,28 @@ namespace Application\Service\Traits; -use Application\Service\Structure; +use Application\Service\StructureService; /** - * Description of StructureAwareTrait + * Description of StructureServiceAwareTrait * * @author UnicaenCode */ -trait StructureAwareTrait +trait StructureServiceAwareTrait { /** - * @var Structure + * @var StructureService */ private $serviceStructure; /** - * @param Structure $serviceStructure + * @param StructureService $serviceStructure * * @return self */ - public function setServiceStructure(Structure $serviceStructure) + public function setServiceStructure(StructureService $serviceStructure) { $this->serviceStructure = $serviceStructure; @@ -33,12 +33,12 @@ trait StructureAwareTrait /** - * @return Structure + * @return StructureService */ public function getServiceStructure() { if (empty($this->serviceStructure)) { - $this->serviceStructure = \Application::$container->get('ApplicationStructure'); + $this->serviceStructure = \Application::$container->get(StructureService::class); } return $this->serviceStructure; diff --git a/module/Application/src/Application/Service/TypeDotationService.php b/module/Application/src/Application/Service/TypeDotationService.php index e08794d165438d17137adfd440ef34474c21a83b..7d479a91648612f9a55aed823273ddf46aef6de7 100755 --- a/module/Application/src/Application/Service/TypeDotationService.php +++ b/module/Application/src/Application/Service/TypeDotationService.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\TypeDotation; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Doctrine\ORM\QueryBuilder; /** @@ -15,8 +15,8 @@ use Doctrine\ORM\QueryBuilder; */ class TypeDotationService extends AbstractEntityService { - use SourceAwareTrait; - + use SourceServiceAwareTrait; + /** * retourne la classe des entités * @@ -28,8 +28,8 @@ class TypeDotationService extends AbstractEntityService return \Application\Entity\Db\TypeDotation::class; } - - + + /** * Retourne l'alias d'entité courante * @@ -82,7 +82,7 @@ class TypeDotationService extends AbstractEntityService */ public function save($entity){ $entity->setSource($this->getServiceSource()->getOse()); - + return parent::save($entity); } } \ No newline at end of file diff --git a/module/Application/src/Application/Service/TypeModulateur.php b/module/Application/src/Application/Service/TypeModulateur.php index 558939084615c926ffcf71d97061daa02d114ddd..906f4c71f6d6df2439629066f8bc77e534afc8c1 100644 --- a/module/Application/src/Application/Service/TypeModulateur.php +++ b/module/Application/src/Application/Service/TypeModulateur.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\TypeModulateur as TypeModulateurEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\ElementPedagogique as ElementPedagogiqueEntity; use Doctrine\ORM\QueryBuilder; @@ -54,12 +54,12 @@ class TypeModulateur extends AbstractEntityService /** * Ne récupère que les types de modulateurs associés à une structure donnée * - * @param StructureEntity $structure + * @param Structure $structure * @param \Doctrine\ORM\QueryBuilder $qb * @param type $alias * @return \Doctrine\ORM\QueryBuilder */ - public function finderByStructure(StructureEntity $structure, QueryBuilder $qb=null, $alias=null) + public function finderByStructure(Structure $structure, QueryBuilder $qb=null, $alias=null) { list($qb,$alias) = $this->initQuery($qb, $alias); diff --git a/module/Application/src/Application/Service/TypePieceJointeStatutService.php b/module/Application/src/Application/Service/TypePieceJointeStatutService.php index e07aa339a639cee87900f50ceafbc9dd096c4f49..0874b9231c5d10129726bb980b34a825e4d2121e 100644 --- a/module/Application/src/Application/Service/TypePieceJointeStatutService.php +++ b/module/Application/src/Application/Service/TypePieceJointeStatutService.php @@ -2,7 +2,7 @@ namespace Application\Service; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; use Doctrine\ORM\QueryBuilder; use Application\Entity\Db\TypePieceJointeStatut; use Application\Entity\Db\StatutIntervenant as StatutIntervenantEntity; @@ -14,7 +14,7 @@ use Application\Entity\Db\StatutIntervenant as StatutIntervenantEntity; */ class TypePieceJointeStatutService extends AbstractEntityService { - use AnneeAwareTrait; + use AnneeServiceAwareTrait; /** * retourne la classe des entités diff --git a/module/Application/src/Application/Service/Validation.php b/module/Application/src/Application/Service/Validation.php index 1c594c6ccab194ff9de16a8de9e251d371656111..04b59b2cdb650d7070b18a97e52ede65499262a8 100644 --- a/module/Application/src/Application/Service/Validation.php +++ b/module/Application/src/Application/Service/Validation.php @@ -6,7 +6,7 @@ use Application\Entity\Db\Contrat as ContratEntity; use Application\Entity\Db\Dossier as DossierEntity; use Application\Entity\Db\Intervenant as IntervenantEntity; use Application\Entity\Db\MiseEnPaiement as MiseEnPaiementEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TypeValidation as TypeValidationEntity; use Application\Entity\Db\Validation as ValidationEntity; use Application\Entity\Db\TypeVolumeHoraire as TypeVolumeHoraireEntity; @@ -191,11 +191,11 @@ class Validation extends AbstractEntityService /** * @param TypeValidationEntity $typeValidation * @param IntervenantEntity $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return array */ - public function lister(TypeValidationEntity $typeValidation, IntervenantEntity $intervenant, StructureEntity $structure = null) + public function lister(TypeValidationEntity $typeValidation, IntervenantEntity $intervenant, Structure $structure = null) { $dql = " SELECT diff --git a/module/Application/src/Application/Service/VolumeHoraireEnsService.php b/module/Application/src/Application/Service/VolumeHoraireEnsService.php index dd45831fb5abe1c3baff5efa5786dbcf1179f6a6..55c102166e97b12014d72519a68df0639b2caadb 100644 --- a/module/Application/src/Application/Service/VolumeHoraireEnsService.php +++ b/module/Application/src/Application/Service/VolumeHoraireEnsService.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\VolumeHoraireEns; -use Application\Service\Traits\SourceAwareTrait; +use Application\Service\Traits\SourceServiceAwareTrait; use Application\Entity\Db\ElementPedagogique as ElementPedagogiqueEntity; use Application\Entity\Db\TypeIntervention as TypeInterventionEntity; @@ -18,7 +18,7 @@ use Application\Entity\Db\TypeIntervention as TypeInterventionEntity; */ class VolumeHoraireEnsService extends AbstractEntityService { - use SourceAwareTrait; + use SourceServiceAwareTrait; diff --git a/module/Application/src/Application/Service/WorkflowService.php b/module/Application/src/Application/Service/WorkflowService.php index e4be631822712ed137f10990b206d5e6abeef3a6..da26929fb74e8a091779179094328c283e29e272 100755 --- a/module/Application/src/Application/Service/WorkflowService.php +++ b/module/Application/src/Application/Service/WorkflowService.php @@ -3,7 +3,7 @@ namespace Application\Service; use Application\Entity\Db\Intervenant as IntervenantEntity; -use Application\Entity\Db\Structure as StructureEntity; +use Application\Entity\Db\Structure; use Application\Entity\Db\TblWorkflow; use Application\Entity\Db\TypeVolumeHoraire as TypeVolumeHoraireEntity; use Application\Entity\Db\WfEtape; @@ -30,7 +30,7 @@ class WorkflowService extends AbstractService - protected function prepareEtapeParams($etape, IntervenantEntity $intervenant = null, StructureEntity $structure = null) + protected function prepareEtapeParams($etape, IntervenantEntity $intervenant = null, Structure $structure = null) { switch (true) { case $etape === WfEtape::CURRENT || empty($etape): @@ -77,11 +77,11 @@ class WorkflowService extends AbstractService /** * @param WfEtape|WorkflowEtape|TblWorkflow|string $etape * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape */ - public function getEtape($etape, IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getEtape($etape, IntervenantEntity $intervenant = null, Structure $structure = null) { list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure); @@ -102,11 +102,11 @@ class WorkflowService extends AbstractService /** * @param WfEtape|WorkflowEtape|TblWorkflow|string $etape * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape */ - public function getNextEtape($etape, IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getNextEtape($etape, IntervenantEntity $intervenant = null, Structure $structure = null) { list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure); @@ -129,11 +129,11 @@ class WorkflowService extends AbstractService /** * @param WfEtape|WorkflowEtape|TblWorkflow|string $etape * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape */ - public function getPreviousAccessibleEtape($etape, IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getPreviousAccessibleEtape($etape, IntervenantEntity $intervenant = null, Structure $structure = null) { list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure); @@ -156,11 +156,11 @@ class WorkflowService extends AbstractService /** * @param WfEtape|WorkflowEtape|TblWorkflow|string $etape * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape */ - public function getNextAccessibleEtape($etape, IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getNextAccessibleEtape($etape, IntervenantEntity $intervenant = null, Structure $structure = null) { list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure); @@ -198,11 +198,11 @@ class WorkflowService extends AbstractService /** * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape|null */ - public function getEtapeCourante(IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getEtapeCourante(IntervenantEntity $intervenant = null, Structure $structure = null) { $fdr = $this->getFeuilleDeRoute($intervenant, $structure); @@ -218,11 +218,11 @@ class WorkflowService extends AbstractService /** * * @param IntervenantEntity|null $intervenant - * @param StructureEntity|null $structure + * @param Structure|null $structure * * @return WorkflowEtape[] */ - public function getFeuilleDeRoute(IntervenantEntity $intervenant = null, StructureEntity $structure = null) + public function getFeuilleDeRoute(IntervenantEntity $intervenant = null, Structure $structure = null) { if (!$intervenant || !$structure) { /* Filtrage en fonction du contexte */ @@ -284,7 +284,7 @@ class WorkflowService extends AbstractService /** - * @param array $tableauxBords + * @param array $tableauxBords * @param IntervenantEntity|IntervenantEntity[]|string $intervenant */ public function calculerTableauxBord($tableauxBords = [], $intervenant) @@ -319,19 +319,19 @@ class WorkflowService extends AbstractService foreach ($deps as $dep => $null) { if (isset($tbls[$dep])) { - if (is_array($intervenant)){ + if (is_array($intervenant)) { $params = 'INTERVENANT_ID IN ('; - $c = 0; - foreach( $intervenant as $i ){ + $c = 0; + foreach ($intervenant as $i) { $c++; if ($c > 1) $params .= ','; $params .= $i->getId(); } $params .= ')'; - }elseif($intervenant instanceof \Application\Entity\Db\Intervenant){ + } elseif ($intervenant instanceof \Application\Entity\Db\Intervenant) { $params = ['intervenant_id' => $intervenant->getId()]; - }else{ - $params = 'INTERVENANT_ID IN ('.$intervenant.')'; + } else { + $params = 'INTERVENANT_ID IN (' . $intervenant . ')'; } $this->getServiceTableauBord()->calculer( @@ -400,7 +400,7 @@ class WorkflowService extends AbstractService * * @return TblWorkflow[] */ - protected function getEtapes(IntervenantEntity $intervenant, StructureEntity $structure = null) + protected function getEtapes(IntervenantEntity $intervenant, Structure $structure = null) { $dql = " diff --git a/module/Application/src/Application/View/Helper/AgrementViewHelper.php b/module/Application/src/Application/View/Helper/AgrementViewHelper.php index 8529c6216ccc4c61d46f576a4bdb92d722676a14..5f9bb94b6f458b221872b5b4646d45723d1bd7eb 100644 --- a/module/Application/src/Application/View/Helper/AgrementViewHelper.php +++ b/module/Application/src/Application/View/Helper/AgrementViewHelper.php @@ -93,7 +93,7 @@ class AgrementViewHelper extends AbstractHtmlElement if (!$this->short) { $vars["Intervenant"] = (string)$entity->getIntervenant(); if ($structure = $entity->getStructure()) { - $vars["Structure"] = (string)$structure; + $vars["StructureService"] = (string)$structure; } } $vars["Date de la décision"] = $entity->getDateDecision()->format(Constants::DATE_FORMAT); diff --git a/module/Application/src/Application/View/Helper/AppLinkFactory.php b/module/Application/src/Application/View/Helper/AppLinkFactory.php index c7cb0268c61d30fd8cad2f8029eb1fc8cb881add..18f7eea6b3028fceb66a194365d9cad5a97cba94 100644 --- a/module/Application/src/Application/View/Helper/AppLinkFactory.php +++ b/module/Application/src/Application/View/Helper/AppLinkFactory.php @@ -8,7 +8,7 @@ use Zend\View\HelperPluginManager; use Zend\Console\Console; use Zend\Mvc\Router\RouteMatch; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\AnneeAwareTrait; +use Application\Service\Traits\AnneeServiceAwareTrait; /** * Description of AppLinkFactory @@ -18,7 +18,7 @@ use Application\Service\Traits\AnneeAwareTrait; class AppLinkFactory implements FactoryInterface { use ContextServiceAwareTrait; - use AnneeAwareTrait; + use AnneeServiceAwareTrait; /** diff --git a/module/Application/src/Application/View/Helper/Import/EtapeViewHelper.php b/module/Application/src/Application/View/Helper/Import/EtapeViewHelper.php index 3557c1bbbe028c07ebaafe25672d07f7d02a769d..d6213a092f444ca5a22878001b05e55d961999f6 100644 --- a/module/Application/src/Application/View/Helper/Import/EtapeViewHelper.php +++ b/module/Application/src/Application/View/Helper/Import/EtapeViewHelper.php @@ -9,16 +9,16 @@ use UnicaenImport\View\Helper\DifferentielLigne\DifferentielLigne; */ class EtapeViewHelper extends DifferentielLigne { - use \Application\Service\Traits\StructureAwareTrait; + use \Application\Service\Traits\StructureServiceAwareTrait; public function getColumnDetails($column, $value) { switch( $column ){ case 'STRUCTURE_ID': if (null === $value){ - return '<span class="text-danger">Structure non identifiée</span>'; + return '<span class="text-danger">StructureService non identifiée</span>'; }else{ - $column = 'Structure'; + $column = 'StructureService'; $value = $this->getServiceStructure()->get($value); return parent::getColumnDetails($column, $value); } diff --git a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php index 554d9d82f7600b95417b5c765f1057553a433daf..1983fc50e3d2b4a23a26ae3ea57e7310c6f09151 100644 --- a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php +++ b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php @@ -100,7 +100,7 @@ class IntervenantViewHelper extends AbstractHtmlElement if ($entity->getHistoDestruction()) { $msg = 'Cet intervenant a été supprimé de OSE le '.$entity->getHistoDestruction()->format(Constants::DATE_FORMAT).'.'; - if ($entity->getSource()->getCode() !== \Application\Service\Source::CODE_SOURCE_OSE){ + if ($entity->getSource()->getCode() !== \Application\Service\SourceService::CODE_SOURCE_OSE){ $msg .= ' Sa fiche ne remonte plus depuis l\'application '.$entity->getSource().'.'; } diff --git a/module/Application/src/Application/View/Helper/OffreFormation/ElementPedagogiqueViewHelper.php b/module/Application/src/Application/View/Helper/OffreFormation/ElementPedagogiqueViewHelper.php index 6bbe8c2d95fe55706781c1efc0be65346692fa28..6d5f897e54b813580ebcf4abbb389751f7fdca89 100644 --- a/module/Application/src/Application/View/Helper/OffreFormation/ElementPedagogiqueViewHelper.php +++ b/module/Application/src/Application/View/Helper/OffreFormation/ElementPedagogiqueViewHelper.php @@ -62,7 +62,7 @@ class ElementPedagogiqueViewHelper extends AbstractHtmlElement $vars = [ "Code {$entity->getSource()->getLibelle()}" => $entity->getSourceCode(), "Libellé" => $entity->getLibelle(), - "Structure" => $entity->getStructure(), + "StructureService" => $entity->getStructure(), "Discipline" => $entity->getDiscipline(), "Période d'enseignement" => $entity->getPeriode(), "<span title=\"Formation ouverte à distance\">FOAD</span>" => (bool)$entity->getTauxFoad() ? "Oui" : "Non", diff --git a/module/Application/src/Application/View/Helper/OffreFormation/EtapeViewHelper.php b/module/Application/src/Application/View/Helper/OffreFormation/EtapeViewHelper.php index bfb97733b5be1f6c1a12e8d7d160a680c77ac308..8ef794d4e95ae02c44a701bac4629169532a5bb4 100644 --- a/module/Application/src/Application/View/Helper/OffreFormation/EtapeViewHelper.php +++ b/module/Application/src/Application/View/Helper/OffreFormation/EtapeViewHelper.php @@ -64,7 +64,7 @@ class EtapeViewHelper extends AbstractViewHelper $vars = [ "Code {$entity->getSource()->getLibelle()}" => $entity->getSourceCode(), "Libellé" => $entity->getLibelle(), - "Structure" => $entity->getStructure(), + "StructureService" => $entity->getStructure(), "Type de formation" => $entity->getTypeFormation(), "Niveau" => $entity->getNiveau(), "Spécif. échanges" => $entity->getSpecifiqueEchanges() ? 'Oui' : 'Non', diff --git a/module/Application/src/Application/View/Helper/Service/Liste.php b/module/Application/src/Application/View/Helper/Service/Liste.php index d43f7e96d3cb638542af329039ac6fd54a6de436..541807fb00407b2f29fb6dd15d8ab524202be8af 100644 --- a/module/Application/src/Application/View/Helper/Service/Liste.php +++ b/module/Application/src/Application/View/Helper/Service/Liste.php @@ -66,11 +66,11 @@ class Liste extends AbstractViewHelper ], 'structure-aff' => [ 'visibility' => false, - 'head-text' => "<th title=\"Structure d'appartenance de l'intervenant\">Structure d'affectation</th>", + 'head-text' => "<th title=\"StructureService d'appartenance de l'intervenant\">StructureService d'affectation</th>", ], 'structure-ens' => [ 'visibility' => true, - 'head-text' => "<th title=\"Structure gestionnaire de l'enseignement\">Composante d'enseignement</th>", + 'head-text' => "<th title=\"StructureService gestionnaire de l'enseignement\">Composante d'enseignement</th>", ], 'formation' => [ 'visibility' => true, diff --git a/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php b/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php index e1b87d796620709d7b8aec2dfcb57a589160f592..452d5284645ee1e2276feb7af64ea25c7673b048 100644 --- a/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php +++ b/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php @@ -56,7 +56,7 @@ class Liste extends AbstractViewHelper ], 'structure' => [ 'visibility' => true, - 'head-text' => "<th title=\"Structure\">Structure</th>", + 'head-text' => "<th title=\"StructureService\">StructureService</th>", ], 'fonction' => [ 'visibility' => true, diff --git a/module/Application/src/Application/View/Helper/StructureViewHelper.php b/module/Application/src/Application/View/Helper/StructureViewHelper.php index 08f461656128b06a3a2707a0bfadf24b27ab9002..52607883803099dbe33898ba6c0f490bbf5f02a7 100644 --- a/module/Application/src/Application/View/Helper/StructureViewHelper.php +++ b/module/Application/src/Application/View/Helper/StructureViewHelper.php @@ -7,7 +7,7 @@ use Application\Entity\Db\Structure; use Application\Entity\Db\Traits\StructureAwareTrait; /** - * Description of Structure + * Description of StructureService * * @author Laurent LÉCLUSE <laurent.lecluse at unicaen.fr> */ diff --git a/module/Application/src/Application/View/Helper/UserProfileSelectRadioItem.php b/module/Application/src/Application/View/Helper/UserProfileSelectRadioItem.php index c8f0923b1f9c0011fed0385ff36983d31e69bad7..c6e4f77898963c1e45a54cf15da157bad7ed0ed9 100644 --- a/module/Application/src/Application/View/Helper/UserProfileSelectRadioItem.php +++ b/module/Application/src/Application/View/Helper/UserProfileSelectRadioItem.php @@ -3,7 +3,7 @@ namespace Application\View\Helper; use UnicaenApp\Traits\SessionContainerTrait; use UnicaenAuth\View\Helper\UserProfileSelectRadioItem as UnicaenAuthViewHelper; -use Application\Service\Traits\StructureAwareTrait as StructureServiceAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait as StructureServiceAwareTrait; use Application\Entity\Db\Traits\StructureAwareTrait; /** diff --git a/module/Application/src/Application/View/Helper/UserProfileSelectRadioItemFactory.php b/module/Application/src/Application/View/Helper/UserProfileSelectRadioItemFactory.php index 35673d065569547e33ec7272998d1552752f9ca3..88a38e56b8d24e99c8169590830fb90ad3b8c83b 100644 --- a/module/Application/src/Application/View/Helper/UserProfileSelectRadioItemFactory.php +++ b/module/Application/src/Application/View/Helper/UserProfileSelectRadioItemFactory.php @@ -6,7 +6,7 @@ use Zend\ServiceManager\ServiceLocatorInterface; use UnicaenApp\View\Helper\UserProfileSelectFactory; use Zend\ServiceManager\ServiceLocatorAwareTrait; use Application\Service\Traits\ContextServiceAwareTrait; -use Application\Service\Traits\StructureAwareTrait; +use Application\Service\Traits\StructureServiceAwareTrait; /** * @@ -17,7 +17,7 @@ class UserProfileSelectRadioItemFactory extends UserProfileSelectFactory { use ServiceLocatorAwareTrait; use ContextServiceAwareTrait; - use StructureAwareTrait; + use StructureServiceAwareTrait; /** diff --git a/module/Application/view/application/droits/affectations.phtml b/module/Application/view/application/droits/affectations.phtml index a92a5ac5c35b09b748cf88ce9b669b066dafc9bf..f266e5de38e0abfbf13f018b38aebc89659c9a4e 100644 --- a/module/Application/view/application/droits/affectations.phtml +++ b/module/Application/view/application/droits/affectations.phtml @@ -9,10 +9,10 @@ use Application\Provider\Privilege\Privileges; $head = [ - 'structure' => 'Structure', + 'structure' => 'StructureService', 'role' => 'Rôle', 'personnel' => 'Personnel', - 'source' => '<abbr title="Source de données">Src</abbr>/Actions', + 'source' => '<abbr title="SourceService de données">Src</abbr>/Actions', ]; if ($structure) unset($head['structure']); diff --git a/tests/OSETest/Entity/Db/Asset.php b/tests/OSETest/Entity/Db/Asset.php index bd8865e1e349234197fe7ba413cf6510cf6a3d17..fc04275ee003ed49fca286df014a746848c5cd0e 100644 --- a/tests/OSETest/Entity/Db/Asset.php +++ b/tests/OSETest/Entity/Db/Asset.php @@ -86,7 +86,7 @@ class Asset $e ->setEtablissement($etablissement) ->setLibelleCourt(uniqid('TEST ')) - ->setLibelleLong(uniqid('Structure de test')) + ->setLibelleLong(uniqid('StructureService de test')) ->setNiveau(2) ->setType($typeStructure) ->setParente($parente) diff --git a/tests/OSETest/Entity/Db/EntityProvider.php b/tests/OSETest/Entity/Db/EntityProvider.php index 8b96d00b94d649b649397bd6b051d70f7c1996f9..16bcfbefd636ae86b6a26f28510a921f72f8b8b5 100644 --- a/tests/OSETest/Entity/Db/EntityProvider.php +++ b/tests/OSETest/Entity/Db/EntityProvider.php @@ -328,7 +328,7 @@ class EntityProvider } /** - * Retourne à chaque appel une nouvelle instance de Structure persistée. + * Retourne à chaque appel une nouvelle instance de StructureService persistée. * * @return Structure */ @@ -347,7 +347,7 @@ class EntityProvider * Recherche et retourne la structure racine, i.e. qui n'a aucun structure mère. * * @return Structure - * @throws RuntimeException Structure racine introuvable + * @throws RuntimeException StructureService racine introuvable */ public function getStructureRacine() { @@ -357,7 +357,7 @@ class EntityProvider $this->structureRacine = $this->getEntityManager()->getRepository("Application\Entity\Db\Structure")->findOneByParente(null); if (!$this->structureRacine) { - throw new RuntimeException("Structure racine introuvable."); + throw new RuntimeException("StructureService racine introuvable."); } return $this->structureRacine; @@ -365,8 +365,8 @@ class EntityProvider /** * Retourne : - * - soit une Structure d'enseignement quelconque ; - * - soit à chaque appel une nouvelle instance de Structure d'enseignement persistée. + * - soit une StructureService d'enseignement quelconque ; + * - soit à chaque appel une nouvelle instance de StructureService d'enseignement persistée. * * @param boolean $quelconque * @return Structure @@ -380,7 +380,7 @@ class EntityProvider ->andWhere("ts.enseignement = 1"); $this->structureEns = $qb->getQuery()->setMaxResults(1)->getSingleResult(); if (!$this->structureEns) { - throw new RuntimeException("Structure d'enseignement quelconque introuvable."); + throw new RuntimeException("StructureService d'enseignement quelconque introuvable."); } } @@ -801,7 +801,7 @@ class EntityProvider } /** - * Retourne à chaque appel une nouvelle instance d'Agrement persistée. + * Retourne à chaque appel une nouvelle instance d'AgrementService persistée. * * @param TypeAgrement $type * @param Intervenant $intervenant