SGSF#85300 -- SGSF Implementatie, inrichting email notificatie bij bepaalde gebouwen
svn path=/Customer/trunk/; revision=70041
This commit is contained in:
@@ -27,6 +27,84 @@ PROMPT &fcltcusttxt
|
||||
SET DEFINE OFF
|
||||
|
||||
------ payload begin ------
|
||||
|
||||
-- Notificatie bij resreveringen in gebouwen
|
||||
-- SGS Amsterdam, Nieuw Zeelandweg 5B-1 (NLD18-0025)
|
||||
-- SGS Schiphol-Rijk - Douglassingel (NLD18-0008)
|
||||
-- naar email adres van gebouw gebouw bij
|
||||
CREATE OR REPLACE VIEW SGSF_V_RES_GEBOUW
|
||||
(
|
||||
xkey,
|
||||
key,
|
||||
code,
|
||||
sender,
|
||||
receiver,
|
||||
text,
|
||||
xemail,
|
||||
xmobile
|
||||
)
|
||||
AS
|
||||
SELECT distinct rrr.res_rsv_ruimte_key xkey,
|
||||
rrr.res_reservering_key key,
|
||||
'CUST05' code,
|
||||
NULL sender,
|
||||
NULL receiver,
|
||||
'Reservering SGS Amsterdam, Nieuw Zeelandweg 5B-1 (NLD18-0025) '||res_reservering_key||'/'||rrr.res_rsv_ruimte_volgnr||'.' text,
|
||||
g.alg_gebouw_email xemail,
|
||||
NULL xmobile
|
||||
FROM res_rsv_ruimte rrr,
|
||||
res_ruimte_opstelling rro,
|
||||
res_ruimte rr,
|
||||
res_alg_ruimte rar,
|
||||
alg_v_onroerendgoed_gegevens a,
|
||||
alg_gebouw g,
|
||||
fac_notificatie_job fnj
|
||||
WHERE rrr.res_ruimte_opstel_key = rro.res_ruimte_opstel_key
|
||||
AND rr.res_ruimte_key = rro.res_ruimte_key
|
||||
AND rar.res_ruimte_key = rr.res_ruimte_key
|
||||
AND a.alg_ruimte_key = rar.alg_ruimte_key
|
||||
AND g.alg_gebouw_key = a.alg_gebouw_key
|
||||
AND g.alg_gebouw_email IS NOT NULL
|
||||
AND g.alg_gebouw_key=221 -- Locatie SGS Amsterdam, Nieuw Zeelandweg 5B-1 (NLD18-0025)
|
||||
AND rrr.res_status_fo_key=2
|
||||
AND rrr.res_rsv_ruimte_verwijder IS NULL
|
||||
AND rrr.res_rsv_ruimte_dirtlevel=0
|
||||
AND fnj.fac_notificatie_job_view='SGSF_V_RES_GEBOUW'
|
||||
AND rrr.res_rsv_ruimte_aanmaak > COALESCE(fnj.fac_notificatie_job_lastrun,SYSDATE)
|
||||
UNION ALL
|
||||
SELECT distinct rrr.res_rsv_ruimte_key xkey,
|
||||
rrr.res_reservering_key key,
|
||||
'CUST05' code,
|
||||
NULL sender,
|
||||
NULL receiver,
|
||||
'Reservering SGS Schiphol-Rijk - Douglassingel (NLD18-0008) '||res_reservering_key||'/'||rrr.res_rsv_ruimte_volgnr||'.' text,
|
||||
g.alg_gebouw_email xemail,
|
||||
NULL xmobile
|
||||
FROM res_rsv_ruimte rrr,
|
||||
res_ruimte_opstelling rro,
|
||||
res_ruimte rr,
|
||||
res_alg_ruimte rar,
|
||||
alg_v_onroerendgoed_gegevens a,
|
||||
alg_gebouw g,
|
||||
fac_notificatie_job fnj
|
||||
WHERE rrr.res_ruimte_opstel_key = rro.res_ruimte_opstel_key
|
||||
AND rr.res_ruimte_key = rro.res_ruimte_key
|
||||
AND rar.res_ruimte_key = rr.res_ruimte_key
|
||||
AND a.alg_ruimte_key = rar.alg_ruimte_key
|
||||
AND g.alg_gebouw_key = a.alg_gebouw_key
|
||||
AND g.alg_gebouw_email IS NOT NULL
|
||||
AND g.alg_gebouw_key=220 -- Locatie SGS Schiphol-Rijk - Douglassingel (NLD18-0008)
|
||||
AND rrr.res_status_fo_key=2
|
||||
AND rrr.res_rsv_ruimte_verwijder IS NULL
|
||||
AND rrr.res_rsv_ruimte_dirtlevel=0
|
||||
AND fnj.fac_notificatie_job_view='SGSF_V_RES_GEBOUW'
|
||||
AND rrr.res_rsv_ruimte_aanmaak > COALESCE(fnj.fac_notificatie_job_lastrun,SYSDATE-30);
|
||||
|
||||
|
||||
|
||||
|
||||
-- Notificatie als er reservereing met catering wordt aangemaakt of gemuteerd
|
||||
|
||||
CREATE OR REPLACE VIEW SGSF_V_CATERING_NOTI
|
||||
(
|
||||
xkey,
|
||||
@@ -69,7 +147,10 @@ AS
|
||||
AND rrr.res_rsv_ruimte_dirtlevel=0
|
||||
AND fnj.fac_notificatie_job_view='SGSF_V_CATERING_NOTI'
|
||||
AND COALESCE(rra.res_rsv_artikel_mutatie, rra.res_rsv_artikel_aanmaak) > fnj.fac_notificatie_job_lastrun;
|
||||
|
||||
|
||||
|
||||
-- Notificatie als er reservereing met catering wordt verwijderd
|
||||
|
||||
CREATE OR REPLACE VIEW SGSF_V_CATERING_DELETE
|
||||
(
|
||||
xkey,
|
||||
@@ -114,6 +195,7 @@ AS
|
||||
WHERE ft.fac_tracking_refkey=rrr.res_rsv_ruimte_key
|
||||
AND ft.fac_srtnotificatie_key=123);
|
||||
|
||||
-- Notificatie als er reservereing van koppelzaal in NL wordt gedaan
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW SGSF_V_KOPPELZALEN_NL
|
||||
@@ -179,7 +261,7 @@ AS
|
||||
|
||||
|
||||
|
||||
|
||||
-- Notificatie als er reservereing van koppelzaal in BE wordt gedaan
|
||||
|
||||
CREATE OR REPLACE VIEW SGSF_V_KOPPELZALEN_BE
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user