First rough version

svn path=/Database/trunk/; revision=7854
This commit is contained in:
Peter Feij
2001-10-01 07:43:04 +00:00
parent 7565974739
commit 47a6c5cb61
8 changed files with 214 additions and 0 deletions

0
BES/.gitignore vendored
View File

9
BES/BES_IND.SRC Normal file
View File

@@ -0,0 +1,9 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION (concept).
*/
#endif // BES

58
BES/BES_INI.SRC Normal file
View File

@@ -0,0 +1,58 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION (concept).
*/
#include "comsql.h"
#include "FAC\fac_hlp.h"
#define DEF_FAC_ROL(c, o) INSERT INTO fac_rol (fac_rol_role, fac_rol_omschrijving) VALUES(c, o)
#define DEF_FAC_FUNCTIE(c, o, m, l) INSERT INTO fac_functie (fac_functie_code, fac_functie_omschrijving,fac_functie_module,fac_functie_min_level) VALUES(c, o, m, l)
/*
** Bij installatie van modules moet de tabel FAC_MODULE gevuld of ge-update worden.
*/
_FAC_MODULE('BES','Bestellingen')
/*
** Definieer de rollen voor de RES module en geef de hoofduser (waaronder dit script wordt gedraaid) altijd de hoogste rol.
** NB: Er is (nu nog) geen LAN functionaliteit, dus WEB only!
*/
DEF_FAC_ROL (USER||'_BES_SMALL_ROLE' ,'Bestellingen kijken');
DEF_FAC_ROL (USER||'_BES_FULL_ROLE' ,'Bestellingen muteren');
DEF_FAC_ROL (USER||'_BES_ARCHIVE_ROLE','Bestellingen beheren');
INSERT INTO fac_gebruiker (fac_gebruiker_username,
fac_gebruiker_module,
fac_gebruiker_tabel,
fac_gebruiker_kolom,
fac_gebruiker_kolomkey)
SELECT USER,'FAC','FAC_ROL','FAC_ROL_KEY', fac_rol_key
FROM fac_rol
WHERE fac_rol_role LIKE USER||'_BES_ARCHIVE_ROLE';
/*
** Voeg de functies voor de BES module toe en geef de hoofuser toegang op all functies.
*/
INSERT INTO fac_gebruiker (fac_gebruiker_username,
fac_gebruiker_module,
fac_functie_key,
fac_gebruiker_soort)
SELECT USER,fac_functie_module, fac_functie_key, '1'
FROM fac_functie
WHERE fac_functie_module = 'BES';
/*
** De ENTITY_NAMES van de BES module.
*/
/*
** De MESSAGES van de BES module.
*/
#endif // BES

9
BES/BES_PAC.SRC Normal file
View File

@@ -0,0 +1,9 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION (concept).
*/
#endif // BES

14
BES/BES_SEQ.SRC Normal file
View File

@@ -0,0 +1,14 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION (concept).
*/
CREATE SEQUENCE bes_s_bes_bestelling_key MINVALUE 1;
CREATE SEQUENCE bes_s_bes_bestelling_item_key MINVALUE 1;
CREATE SEQUENCE bes_s_bes_bestelopdr_key MINVALUE 1;
CREATE SEQUENCE bes_s_bes_bestelopdr_item_key MINVALUE 1;
#endif // BES

68
BES/BES_TAB.SRC Normal file
View File

@@ -0,0 +1,68 @@
#ifdef BES // 03-11-2000 PF
#include "comsql.h"
CREATE_TABLE(bes_bestelling,BES_BIBLIOTHEEK_PRIVILEGE)
(
bes_bestelling_key
NUMBER(10)
CONSTRAINT bes_k_bes_bestelling_key PRIMARY KEY,
bes_bestelling_module
VARCHAR2(3)
NOT_NULL(bes_bestelling_module, bes_c_bes_bestelling_module),
bes_bestelling_status
NUMBER(1)
NOT_NULL(bes_bestelling_status, bes_c_bes_bestelling_status)
bes_bestelling_datum
DATE
NOT_NULL(bes_bestelling_datum, bes_c_bes_bestelling_datum),
prs_perslid_key
NUMBER(10)
CONSTRAINT bes_r_prs_user_key1 REFERENCES prs_perslid(prs_perslid_key),
prs_afdeling_key
NUMBER(10)
CONSTRAINT bes_r_prs_afdeling_key1 REFERENCES prs_afdeling(prs_afdeling_key),
bes_bestelling_owner_key
NUMBER(10)
CONSTRAINT bes_r_prs_user_key2 REFERENCES prs_perslid(prs_perslid_key),
bes_bestelling_geaccepteerd
DATE,
bes_bestelling_geaccepteerd_user_key
NUMBER(10)
CONSTRAINT bes_r_prs_user_key3 REFERENCES prs_perslid(prs_perslid_key),
bes_bestelling_afgewezen
DATE,
bes_bestelling_afgemeld
DATE,
bes_bestelling_verwerkt
DATE,
bes_ins_srtinst_keys
NUMBER(10),
bes_meldbron_nr
VARCHAR2(12),
bes_alg_locatie_key
NUMBER(10)
NOT_NULL(bes_alg_locatie_key, bes_r_alg_locatie_key1)
CONSTRAINT bes_r_alg_locatie_key2 REFERENCES alg_locatie(alg_locatie_key),
bes_alg_onroerendgoed_keys
NUMBER(10)
NOT_NULL(bes_alg_onroerendgoed_keys, bes_c_alg_onroerendgoed_keys),
bes_bestelling_opmerking
VARCHAR2(320),
bes_bestelling_melder_naam
VARCHAR2(30),
bes_bestelling_document
LONG RAW,
bes_bestelling_documentnaam
VARCHAR2(512),
bes_bestelling_ordernr
VARCHAR2(12),
bes_bestelling_telefoon
VARCHAR2(15),
bes_bestelling_plaats
VARCHAR2(30),
CONSTRAINT bes_c_afgewezen_opmerking CHECK(bes_bestelling_afgewezen IS NULL
OR (bes_bestelling_afgewezen IS NOT NULL
AND bes_bestelling_opmerking IS NOT NULL))
#endif // BES

43
BES/BES_TRI.SRC Normal file
View File

@@ -0,0 +1,43 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION.
*/
#include "comsql.h"
CREATE_TRIGGER(bes_t_bes_bestelling_B_IU)
BEFORE INSERT OR UPDATE ON bes_bestelling
FOR EACH ROW
BEGIN
UPDATE_PRIMARY_KEY(bes_bestelling_key,bes_s_bes_bestelling_key);
END;
/
CREATE_TRIGGER(bes_t_bes_bestelling_item_B_IU)
BEFORE INSERT OR UPDATE ON bes_bestelling_item
FOR EACH ROW
BEGIN
UPDATE_PRIMARY_KEY(bes_bestelling_item_key,bes_s_bes_bestelling_item_key);
END;
/
CREATE_TRIGGER(bes_t_bes_bestelopdr_B_IU)
BEFORE INSERT OR UPDATE ON bes_bestelopdr
FOR EACH ROW
BEGIN
UPDATE_PRIMARY_KEY(bes_bestelopdr_key,bes_s_bes_bestelopdr_key);
END;
/
CREATE_TRIGGER(bes_t_bes_bestelopdr_item_B_IU)
BEFORE INSERT OR UPDATE ON bes_bestelopdr_item
FOR EACH ROW
BEGIN
UPDATE_PRIMARY_KEY(bes_bestelopdr_item_key,bes_s_bes_bestelopdr_item_key);
END;
/
#endif // BES

13
BES/BES_VIE.SRC Normal file
View File

@@ -0,0 +1,13 @@
#ifdef BES // 03-11-2000 PF
/* REVISIONS:
*
* 03-11-20000 PF CREATION (concept).
*/
#include "comsql.h"
#endif // BEZ