LOGI#13756
svn path=/Database/trunk/; revision=9725
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#ifdef BES // 03-11-2000 PF
|
||||
|
||||
/*
|
||||
* $Revision: 42 $
|
||||
* $Modtime: 3-12-07 9:33 $
|
||||
* $Revision: 43 $
|
||||
* $Modtime: 12-02-08 17:20 $
|
||||
*/
|
||||
|
||||
#include "comsql.h"
|
||||
@@ -122,6 +122,7 @@ BEGIN
|
||||
soms fac_srtnotificatie.fac_srtnotificatie_oms%TYPE;
|
||||
scode fac_srtnotificatie.fac_srtnotificatie_code%TYPE;
|
||||
lreceiver prs_perslid.prs_perslid_key%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
BEGIN
|
||||
IF :NEW.bes_bestelling_status = 5 AND :OLD.bes_bestelling_status <> 5
|
||||
THEN
|
||||
@@ -170,12 +171,24 @@ BEGIN
|
||||
);
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
SELECT l.alg_locatie_email
|
||||
INTO lsender
|
||||
FROM mld_adres ma, alg_locatie l
|
||||
WHERE :new.mld_adres_key_lev = ma.mld_adres_key(+)
|
||||
AND ma.alg_locatie_key = l.alg_locatie_key(+);
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
-- Stuur notificatie naar de aanvrager
|
||||
fac.putnotificationsrt (:NEW.prs_perslid_key, :NEW.prs_perslid_key, scode, :NEW.bes_bestelling_key, soms, NULL, NULL, NULL, NULL);
|
||||
fac.putnotificationsrtprio (:NEW.prs_perslid_key, :NEW.prs_perslid_key, scode, :NEW.bes_bestelling_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
|
||||
-- Stuur notificatie naar de behandelaar indien afwijkend
|
||||
IF :NEW.prs_perslid_key <> :NEW.bes_bestelling_owner_key
|
||||
THEN
|
||||
fac.putnotificationsrt (:NEW.prs_perslid_key, :NEW.prs_perslid_key, scode, :NEW.bes_bestelling_key, soms, NULL, NULL, NULL, NULL);
|
||||
fac.putnotificationsrtprio (:NEW.prs_perslid_key, :NEW.prs_perslid_key, scode, :NEW.bes_bestelling_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
@@ -198,6 +211,7 @@ DECLARE
|
||||
lemail prs_bedrijf.prs_bedrijf_email%TYPE;
|
||||
lphone prs_bedrijf.prs_bedrijf_telefoon2%TYPE;
|
||||
lbedrijfnaam prs_bedrijf.prs_bedrijf_naam%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
BEGIN
|
||||
-- Nu sturen we naar de leverancier, vooralsnog
|
||||
IF :NEW.bes_bestelopdr_status = 4 AND :OLD.bes_bestelopdr_status <> 4
|
||||
@@ -250,7 +264,20 @@ BEGIN
|
||||
'##NAAM##', lbedrijfnaam
|
||||
);
|
||||
END IF;
|
||||
fac.putnotificationsrt(NULL, NULL, scode, :NEW.bes_bestelopdr_key, soms, NULL, lemail, lphone, NULL);
|
||||
|
||||
BEGIN
|
||||
SELECT l.alg_locatie_email
|
||||
INTO lsender
|
||||
FROM mld_adres ma, alg_locatie l
|
||||
WHERE :new.mld_adres_key_lev = ma.mld_adres_key(+)
|
||||
AND ma.alg_locatie_key = l.alg_locatie_key(+);
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
fac.putnotificationsrtprio(NULL, NULL, scode, :NEW.bes_bestelopdr_key, soms, NULL, lemail, lphone, NULL, 2, lsender);
|
||||
END IF;
|
||||
END;
|
||||
/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef BEZ // 03-11-2000 PF
|
||||
|
||||
/* $Revision: 26 $
|
||||
* $Modtime: 3-01-08 15:03 $
|
||||
/* $Revision: 27 $
|
||||
* $Modtime: 13-02-08 13:11 $
|
||||
*/
|
||||
|
||||
#include "comsql.h"
|
||||
@@ -102,6 +102,7 @@ BEGIN
|
||||
scode fac_srtnotificatie.fac_srtnotificatie_code%TYPE;
|
||||
lbezoek VARCHAR2 (50);
|
||||
lreceiver prs_perslid.prs_perslid_key%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
BEGIN
|
||||
-- Alleen registratie van globale mutaties; per bezoeker wordt ook genotificeerd
|
||||
-- Er is niet noodzakelijk iets gewijzigd, maar we notificeren wel
|
||||
@@ -151,8 +152,19 @@ BEGIN
|
||||
DATE_TO_CHAR (:NEW.bez_afspraak_datum, 'DD-MM-YY HH24:MI')
|
||||
);
|
||||
END IF;
|
||||
BEGIN
|
||||
SELECT l.alg_locatie_email
|
||||
INTO lsender
|
||||
FROM alg_locatie l
|
||||
WHERE l.alg_locatie_key = :new.alg_locatie_key;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
fac.clrnotifications(scode, :NEW.bez_afspraak_key);
|
||||
fac.putnotificationsrt (:NEW.prs_perslid_key,
|
||||
fac.putnotificationsrtprio (:NEW.prs_perslid_key,
|
||||
:NEW.bez_afspraak_contact_key,
|
||||
scode,
|
||||
:NEW.bez_afspraak_key,
|
||||
@@ -160,7 +172,9 @@ BEGIN
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
2,
|
||||
lsender
|
||||
);
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
@@ -197,11 +211,13 @@ BEGIN
|
||||
lbezoek bez_bezoekers.bez_afspraak_naam%TYPE;
|
||||
lreceiver prs_perslid.prs_perslid_key%TYPE;
|
||||
lreceiver2 prs_perslid.prs_perslid_key%TYPE;
|
||||
lsender prs_perslid.prs_perslid_key%TYPE;
|
||||
lsenderkey prs_perslid.prs_perslid_key%TYPE;
|
||||
lalglocatiekey bez_afspraak.alg_locatie_key%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
ldatum DATE;
|
||||
BEGIN
|
||||
SELECT bez_afspraak_host_key, bez_afspraak_contact_key, bez_afspraak_datum, prs_perslid_key
|
||||
INTO lreceiver, lreceiver2, ldatum, lsender
|
||||
SELECT bez_afspraak_host_key, bez_afspraak_contact_key, bez_afspraak_datum, prs_perslid_key, alg_locatie_key
|
||||
INTO lreceiver, lreceiver2, ldatum, lsenderkey, lalglocatiekey
|
||||
FROM bez_afspraak
|
||||
WHERE bez_afspraak_key = :NEW.bez_afspraak_key;
|
||||
|
||||
@@ -265,16 +281,27 @@ BEGIN
|
||||
DATE_TO_CHAR (ldatum, 'DD-MM-YY HH24:MI')
|
||||
);
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
SELECT l.alg_locatie_email
|
||||
INTO lsender
|
||||
FROM alg_locatie l
|
||||
WHERE l.alg_locatie_key = lalglocatiekey;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
-- Prevent sending these messages to self
|
||||
IF soms IS NOT NULL AND lsender != lreceiver
|
||||
IF soms IS NOT NULL AND lsenderkey != lreceiver
|
||||
THEN
|
||||
fac.putnotificationsrt (lsender, lreceiver, scode, :NEW.bez_afspraak_key, soms, NULL, NULL, NULL, NULL);
|
||||
fac.putnotificationsrtprio (lsenderkey, lreceiver, scode, :NEW.bez_afspraak_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
|
||||
END IF;
|
||||
|
||||
IF soms2 IS NOT NULL AND lsender != lreceiver2
|
||||
IF soms2 IS NOT NULL AND lsenderkey != lreceiver2
|
||||
THEN
|
||||
fac.putnotificationsrt (lsender, lreceiver2, scode2, :NEW.bez_afspraak_key, soms2, NULL, NULL, NULL, NULL);
|
||||
fac.putnotificationsrtprio (lsenderkey, lreceiver2, scode2, :NEW.bez_afspraak_key, soms2, NULL, NULL, NULL, NULL, 2, lsender);
|
||||
END IF;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifdef FAC
|
||||
/* $Revision: 127 $
|
||||
* $Modtime: 8-02-08 13:54 $
|
||||
/* $Revision: 128 $
|
||||
* $Modtime: 12-02-08 14:56 $
|
||||
*/
|
||||
|
||||
/* FAC_P_FAC_VOLGNR: Tabel en functies voor volgnummers.
|
||||
@@ -577,9 +577,8 @@ CREATE OR REPLACE PACKAGE fac AS
|
||||
poptemail VARCHAR2, poptmobile VARCHAR2);
|
||||
PROCEDURE putsystemnotification (pmessage VARCHAR2, pmode NUMBER);
|
||||
PROCEDURE putnotificationsrtprio (pfrom NUMBER, pto NUMBER, pcode VARCHAR2, pref NUMBER,
|
||||
poptmessage VARCHAR2, poptstatus NUMBER, poptemail VARCHAR2, poptmobile VARCHAR2, pxref NUMBER, pprio NUMBER);
|
||||
PROCEDURE putnotificationsrt (pfrom NUMBER, pto NUMBER, pcode VARCHAR2, pref NUMBER,
|
||||
poptmessage VARCHAR2, poptstatus NUMBER, poptemail VARCHAR2, poptmobile VARCHAR2, pxref NUMBER);
|
||||
poptmessage VARCHAR2, poptstatus NUMBER, poptemail VARCHAR2, poptmobile VARCHAR2, pxref NUMBER,
|
||||
pprio NUMBER, psender VARCHAR2);
|
||||
PROCEDURE clrnotifications (pcode VARCHAR2, pref NUMBER);
|
||||
PROCEDURE putnotificationjobs (pcust VARCHAR2);
|
||||
PROCEDURE putjobnotifications (pviewname VARCHAR2, pmode NUMBER);
|
||||
@@ -1583,6 +1582,7 @@ CREATE OR REPLACE PACKAGE BODY fac AS
|
||||
-- kan de email en mobile van pto optioneel worden overruled door poptemail en poptmobile
|
||||
-- Als email of sms gevraagt wordt (smode) en email of mobile kan niet bepaald worden, wordt niet gequeued
|
||||
-- pprio is de prioriteit (1, 2 of 3) die geen effect heeft op de quebehandeling, maar wel wordt meegegeven
|
||||
-- psender is een optioneel emailadres dat als afzender kan worden gehanteerd.
|
||||
PROCEDURE putnotificationsrtprio (
|
||||
pfrom NUMBER,
|
||||
pto NUMBER,
|
||||
@@ -1593,7 +1593,8 @@ CREATE OR REPLACE PACKAGE BODY fac AS
|
||||
poptemail VARCHAR2,
|
||||
poptmobile VARCHAR2,
|
||||
pxref NUMBER,
|
||||
pprio NUMBER
|
||||
pprio NUMBER,
|
||||
psender VARCHAR2
|
||||
)
|
||||
AS
|
||||
soms fac_srtnotificatie.fac_srtnotificatie_oms%TYPE;
|
||||
@@ -1682,36 +1683,17 @@ CREATE OR REPLACE PACKAGE BODY fac AS
|
||||
(fac_srtnotificatie_key, fac_notificatie_status, prs_perslid_key_sender,
|
||||
prs_perslid_key_receiver, fac_notificatie_receiver_email, fac_notificatie_receiver_phone,
|
||||
fac_notificatie_oms, fac_notificatie_refkey, fac_notificatie_extrakey,
|
||||
fac_notificatie_prioriteit
|
||||
fac_notificatie_prioriteit, fac_notificatie_sender_email
|
||||
)
|
||||
VALUES (skey, lmode, pfrom,
|
||||
pto, lemail, lphone,
|
||||
soms, pref, pxref,
|
||||
pprio
|
||||
pprio, psender
|
||||
);
|
||||
END IF;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
/* for code compatibility only */
|
||||
PROCEDURE putnotificationsrt (
|
||||
pfrom NUMBER,
|
||||
pto NUMBER,
|
||||
pcode VARCHAR2,
|
||||
pref NUMBER,
|
||||
poptmessage VARCHAR2,
|
||||
poptstatus NUMBER,
|
||||
poptemail VARCHAR2,
|
||||
poptmobile VARCHAR2,
|
||||
pxref NUMBER
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
putnotificationsrtprio (pfrom, pto, pcode, pref,
|
||||
poptmessage, poptstatus, poptemail, poptmobile,
|
||||
pxref, 2);
|
||||
END;
|
||||
|
||||
-- Ruim zoveel mogelijk notificatiespul op voor dit item. Pcode mag een wildcard zijn!
|
||||
PROCEDURE clrnotifications (pcode VARCHAR2, pref NUMBER)
|
||||
AS
|
||||
@@ -1796,7 +1778,7 @@ CREATE OR REPLACE PACKAGE BODY fac AS
|
||||
THEN
|
||||
putnotification (lsender, lreceiver, ltext, pmode, NULL, NULL);
|
||||
ELSE
|
||||
putnotificationsrtprio (lsender, lreceiver, lcode, lrefkey, ltext, pmode, NULL, NULL, lxkey, 2);
|
||||
putnotificationsrtprio (lsender, lreceiver, lcode, lrefkey, ltext, pmode, NULL, NULL, lxkey, 2, NULL);
|
||||
END IF;
|
||||
END LOOP;
|
||||
|
||||
@@ -2553,7 +2535,7 @@ AS
|
||||
AS
|
||||
v_value VARCHAR2 (30);
|
||||
BEGIN
|
||||
createopentagattributes ('header', 'revision', SUBSTR('$Revision: 127 $',12,3), NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
createopentagattributes ('header', 'revision', SUBSTR('$Revision: 128 $',12,3), NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
createxmltagvalue ('dateTime', DATE_TO_CHAR (SYSDATE, 'dd-mm-yyyy hh24:mi:ss'));
|
||||
createxmltagvalue ('dateDay', DATE_TO_CHAR (SYSDATE, 'dd'));
|
||||
createxmltagvalue ('dateMonth', DATE_TO_CHAR (SYSDATE, 'mm'));
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* System views for Facilitor
|
||||
*/
|
||||
|
||||
/* $Revision: 43 $
|
||||
* $Modtime: 12-02-08 12:43 $
|
||||
/* $Revision: 44 $
|
||||
* $Modtime: 12-02-08 13:59 $
|
||||
*/
|
||||
#include "comsql.h"
|
||||
|
||||
@@ -817,7 +817,7 @@ AS
|
||||
WHERE b.prs_bedrijf_key = o.mld_uitvoerende_keys
|
||||
AND o.mld_melding_key = m.mld_melding_key
|
||||
AND m.mld_adres_key = ma.mld_adres_key(+)
|
||||
AND ma.alg_locatie_key = l1.alg_locatie_key
|
||||
AND ma.alg_locatie_key = l1.alg_locatie_key(+)
|
||||
AND m.mld_alg_locatie_key = l2.alg_locatie_key(+)
|
||||
AND b.prs_bedrijf_mldorder_adres IS NOT NULL
|
||||
AND (o.mld_statusopdr_key = 5 OR o.mld_statusopdr_key = 4)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef MLD // 13-03-96 AH
|
||||
/*
|
||||
* $Revision: 64 $
|
||||
* $Modtime: 3-08-07 10:36 $
|
||||
* $Revision: 65 $
|
||||
* $Modtime: 13-02-08 16:20 $
|
||||
*/
|
||||
#include "comsql.h"
|
||||
|
||||
@@ -753,6 +753,7 @@ BEGIN
|
||||
lreceiver prs_perslid.prs_perslid_key%TYPE;
|
||||
varplaats alg_v_plaatsaanduiding_all.alg_plaatsaanduiding%TYPE;
|
||||
lnotify mld_disc_params.mld_disc_params_notify%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
BEGIN
|
||||
-- Ontvanger is voor alle events gelijk, de aanvrager.
|
||||
lreceiver := :NEW.prs_perslid_key;
|
||||
@@ -838,8 +839,28 @@ BEGIN
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
SELECT COALESCE (email1, email2)
|
||||
INTO lsender
|
||||
FROM (SELECT (SELECT l1.alg_locatie_email
|
||||
FROM mld_adres ma,
|
||||
alg_locatie l1
|
||||
WHERE :new.mld_adres_key = ma.mld_adres_key(+)
|
||||
AND ma.alg_locatie_key = l1.alg_locatie_key(+)) email1,
|
||||
(SELECT l2.alg_locatie_email
|
||||
FROM alg_locatie l2
|
||||
WHERE :new.mld_alg_locatie_key = l2.alg_locatie_key(+)) email2
|
||||
FROM DUAL)
|
||||
WHERE email1 IS NOT NULL
|
||||
OR email2 IS NOT NULL;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
-- Stuur notificatie naar de aanvrager
|
||||
fac.putnotificationsrt (:NEW.mld_melding_user_key, lreceiver, scode, :NEW.mld_melding_key, soms, NULL, NULL, NULL, NULL);
|
||||
fac.putnotificationsrtprio (:NEW.mld_melding_user_key, lreceiver, scode, :NEW.mld_melding_key, soms, NULL, NULL, NULL, NULL, 2, lsender);
|
||||
END IF;
|
||||
END;
|
||||
END;
|
||||
@@ -865,6 +886,7 @@ BEGIN
|
||||
lemail prs_bedrijf.prs_bedrijf_email%TYPE;
|
||||
lphone prs_bedrijf.prs_bedrijf_telefoon2%TYPE;
|
||||
varplaats alg_v_plaatsaanduiding_all.alg_plaatsaanduiding%TYPE;
|
||||
lsender fac_notificatie.fac_notificatie_sender_email%TYPE;
|
||||
BEGIN
|
||||
lreceiver := :NEW.mld_uitvoerende_keys;
|
||||
lemail := NULL;
|
||||
@@ -1005,9 +1027,23 @@ BEGIN
|
||||
RETURN;
|
||||
END;
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
SELECT COALESCE (l1.alg_locatie_email, l2.alg_locatie_email)
|
||||
INTO lsender
|
||||
FROM mld_melding m, mld_adres ma, alg_locatie l1, alg_locatie l2
|
||||
WHERE m.mld_adres_key = ma.mld_adres_key(+)
|
||||
AND ma.alg_locatie_key = l1.alg_locatie_key(+)
|
||||
AND m.mld_alg_locatie_key = l2.alg_locatie_key(+)
|
||||
AND m.mld_melding_key = :new.mld_melding_key;
|
||||
EXCEPTION
|
||||
WHEN NO_DATA_FOUND
|
||||
THEN
|
||||
lsender := NULL;
|
||||
END;
|
||||
|
||||
-- Stuur notificatie naar de uitvoerende (vooralsnog intern)
|
||||
fac.putnotificationsrt (:NEW.mld_opdr_afgemeld_user,
|
||||
fac.putnotificationsrtprio (:NEW.mld_opdr_afgemeld_user,
|
||||
lreceiver,
|
||||
scode,
|
||||
:NEW.mld_opdr_key,
|
||||
@@ -1015,7 +1051,9 @@ BEGIN
|
||||
smode,
|
||||
lemail,
|
||||
lphone,
|
||||
NULL
|
||||
NULL,
|
||||
2,
|
||||
lsender
|
||||
);
|
||||
END IF;
|
||||
END;
|
||||
|
||||
Reference in New Issue
Block a user