PCHD#90763 Onderzoek traagheid en storingen Facilitor software

svn path=/Customer/trunk/; revision=70495
This commit is contained in:
Sander Schepers
2025-10-01 19:27:31 +00:00
parent 4ff9724815
commit 3c9fc1cc32

View File

@@ -5721,6 +5721,85 @@ AS
AND m.prs_kostenplaats_key = k.prs_kostenplaats_key(+)
AND k.prs_perslid_key = pf.prs_perslid_key(+);
CREATE OR REPLACE VIEW PCHX_V_UDR_MELDING_NEW
(
MELDING_GEBOUW, -- Gebouw
MELDING_LOCATIEPLAATS, -- Locatie
MELDER, -- Melder
PRODUCTGROEP, -- Vakgroep
ONDERWERP, -- Onderwerp
ACTIEVE_BEHANDELGROEP, -- Behandelteam
MELDING_DATUM, -- Registratiedatum
BEHANDELAAR, -- Hoofdbehandelaar
ACTIEVE_BEHANDELAAR, -- Actieve Behandelaar
ACTIEVE_BEHANDELAAR_KEY -- voor "Tellen"
)
AS
WITH
mld
AS
(SELECT m.mld_melding_key,
COALESCE (og.alg_gebouw_naam, og.alg_terreinsector_naam)
AS melding_gebouw,
l.alg_locatie_plaats
AS melding_locatieplaats,
pf_melder.prs_perslid_naam_full
AS melder,
md.ins_discipline_omschrijving
AS productgroep,
m.mld_melding_onderwerp
AS onderwerp,
md2.ins_discipline_omschrijving
AS actieve_behandelgroep,
m.mld_melding_datum
AS melding_datum,
pf_bh1.prs_perslid_naam_full
AS behandelaar,
pf_bh2.prs_perslid_naam_full
AS actieve_behandelaar,
m.mld_melding_behandelaar2_key
AS actieve_behandelaar_key,
sta.mld_statuses_omschrijving
AS melding_status,
COALESCE (
mld.getmeldingstatusdate (m.mld_melding_key, 5),
mld.getmeldingstatusdate (m.mld_melding_key, 1))
AS melding_afgemeld
FROM mld_melding m
JOIN mld_stdmelding s
ON s.mld_stdmelding_key = m.mld_stdmelding_key
JOIN mld_discipline md
ON md.ins_discipline_key = s.mld_ins_discipline_key
LEFT JOIN mld_discipline md2
ON md2.ins_discipline_key = m.mld_ins_discipline_key
LEFT JOIN alg_locatie l
ON l.alg_locatie_key = m.mld_alg_locatie_key
LEFT JOIN ALG_V_ALLONRGOED_GEGEVENS og
ON og.ALG_ONROERENDGOED_KEYS =
m.mld_alg_onroerendgoed_keys
LEFT JOIN mld_statuses sta
ON sta.mld_statuses_key = m.mld_melding_status
LEFT JOIN PRS_V_PERSLID_FULLNAMES_ALL pf_melder
ON pf_melder.prs_perslid_key = m.prs_perslid_key
LEFT JOIN PRS_V_PERSLID_FULLNAMES_ALL pf_bh1
ON pf_bh1.prs_perslid_key =
m.mld_melding_behandelaar_key
LEFT JOIN PRS_V_PERSLID_FULLNAMES_ALL pf_bh2
ON pf_bh2.prs_perslid_key =
m.mld_melding_behandelaar2_key
WHERE m.fac_activiteit_key IS NULL)
SELECT melding_gebouw,
melding_locatieplaats,
melder,
productgroep,
onderwerp,
actieve_behandelgroep,
melding_datum,
behandelaar,
actieve_behandelaar,
actieve_behandelaar_key
FROM mld;
------ payload end ------
SET DEFINE OFF