FCLT#76580 syntactisch savepoint
svn path=/Database/trunk/; revision=64320
This commit is contained in:
@@ -2,66 +2,8 @@
|
||||
-- $Id$
|
||||
--
|
||||
-- Script bevat initiele configuratie voor een standaard FM inrichting
|
||||
-- gebaseerd op DB48
|
||||
--
|
||||
-- Volgende iteratie naar Onderdeel van de core
|
||||
|
||||
|
||||
DEFINE thisfile = 'fmis.sql'
|
||||
DEFINE dbuser = '^'
|
||||
|
||||
SET ECHO ON
|
||||
SET DEFINE ON
|
||||
COLUMN fcltlogfile NEW_VALUE fcltlogfile NOPRINT;
|
||||
COLUMN fcltcusttxt NEW_VALUE fcltcusttxt NOPRINT;
|
||||
WHENEVER SQLERROR CONTINUE;
|
||||
SELECT adm.getscriptspoolfile('&thisfile') AS fcltlogfile FROM DUAL;
|
||||
SPOOL &fcltlogfile
|
||||
WHENEVER SQLERROR EXIT;
|
||||
SELECT adm.checkscriptcust('&dbuser') AS fcltcusttxt FROM DUAL;
|
||||
WHENEVER SQLERROR CONTINUE;
|
||||
---------------------------------------
|
||||
PROMPT &fcltcusttxt
|
||||
---------------------------------------
|
||||
SET DEFINE OFF
|
||||
|
||||
------ payload begin ------
|
||||
|
||||
-- TODO: controle of deze al eens gerund heeft?
|
||||
|
||||
-- Some temporary tooling for this script
|
||||
-- Will be destrouyed after the script has been run
|
||||
|
||||
CREATE PACKAGE tmp_fmis_ini AS
|
||||
FUNCTION getImportKey (p_import_app_code VARCHAR2)
|
||||
RETURN NUMBER;
|
||||
END tmp_fmis_ini;
|
||||
/
|
||||
CREATE PACKAGE BODY tmp_fmis_ini AS
|
||||
-- Functie om voor iedere importfunctie een nieuwe importkey te genereren.
|
||||
FUNCTION getImportKey (p_import_app_code VARCHAR2)
|
||||
RETURN NUMBER
|
||||
AS
|
||||
v_import_key NUMBER;
|
||||
v_import_app_key NUMBER;
|
||||
|
||||
BEGIN
|
||||
SELECT fac_import_app_key
|
||||
INTO v_import_app_key
|
||||
FROM fac_import_app
|
||||
WHERE fac_import_app_code = UPPER(p_import_app_code);
|
||||
|
||||
INSERT INTO fac_import (fac_import_app_key, fac_import_datum_gelezen)
|
||||
VALUES (v_import_app_key, SYSDATE)
|
||||
RETURNING fac_import_key INTO v_import_key;
|
||||
|
||||
RETURN v_import_key;
|
||||
END;
|
||||
END tmp_fmis_ini;
|
||||
/
|
||||
-- End of temporary tooling
|
||||
|
||||
|
||||
--
|
||||
-- Moet in sync worden gehouden met de DB-versies
|
||||
|
||||
-- Moeten wij dit doen (FMIS) of is er nog een neutrale init.sql die wat config doet na de crea?
|
||||
UPDATE fac_version SET fac_version_cust = UPPER(user), fac_version_otap = NULL WHERE fac_version_cust IS NULL;
|
||||
@@ -69,10 +11,10 @@ UPDATE fac_version SET fac_version_cust = UPPER(user), fac_version_otap = NULL W
|
||||
-- BASISCONFIG PER MODULE
|
||||
-- 1. ALG
|
||||
-- Gebouwfuncties en ruimtefuncties
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Kantoor', 0);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Kantoor', NULL);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Opslag/Magazijn', 1);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Woning', 0);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Werkplaats', 0);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Woning', NULL);
|
||||
INSERT INTO alg_srtgebouw(alg_srtgebouw_omschrijving, alg_srtgebouw_passief) VALUES ('Werkplaats', NULL);
|
||||
|
||||
INSERT INTO alg_srtterreinsector(alg_srtterreinsec_omschrijving) VALUES ('Parkeerterrein');
|
||||
INSERT INTO alg_srtterreinsector(alg_srtterreinsec_omschrijving) VALUES ('Groenvoorziening');
|
||||
@@ -88,16 +30,16 @@ INSERT INTO alg_srtruimte(alg_srtruimte_omschrijving, prs_bevat_werkplek, prs_ve
|
||||
-- Maak het vakgroeptype aan.
|
||||
INSERT INTO ins_srtdiscipline ( ins_srtdiscipline_module, ins_srtdiscipline_omschrijving, ins_srtdiscipline_prefix, ins_srtdiscipline_kostenklant)
|
||||
SELECT * FROM (
|
||||
SELECT 'INS', 'Facilitaire objecten', 'F', 2 FROM DUAL UNION ALL
|
||||
SELECT 'INS' a, 'Facilitaire objecten' b, 'F' c, 2 d FROM DUAL UNION ALL
|
||||
SELECT 'INS', 'Gebouwgebonden objecten', 'G', 2 FROM DUAL UNION ALL
|
||||
SELECT 'INS', 'ICT objecten', 'I', 2 FROM DUAL UNION ALL
|
||||
SELECT 'INS', 'Parkeerplaatsen', 'P', 2 FROM DUAL
|
||||
);
|
||||
-- Vakgroepen
|
||||
-- Leidraad is: is het aannemelijk dat daar andere personen (backoffice, autorisaties) over gaan?
|
||||
INSERT INTO ins_tab_discipline (ins_discipline_module, ins_discipline_code, ins_discipline_omschrijving, ins_srtdiscipline_key)
|
||||
INSERT INTO ins_tab_discipline (ins_discipline_module, ins_discipline_code, ins_discipline_omschrijving, ins_srtdiscipline_key)
|
||||
SELECT * FROM (
|
||||
SELECT 'INS', 'F010', 'Apparatuur', ins_srtdiscipline_key FROM ins_srtdiscipline WHERE ins_srtdiscipline_omschrijving = 'Facilitaire objecten' UNION ALL
|
||||
SELECT 'INS' a, 'F010' b, 'Apparatuur' c, ins_srtdiscipline_key d FROM ins_srtdiscipline WHERE ins_srtdiscipline_omschrijving = 'Facilitaire objecten' UNION ALL
|
||||
SELECT 'INS', 'F020', 'Automaten', ins_srtdiscipline_key FROM ins_srtdiscipline WHERE ins_srtdiscipline_omschrijving = 'Facilitaire objecten' UNION ALL
|
||||
SELECT 'INS', 'F030', 'Werkplekken', ins_srtdiscipline_key FROM ins_srtdiscipline WHERE ins_srtdiscipline_omschrijving = 'Facilitaire objecten' UNION ALL
|
||||
SELECT 'INS', 'F040', 'Toegang/Beveiliging', ins_srtdiscipline_key FROM ins_srtdiscipline WHERE ins_srtdiscipline_omschrijving = 'Facilitaire objecten' UNION ALL
|
||||
@@ -116,9 +58,9 @@ SELECT * FROM (
|
||||
INSERT INTO ins_disc_params (ins_discipline_key) SELECT ins_discipline_key FROM ins_tab_discipline WHERE ins_discipline_module='INS' AND ins_discipline_key NOT IN (SELECT ins_discipline_key FROM ins_disc_params);
|
||||
|
||||
-- Groepen TODO AANVULLEN of verbeteren. Meervoud of enkelvoud?
|
||||
INSERT INTO ins_srtgroep (ins_srtgroep_omschrijving, ins_discipline_key)
|
||||
INSERT INTO ins_srtgroep (ins_srtgroep_omschrijving, ins_discipline_key)
|
||||
SELECT * FROM (
|
||||
SELECT 'Koffieautomaten', ins_discipline_key FROM ins_tab_discipline WHERE ins_discipline_code = 'F020' UNION ALL
|
||||
SELECT 'Koffieautomaten' a, ins_discipline_key b FROM ins_tab_discipline WHERE ins_discipline_code = 'F020' UNION ALL
|
||||
SELECT 'Snoepautomaten', ins_discipline_key FROM ins_tab_discipline WHERE ins_discipline_code = 'F020' UNION ALL
|
||||
SELECT 'Frisdrankautomaten', ins_discipline_key FROM ins_tab_discipline WHERE ins_discipline_code = 'F020' UNION ALL
|
||||
SELECT 'Waterkoelers', ins_discipline_key FROM ins_tab_discipline WHERE ins_discipline_code = 'F020' UNION ALL
|
||||
@@ -135,7 +77,7 @@ SELECT * FROM (
|
||||
-- Objectsoorten TODO AANVULLEN. Meervoud of enkelvoud?
|
||||
INSERT INTO ins_srtdeel (ins_srtgroep_key, ins_srtdeel_code, ins_srtdeel_omschrijving, ins_srtdeel_image, ins_srtdeel_sensortype)
|
||||
SELECT * FROM (
|
||||
SELECT ins_srtgroep_key, 'KOF','Koffieautomaat', 'fa-mug-hot', 0 FROM ins_srtgroep WHERE ins_srtgroep_omschrijving = 'Koffieautomaten' UNION ALL
|
||||
SELECT ins_srtgroep_key a, 'KOF' b,'Koffieautomaat' c, 'fa-mug-hot' d, 0 e FROM ins_srtgroep WHERE ins_srtgroep_omschrijving = 'Koffieautomaten' UNION ALL
|
||||
SELECT ins_srtgroep_key, 'SNP','Snoepautomaat', 'fa-lollipop', 0 FROM ins_srtgroep WHERE ins_srtgroep_omschrijving = 'Snoepautomaten' UNION ALL
|
||||
SELECT ins_srtgroep_key, 'FRS','Frisdrankautomaat', 'fa-cup-straw-swoosh', 0 FROM ins_srtgroep WHERE ins_srtgroep_omschrijving = 'Frisdrankautomaten' UNION ALL
|
||||
SELECT ins_srtgroep_key, 'WTK','Waterkoeler', 'fa-glass-water', 0 FROM ins_srtgroep WHERE ins_srtgroep_omschrijving = 'Waterkoelers' UNION ALL
|
||||
@@ -153,9 +95,9 @@ SELECT * FROM (
|
||||
|
||||
-- 3. MLD
|
||||
-- Importeren van een standaard meldingenstructuur (MLD), maakt alle bovenliggende niveaus zelf aan
|
||||
INSERT INTO fac_imp_mld (ins_srtdiscipline_omschrijving, ins_srtdiscipline_prefix, ins_srtdiscipline_alg, ins_discipline_omschrijving, mld_stdmelding_hint, mld_stdmelding_omschrijving, mld_stdmelding_uitvoertijd)
|
||||
INSERT INTO fac_imp_mld (ins_srtdiscipline_omschrijving, ins_srtdiscipline_prefix, ins_srtdiscipline_alg, ins_discipline_omschrijving, mld_stdmelding_hint, mld_stdmelding_omschrijving, mld_stdmelding_uitvoertijd)
|
||||
SELECT * FROM (
|
||||
SELECT 'Aanvraag','A',1,'Afval','fa-recycle','Ophalen/verzamelen afval', 5 FROM DUAL UNION ALL
|
||||
SELECT 'Aanvraag' a,'A' b, 1 c,'Afval' d,'fa-recycle' e,'Ophalen/verzamelen afval' f, 5 g FROM DUAL UNION ALL
|
||||
SELECT 'Aanvraag','A',1,'Afval','fa-recycle','Extra container(rest-/papiercontainer)', 5 FROM DUAL UNION ALL
|
||||
SELECT 'Aanvraag','A',1,'Afval','fa-recycle','Zwerfafval (verzamelen)', 5 FROM DUAL UNION ALL
|
||||
SELECT 'Aanvraag','A',1,'Automaten','fa-server','Fris-/versnapering-automaat', 5 FROM DUAL UNION ALL
|
||||
@@ -290,8 +232,8 @@ SELECT * FROM (
|
||||
-- beetje lomp, wat vinden we?
|
||||
UPDATE fac_imp_mld SET mld_stdmelding_slabewaken = 0, mld_stdmelding_notfrontend = 0
|
||||
WHERE ins_srtdiscipline_omschrijving <> 'Melding';
|
||||
BEGIN fac_update_mld(tmp_fmis_ini.getImportKey('MLD')); END;
|
||||
/
|
||||
BEGIN fac_update_mld(ini.getImportKey('MLD')); END;
|
||||
|
||||
UPDATE ins_srtdiscipline SET ins_srtdiscipline_kostenklant = 8 WHERE ins_srtdiscipline_omschrijving = 'Klacht';
|
||||
UPDATE fac_setting
|
||||
SET fac_setting_pvalue =
|
||||
@@ -299,7 +241,7 @@ UPDATE fac_setting
|
||||
FROM mld_stdmelding
|
||||
WHERE mld_stdmelding_omschrijving = 'Ontvangen mail bericht')
|
||||
WHERE fac_setting_name = 'defaultstdmelding';
|
||||
INSERT INTO fac_email_setting (fac_email_setting_user, fac_email_setting_frommode, fac_email_setting_action, fac_email_setting_attachpath)
|
||||
INSERT INTO fac_email_setting (fac_email_setting_user, fac_email_setting_frommode, fac_email_setting_action, fac_email_setting_attachpath)
|
||||
VALUES ('servicedesk', 0, 'FAC.processemail', '*flexfilespath');
|
||||
|
||||
-- huh? O, de import ondersteunt de image niet, dus die gaat via de hint
|
||||
@@ -317,7 +259,6 @@ BEGIN
|
||||
RETURNING mld_srtkenmerk_key INTO v_key;
|
||||
INSERT INTO mld_kenmerk (mld_srtkenmerk_key, mld_kenmerk_niveau, mld_kenmerk_volgnummer, mld_kenmerk_groep) VALUES (v_key, 'A', 100, 0);
|
||||
END;
|
||||
/
|
||||
|
||||
-- 4. RES
|
||||
-- Activiteiten zijn er default al, catalogi dan
|
||||
@@ -326,9 +267,9 @@ DECLARE
|
||||
v_key res_activiteit.res_activiteit_key%TYPE;
|
||||
BEGIN
|
||||
INSERT INTO ins_tab_discipline (ins_discipline_omschrijving, ins_discipline_module) VALUES ('Vergaderruimte', 'RES') RETURNING ins_discipline_key INTO v_discipline_key;
|
||||
INSERT INTO res_disc_params (res_disc_params_key) VALUES (v_discipline_key);
|
||||
INSERT INTO res_disc_params (res_ins_discipline_key) VALUES (v_discipline_key);
|
||||
INSERT INTO ins_tab_discipline (ins_discipline_omschrijving, ins_discipline_module) VALUES ('Flexplekken', 'RES') RETURNING ins_discipline_key INTO v_discipline_key;
|
||||
INSERT INTO res_disc_params (res_disc_params_key) VALUES (v_discipline_key);
|
||||
INSERT INTO res_disc_params (res_ins_discipline_key) VALUES (v_discipline_key);
|
||||
UPDATE res_disc_params
|
||||
SET res_disc_params_expire_dagen = 0, res_disc_params_cancel_dagen = 0
|
||||
WHERE res_ins_discipline_key = v_discipline_key;
|
||||
@@ -338,7 +279,7 @@ BEGIN
|
||||
RETURNING res_activiteit_key INTO v_key;
|
||||
INSERT INTO res_activiteitdiscipline(res_discipline_key, res_activiteit_key) VALUES (v_discipline_key, v_key);
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
-- De catalogus om ruimten te reserveren moet nog wel aan de activiteit gekoppeld worden.
|
||||
INSERT INTO res_activiteitdiscipline(res_discipline_key, res_activiteit_key)
|
||||
@@ -386,7 +327,7 @@ BEGIN
|
||||
cnt_kenmerk_groep)
|
||||
SELECT v_key, ins_discipline_key, 'S', 100, 0 FROM cnt_discipline;
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
-- 6. FAQ
|
||||
INSERT INTO ins_tab_discipline (ins_discipline_omschrijving, ins_discipline_module) VALUES ('Facilitaire Kennisbank', 'FAQ');
|
||||
@@ -418,7 +359,7 @@ INSERT INTO fac_groeprechten (fac_groep_key, fac_functie_key, ins_discipline_key
|
||||
fac_gebruiker_alg_level_read, fac_gebruiker_alg_level_write,
|
||||
fac_gebruiker_prs_level_read, fac_gebruiker_prs_level_write)
|
||||
SELECT g.fac_groep_key, f.fac_functie_key, d.ins_discipline_key, -1, -1, -1, -1
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
WHERE f.fac_functie_code IN ('WEB_RESUSE', 'WEB_MLDUSE', 'WEB_BESUSE','WEB_BEZUSE','WEB_FAQUSE','WEB_PROFIL')
|
||||
AND f.fac_functie_module = d.ins_discipline_module
|
||||
AND g.fac_groep_upper = '_DEFAULT'
|
||||
@@ -435,7 +376,7 @@ INSERT INTO fac_groeprechten (fac_groep_key, fac_functie_key, ins_discipline_key
|
||||
fac_gebruiker_alg_level_read, fac_gebruiker_alg_level_write,
|
||||
fac_gebruiker_prs_level_read, fac_gebruiker_prs_level_write)
|
||||
SELECT g.fac_groep_key, f.fac_functie_key, d.ins_discipline_key, -1, -1, -1, -1
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
WHERE f.fac_functie_code IN ('WEB_RESFOF', 'WEB_MLDFOF', 'WEB_BESFOF', 'WEB_BEZFOF', 'WEB_FAQFOF', 'WEB_INSFOF')
|
||||
AND f.fac_functie_module = d.ins_discipline_module
|
||||
AND g.fac_groep_upper = 'FRONTOFFICE'
|
||||
@@ -451,7 +392,7 @@ INSERT INTO fac_groeprechten (fac_groep_key, fac_functie_key, ins_discipline_key
|
||||
fac_gebruiker_alg_level_read, fac_gebruiker_alg_level_write,
|
||||
fac_gebruiker_prs_level_read, fac_gebruiker_prs_level_write)
|
||||
SELECT g.fac_groep_key, f.fac_functie_key, d.ins_discipline_key, -1, -1, -1, -1
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
FROM fac_functie f, ins_tab_discipline d, fac_groep g
|
||||
WHERE f.fac_functie_code IN ('WEB_RESBOF', 'WEB_MLDBOF', 'WEB_ORDBOF', 'WEB_BESBOF', 'WEB_BEZBOF', 'WEB_FAQBOF', 'WEB_INSUSE', 'WEB_INSMAN', 'WEB_CNTMAN', 'WEB_CNTUSE')
|
||||
AND f.fac_functie_module = d.ins_discipline_module
|
||||
AND g.fac_groep_upper = 'BACKOFFICE'
|
||||
@@ -483,8 +424,8 @@ INSERT INTO fac_groeprechten (fac_groep_key, fac_functie_key, ins_discipline_key
|
||||
|
||||
-- Portaal
|
||||
-- Uitwerken, maar niet te gek maken
|
||||
UPDATE fac_locale_xsl
|
||||
SET fac_locale_xsl_cust = 'Welkom in jouw persoonlijke Facilitor/FMIS-omgeving. Je kunt hier allerlei zaken regelen, we leggen je hier kort even uit hoe.'
|
||||
UPDATE fac_locale_xsl
|
||||
SET fac_locale_xsl_cust = 'Welkom in jouw persoonlijke Facilitor/FMIS-omgeving. Je kunt hier allerlei zaken regelen, we leggen je hier kort even uit hoe.'
|
||||
WHERE fac_locale_xsl_label = 'lcl_welcome_intro' AND fac_locale_xsl_lang = 'NL' AND fac_locale_xsl_module = 'ASP';
|
||||
|
||||
|
||||
@@ -501,41 +442,41 @@ INSERT INTO fac_imp_onrgoed1 (alg_regio_omschrijving, alg_district_omschrijving,
|
||||
VALUES ('Nederland', 'Midden',
|
||||
'UTR','Hoofdkantoor','HQ','Hoofdgebouw','Kantoor',
|
||||
'Grotestraat 123','1234 AB','Utrecht');
|
||||
BEGIN fac_update_onrgoed1(tmp_fmis_ini.getImportKey('ONRGOED1')); END;
|
||||
/
|
||||
BEGIN fac_update_onrgoed1(ini.getImportKey('ONRGOED1')); END;
|
||||
|
||||
|
||||
-- Importeren van vergaderzalen (ONRGOED2)
|
||||
INSERT INTO fac_imp_onrgoed2 (alg_locatie_code, alg_gebouw_code, alg_verdieping_volgnr, alg_srtruimte_omschrijving,
|
||||
alg_ruimte_nr, alg_ruimte_omschrijving, reserveerbaar,
|
||||
res_discipline_omschrijving, res_opstelling_omschrijving, res_ruimte_opstel_bezoekers, res_ruimte_nr)
|
||||
SELECT * FROM (
|
||||
SELECT 'UTR', 'HQ', 0, 'Vergaderruimte', '0.02', 'Vergaderruimte 1','J', 'Vergaderruimte', 'Standaard', 10, 'Dahlia' FROM DUAL UNION ALL
|
||||
SELECT * FROM (
|
||||
SELECT 'UTR' a, 'HQ' b, 0 c, 'Vergaderruimte' d, '0.02' e, 'Vergaderruimte 1' f,'J' g, 'Vergaderruimte' h, 'Standaard' i, 10 j, 'Dahlia' k FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 0, 'Vergaderruimte', '0.03', 'Vergaderruimte 2','J', 'Vergaderruimte', 'Standaard', 8, 'Rozentuin' FROM DUAL
|
||||
);
|
||||
|
||||
-- Importeren van losse ruimten
|
||||
INSERT INTO fac_imp_onrgoed2( alg_locatie_code, alg_gebouw_code, alg_verdieping_volgnr, alg_srtruimte_omschrijving, alg_ruimte_nr, alg_ruimte_omschrijving)
|
||||
SELECT * FROM (
|
||||
SELECT 'UTR', 'HQ', 0, 'Kantoor', '0.04', 'Kantoor 0.03' FROM DUAL UNION ALL
|
||||
SELECT 'UTR' a, 'HQ' b, 0 c, 'Kantoor' d, '0.04' e, 'Kantoor 0.03' f FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 0, 'Kantoor', '0.05', 'Kantoor 0.04' FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 0, 'Verkeersruimte', '0.01', 'Gang' FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 1, 'Kantoor', '1.03', 'Kantoor 1.03' FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 1, 'Kantoor', '1.04', 'Kantoor 1.04' FROM DUAL UNION ALL
|
||||
SELECT 'UTR', 'HQ', 1, 'Verkeersruimte', '1.01', 'Gang' FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_onrgoed2(tmp_fmis_ini.getImportKey('ONRGOED2')); END;
|
||||
/
|
||||
BEGIN fac_update_onrgoed2(ini.getImportKey('ONRGOED2')); END;
|
||||
|
||||
|
||||
-- Importeren van flexplekken (INS)
|
||||
INSERT INTO fac_imp_ins (ins_discipline_omschrijving, ins_srtgroep_omschrijving,ins_srtdeel_code,ins_srtdeel_omschrijving,ins_deel_omschrijving,
|
||||
alg_locatie_code,alg_gebouw_code,alg_verdieping_volgnr,alg_ruimte_nr,ins_deel_aantal,reserveerbaar,res_deel_alg_level,res_discipline_omschrijving)
|
||||
SELECT * FROM (
|
||||
SELECT 'Werkplekken', 'Flexplekken','FLEXDS','Flexplek met dockingstation','FLEXDS003.1', 'UTR','HQ',0,'0.03',1,1,4,'Flexplekken' FROM DUAL UNION ALL
|
||||
SELECT 'Werkplekken' a, 'Flexplekken' b,'FLEXDS' c,'Flexplek met dockingstation' d,'FLEXDS003.1' e, 'UTR' f,'HQ' g, 0 h,'0.03' i, 1 j, 1 k, 4 l,'Flexplekken' m FROM DUAL UNION ALL
|
||||
SELECT 'Werkplekken', 'Flexplekken','FLEXDS','Flexplek met dockingstation','FLEXDS004.2', 'UTR','HQ',0,'0.04',1,1,4,'Flexplekken' FROM DUAL UNION ALL
|
||||
SELECT 'Werkplekken', 'Flexplekken','FLEX','Flexplek','FLEX014.1', 'UTR','HQ',0,'1.04',1,1,4,'Flexplekken' FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_ins(tmp_fmis_ini.getImportKey('INS')); END;
|
||||
/
|
||||
BEGIN fac_update_ins(ini.getImportKey('INS')); END;
|
||||
|
||||
-- Dit zijn geen objecten maar werkplekken
|
||||
UPDATE ins_tab_discipline SET ins_discipline_min_level = 5 WHERE ins_discipline_omschrijving = 'Flexplekken' and ins_discipline_module = 'RES';
|
||||
|
||||
@@ -562,18 +503,18 @@ INSERT INTO fac_menu (fac_menu_altlabel,
|
||||
-- Reserveerbare artikelen
|
||||
INSERT INTO fac_imp_res_artikel_sync (res_discipline_oms, res_artikel_nr, res_artikel_omschrijving, res_artikel_eenheid, res_artikel_prijs, res_artikel_prijs_vast)
|
||||
SELECT * FROM (
|
||||
SELECT 'Dranken', 'D002', 'Thee', 'Kan', '5.50', 1 FROM DUAL UNION ALL
|
||||
SELECT 'Dranken' a, 'D002' b, 'Thee' c, 'Kan' d, '5.50' e, 1 f FROM DUAL UNION ALL
|
||||
SELECT 'Dranken', 'D003', 'Frisdrank', 'Flesje', '2.50', 1 FROM DUAL UNION ALL
|
||||
SELECT 'Dranken', 'D004', 'Water', 'Kan', '2.00', 1 FROM DUAL UNION ALL
|
||||
SELECT 'Dranken', 'D001', 'Koffie', 'Kan', '7.50', 1 FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_res_artikel_sync(tmp_fmis_ini.getImportKey('RES_ARTIKEL_SYNC')); END;
|
||||
/
|
||||
BEGIN fac_update_res_artikel_sync(ini.getImportKey('RES_ARTIKEL_SYNC')); END;
|
||||
|
||||
|
||||
-- Interne organisatiestructuur (ORGANISATIE), is die kostenplaats nodig?
|
||||
INSERT INTO fac_imp_organisatie (prs_bedrijf_naam, prs_afdeling_naam, prs_afdeling_omschrijving, prs_kostenplaats_nr)
|
||||
SELECT * FROM (
|
||||
SELECT 'Onze organisatie', 'SALES', 'Sales & Marketing', 'S' FROM DUAL UNION ALL
|
||||
SELECT 'Onze organisatie' a, 'SALES' b, 'Sales & Marketing' c, 'S' d FROM DUAL UNION ALL
|
||||
SELECT 'Onze organisatie', 'DIR', 'Directie', 'D' FROM DUAL UNION ALL
|
||||
SELECT 'Onze organisatie', 'HR', 'Personeel & Organisatie', 'P' FROM DUAL UNION ALL
|
||||
SELECT 'Onze organisatie', 'ICT', 'ICT', 'I' FROM DUAL UNION ALL
|
||||
@@ -581,18 +522,18 @@ SELECT * FROM (
|
||||
SELECT 'Onze organisatie', 'MW', 'Overig', 'MW' FROM DUAL UNION ALL
|
||||
SELECT 'Onze organisatie', 'FM', 'Facility Management', 'FM' FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_organisatie(tmp_fmis_ini.getImportKey('ORGANISATIE')); END;
|
||||
/
|
||||
BEGIN fac_update_organisatie(ini.getImportKey('ORGANISATIE')); END;
|
||||
|
||||
|
||||
-- Minimale gebruikers, moet gedocumenteerd worden, wachtwoorden via wachtwoord-vergeten oid
|
||||
INSERT INTO fac_imp_perslid (prs_afdeling_naam, prs_perslid_naam, prs_perslid_voornaam, prs_perslid_telefoonnr, prs_perslid_mobiel, prs_perslid_email, prs_srtperslid_omschrijving, prs_perslid_nr, prs_perslid_oslogin, prs_perslid_wachtwoord)
|
||||
SELECT * FROM (
|
||||
SELECT 'MW', 'Medewerker', 'Wim', '022-3982345', '06-293785629', 'Wim.Medewerker@bedrijf.nl', 'Medewerker', '001', 'Wim', 'Medewerker21#' FROM DUAL UNION ALL
|
||||
SELECT 'MW' a, 'Medewerker' b, 'Wim' c, '022-3982345' d, '06-293785629' e, 'Wim.Medewerker@bedrijf.nl' f, 'Medewerker' g, '001' h, 'Wim' i, 'Medewerker21#' j FROM DUAL UNION ALL
|
||||
SELECT 'FM', 'Backoffice', 'Hans', '022-3982346', '06-293785630', 'Hans.Backoffice@bedrijf.nl', 'Medewerker', '002', 'Hans', 'Backoffice21#' FROM DUAL UNION ALL
|
||||
SELECT 'ICT', 'Beheerder', 'Olga', '022-3982347', '06-293785631', 'Olga.Beheerder@bedrijf.nl', 'Medewerker', '003', 'Olga', 'Beheerder21#' FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_perslid(tmp_fmis_ini.getImportKey('PERSLID')); END;
|
||||
/
|
||||
BEGIN fac_update_perslid(ini.getImportKey('PERSLID')); END;
|
||||
|
||||
|
||||
-- Rechten toekennen aan de personen
|
||||
-- Iedereen zit standaard al in de _default groep
|
||||
@@ -600,7 +541,7 @@ BEGIN fac_update_perslid(tmp_fmis_ini.getImportKey('PERSLID')); END;
|
||||
-- INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep, prs_perslid p WHERE g.fac_groep_upper = '_DEFAULT' AND p.prs_perslid_naam = 'Medewerker'
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = 'BACKOFFICE' AND p.prs_perslid_naam = 'Backoffice';
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = 'FRONTOFFICE' AND p.prs_perslid_naam = 'Backoffice';
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = '_ADMIN' AND p.prs_perslid_naam = 'Beheerder';
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = '_ADMIN' AND p.prs_perslid_naam = 'Beheerder';
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = 'BACKOFFICE' AND p.prs_perslid_naam = 'Beheerder';
|
||||
INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_groep_key, p.prs_perslid_key FROM fac_groep g, prs_perslid p WHERE g.fac_groep_upper = 'FRONTOFFICE' AND p.prs_perslid_naam = 'Beheerder';
|
||||
|
||||
@@ -638,7 +579,7 @@ INSERT INTO fac_gebruikersgroep (fac_groep_key, prs_perslid_key) SELECT g.fac_gr
|
||||
-- 'F',
|
||||
-- 3000,
|
||||
-- 'G');
|
||||
--BEGIN fac_update_cnt(tmp_fmis_ini.getImportKey('CNT')); END;
|
||||
--BEGIN fac_update_cnt(ini.getImportKey('CNT')); END;
|
||||
--/
|
||||
|
||||
-- INS
|
||||
@@ -646,13 +587,17 @@ DELETE fac_imp_ins;
|
||||
INSERT INTO fac_imp_ins (ins_discipline_omschrijving, ins_srtgroep_omschrijving,ins_srtdeel_code,ins_srtdeel_omschrijving,ins_deel_omschrijving,
|
||||
alg_locatie_code,alg_gebouw_code,alg_verdieping_volgnr,alg_ruimte_nr,ins_deel_aantal)
|
||||
SELECT * FROM (
|
||||
SELECT 'Automaten','Koffieautomaten','KOF','Koffieautomaat','KOF001','UTR','HQ',0,'0.01',1 FROM DUAL UNION ALL
|
||||
SELECT 'Automaten' a,'Koffieautomaten' b,'KOF' c,'Koffieautomaat' d,'KOF001' e,'UTR' f,'HQ' g, 0 h,'0.01' i, 1 j FROM DUAL UNION ALL
|
||||
SELECT 'Automaten','Koffieautomaten','KOF','Koffieautomaat','KOF002','UTR','HQ',0,'1.01',1 FROM DUAL
|
||||
);
|
||||
BEGIN fac_update_ins(tmp_fmis_ini.getImportKey('INS')); END;
|
||||
/
|
||||
BEGIN fac_update_ins(ini.getImportKey('INS')); END;
|
||||
|
||||
INSERT INTO fac_nieuws (fac_nieuws_omschrijving) VALUES ('Gefeliciteerd met de keuze voor Facilitor voor FM!');
|
||||
|
||||
INSERT INTO fac_nieuws (fac_nieuws_omschrijving, prs_perslid_key)
|
||||
SELECT 'Gefeliciteerd met de keuze voor Facilitor voor FM!',
|
||||
prs_perslid_key
|
||||
FROM prs_perslid
|
||||
WHERE prs_perslid_oslogin = '_FACILITOR';
|
||||
|
||||
|
||||
---- Menu-items voor de vakgroeptypen toevoegen
|
||||
@@ -696,20 +641,7 @@ INSERT INTO fac_nieuws (fac_nieuws_omschrijving) VALUES ('Gefeliciteerd met de k
|
||||
--END;
|
||||
--/
|
||||
|
||||
-- Cleanup
|
||||
DROP PACKAGE tmp_fmis_ini;
|
||||
|
||||
|
||||
-- TODO: registreren dat we gerund zijn, zodat we dat een volgende keer kunnen checken
|
||||
|
||||
------ payload end ------
|
||||
|
||||
SET DEFINE OFF
|
||||
BEGIN adm.systrackscriptId ('$Id$', 1); END;
|
||||
/
|
||||
|
||||
COMMIT;
|
||||
SET ECHO OFF
|
||||
SPOOL OFF
|
||||
SET DEFINE ON
|
||||
PROMPT Logfile of this initialisation is: &fcltlogfile
|
||||
70
INI/INI_PAC.SRC
Normal file
70
INI/INI_PAC.SRC
Normal file
@@ -0,0 +1,70 @@
|
||||
/* $Revision$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Dit is een frame, de echte functionaliteit zit in de verschillende includes
|
||||
*
|
||||
* Ambitie is om deze includes zodanig te definieren dat ze tbv development als los script gedraaid kunnen worden
|
||||
* en ze hier pas in de proc komen, maar dat is nog maar de vraag of dat lukt. JE mag dan iig geen SQLPlus gebruiken.
|
||||
*/
|
||||
|
||||
#include "comsql.h"
|
||||
|
||||
CREATE OR REPLACE PACKAGE ini
|
||||
AS
|
||||
FUNCTION getImportKey (p_import_app_code VARCHAR2) RETURN NUMBER;
|
||||
PROCEDURE fmis_ini;
|
||||
PROCEDURE itil_ini;
|
||||
PROCEDURE init (modulenaam IN VARCHAR2);
|
||||
END ini;
|
||||
/
|
||||
|
||||
CREATE OR REPLACE PACKAGE BODY ini AS
|
||||
|
||||
-- Local tooling for INI
|
||||
FUNCTION getImportKey (p_import_app_code VARCHAR2)
|
||||
RETURN NUMBER
|
||||
AS
|
||||
v_import_key NUMBER;
|
||||
v_import_app_key NUMBER;
|
||||
|
||||
BEGIN
|
||||
SELECT fac_import_app_key
|
||||
INTO v_import_app_key
|
||||
FROM fac_import_app
|
||||
WHERE fac_import_app_code = UPPER(p_import_app_code);
|
||||
|
||||
INSERT INTO fac_import (fac_import_app_key, fac_import_datum_gelezen)
|
||||
VALUES (v_import_app_key, SYSDATE)
|
||||
RETURNING fac_import_key INTO v_import_key;
|
||||
|
||||
RETURN v_import_key;
|
||||
END;
|
||||
-- End of local tooling
|
||||
|
||||
|
||||
PROCEDURE fmis_ini
|
||||
AS
|
||||
BEGIN
|
||||
#include "fmis/fmis_ini.sql"
|
||||
END;
|
||||
|
||||
PROCEDURE itil_ini
|
||||
AS
|
||||
BEGIN
|
||||
NULL;
|
||||
/* #include "itil/itil_ini.sql" */
|
||||
END;
|
||||
|
||||
PROCEDURE init (modulenaam IN VARCHAR2)
|
||||
AS
|
||||
BEGIN
|
||||
-- not yet supported
|
||||
NULL;
|
||||
END;
|
||||
|
||||
END ini;
|
||||
/
|
||||
|
||||
REGISTERRUN('$Id$')
|
||||
Reference in New Issue
Block a user