71 lines
3.4 KiB
SQL
71 lines
3.4 KiB
SQL
-- Customer specific once-script PNBR#33308-2.sql
|
|
|
|
SET ECHO ON
|
|
SPOOL xPNBR#33308_2.lst
|
|
SET DEFINE OFF
|
|
|
|
--persoon bestaat al
|
|
--INSERT INTO prs_perslid (prs_perslid_module,
|
|
-- prs_srtperslid_key,
|
|
-- prs_afdeling_key,
|
|
-- prs_perslid_naam,
|
|
-- prs_perslid_oslogin,
|
|
-- prs_perslid_apikey,
|
|
-- prs_perslid_flags,
|
|
-- prs_perslid_systeemadres)
|
|
-- VALUES ('PRS',
|
|
-- 1, -- Onbekend
|
|
-- 1, -- Onbekend
|
|
-- 'Smart Signs',
|
|
-- '_SMARTSIGNS',
|
|
-- 'NcANlXtpNwANyTvCKuNHFhDvNQOLQxNE',
|
|
-- 4,
|
|
-- NULL);
|
|
|
|
SET DEFINE OFF;
|
|
Insert into FAC_API
|
|
(FAC_API_NAME, FAC_API_FILEPATH, FAC_API_LOGLEVEL, FAC_API_STYLESHEET)
|
|
Values
|
|
('RESSET', 'appl/api/api_ressoap.asp', 1, 'cust\pnbr\xsl\apiresset.xsl');
|
|
|
|
-- ruimtenaam zit niet in de filter mogelijkheden.
|
|
UPDATE fac_api SET fac_api_viewmapping_json =
|
|
'[{"req": "Reserveringen", "node": "reservering", "view": "res_v_api_reserveringen","filter":{"locatiecode":"locatiecode","gebouwcode":"gebouwcode","verdiepingcode":"verdiepingcode","ruimtecode":"ruimtecode", "ruimtenaam":"ruimtenaam", "catalogus": "catalogus", "begindatumtijd": {"colName": "van", "operand":"GT","datatype":"date"}, "einddatumtijd": {"colName": "tot", "operand":"LT", "datatype":"date"}},"limit":75},{"req": "Voorzieningen", "node": "voorziening", "view": "res_v_api_voorzieningen","filter":{"locatiecode":"locatiecode","gebouwcode":"gebouwcode","verdiepingcode":"verdiepingcode", "catalogus": "catalogus"},"limit":75}]'
|
|
where fac_api_key = 49;
|
|
|
|
|
|
--Maak een nieuwe api aan die specifiek is voor PNBR
|
|
INSERT INTO fac_api (fac_api_name,
|
|
fac_api_omschrijving,
|
|
fac_api_filepath,
|
|
fac_api_loglevel,
|
|
fac_api_viewmapping_json,
|
|
fac_api_stylesheet)
|
|
SELECT 'RES_PNBR',
|
|
fac_api_omschrijving,
|
|
fac_api_filepath,
|
|
fac_api_loglevel,
|
|
fac_api_viewmapping_json,
|
|
fac_api_stylesheet
|
|
FROM fac_api
|
|
WHERE fac_api_key = 49;
|
|
|
|
-- Verander de naam van de view
|
|
UPDATE fac_api
|
|
SET fac_api_viewmapping_json =
|
|
REPLACE (fac_api_viewmapping_json, 'res_v_api', 'pnbr_v_api')
|
|
WHERE fac_api_name = 'RES_PNBR';
|
|
|
|
-- En zorg dat we ook op de resruimtekey en algruimtekey kunnen filteren.
|
|
UPDATE fac_api
|
|
SET fac_api_viewmapping_json =
|
|
'[{"req": "Reserveringen", "node": "reservering", "view": "pnbr_v_api_reserveringen","filter":{"locatiecode":"locatiecode","gebouwcode":"gebouwcode","verdiepingcode":"verdiepingcode","ruimtecode":"ruimtecode", "ruimtenaam":"ruimtenaam", "resruimtekey":"resruimtekey", "algruimtekey":"algruimtekey", "catalogus": "catalogus", "begindatumtijd": {"colName": "van", "operand":"GT","datatype":"date"}, "einddatumtijd": {"colName": "tot", "operand":"LT", "datatype":"date"}},"limit":75},{"req": "Voorzieningen", "node": "voorziening", "view": "pnbr_v_api_voorzieningen","filter":{"locatiecode":"locatiecode","gebouwcode":"gebouwcode","verdiepingcode":"verdiepingcode", "catalogus": "catalogus"},"limit":75}]'
|
|
WHERE fac_api_name = 'RES_PNBR';
|
|
|
|
COMMIT;
|
|
|
|
BEGIN adm.systrackscriptId('$Id$'); END;
|
|
/
|
|
COMMIT;
|
|
|
|
SPOOL OFF |