FSN#18275

svn path=/Database/trunk/; revision=10393
This commit is contained in:
Peter Feij
2010-09-06 13:53:52 +00:00
parent 014275b717
commit 0d4877bd6f
55 changed files with 366 additions and 968 deletions

View File

@@ -1,8 +1,7 @@
#ifdef PRJ
/* PRJ_IND.SRC
*
* $Revision: 6 $
* $Modtime: 8-02-08 10:17 $
* $Revision: 7 $
* $Modtime: 6-09-10 16:02 $
*/
create index prj_i_prj_scenario1 on prj_scenario(mld_melding_key);
@@ -19,5 +18,6 @@ create index prj_i_prj_deel1 on prj_deel(ins_srtdeel_key);
create index prj_i_prj_deel2 on prj_deel(ins_deel_key);
create index prj_i_prj_deel3 on prj_deel(prj_ruimte_key, prj_werkplek_key);
REGISTERONCE('$Workfile: Prj_ind.src $','$Revision: 7 $')
#endif // PRJ

View File

@@ -1,36 +1,44 @@
#ifdef PRJ
/* $Revision: 10 $
* $Modtime: 22-06-06 9:58 $
/* $Revision: 12 $
* $Modtime: 6-09-10 16:01 $
*/
#include "comsql.h"
_FAC_MODULE('PRJ','Projecten')
BEGIN
DECLARE
legenda_key cad_legenda.cad_legenda_key%TYPE;
BEGIN
INSERT INTO cad_legenda (cad_legenda_omschrijving, cad_legenda_discreet) VALUES ('Default project legenda', 1);
SELECT cad_legenda_key INTO legenda_key FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_legenda (cad_legenda_omschrijving, cad_legenda_discreet) VALUES ('Default project legenda', 1);
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Bezetting: Aantal werkplekken', legenda_key, 'prj_v_cad_thema_aantalwp', '5');
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Gebruik: Ruimtefunctie', legenda_key, 'prj_v_cad_thema_srtruimte', '5');
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Bezetting: Afdeling', legenda_key, 'prj_v_cad_thema_afdeling', '5');
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Oppervlakte: Gemiddeld/werkplek', legenda_key, 'prj_v_cad_thema_wpopp', '5');
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Oppervlakte: Restoppervlak', legenda_key, 'prj_v_cad_thema_restopp', '5');
INSERT INTO cad_thema (cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
VALUES ('Onderhanden', legenda_key, 'prj_v_cad_thema_onderhanden', '5');
END;
END
/
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Bezetting: Aantal werkplekken', cad_legenda_key, 'prj_v_cad_thema_aantalwp', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Gebruik: Ruimtefunctie', cad_legenda_key, 'prj_v_cad_thema_srtruimte', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Bezetting: Afdeling', cad_legenda_key, 'prj_v_cad_thema_afdeling', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Oppervlakte: Gemiddeld/werkplek', cad_legenda_key, 'prj_v_cad_thema_wpopp', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Oppervlakte: Restoppervlak', cad_legenda_key, 'prj_v_cad_thema_restopp', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_thema
(cad_thema_omschrijving, cad_legenda_key, cad_thema_view, cad_thema_type)
SELECT 'Onderhanden', cad_legenda_key, 'prj_v_cad_thema_onderhanden', '5'
FROM cad_legenda
WHERE cad_legenda_omschrijving = 'Default project legenda';
INSERT INTO cad_label (cad_label_omschrijving, cad_label_view, cad_label_type, cad_label_size)
VALUES ('Werkplekken', 'prj_v_cad_label_werkplekken', '5', 420);
@@ -39,4 +47,6 @@ INSERT INTO cad_label (cad_label_omschrijving, cad_label_view, cad_label_type, c
INSERT INTO cad_label (cad_label_omschrijving, cad_label_view, cad_label_type, cad_label_size)
VALUES ('Bewoners/werkplekken', 'prj_v_cad_label_bewonerwp', '5', 380);
REGISTERONCE('$Workfile: prj_ini.src $','$Revision: 12 $')
#endif // PRJ

View File

@@ -1,8 +1,7 @@
#ifdef PRJ
/* PRJ_PAC.SRC
*
* $Revision: 59 $
* $Modtime: 17-06-10 11:00 $
* $Revision: 60 $
* $Modtime: 6-09-10 16:01 $
*/
/*
CODE COMMENTS, CONSIDERATIONS
@@ -25,8 +24,6 @@ en voor bestemming de prj keys (prj_ruimte etc)
*/
#ifndef MS_SQL
[skip]
CREATE OR REPLACE PACKAGE prj
AS
PROCEDURE prj_initiate_scenario (pscenariokey IN NUMBER, pverdiepingkey IN NUMBER);
@@ -1244,6 +1241,7 @@ AS
END prj_commit_scenario;
END prj;
/
[/skip]
#endif
REGISTERRUN('$Workfile: Prj_pac.src $','$Revision: 60 $')
#endif // PRJ

View File

@@ -1,8 +1,7 @@
#ifdef PRJ
/* PRJ_SEQ.SRC
*
* $Revision: 6 $
* $Modtime: 6-11-08 14:47 $
* $Revision: 7 $
* $Modtime: 6-09-10 16:01 $
*/
CREATE SEQUENCE prj_s_prj_scenario_key MINVALUE 1 NOCACHE;
@@ -14,4 +13,6 @@ CREATE SEQUENCE prj_s_prj_perslidwerkplek_key MINVALUE 1 NOCACHE;
CREATE SEQUENCE prj_s_prj_deel_key MINVALUE 1 NOCACHE;
CREATE SEQUENCE prj_s_prj_selectie_key MINVALUE 1;
REGISTERONCE('$Workfile: Prj_seq.src $','$Revision: 7 $')
#endif // PRJ

View File

@@ -1,12 +1,10 @@
#ifdef PRJ
/* PRJ_TAB.SRC
*
* $Revision: 26 $
* $Modtime: 5-11-09 17:34 $
* $Revision: 27 $
* $Modtime: 6-09-10 16:01 $
*/
#include "comsql.h"
/* Om een naam te kunnen geven aan een scenario en deze later weer op te kunnen roepen */
CREATE_TABLE(prj_scenario, 0)
(
@@ -64,10 +62,7 @@ CREATE_TABLE(prj_ruimte, 0)
NOT_NULL(prj_ruimte_nr, prj_c_alg_ruimte_nr),
prj_ruimte_upper_nr
VARCHAR2(10)
#ifndef MS_SQL
NOT_NULL(prj_ruimte_upper_nr, prj_c_alg_ruimte_upper_nr)
#endif
,
NOT_NULL(prj_ruimte_upper_nr, prj_c_alg_ruimte_upper_nr),
prj_ruimte_omschrijving
VARCHAR2(30),
prj_ruimte_aanmaak
@@ -307,4 +302,6 @@ CREATE_TABLE(prj_scenario_note, 0)
ALTER TABLE cad_imp_contour
ADD prj_scenario_key NUMBER(10) REFERENCES prj_scenario(prj_scenario_key) ON DELETE CASCADE;
REGISTERONCE('$Workfile: Prj_tab.src $','$Revision: 27 $')
#endif // PRJ

View File

@@ -1,8 +1,7 @@
#ifdef PRJ
/* PRJ_TRI.SRC
*
* $Revision: 15 $
* $Modtime: 6-11-08 14:54 $
* $Revision: 16 $
* $Modtime: 6-09-10 16:01 $
*/
CREATE_TRIGGER(prj_t_prj_scenario_b_iu)
@@ -70,4 +69,6 @@ BEGIN
END;
/
REGISTERRUN('$Workfile: Prj_tri.src $','$Revision: 16 $')
#endif // PRJ

View File

@@ -1,22 +1,19 @@
#ifdef PRJ
/* PRJ_VIE.SRC
*
* $Revision: 60 $
* $Modtime: 14-04-09 12:10 $
* $Revision: 61 $
* $Modtime: 6-09-10 16:01 $
*/
#include "comsql.h"
-- selecteer alle verdiepingen van een bepaald project
CREATE_VIEW(prj_v_alg_verdiepingen, PRJ_NORMAAL_PRIVILEGE)
CREATE_VIEW(prj_v_alg_verdiepingen,0)
AS
SELECT DISTINCT alg_verdieping_key, prj_scenario_key
FROM prj_ruimte
WHERE alg_verdieping_key IS NOT NULL;
-- aanduiding ruimten van ALG
CREATE_VIEW(prj_v_alg_ruimte_aanduiding, PRJ_NORMAAL_PRIVILEGE)
CREATE_VIEW(prj_v_alg_ruimte_aanduiding,0)
AS SELECT ALG_R.alg_ruimte_key
, to_number(NULL) prj_scenario_key
, ALG_G.alg_gebouw_code ||' - '
@@ -447,7 +444,6 @@ AS
AND rx.prj_ruimte_key(+) = rax.prj_ruimte_key
AND ra.prs_ruimteafdeling_verwijder IS NULL;
REGISTERRUN('$Workfile: Prj_vie.src $','$Revision: 61 $')
#endif // PRJ