CSUN#89800 Notificatie niet verzonden bij melding A741349

svn path=/Customer/trunk/; revision=71029
This commit is contained in:
Sander Schepers
2025-11-21 13:59:34 +00:00
parent 91588a14b7
commit 2bd496e12f

View File

@@ -558,7 +558,9 @@ AS
mld_stdmelding_default_disc,
mld_ins_discipline_key,
mld_stdmeldinggroep_key,
mld_stdmelding_autoorder
mld_stdmelding_autoorder,
prs_dienst_key,
prs_bedrijf_key
FROM mld_stdmelding
WHERE mld_stdmelding_verwijder IS NULL),
fac_ud
@@ -624,7 +626,7 @@ AS
ON pwpg.prs_perslid_key = p.prs_perslid_key
JOIN prs_kenmerklink kl
ON kl.prs_link_key = p.prs_perslid_key
JOIN stdmelding sm
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = m.mld_stdmelding_key
WHERE m.mld_stdmelding_key != 41
AND p.prs_srtperslid_key = 32 -- BBer
@@ -650,7 +652,7 @@ AS
ON pwpg.prs_perslid_key = p.prs_perslid_key
JOIN prs_kenmerklink kl
ON kl.prs_link_key = p.prs_perslid_key
JOIN stdmelding sm
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = m.mld_stdmelding_key
JOIN ins_tab_discipline d
ON d.ins_discipline_key = sm.mld_ins_discipline_key
@@ -677,7 +679,7 @@ AS
ON pwpg.prs_perslid_key = p.prs_perslid_key
JOIN prs_kenmerklink kl
ON kl.prs_link_key = p.prs_perslid_key
JOIN stdmelding sm
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = m.mld_stdmelding_key
WHERE m.mld_stdmelding_key != 41
AND p.prs_srtperslid_key IN (4041, 50) -- OL / RM
@@ -696,7 +698,7 @@ AS
'Klantsupport'
AS functie
FROM mld_melding m
JOIN stdmelding sm
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = m.mld_stdmelding_key
LEFT JOIN fac_ud ud
ON ud.discipline_key = sm.mld_ins_discipline_key
@@ -733,7 +735,7 @@ AS
'Klantsupport'
AS functie
FROM mld_melding m
JOIN stdmelding sm
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = m.mld_stdmelding_key
LEFT JOIN fac_ud ud
ON ud.discipline_key = sm.mld_ins_discipline_key
@@ -756,21 +758,34 @@ AS
AND p.prs_perslid_verwijder IS NULL)),
g_filtered
AS
(SELECT g.*
FROM g
JOIN stdmelding sm
ON sm.mld_stdmelding_key = g.mld_stdmelding_key
(SELECT g.*
FROM g
JOIN mld_stdmelding sm
ON sm.mld_stdmelding_key = g.mld_stdmelding_key
WHERE -- statusfilter
( g.mld_melding_status IN (2,
( g.mld_melding_status IN (2,
3,
4,
7)
OR ( g.mld_melding_status IN (5, 6)
OR ( g.mld_melding_status IN (5, 6)
AND g.functie = 'BBer'
AND sm.mld_stdmelding_default_disc IN (1461)))
AND ( sm.mld_stdmeldinggroep_key IS NULL
OR sm.mld_stdmeldinggroep_key <> 1)
AND NVL (sm.mld_stdmelding_autoorder, 0) <> 1)
OR sm.mld_stdmeldinggroep_key <> 1)
AND (
NVL (sm.mld_stdmelding_autoorder, 0) <> 1
OR ( g.functie = 'BBer'
AND NOT EXISTS (
SELECT 1
FROM mld_melding m2
JOIN prs_bedrijfdienstlocatie pbdl
ON pbdl.alg_locatie_key = m2.mld_alg_locatie_key
AND pbdl.prs_dienst_key = sm.prs_dienst_key
WHERE m2.mld_melding_key = g.mld_melding_key
)
)
)
)
SELECT DISTINCT
x.mld_melding_key,
DECODE (COUNT (x.haaglanden) OVER (PARTITION BY x.mld_melding_key),
@@ -6169,6 +6184,7 @@ AS
CURSOR cmld
IS
SELECT m.*,
sm.mld_stdmelding_default_disc,
(SELECT fac.safe_to_number (km.alg_onrgoedkenmerk_waarde)
FROM alg_v_aanwezigonrgoedkenmerk km
WHERE km.alg_onrgoed_niveau = 'D'
@@ -6182,12 +6198,13 @@ AS
AND prs_kenmerklink_verwijder IS NULL
AND UPPER (prs_kenmerklink_waarde) =
UPPER (m.aanvrageremail)),
v_perslid_key)
4)
AS aanvrager_key,
l.alg_locatie_key,
REPLACE(REPLACE(kosten, '.'), ',', '.') as kosten_n
FROM csun_imp_jde m, alg_v_locatie_gegevens l
FROM csun_imp_jde m, alg_v_locatie_gegevens l, mld_stdmelding sm
WHERE l.alg_locatie_code = m.alg_locatie_code
AND m.mld_stdmelding_key = sm.mld_stdmelding_key
AND m.mld_melding_key IS NULL;
BEGIN
FOR recmld IN cmld
@@ -6201,6 +6218,7 @@ BEGIN
mld_alg_locatie_key,
mld_melding_datum,
mld_stdmelding_key,
mld_ins_discipline_key,
mld_melding_einddatum,
mld_melding_status,
mld_melding_spoed,
@@ -6212,6 +6230,7 @@ BEGIN
recmld.alg_locatie_key,
SYSDATE,
recmld.mld_stdmelding_key,
recmld.mld_stdmelding_default_disc,
TO_DATE(CONCAT (
TO_CHAR (recmld.uitvoerdatum, 'YYYY-MM-DD'),
' 17:00:00')),
@@ -8690,7 +8709,8 @@ BEGIN
fac_notificatie_oms,
fac_notificatie_refkey,
fac_notificatie_extrakey,
fac_notificatie_prioriteit)
fac_notificatie_prioriteit,
prs_perslid_key_sender)
VALUES (rec.fac_srtnotificatie_key,
2,
NULL,
@@ -8699,7 +8719,8 @@ BEGIN
rec.text,
rec.key,
NULL,
2);
2,
4);
END LOOP;
FOR rec IN CUST15
@@ -8713,7 +8734,8 @@ BEGIN
fac_notificatie_oms,
fac_notificatie_refkey,
fac_notificatie_extrakey,
fac_notificatie_prioriteit)
fac_notificatie_prioriteit,
prs_perslid_key_sender)
VALUES (rec.fac_srtnotificatie_key,
2,
NULL,
@@ -8722,7 +8744,8 @@ BEGIN
rec.text,
rec.key,
NULL,
2);
2,
4);
END LOOP;
FOR rec IN CUST16
@@ -8736,7 +8759,8 @@ BEGIN
fac_notificatie_oms,
fac_notificatie_refkey,
fac_notificatie_extrakey,
fac_notificatie_prioriteit)
fac_notificatie_prioriteit,
prs_perslid_key_sender)
VALUES (rec.fac_srtnotificatie_key,
2,
NULL,
@@ -8745,7 +8769,8 @@ BEGIN
rec.text,
rec.key,
NULL,
2);
2,
4);
END LOOP;
END csun_noti_rm_noshow;
/