ARAI#79395 -- Notificaties t.b.v. proces knelpuntregistratie

svn path=/Customer/trunk/; revision=62820
This commit is contained in:
Robin Stoker
2023-12-04 12:50:43 +00:00
parent a8e4679e3f
commit cd6dbc00b7

View File

@@ -13271,6 +13271,47 @@ SELECT
WHERE UPPER(fac_notificatie_job_view) =
'ARAI_V_NOTI_KNLPNTTOEWIJZER2')) x
WHERE x.receiver IS NOT NULL;
-- Notificatie naar melder wanneer een knelpunt is toegewezen aan een manager (via kenmerk)
CREATE OR REPLACE VIEW arai_v_noti_melder
AS
SELECT
x.code,
x.sender,
x.receiver,
x.text,
x.key,
x.xkey,
x.xsender,
x.xemail,
x.xmobile,
x.attachments
FROM
(SELECT DISTINCT 'CUST19' code,
NULL sender,
m.prs_perslid_key receiver, -- Melder van het knelpunt
'Uw gemelde knelpunt is toegewezen voor behandeling' text,
m.mld_melding_key key,
NULL xkey,
NULL xsender,
NULL xemail,
NULL xmobile,
NULL attachments
FROM mld_melding m, fac_tracking t
WHERE m.mld_stdmelding_key IN (4541, 7181, 7182, 7183, 7184) -- Evenement overschrijdende knelpunten
AND t.fac_tracking_refkey = m.mld_melding_key
AND UPPER (t.fac_tracking_oms) LIKE '%VERANTWOORDELIJKE AFDELING%'
AND t.fac_tracking_datum BETWEEN (SELECT fac_notificatie_job_nextrun
- fac_notificatie_job_interval
/ 24
FROM fac_notificatie_job
WHERE UPPER(fac_notificatie_job_view) =
'ARAI_V_NOTI_MELDER')
AND (SELECT fac_notificatie_job_nextrun
FROM fac_notificatie_job
WHERE UPPER(fac_notificatie_job_view) =
'ARAI_V_NOTI_MELDER')) x
WHERE x.receiver IS NOT NULL;
-- Notificatie naar de toegewezen manager van het knelpunt wanneer de deadline 1 dag geleden is verstreken
CREATE OR REPLACE VIEW arai_v_noti_knlpntreminder2
@@ -13335,7 +13376,7 @@ SELECT
x.xmobile,
x.attachments
FROM
(SELECT DISTINCT 'CUST17' code,
(SELECT DISTINCT 'CUST18' code,
NULL sender,
(SELECT prs_perslid_key
FROM fac_tracking