ASDL#40232 -- Logboek NS: Afmelding glasbewassing

svn path=/Customer/trunk/; revision=34491
This commit is contained in:
Arthur Egberink
2017-06-30 13:38:17 +00:00
parent 726272ee40
commit e64b6738e3

View File

@@ -1099,6 +1099,26 @@ AS
AND d.alg_district_key IN (41, 42, 43, 44)
GROUP BY prs_kenmerk_key, fac_usrdata_volgnr, fac_usrdata_omschr, fac_usrdata_key;
-- view om een listbox met locatiebeheerders te vullen
CREATE OR REPLACE VIEW asdl_v_list_locatiebeheerder
(
prs_perslid_naam_full,
prs_perslid_key,
prs_perslid_verwijder
)
AS
SELECT prs_perslid_naam_full, pf.prs_perslid_key, NULL
FROM prs_v_perslid_fullnames pf, fac_gebruikersgroep gg
WHERE pf.prs_perslid_key = gg.prs_perslid_key AND fac_groep_key = 241
UNION ALL
SELECT prs_perslid_naam_full, prs_perslid_key, SYSDATE
FROM prs_v_perslid_fullnames_all pf
WHERE pf.prs_perslid_key NOT IN
(SELECT prs_perslid_key
FROM fac_gebruikersgroep gg
WHERE gg.prs_perslid_key = pf.prs_perslid_key AND fac_groep_key = 241);
-------------------------------------------------------------------------------------------
--
-- Notificatiejobs
@@ -1246,6 +1266,82 @@ AS
AND nj.fac_notificatie_job_view = 'ASDL_V_NOTI_ADMINISTRATIE'
AND t.fac_tracking_datum > nj.fac_notificatie_job_nextrun - (nj.fac_notificatie_job_interval / 24);
-- Notificatie naar de locatiebeheerder om de actie goed te keuren of af te wijzen.
CREATE OR REPLACE VIEW asdl_v_noti_glas_locatiebeheer
(
code,
sender,
receiver,
text,
key,
xkey,
xemail,
xmobile
)
AS
SELECT sn.fac_srtnotificatie_code,
NULL,
fac.safe_to_number(mld_kenmerkmelding_waarde) prs_perslid_key, -- NS Asito administratie
'Glasbewassing op locatie ' || alg_locatie_omschrijving || ' is uitgevoerd.',
m.mld_melding_key,
NULL,
NULL,
NULL
FROM fac_tracking t,
mld_melding m,
mld_stdmelding sm,
fac_srtnotificatie sn,
fac_notificatie_job nj,
mld_kenmerkmelding km,
alg_locatie l
WHERE t.fac_srtnotificatie_key = 43 -- MLDNEW
AND t.fac_tracking_refkey = m.mld_melding_key
AND m.mld_stdmelding_key = sm.mld_stdmelding_key
AND sm.mld_ins_discipline_key = 241
AND sn.fac_srtnotificatie_code = 'CUST02'
AND km.mld_kenmerk_key = 181 -- locatiebeheerder
AND km.mld_melding_key = m.mld_melding_key
AND m.mld_alg_locatie_key = l.alg_locatie_key
AND UPPER(nj.fac_notificatie_job_view) = 'ASDL_V_NOTI_GLAS_LOCATIEBEHEER'
AND t.fac_tracking_datum > nj.fac_notificatie_job_nextrun - (nj.fac_notificatie_job_interval / 24);
--
-- Notificatie naar het KPC om glasbewassing te factureren.
CREATE OR REPLACE VIEW asdl_v_noti_glas_facuur
(
code,
sender,
receiver,
text,
key,
xkey,
xemail,
xmobile
)
AS
SELECT sn.fac_srtnotificatie_code,
NULL,
701 prs_perslid_key, -- NS Asito administratie
'Glasbewassing op locatie ' || alg_locatie_omschrijving || ' kan gefactureerd worden.',
m.mld_melding_key,
NULL,
NULL,
NULL
FROM fac_tracking t,
mld_melding m,
mld_stdmelding sm,
fac_srtnotificatie sn,
fac_notificatie_job nj,
alg_locatie l
WHERE t.fac_srtnotificatie_key = 43 -- MLDACP
AND t.fac_tracking_refkey = m.mld_melding_key
AND m.mld_stdmelding_key = sm.mld_stdmelding_key
AND sm.mld_ins_discipline_key = 241
AND sn.fac_srtnotificatie_code = 'MLDMAI'
AND m.mld_alg_locatie_key = l.alg_locatie_key
AND UPPER(nj.fac_notificatie_job_view) = 'ASDL_V_NOTI_GLAS_FACTUUR'
AND t.fac_tracking_datum > nj.fac_notificatie_job_nextrun - (nj.fac_notificatie_job_interval / 24);
-------------------------------------------------------------------------------------------
--
-- Importsheets