MARX#78859 Notities bij notificaties van mld-opdrachten savepoint

svn path=/Database/trunk/; revision=61896
This commit is contained in:
Jos Groot Lipman
2023-09-26 12:10:17 +00:00
parent ff353975d9
commit 715c2c013a

View File

@@ -15,7 +15,7 @@ CREATE OR REPLACE PACKAGE mld AS
FUNCTION getmeldinguser (pmeldingkey IN number) RETURN NUMBER;
PROCEDURE setmeldingstatus (pmeldingkey IN NUMBER, pstatus IN NUMBER, puserkey IN NUMBER, pnotificeren IN NUMBER DEFAULT 1);
FUNCTION getopdrachtstatusdate (popdrkey IN number, pstatus IN number) RETURN date;
PROCEDURE setopdrachtstatus (popdrachtkey IN NUMBER, pstatus IN NUMBER, puserkey IN NUMBER);
PROCEDURE setopdrachtstatus (popdrachtkey IN NUMBER, pstatus IN NUMBER, puserkey IN NUMBER, popdr_note_key IN NUMBER DEFAULT NULL);
PROCEDURE notifybackoffice (pmeldingkey IN NUMBER, pcode IN VARCHAR2, pdisc_level IN NUMBER DEFAULT 1);
PROCEDURE notifyprio (pmeldingkey IN NUMBER, prio IN NUMBER, pperslid_key IN NUMBER, pdisc_level IN NUMBER DEFAULT 1);
PROCEDURE notifyopdrgoedkeurders (popdrkey IN NUMBER);
@@ -436,7 +436,7 @@ CREATE OR REPLACE PACKAGE BODY mld AS
-- gezet, waarbij zonodig (indien verandering) een trackrecord wordt gemaakt
-- Als de status niet wijzigt, wordt ook geen trackrecord gemaakt
-- ZIE schema StateDiagramOpdrachten.vsd
PROCEDURE setopdrachtstatus (popdrachtkey IN NUMBER, pstatus IN NUMBER, puserkey IN NUMBER)
PROCEDURE setopdrachtstatus (popdrachtkey IN NUMBER, pstatus IN NUMBER, puserkey IN NUMBER, popdr_note_key IN NUMBER DEFAULT NULL)
AS
currentstatus mld_opdr.mld_statusopdr_key%TYPE;
newstatus mld_opdr.mld_statusopdr_key%TYPE;
@@ -444,6 +444,7 @@ CREATE OR REPLACE PACKAGE BODY mld AS
typeopdr_key mld_typeopdr.mld_typeopdr_key%TYPE;
typeopdr_isofferte mld_typeopdr.mld_typeopdr_isofferte%TYPE;
statusopdr_key_refiat mld_opdr.mld_statusopdr_key_refiat%TYPE;
new_fac_tracking_key fac_tracking.fac_tracking_key%TYPE;
BEGIN
SELECT mld_statusopdr_key, mld_typeopdr_key, mld_statusopdr_key_refiat
INTO currentstatus, typeopdr_key, statusopdr_key_refiat
@@ -569,7 +570,13 @@ CREATE OR REPLACE PACKAGE BODY mld AS
IF statusopdr_key_refiat IS NULL OR
newstatus = 3 OR newstatus = 4 OR newstatus = 10
THEN
fac.trackaction (eventcode, popdrachtkey, puserkey, NULL, NULL);
fac.trackaction (eventcode, popdrachtkey, puserkey, NULL, NULL, new_fac_tracking_key);
IF popdr_note_key IS NOT NULL
THEN
UPDATE mld_opdr_note
SET fac_tracking_key = new_fac_tracking_key
WHERE mld_opdr_note_key = popdr_note_key;
END IF;
END IF;
END IF;
END;
@@ -2886,7 +2893,7 @@ CREATE OR REPLACE PACKAGE BODY mld AS
BEGIN
-- even kijken of er uberhaupt wel objecten zijn
-- zonder de ins_deel tabel te raadplegen
-- dat leidde nl tot een muating-error bij het verwerken van
-- dat leidde nl tot een muating-error bij het verwerken van
-- sensoroverschreiding, en het kan in veel gevallen directer
SELECT COUNT (*)
INTO lnrins