AAGN#71470 -- Project digitaal logboek afronding - rapportage bewaking en qr-codes

svn path=/Customer/trunk/; revision=56528
This commit is contained in:
Jos Migo
2022-07-08 11:28:37 +00:00
parent 84d5131697
commit b636a2ba78

View File

@@ -687,69 +687,41 @@ AS
;
-- QR-codes voor installaties tbv Digitale logboek (ticket AAGN#71470)
CREATE OR REPLACE VIEW aagn_v_ins_qrc_deel
-- view om QR codes voor een deel te genereren.
CREATE OR REPLACE VIEW aagn_v_rap_qr_deel
AS
SELECT user omgeving,
i.ins_deel_omschrijving hide_f_sort,
l.alg_locatie_code || ' ' || l.alg_locatie_omschrijving
fclt_f_locatie,
o.alg_gebouw_omschrijving fclt_f_gebouw,
o.alg_plaatsaanduiding fclt_f_plaats,
d.ins_discipline_omschrijving fclt_f_discipline,
g.ins_srtgroep_omschrijving fclt_f_objectgroep,
s.ins_srtdeel_omschrijving || ' (' || s.ins_srtdeel_code || ')' fclt_f_objectsoort,
i.ins_deel_omschrijving fclt_f_identificatie,
i.ins_deel_key,
s.ins_srtdeel_key,
o.alg_gebouw_code,
o.alg_verdieping_code,
i.ins_discipline_key fclt_3d_discipline_key,
l.alg_locatie_key fclt_3d_locatie_key,
i.ins_alg_ruimte_type,
i.ins_alg_ruimte_key,
CASE
WHEN d.ins_discipline_key = 361 -- Gebouwobjecten
THEN
(SELECT k.ins_kenmerkdeel_waarde
FROM ins_kenmerkdeel k
WHERE k.ins_deel_key = i.ins_deel_key
AND k.ins_kenmerk_key = 55)
ELSE
NULL
END
referentienr_lev,
b.bookmark_ins hide_f_bookmark_id,
b.bookmark_query,
b.bookmark_ins_mob hide_f_bookmark_id2,
b.bookmark_query_mob
-- path??
FROM ins_deel i,
ins_v_alg_overzicht o,
ins_srtdeel s,
ins_srtgroep g,
ins_discipline d,
alg_locatie l,
(SELECT b1.fac_bookmark_id bookmark_ins, b1.fac_bookmark_query bookmark_query, b2.fac_bookmark_id bookmark_ins_mob, b2.fac_bookmark_query bookmark_query_mob
FROM (SELECT fac_bookmark_naam, fac_bookmark_id, fac_bookmark_query
FROM fac_bookmark
WHERE fac_bookmark_naam = 'OBJECT_OPENEN_DESKTOP' AND (fac_bookmark_expire IS NULL OR fac_bookmark_expire>SYSDATE))b1,
(SELECT fac_bookmark_naam, fac_bookmark_id, fac_bookmark_query
FROM fac_bookmark
WHERE fac_bookmark_naam = 'OBJECT_OPENEN_MOBILE' AND (fac_bookmark_expire IS NULL OR fac_bookmark_expire>SYSDATE)) b2
) b
WHERE ins_deel_verwijder IS NULL
AND i.ins_deel_module = 'INS'
AND i.ins_deel_parent_key IS NULL
AND s.ins_srtdeel_key = i.ins_srtdeel_key
AND g.ins_srtgroep_key = s.ins_srtgroep_key
AND d.ins_discipline_key = g.ins_discipline_key
AND d.ins_discipline_key = 361 -- Gebouwobjecten
AND o.alg_onroerendgoed_keys = i.ins_alg_ruimte_key
AND o.alg_onroerendgoed_type = i.ins_alg_ruimte_type
AND i.ins_alg_ruimte_type IN ('R') -- R = ruimte (T = terrein, W = werkplek, A =afdeling)
AND o.alg_locatie_key = i.ins_alg_locatie_key
AND i.ins_alg_locatie_key = l.alg_locatie_key;
SELECT fac_bookmark_naam,
fac_bookmark_id,
ins_discipline_omschrijving,
ins_srtgroep_omschrijving,
ins_srtdeel_omschrijving,
ins_deel_omschrijving,
CASE
WHEN d.ins_discipline_key = 361 -- GEBOUWOBJECTEN
THEN
(SELECT k.ins_kenmerkdeel_waarde
FROM ins_kenmerkdeel k
WHERE k.ins_deel_key = d.ins_deel_key
AND k.ins_kenmerk_key = 55)
ELSE
NULL
END
refnr_leverancier,
'Locatiegebonden'
soort,
alg_district_omschrijving
district_naam,
d.alg_locatie_key,
alg_locatie_omschrijving || ' - ' || alg_locatie_code
locatie_naam,
alg_gebouw_omschrijving
gebouw_naam,
ins_deel_aanmaak,
ins_deel_key
FROM fac_bookmark b, ins_v_deel_gegevens d, alg_locatie l, alg_district d
WHERE fac_bookmark_expire IS NULL
AND d.alg_locatie_key = l.alg_locatie_key AND l.alg_district_key = d.alg_district_key
AND fac_bookmark_id = 'WroKOyDAZVPtYlGF';
------ payload end ------