APGR#69547 -- Meldingen rapportage

svn path=/Customer/trunk/; revision=64691
This commit is contained in:
Robin Stoker
2024-05-15 15:21:06 +00:00
parent 7977fdf936
commit f3c29e763b

View File

@@ -5,15 +5,20 @@
DEFINE thisfile = 'APGR.SQL'
DEFINE dbuser = '^APGR'
DEFINE custid = 'APGR'
SET ECHO ON
SET DEFINE ON
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
WHENEVER SQLERROR EXIT;
SELECT adm.scriptspoolfile('&dbuser', '&thisfile') AS fcltlogfile FROM DUAL;
COLUMN fcltcusttxt NEW_VALUE fcltcusttxt NOPRINT;
WHENEVER SQLERROR CONTINUE;
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
SPOOL &fcltlogfile
WHENEVER SQLERROR EXIT;
SELECT adm.checkscriptcust('&dbuser') AS fcltcusttxt FROM DUAL;
WHENEVER SQLERROR CONTINUE;
---------------------------------------
PROMPT &fcltcusttxt
---------------------------------------
SET DEFINE OFF
------ payload begin ------
@@ -1663,6 +1668,59 @@ AS
m.mld_melding_actiecode,
a.prs_afdeling_naam,
a.prs_afdeling_omschrijving;
CREATE OR REPLACE VIEW apgr_v_ins_qrc_mld
AS
SELECT 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 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 = 61 -- ICT
THEN
(SELECT k.ins_kenmerkdeel_waarde
FROM ins_kenmerkdeel k
WHERE k.ins_deel_key = i.ins_deel_key
AND k.ins_kenmerk_key = 1)
ELSE
NULL
END
serienummer,
b.fac_bookmark_id hide_f_bookmark_id
FROM ins_deel i,
ins_v_alg_overzicht o,
ins_srtdeel s,
ins_srtgroep g,
ins_discipline d,
alg_locatie l,
fac_bookmark b
WHERE b.fac_bookmark_naam = 'QRC_MELDING'
AND (b.fac_bookmark_expire IS NULL
OR b.fac_bookmark_expire > SYSDATE)
AND 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 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 ('T', 'R', 'W')
AND o.alg_locatie_key = i.ins_alg_locatie_key
AND i.ins_alg_locatie_key = l.alg_locatie_key;
-- En dan nu de export naar Simac Palette (opdr en bes).