Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
9dc73423
Commit
9dc73423
authored
3 years ago
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
Ajout des dates de validation du prévisionnel et du réalisé dans l'historique de l'intervenant
parent
720ff4a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
data/ddl/view/V_INTERVENANT_HISTORIQUE.sql
+67
-3
67 additions, 3 deletions
data/ddl/view/V_INTERVENANT_HISTORIQUE.sql
with
67 additions
and
3 deletions
data/ddl/view/V_INTERVENANT_HISTORIQUE.sql
+
67
−
3
View file @
9dc73423
CREATE
OR
REPLACE
FORCE
VIEW
V_INTERVENANT_HISTORIQUE
AS
CREATE
OR
REPLACE
FORCE
VIEW
V_INTERVENANT_HISTORIQUE
AS
WITH
historique
AS
(
--Initialisation des données personnelles
SELECT
d
.
intervenant_id
intervenant_id
,
...
...
@@ -79,8 +80,8 @@ UNION ALL
SELECT
s
.
intervenant_id
intervenant_id
,
'3 - Service prévisionnel et/ou service référentiel'
categorie
,
'Modification/Ajout du service prévisionnel pour la composante '
||
MAX
(
st
.
libelle_court
)
label
,
MAX
(
vh
.
histo_
modific
ation
)
histo_date
,
MAX
(
vh
.
histo_
modific
ateur_id
)
KEEP
(
dense_rank
FIRST
ORDER
BY
vh
.
histo_modification
DESC
)
histo_createur_id
,
MAX
(
u
.
display_name
)
KEEP
(
dense_rank
FIRST
ORDER
BY
vh
.
histo_modification
DESC
)
histo_user
,
MAX
(
vh
.
histo_
cre
ation
)
histo_date
,
MAX
(
vh
.
histo_
cre
ateur_id
)
KEEP
(
dense_rank
FIRST
ORDER
BY
vh
.
histo_modification
DESC
)
histo_createur_id
,
MAX
(
u
.
display_name
)
KEEP
(
dense_rank
FIRST
ORDER
BY
vh
.
histo_modification
DESC
)
histo_user
,
'glyphicon glyphicon-ok'
icon
,
3
ordre
FROM
volume_horaire
vh
...
...
@@ -112,6 +113,47 @@ FROM
WHERE
s
.
histo_destruction
IS
NULL
UNION
ALL
--Validation du service prévisionnel
SELECT
s
.
intervenant_id
intervenant_id
,
'3 - Service prévisionnel et/ou service référentiel'
categorie
,
'Validation du service prévisionnel pour la composante '
||
MAX
(
st
.
libelle_court
)
label
,
MAX
(
v
.
histo_modification
)
histo_date
,
MAX
(
v
.
histo_modificateur_id
)
KEEP
(
dense_rank
FIRST
ORDER
BY
v
.
histo_modification
DESC
)
histo_createur_id
,
MAX
(
u
.
display_name
)
KEEP
(
dense_rank
FIRST
ORDER
BY
v
.
histo_modification
DESC
)
histo_user
,
'glyphicon glyphicon-ok'
icon
,
3
ordre
FROM
volume_horaire
vh
JOIN
service
s
ON
s
.
id
=
vh
.
service_id
JOIN
element_pedagogique
ep
ON
s
.
element_pedagogique_id
=
ep
.
id
JOIN
STRUCTURE
st
ON
st
.
id
=
ep
.
structure_id
JOIN
type_volume_horaire
tvh
ON
tvh
.
id
=
vh
.
type_volume_horaire_id
AND
tvh
.
code
=
'PREVU'
JOIN
periode
p
ON
p
.
id
=
vh
.
periode_id
JOIN
type_intervention
ti
ON
ti
.
id
=
vh
.
type_intervention_id
JOIN
validation_vol_horaire
vvh
ON
vvh
.
volume_horaire_id
=
vh
.
id
JOIN
validation
v
ON
v
.
id
=
vvh
.
validation_id
JOIN
utilisateur
u
ON
u
.
id
=
vh
.
histo_modificateur_id
GROUP
BY
s
.
intervenant_id
,
ep
.
structure_id
UNION
ALL
--validation du service référentiel
SELECT
s
.
intervenant_id
intervenant_id
,
'3 - Service prévisionnel et/ou service référentiel'
categorie
,
'Validation du service référentiel : '
||
fr
.
libelle_court
||
' pour la composante '
||
str
.
libelle_court
label
,
v
.
histo_modification
histo_date
,
v
.
histo_modificateur_id
histo_createur_id
,
u
.
display_name
histo_user
,
'glyphicon glyphicon-ok'
icon
,
3
ordre
FROM
service_referentiel
s
JOIN
validation_vol_horaire_ref
vvhr
ON
s
.
id
=
vvhr
.
volume_horaire_ref_id
JOIN
validation
v
ON
v
.
id
=
vvhr
.
validation_id
JOIN
fonction_referentiel
fr
ON
fr
.
id
=
s
.
fonction_id
JOIN
utilisateur
u
ON
u
.
id
=
s
.
histo_modificateur_id
LEFT
JOIN
STRUCTURE
str
ON
str
.
id
=
s
.
structure_id
WHERE
s
.
histo_destruction
IS
NULL
UNION
ALL
--Modification de service dû
SELECT
...
...
@@ -249,6 +291,28 @@ FROM volume_horaire vh
LEFT
JOIN
motif_non_paiement
mnp
ON
mnp
.
id
=
vh
.
motif_non_paiement_id
GROUP
BY
s
.
intervenant_id
,
ep
.
structure_id
UNION
ALL
--Validation du service réalisé
SELECT
s
.
intervenant_id
intervenant_id
,
'5 - Services réalisés'
categorie
,
'Validation du service réalisé pour la composante '
||
MAX
(
st
.
libelle_court
)
label
,
MAX
(
v
.
histo_modification
)
histo_date
,
MAX
(
v
.
histo_modificateur_id
)
KEEP
(
dense_rank
FIRST
ORDER
BY
v
.
histo_modification
DESC
)
histo_createur_id
,
MAX
(
u
.
display_name
)
KEEP
(
dense_rank
FIRST
ORDER
BY
v
.
histo_modification
DESC
)
histo_user
,
'glyphicon glyphicon-calendar'
icon
,
5
ordre
FROM
volume_horaire
vh
JOIN
service
s
ON
s
.
id
=
vh
.
service_id
JOIN
element_pedagogique
ep
ON
s
.
element_pedagogique_id
=
ep
.
id
JOIN
STRUCTURE
st
ON
st
.
id
=
ep
.
structure_id
JOIN
type_volume_horaire
tvh
ON
tvh
.
id
=
vh
.
type_volume_horaire_id
AND
tvh
.
code
=
'REALISE'
JOIN
periode
p
ON
p
.
id
=
vh
.
periode_id
JOIN
type_intervention
ti
ON
ti
.
id
=
vh
.
type_intervention_id
JOIN
validation_vol_horaire
vvh
ON
vvh
.
volume_horaire_id
=
vh
.
id
JOIN
validation
v
ON
v
.
id
=
vvh
.
validation_id
JOIN
utilisateur
u
ON
u
.
id
=
vh
.
histo_modificateur_id
LEFT
JOIN
motif_non_paiement
mnp
ON
mnp
.
id
=
vh
.
motif_non_paiement_id
GROUP
BY
s
.
intervenant_id
,
ep
.
structure_id
UNION
ALL
--Mise en paiement
SELECT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment