DRIE#72618 Events van kop tot staart in Facilitor

svn path=/Customer/trunk/; revision=61262
This commit is contained in:
Sander Schepers
2023-07-20 14:55:06 +00:00
parent 60ec06734e
commit d978eaaf14

View File

@@ -744,6 +744,67 @@ SELECT rr.res_reservering_key,
AND d.prs_kostensoort_key = ks.prs_kostensoort_key(+)
AND rr.res_rsv_ruimte_host_key = h.prs_perslid_key
AND rr.res_rsv_ruimte_dirtlevel = 0;
CREATE OR REPLACE VIEW drie_v_noti_reschange10
(
code,
sender,
receiver,
text,
key,
xkey,
xsender,
xemail,
xmobile
)
AS
SELECT DISTINCT 'CUST02',
NULL,
ag.prs_perslid_key,
( 'Reservering '
|| rrr.res_reservering_key
|| '/'
|| rrr.res_rsv_ruimte_volgnr
|| ' ('
|| TO_CHAR (rrg.datum, 'DD/MM/YYYY')
|| ') '
|| rrg.res_omschrijving
|| ', is '
|| DECODE (sn.fac_srtnotificatie_key,
101, 'nieuw ingevoerd',
102, 'aangepast',
106, 'vervallen')
|| ' op '
|| TO_CHAR (t.fac_tracking_datum, 'DD/MM/YYYY HH24:MI')),
rrr.res_reservering_key,
rrg.key,
NULL,
NULL,
NULL
FROM res_v_udr_reservering rrg,
res_rsv_ruimte rrr,
res_rsv_artikel rra,
fac_tracking t,
fac_srtnotificatie sn,
fac_gebruikersgroep ag
WHERE t.fac_tracking_refkey = rrg.key
AND rrr.res_rsv_ruimte_key = rrg.key
AND t.fac_srtnotificatie_key = sn.fac_srtnotificatie_key
AND ag.fac_groep_key = 261 --Autorisatiegroep tbv notificatie
AND sn.fac_srtnotificatie_key IN (101, 102, 106) --RESNEW, RESUPD, RESDEL
AND rra.res_rsv_ruimte_key = rrr.res_rsv_ruimte_key
AND TRUNC (rrg.van) - 10 <= TRUNC (SYSDATE)
AND TRUNC (rrg.van) >= TRUNC (SYSDATE)
AND t.fac_tracking_datum BETWEEN (SELECT fac_notificatie_job_nextrun
- fac_notificatie_job_interval
/ 24
FROM fac_notificatie_job
WHERE fac_notificatie_job_view =
'DRIE_V_NOTI_RESCHANGE10')
AND (SELECT fac_notificatie_job_nextrun
FROM fac_notificatie_job
WHERE fac_notificatie_job_view =
'DRIE_V_NOTI_RESCHANGE10');
------ payload end ------