UWVA#77362 Verbeteren klantreis/QR-code rapportage (draft)
svn path=/Customer/trunk/; revision=60541
This commit is contained in:
@@ -16150,6 +16150,166 @@ AS
|
||||
AND md.ins_discipline_key = dp.mld_ins_discipline_key(+)
|
||||
AND dp.mld_behandelgroep_key = bg.mld_behandelgroep_key(+);
|
||||
|
||||
-- UWVA#77362: QR-codes/Verbeteren klantreis!
|
||||
CREATE OR REPLACE VIEW UWVA_V_RAP_QRC
|
||||
AS
|
||||
SELECT fac_bookmark_naam || '|' || pa.alg_plaatsaanduiding hide_f_sort,
|
||||
fac_bookmark_naam fclt_f_bookmark,
|
||||
--'Plaats' gekoppeld_aan,
|
||||
l.alg_locatie_omschrijving fclt_f_locatie,
|
||||
pa.alg_plaatsaanduiding || ' / ' || r.alg_ruimte_omschrijving fclt_f_plaats,
|
||||
--NULL fclt_f_persoon,
|
||||
pa.alg_plaatsaanduiding fclt_f_identificatie,
|
||||
l.alg_locatie_key fclt_3d_locatie_key,
|
||||
--'R' alg_onroerendgoed_type,
|
||||
r.alg_ruimte_key alg_onroerendgoed_keys,
|
||||
NULL ins_deel_key,
|
||||
NULL res_ruimte_key,
|
||||
b.fac_bookmark_id hide_f_bookmark_id
|
||||
FROM --fac_bookmark b,
|
||||
(SELECT SUBSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'DISC=') + 5), 1, INSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'DISC=') + 5) || '&', '&') - 1)
|
||||
disc_key,
|
||||
fac_bookmark_naam,
|
||||
fac_bookmark_id
|
||||
FROM fac_bookmark
|
||||
WHERE (fac_bookmark_expire IS NULL OR fac_bookmark_expire > SYSDATE)
|
||||
AND UPPER (TRIM (fac_bookmark_path)) = 'APPL/PDA/MELDING.ASP'
|
||||
AND INSTR (UPPER (fac_bookmark_query), 'DISC=') > 0) b, -- DISC-bookmarks tbv. ruimtemeldingen SANITAIR!
|
||||
alg_v_aanwezigruimte r,
|
||||
alg_verdieping v,
|
||||
alg_gebouw g,
|
||||
alg_locatie l,
|
||||
alg_v_plaatsaanduiding pa
|
||||
WHERE r.alg_srtruimte_key = 306 -- Sanitair!
|
||||
AND r.alg_verdieping_key = v.alg_verdieping_key
|
||||
AND v.alg_gebouw_key = g.alg_gebouw_key
|
||||
AND g.alg_locatie_key = l.alg_locatie_key
|
||||
AND pa.alg_onroerendgoed_type = 'R'
|
||||
AND r.alg_ruimte_key = pa.alg_onroerendgoed_keys
|
||||
--AND b.disc_key = md.ins_discipline_key -- TODO:Bestaat vakgroep?
|
||||
UNION ALL -- Reserveerbare ruimtes 50=Gemeentehuis
|
||||
SELECT b.fac_bookmark_naam || '|' || d.ins_deel_omschrijving hide_f_sort,
|
||||
b.fac_bookmark_naam fclt_f_bookmark,
|
||||
--'Plaats' gekoppeld_aan,
|
||||
l.alg_locatie_omschrijving fclt_f_locatie,
|
||||
o.alg_plaatsaanduiding fclt_f_plaats,
|
||||
--NULL fclt_f_persoon,
|
||||
d.ins_deel_omschrijving fclt_f_identificatie,
|
||||
l.alg_locatie_key fclt_3d_locatie_key,
|
||||
--d.ins_alg_ruimte_type alg_onroerendgoed_type,
|
||||
d.ins_alg_ruimte_key alg_onroerendgoed_keys,
|
||||
d.ins_deel_key,
|
||||
NULL res_ruimte_key,
|
||||
b.fac_bookmark_id hide_f_bookmark_id
|
||||
FROM --fac_bookmark b,
|
||||
(SELECT SUBSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') + 9), 1, INSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') + 9) || '&', '&') - 1)
|
||||
stdmkina,
|
||||
fac_bookmark_naam,
|
||||
fac_bookmark_id
|
||||
FROM fac_bookmark
|
||||
WHERE (fac_bookmark_expire IS NULL OR fac_bookmark_expire > SYSDATE)
|
||||
AND UPPER (TRIM (fac_bookmark_path)) = 'APPL/PDA/INS_DEEL.ASP'
|
||||
AND INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') > 0) b, -- STDMKINA-bookmarks tbv. objectmeldingen KOFFIEAUTOMAAT!
|
||||
ins_v_aanwezigdeel d,
|
||||
ins_srtdeel sd,
|
||||
ins_srtgroep sg,
|
||||
--ins_discipline dd,
|
||||
alg_locatie l,
|
||||
ins_v_alg_overzicht o
|
||||
--mld_stdmelding sm,
|
||||
--mld_stdmelding_srtinst smsd
|
||||
WHERE d.ins_srtdeel_key IN (258830) -- 454=Automaten/1232=Koffieautomaat/258830=Koffieautomaat
|
||||
AND d.ins_srtdeel_key = sd.ins_srtdeel_key
|
||||
AND sd.ins_srtgroep_key = sg.ins_srtgroep_key
|
||||
--AND sg.ins_discipline_key = dd.ins_discipline_key
|
||||
AND d.ins_deel_parent_key IS NULL
|
||||
AND d.ins_alg_ruimte_type IN ('R') --TODO:IN ('T', 'R', 'W')
|
||||
AND d.ins_alg_locatie_key = l.alg_locatie_key
|
||||
AND d.ins_alg_ruimte_type = o.alg_onroerendgoed_type
|
||||
AND d.ins_alg_ruimte_key = o.alg_onroerendgoed_keys
|
||||
--AND sm.mld_stdmelding_key = smsd.mld_stdmelding_key
|
||||
--AND smsd.ins_srtinstallatie_key = DECODE (smsd.ins_srtinstallatie_niveau, 'S', sd.ins_srtdeel_key, 'G', sg.ins_srtgroep_key, 'D', dd.ins_discipline_key)
|
||||
UNION ALL
|
||||
SELECT fac_bookmark_naam || '|' || l.alg_locatie_code || rr.res_ruimte_nr hide_f_sort,
|
||||
fac_bookmark_naam fclt_f_bookmark,
|
||||
--NULL gekoppeld_aan,
|
||||
l.alg_locatie_omschrijving fclt_f_locatie,
|
||||
l.alg_locatie_code || ' / ' || rr.res_ruimte_nr fclt_f_plaats,
|
||||
--NULL fclt_f_persoon,
|
||||
rr.res_ruimte_nr fclt_f_identificatie,
|
||||
l.alg_locatie_key fclt_3d_locatie_key,
|
||||
--NULL alg_onroerendgoed_type,
|
||||
NULL alg_onroerendgoed_keys,
|
||||
NULL ins_deel_key,
|
||||
rr.res_ruimte_key,
|
||||
b.fac_bookmark_id
|
||||
FROM --fac_bookmark b,
|
||||
(SELECT SUBSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'DISC=') + 5), 1, INSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'DISC=') + 5) || '&', '&') - 1)
|
||||
disc_key,
|
||||
fac_bookmark_naam,
|
||||
fac_bookmark_id
|
||||
FROM fac_bookmark
|
||||
WHERE (fac_bookmark_expire IS NULL OR fac_bookmark_expire > SYSDATE)
|
||||
AND UPPER (TRIM (fac_bookmark_path)) = 'APPL/PDA/RESERVERINGEN.ASP') b, -- Bookmarks tbv. ruimtereserveringen VERGADERING!
|
||||
res_ruimte rr,
|
||||
( SELECT res_ruimte_key, MAX (alg_ruimte_key) alg_ruimte_key
|
||||
FROM res_alg_ruimte
|
||||
WHERE res_alg_ruimte_verwijder IS NULL
|
||||
GROUP BY res_ruimte_key) rar,
|
||||
alg_ruimte r,
|
||||
ins_v_alg_overzicht o,
|
||||
alg_locatie l
|
||||
WHERE rr.res_ruimte_verwijder IS NULL
|
||||
AND (rr.res_ruimte_vervaldatum IS NULL OR rr.res_ruimte_vervaldatum > SYSDATE)
|
||||
AND rr.res_discipline_key IN (89, 276, 496) -- Vergaderruimte/Video-overleg/Vergaderruimte Hybride
|
||||
AND rr.res_ruimte_key = rar.res_ruimte_key
|
||||
AND rar.alg_ruimte_key = r.alg_ruimte_key
|
||||
AND o.alg_onroerendgoed_type = 'R'
|
||||
AND r.alg_ruimte_key = o.alg_onroerendgoed_keys
|
||||
AND o.alg_locatie_key = l.alg_locatie_key
|
||||
;
|
||||
/*
|
||||
UNION ALL
|
||||
SELECT DISTINCT
|
||||
b.fac_bookmark_naam || '|' || d.ins_deel_omschrijving hide_f_sort,
|
||||
b.fac_bookmark_naam fclt_f_bookmark,
|
||||
--'Persoon' gekoppeld_aan,
|
||||
NULL fclt_f_locatie,
|
||||
NULL fclt_f_plaats,
|
||||
--pf.prs_perslid_naam_full fclt_f_persoon,
|
||||
d.ins_deel_omschrijving fclt_f_identificatie,
|
||||
NULL fclt_3d_locatie_key,
|
||||
--NULL alg_onroerendgoed_type,
|
||||
NULL alg_onroerendgoed_keys,
|
||||
d.ins_deel_key,
|
||||
b.fac_bookmark_id hide_f_bookmark_id
|
||||
FROM --fac_bookmark b,
|
||||
(SELECT SUBSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') + 9), 1, INSTR (SUBSTR (UPPER (fac_bookmark_query), INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') + 9) || '&', '&') - 1)
|
||||
stdmkina,
|
||||
fac_bookmark_naam,
|
||||
fac_bookmark_id
|
||||
FROM fac_bookmark
|
||||
WHERE (fac_bookmark_expire IS NULL OR fac_bookmark_expire > SYSDATE)
|
||||
AND UPPER (TRIM (fac_bookmark_path)) = 'APPL/PDA/INS_DEEL.ASP'
|
||||
AND INSTR (UPPER (fac_bookmark_query), 'STDMKINA=') > 0) b, -- STDMKINA-bookmarks tbv. objectmeldingen PERSOONSGEBONDEN!
|
||||
ins_v_aanwezigdeel d,
|
||||
ins_srtdeel sd,
|
||||
ins_srtgroep sg,
|
||||
ins_discipline dd,
|
||||
prs_v_perslid_fullnames pf
|
||||
--mld_stdmelding sm,
|
||||
--mld_stdmelding_srtinst smsd
|
||||
WHERE 1 = 1 --d.ins_srtdeel_key IN (-1)
|
||||
AND d.ins_srtdeel_key = sd.ins_srtdeel_key
|
||||
AND sd.ins_srtgroep_key = sg.ins_srtgroep_key
|
||||
AND sg.ins_discipline_key = dd.ins_discipline_key
|
||||
AND d.ins_deel_parent_key IS NULL
|
||||
AND d.ins_alg_ruimte_type IN ('P')
|
||||
AND d.ins_alg_ruimte_key = pf.prs_perslid_key
|
||||
--AND sm.mld_stdmelding_key = smsd.mld_stdmelding_key
|
||||
--AND smsd.ins_srtinstallatie_key = DECODE (smsd.ins_srtinstallatie_niveau, 'S', sd.ins_srtdeel_key, 'G', sg.ins_srtgroep_key, 'D', dd.ins_discipline_key)
|
||||
;
|
||||
*/
|
||||
------ payload end ------
|
||||
|
||||
SET DEFINE OFF
|
||||
|
||||
Reference in New Issue
Block a user