From 2a0acf6eacaf1d2812e5ad1f7adedd289bda27b2 Mon Sep 17 00:00:00 2001 From: lecluse <lecluse@d57fa8bc-6af1-4de9-8b7d-78e900e231e7> Date: Fri, 17 Nov 2017 14:11:35 +0000 Subject: [PATCH] Refactoring : renomage des services (doivent se terminer par *Service) --- .../Cr\303\251er un administrateur local.php" | 5 +- data/Sql/Versions/v_1.3.2.sql | 534 ++++++++--------- data/Sql/Versions/v_1.3.3.sql | 540 +++++++++--------- module/Application/autoload_classmap.php | 104 ++-- .../Application/config/aaa_module.config.php | 32 +- module/Application/config/agrement.config.php | 68 +-- module/Application/config/budget.config.php | 2 +- module/Application/config/chargens.config.php | 4 +- .../Application/config/modulateur.config.php | 2 +- .../config/offre-formation.config.php | 12 +- module/Application/config/service.config.php | 20 +- .../Application/config/structure.config.php | 78 +-- .../Controller/AgrementController.php | 11 +- .../Controller/BudgetController.php | 18 +- .../Controller/ChargensController.php | 10 +- .../Controller/DisciplineController.php | 4 +- .../Controller/DroitsController.php | 12 +- .../Controller/IndexController.php | 2 +- .../Controller/IndicateurController.php | 4 +- .../Controller/OffreFormationController.php | 4 +- .../Controller/PaiementController.php | 4 +- .../Controller/ParametreController.php | 6 +- .../Controller/PilotageController.php | 2 +- .../Controller/RechercheController.php | 3 +- .../Controller/ServiceController.php | 4 +- .../Controller/StructureController.php | 6 +- .../Controller/UtilisateurController.php | 4 +- .../src/Application/Entity/Db/Affectation.php | 2 +- .../src/Application/Entity/Db/Agrement.php | 4 +- .../src/Application/Entity/Db/Annee.php | 2 +- .../Entity/Db/NotificationIndicateur.php | 2 +- .../src/Application/Entity/Db/Structure.php | 4 +- .../Db/Traits/AffectationAwareTrait.php | 2 +- .../Entity/Db/Traits/AgrementAwareTrait.php | 2 +- .../Entity/Db/Traits/AnneeAwareTrait.php | 2 +- .../Entity/Db/Traits/StructureAwareTrait.php | 2 +- .../Application/Entity/Service/Recherche.php | 4 +- .../Application/Form/Chargens/FiltreForm.php | 6 +- .../Form/Chargens/ScenarioForm.php | 8 +- .../Form/Droits/AffectationForm.php | 8 +- .../FonctionReferentielSaisieForm.php | 8 +- .../ElementPedagogiqueRechercheFieldset.php | 4 +- .../ElementPedagogiqueSaisie.php | 8 +- .../Form/OffreFormation/EtapeSaisie.php | 8 +- .../Paiement/MiseEnPaiementRechercheForm.php | 4 +- .../src/Application/Form/ParametresForm.php | 4 +- .../ModifierTypePieceJointeStatutForm.php | 6 +- .../Form/Plafond/PlafondApplicationForm.php | 14 +- .../Form/Service/RechercheForm.php | 10 +- .../Form/Service/SaisieFieldset.php | 4 +- .../ServiceReferentiel/SaisieFieldset.php | 12 +- .../TypeInterventionSaisieForm.php | 6 +- .../TypeInterventionStructureSaisieForm.php | 14 +- .../Intervenant/SuppressionDataProcessus.php | 8 +- .../Processus/ServiceProcessus.php | 4 +- .../Provider/Chargens/ChargensProvider.php | 4 +- .../Provider/Role/RoleProvider.php | 6 +- ...Affectation.php => AffectationService.php} | 18 +- .../{Agrement.php => AgrementService.php} | 18 +- .../Service/{Annee.php => AnneeService.php} | 32 +- .../src/Application/Service/CentreCoutEp.php | 4 +- .../Application/Service/CheminPedagogique.php | 6 +- .../Application/Service/ContextService.php | 38 +- .../Application/Service/DisciplineService.php | 4 +- .../Application/Service/DotationService.php | 4 +- .../Service/ElementPedagogique.php | 12 +- .../src/Application/Service/Etape.php | 6 +- .../Application/Service/FormuleResultat.php | 6 +- .../Application/Service/IndicateurService.php | 8 +- .../Interfaces/AffectationAwareInterface.php | 7 +- .../Interfaces/AgrementAwareInterface.php | 7 +- .../Interfaces/AnneeAwareInterface.php | 7 +- .../Interfaces/SourceAwareInterface.php | 7 +- .../Interfaces/StructureAwareInterface.php | 7 +- .../src/Application/Service/Intervenant.php | 10 +- .../src/Application/Service/LocalContext.php | 17 +- .../Application/Service/MiseEnPaiement.php | 22 +- .../Service/ModificationServiceDu.php | 8 +- .../Service/NotificationIndicateur.php | 8 +- .../src/Application/Service/Periode.php | 4 +- .../Service/ServiceReferentiel.php | 12 +- .../Application/Service/ServiceService.php | 26 +- .../Service/SeuilChargeService.php | 12 +- .../Service/{Source.php => SourceService.php} | 4 +- .../Application/Service/StatutIntervenant.php | 4 +- .../{Structure.php => StructureService.php} | 24 +- ...t.php => AffectationServiceAwareTrait.php} | 16 +- ...rait.php => AgrementServiceAwareTrait.php} | 16 +- ...reTrait.php => AnneeServiceAwareTrait.php} | 16 +- .../CampagneSaisieServiceAwareTrait.php | 2 +- ...eTrait.php => SourceServiceAwareTrait.php} | 16 +- ...ait.php => StructureServiceAwareTrait.php} | 16 +- .../Service/TypeDotationService.php | 12 +- .../Application/Service/TypeModulateur.php | 6 +- .../Service/TypePieceJointeStatutService.php | 4 +- .../src/Application/Service/Validation.php | 6 +- .../Service/VolumeHoraireEnsService.php | 4 +- .../Application/Service/WorkflowService.php | 44 +- .../View/Helper/AgrementViewHelper.php | 2 +- .../View/Helper/AppLinkFactory.php | 4 +- .../View/Helper/Import/EtapeViewHelper.php | 6 +- .../Intervenant/IntervenantViewHelper.php | 2 +- .../ElementPedagogiqueViewHelper.php | 2 +- .../Helper/OffreFormation/EtapeViewHelper.php | 2 +- .../Application/View/Helper/Service/Liste.php | 4 +- .../View/Helper/ServiceReferentiel/Liste.php | 2 +- .../View/Helper/StructureViewHelper.php | 2 +- .../Helper/UserProfileSelectRadioItem.php | 2 +- .../UserProfileSelectRadioItemFactory.php | 4 +- .../application/droits/affectations.phtml | 4 +- tests/OSETest/Entity/Db/Asset.php | 2 +- tests/OSETest/Entity/Db/EntityProvider.php | 14 +- 112 files changed, 1113 insertions(+), 1106 deletions(-) rename module/Application/src/Application/Service/{Affectation.php => AffectationService.php} (86%) rename module/Application/src/Application/Service/{Agrement.php => AgrementService.php} (90%) rename module/Application/src/Application/Service/{Annee.php => AnneeService.php} (79%) rename module/Application/src/Application/Service/{Source.php => SourceService.php} (94%) rename module/Application/src/Application/Service/{Structure.php => StructureService.php} (93%) rename module/Application/src/Application/Service/Traits/{AffectationAwareTrait.php => AffectationServiceAwareTrait.php} (58%) rename module/Application/src/Application/Service/Traits/{AgrementAwareTrait.php => AgrementServiceAwareTrait.php} (60%) rename module/Application/src/Application/Service/Traits/{AnneeAwareTrait.php => AnneeServiceAwareTrait.php} (62%) rename module/Application/src/Application/Service/Traits/{SourceAwareTrait.php => SourceServiceAwareTrait.php} (61%) rename module/Application/src/Application/Service/Traits/{StructureAwareTrait.php => StructureServiceAwareTrait.php} (59%) diff --git "a/code/Cr\303\251er un administrateur local.php" "b/code/Cr\303\251er un administrateur local.php" index dbe4242685..1f86b4c365 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 43eee0297a..49381319de 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 b2c5200cd2..b5d0e85892 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 acc7e8e8ba..c3f5f89c99 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 b22f0e4113..77ae39949a 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 19a371392e..81e3aad46a 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 a19c56f8e9..5089700f0c 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 9146f4b85b..91012f99ed 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 63c0d3d0d5..53bcfeea55 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 0225b67ec4..371d4d5b56 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 dcfe5c381f..3892706ac5 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 eb79a6cbe1..64119a76d8 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 be0fc1a20e..ba10d141aa 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 3f4ab2abf3..e3b6dd3f28 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 33ab3040e9..272b3ba82f 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 54265ddc9e..2354abaece 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 983f3e4cf0..2d96d9c1dd 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 fe6a4e7336..6c1d40cfc1 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 e59c2500d9..901b447ab8 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 ef397553d1..b554d7565f 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 78145bde98..b335323364 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 5de9960ac5..e312b4ece5 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 2fd88d33f0..b6d6b85c74 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 29e806aa6e..efd352db14 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 d1882bf8ee..a93c515d83 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 06629e6369..43d86f3cb7 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 86d1088f89..7401c814a6 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 32e1023fa1..446e72941b 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 a74a7c1d32..6771d17271 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 8446fbe56b..50d1a4481d 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 97b0a181af..c44f3b73b7 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 d7ffabf9ea..719f2e48b9 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 41838ae2f1..0b6d2ebec5 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 f1bf276aa5..54e9d95abe 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 29f393e2a0..a3a0b6f71e 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 e9f4ac1f14..40be017a4f 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 19d4170035..a97cdf6eb4 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 6d35a611a7..0c2dedf539 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 bed5e81a49..40dc2b6cd2 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 c893d1200a..fd883978d2 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 dad19bd0e4..01a87da0fd 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 1b5d9233c0..205cb10440 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 5ef3114ddb..4f22480fa5 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 dbad124d14..e10fc8acd1 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 845d099b9a..bc9e3dfee1 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 9e57fab148..bafdc55d4f 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 4fa43fe10e..3998931679 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 3fac17556c..c84050a4d5 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 3e6094954f..719a810a25 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 8010fec199..3a846571e1 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 e338ca9a1e..84dc301347 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 e8e7d3131f..6cb3e94271 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 d3065c38bb..c0909a5eab 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 39e0173478..143bf93ca0 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 a811b34624..285db7c127 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 f123820b43..dbea715252 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 a75bf2b45f..399f50b94d 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 87b3b3cc01..8db20f720e 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 a62b13ea79..7f977237ac 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 f877e7bbf6..e09f669993 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 4b7c0efb27..a690b5b1db 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 9ce43f8699..56ddf74c42 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 c4e2721291..7892e8e41b 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 0f2682250f..f413bdca23 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 e88b889b7d..b0fa87bd8e 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 c3b544d6c2..7fc550669c 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 099f315acb..3a0ac8df60 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 ac14121cc1..3d4e495b92 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 e8d9700e86..d1a260aa2b 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 8701967742..6ee1556e0b 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 efddf209e0..5834d414bb 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 cc253c6dc0..9426ddd48d 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 6bb89b4363..b17d4faa8c 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 ef4e2d85a3..df5664a6e4 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 a3dd7b1b09..4e04c749e3 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 5232a94331..2b444882fc 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 f1a575c598..0dc6674243 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 6009c16155..844cdba5cc 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 2867e90fe7..e2aecd3536 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 b1a10a9687..64b2ccd217 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 2cd6e25651..1820a93345 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 b26d17c746..63c100998d 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 5f46b1534b..8a8c3e6808 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 b717e82f6c..436710b790 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 763288f037..b05619efcf 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 f6ec4dbcd9..8d6f2b60d5 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 48221501fa..30f884be71 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 6dc0012786..4edfb22377 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 d43a078d8d..f269e42219 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 4cb5b0f454..00ff5fe0b9 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 ad769cd8cf..6803b6299f 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 bdacb1fd64..65c5721f8f 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 e08794d165..7d479a9164 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 5589390846..906f4c71f6 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 e07aa339a6..0874b9231c 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 1c594c6cca..04b59b2cdb 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 dd45831fb5..55c102166e 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 e4be631822..da26929fb7 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 8529c6216c..5f9bb94b6f 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 c7cb0268c6..18f7eea6b3 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 3557c1bbbe..d6213a092f 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 554d9d82f7..1983fc50e3 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 6bbe8c2d95..6d5f897e54 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 bfb97733b5..8ef794d4e9 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 d43f7e96d3..541807fb00 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 e1b87d7966..452d528464 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 08f4616561..5260788380 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 c8f0923b1f..c6e4f77898 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 35673d0655..88a38e56b8 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 a92a5ac5c3..f266e5de38 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 bd8865e1e3..fc04275ee0 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 8b96d00b94..16bcfbefd6 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 -- GitLab