KFSG#75351 Catering-noti/Inbouwen keys op basis van eigen tabel (met key=341)
svn path=/Customer/trunk/; revision=58639
This commit is contained in:
@@ -387,42 +387,46 @@ CREATE OR REPLACE VIEW KFSG_V_NOTI_CATERING
|
|||||||
xmobile
|
xmobile
|
||||||
)
|
)
|
||||||
AS
|
AS
|
||||||
SELECT NULL sender,
|
SELECT NULL sender,
|
||||||
NULL receiver, --Catering1@schiphol.nl
|
NULL receiver, -- Catering1@schiphol.nl
|
||||||
'Catering bij reservering '
|
'Catering bij reservering '
|
||||||
|| rrr.res_reservering_key
|
|| rrr.res_reservering_key
|
||||||
|| '/'
|
|| '/'
|
||||||
|| rrr.res_rsv_ruimte_volgnr
|
|| rrr.res_rsv_ruimte_volgnr
|
||||||
|| ' is aangemaakt/gewijzigd '
|
|| ' is aangemaakt/gewijzigd '
|
||||||
text,
|
text,
|
||||||
'RESINF' code,
|
'RESINF' code,
|
||||||
NULL fac_srtnotificatie_key,
|
NULL fac_srtnotificatie_key,
|
||||||
rrr.res_reservering_key key,
|
rrr.res_reservering_key key,
|
||||||
rrr.res_rsv_ruimte_key xkey,
|
rrr.res_rsv_ruimte_key xkey,
|
||||||
'Catering1@schiphol.nl' xemail,
|
'Catering1@schiphol.nl' xemail,
|
||||||
NULL xmobile
|
NULL xmobile
|
||||||
FROM res_rsv_artikel rra, res_rsv_ruimte rrr, res_artikel ra
|
FROM res_rsv_artikel rra,
|
||||||
WHERE rra.res_rsv_ruimte_key = rrr.res_rsv_ruimte_key
|
res_rsv_ruimte rrr,
|
||||||
AND rra.res_artikel_key = ra.res_artikel_key
|
res_artikel ra,
|
||||||
--AND ra.res_discipline_key IN (165, 162, 167)
|
(SELECT *
|
||||||
AND ra.res_discipline_key IN (821, 822, 823, 862, 1242, 1281, 1241, 1981) -- KFSG#56898/58379/60004/75351
|
FROM fac_v_aanwezigusrdata
|
||||||
AND rra.res_rsv_artikel_levering > SYSDATE
|
WHERE fac_usrtab_key = 341) ud -- KFSG#75351:Cateringnotificatie
|
||||||
AND GREATEST (COALESCE (res_rsv_artikel_mutatie, SYSDATE - 100),
|
WHERE rra.res_rsv_ruimte_key = rrr.res_rsv_ruimte_key
|
||||||
COALESCE (res_rsv_artikel_verwijder, SYSDATE - 100),
|
AND rra.res_artikel_key = ra.res_artikel_key
|
||||||
COALESCE (res_rsv_artikel_aanmaak, SYSDATE - 100)) >
|
--AND ra.res_discipline_key IN (821, 822, 823, 862, 1242, 1281, 1241, 1981) -- KFSG#56898/58379/60004/75351
|
||||||
(SELECT fac_notificatie_job_nextrun
|
AND ra.res_discipline_key = fac.safe_to_number (ud.fac_usrdata_code)
|
||||||
- fac_notificatie_job_interval / 24
|
AND rra.res_rsv_artikel_levering > SYSDATE
|
||||||
FROM fac_notificatie_job
|
AND GREATEST (COALESCE (res_rsv_artikel_mutatie, SYSDATE - 100),
|
||||||
WHERE fac_notificatie_job_view = 'KFSG_V_NOTI_CATERING')
|
COALESCE (res_rsv_artikel_verwijder, SYSDATE - 100),
|
||||||
AND GREATEST (COALESCE (res_rsv_artikel_mutatie, SYSDATE - 100),
|
COALESCE (res_rsv_artikel_aanmaak, SYSDATE - 100)) >
|
||||||
COALESCE (res_rsv_artikel_verwijder, SYSDATE - 100),
|
(SELECT fac_notificatie_job_nextrun - fac_notificatie_job_interval / 24
|
||||||
COALESCE (res_rsv_artikel_aanmaak, SYSDATE - 100)) <
|
FROM fac_notificatie_job
|
||||||
(SELECT fac_notificatie_job_nextrun
|
WHERE fac_notificatie_job_view = 'KFSG_V_NOTI_CATERING')
|
||||||
FROM fac_notificatie_job
|
AND GREATEST (COALESCE (res_rsv_artikel_mutatie, SYSDATE - 100),
|
||||||
WHERE fac_notificatie_job_view = 'KFSG_V_NOTI_CATERING')
|
COALESCE (res_rsv_artikel_verwijder, SYSDATE - 100),
|
||||||
GROUP BY rrr.res_rsv_ruimte_key,
|
COALESCE (res_rsv_artikel_aanmaak, SYSDATE - 100)) <
|
||||||
rrr.res_reservering_key,
|
(SELECT fac_notificatie_job_nextrun
|
||||||
rrr.res_rsv_ruimte_volgnr;
|
FROM fac_notificatie_job
|
||||||
|
WHERE fac_notificatie_job_view = 'KFSG_V_NOTI_CATERING')
|
||||||
|
GROUP BY rrr.res_rsv_ruimte_key,
|
||||||
|
rrr.res_reservering_key,
|
||||||
|
rrr.res_rsv_ruimte_volgnr;
|
||||||
|
|
||||||
-- rapport met mensen die via de interface inactief gemaakt zijn en nog lopende verplichtingen hebben te tonen.
|
-- rapport met mensen die via de interface inactief gemaakt zijn en nog lopende verplichtingen hebben te tonen.
|
||||||
CREATE OR REPLACE VIEW kfsg_v_rap_prs_inactief
|
CREATE OR REPLACE VIEW kfsg_v_rap_prs_inactief
|
||||||
|
|||||||
Reference in New Issue
Block a user