svn path=/Customer/trunk/; revision=14160

This commit is contained in:
Marcel Bourseau
2010-04-29 15:48:24 +00:00
parent d3c28c0758
commit cd08ded84b
2 changed files with 142 additions and 0 deletions

42
WELK/Once/welk04.sql Normal file
View File

@@ -0,0 +1,42 @@
-- Customer specific once-script
-- WELK (Welkom, inmiddels Elkien)
-- (c) 2010 SG|facilitor bv
-- $Revision: 1 $
-- $Modtime: 28-04-10 16:13 $
--
-- Support: +31 53 4800710
SET ECHO ON;
SPOOL welk04.lst;
-- BEZBAC-autorisatie (key = 58)
INSERT INTO fac_usrrap
(fac_usrrap_omschrijving,
fac_usrrap_view_name,
fac_usrrap_in_huidige_locatie,
fac_usrrap_template,
fac_usrrap_macro,
fac_usrrap_vraagbegindatum,
fac_usrrap_vraageinddatum,
fac_usrrap_functie,
fac_usrrap_info,
fac_functie_key,
fac_usrrap_autorefresh
)
VALUES ('Bezoekers op welkomsscherm',
'welk_v_rapp_bezoekers_screen',
NULL,
NULL,
NULL,
0,
0,
1,
'Bezoekersrapport voor het welkomsscherm beneden in de hal',
58,
0
);
COMMIT;
SPOOL OFF;

100
WELK/welk.sql Normal file
View File

@@ -0,0 +1,100 @@
-- Script containing customer specific configuration sql statements for WELK
-- (c) 2010 SG|facilitor bv
-- $Revision: 1 $
-- $Modtime: 29-04-10 17:31 $
--
-- Support: +31 53 4800710
set echo on
spool welk.lst
-- Voorbeeld aanroep van webservice
-- http://dit03/facilitor5iwork/appl/fac/fac_usrrap_list.asp?standalone=1&key=23&session_customerId=WELK&session_user_key=3&sqlWhere=
-- http://welk-a.facilitor.nl/appl/fac/fac_usrrap_list.asp?standalone=1&key=41&session_customerId=WELK&session_user_key=3&sqlWhere=
CREATE OR REPLACE VIEW welk_v_rapp_bezoekers_screen
AS
SELECT a.bez_afspraak_datum,
to_char(a.bez_afspraak_datum,'HH24:MI') starttijd,
a.bez_afspraak_key afspr_key,
b.bez_afspraak_naam,
b.bez_afspraak_bedrijf bez_bedrijf,
b.prs_contactpersoon_key,
p.prs_perslid_naam
|| CASE
WHEN p.prs_perslid_voorletters IS NULL THEN ''
ELSE ', ' || p.prs_perslid_voorletters
END
|| CASE
WHEN p.prs_perslid_tussenvoegsel IS NULL THEN ''
ELSE ' ' || p.prs_perslid_tussenvoegsel
END
|| CASE
WHEN p.prs_perslid_voornaam IS NULL THEN ''
ELSE ' (' || p.prs_perslid_voornaam || ')'
END
pers_naam,
a.bez_afspraak_gastheer gastheer,
COALESCE (a.bez_afspraak_telefoonnr,
p.prs_perslid_telefoonnr,
p.prs_perslid_mobiel
)
telf_nr,
a.bez_afspraak_ruimte ruimte,
a.bez_afspraak_opmerking,
a.bez_afspraak_eind,
to_char(a.bez_afspraak_eind,'HH24:MI') eindtijd,
t.bez_actie_omschrijving actie,
b.bez_bezoekers_done,
b.bez_bezoekers_out,
l.alg_locatie_omschrijving loc_omschr,
b.bez_bezoekers_key bez_key
FROM bez_afspraak a,
bez_bezoekers b,
bez_actie t,
prs_perslid p,
alg_locatie l,
alg_district d,
res_rsv_ruimte rrr,
res_ruimte_opstelling rro,
res_ruimte rr,
(SELECT alg_r.alg_ruimte_key alg_onroerendgoed_keys,
alg_r.alg_ruimte_key,
alg_r.alg_verdieping_key,
alg_v.alg_gebouw_key,
'R' alg_type
FROM alg_ruimte alg_r, alg_verdieping alg_v
WHERE alg_r.alg_verdieping_key = alg_v.alg_verdieping_key
UNION ALL
SELECT alg_v.alg_verdieping_key,
TO_NUMBER (NULL),
alg_v.alg_verdieping_key,
alg_v.alg_gebouw_key,
'V'
FROM alg_verdieping alg_v
UNION ALL
SELECT alg_g.alg_gebouw_key,
TO_NUMBER (NULL),
TO_NUMBER (NULL),
alg_g.alg_gebouw_key,
'G'
FROM alg_gebouw alg_g) og,
res_rsv_deel rd
WHERE a.bez_afspraak_key = b.bez_afspraak_key
AND l.alg_district_key = d.alg_district_key
AND t.bez_actie_key(+) = a.bez_actie_key
AND a.alg_locatie_key = l.alg_locatie_key
AND og.alg_onroerendgoed_keys(+) = a.alg_onrgoed_keys
AND b.bez_bezoekers_key = rd.bez_bezoekers_key(+)
AND p.prs_perslid_key = a.bez_afspraak_contact_key
AND a.res_rsv_ruimte_key = rrr.res_rsv_ruimte_key(+)
AND rrr.res_ruimte_opstel_key = rro.res_ruimte_opstel_key(+)
AND rro.res_ruimte_key = rr.res_ruimte_key(+)
AND a.bez_afspraak_datum BETWEEN TRUNC(SYSDATE) AND TRUNC(SYSDATE+1)
AND og.alg_gebouw_key = 5;
/
COMMIT;
spool off