-- Customer specific once-script SVRZ1.
--
-- (c) 2014 SG|facilitor bv
--
-- Support: +31 53 4800700
SET ECHO ON
SPOOL xSVRZ1.lst
SET DEFINE OFF

/* Formatted on 5-5-2014 13:48:12 (QP5 v5.136.908.31019) */
INSERT INTO fac_import_app (fac_import_app_code,
                            fac_import_app_oms,
                            fac_import_app_xsl,
                            fac_functie_key,
                            fac_import_app_charset,
                            fac_import_app_folder,
                            fac_import_app_files,
                            fac_import_app_prefix)
   SELECT 'PERSLID',
          'Import Beaufort-persoonsgegevens (xml)',
          'xsl/beaufort.xsl',
          fac_functie_key,
          'utf-8',
          NULL,
          'PRS*.xml',
          'SVRZ'
     FROM fac_functie
    WHERE fac_functie_code = 'WEB_PRSSYS';

INSERT INTO fac_import_app (fac_import_app_code,
                            fac_import_app_oms,
                            fac_import_app_xsl,
                            fac_functie_key,
                            fac_import_app_charset,
                            fac_import_app_folder,
                            fac_import_app_files,
                            fac_import_app_prefix)
   SELECT 'BEDRIJF',
          'Import Exact-relatiegegevens (xml)',
          'xsl/exact.xsl',
          fac_functie_key,
          'utf-8',
          NULL,
          'REL*.xml',
          'SVRZ'
     FROM fac_functie
    WHERE fac_functie_code = 'WEB_PRSSYS';

COMMIT;

/* Formatted on 3-6-2014 8:52:25 (QP5 v5.136.908.31019) */
INSERT INTO fac_api (fac_api_name,
                     fac_api_omschrijving,
                     fac_api_filepath,
                     fac_api_loglevel,
                     fac_import_app_key,
                     fac_api_options_json)
   SELECT 'PRSIMP',
          'Personen uit Beaufort',
          'appl/API/api_gen_import.asp',
          1,
          fac_import_app_key,
          '{"import_app_key":' || TO_CHAR (fac_import_app_key) || '}'
     FROM fac_import_app
    WHERE fac_import_app_code = 'PERSLID' AND fac_import_app_prefix = 'SVRZ';

INSERT INTO fac_api (fac_api_name,
                     fac_api_omschrijving,
                     fac_api_filepath,
                     fac_api_loglevel,
                     fac_import_app_key,
                     fac_api_options_json)
   SELECT 'RELIMP',
          'Relaties uit Exact',
          'appl/API/api_gen_import.asp',
          1,
          fac_import_app_key,
          '{"import_app_key":' || TO_CHAR (fac_import_app_key) || '}'
     FROM fac_import_app
    WHERE fac_import_app_code = 'BEDRIJF' AND fac_import_app_prefix = 'SVRZ';

COMMIT;

/* Formatted on 3-6-2014 9:04:40 (QP5 v5.136.908.31019) */
INSERT INTO prs_perslid (prs_perslid_module,
                         prs_srtperslid_key,
                         prs_afdeling_key,
                         prs_perslid_naam,
                         prs_perslid_oslogin,
                         prs_perslid_flags,
                         prs_perslid_apikey)
   SELECT p.prs_perslid_module,
          p.prs_srtperslid_key,
          p.prs_afdeling_key,
          'Pseudo-user tbv. PRSIMP-API',
          '_BEAUFORT',
          0,
          'eGfHqZfwkssmAitl'
     FROM prs_perslid p
    WHERE p.prs_perslid_oslogin = '_FACILITOR';

INSERT INTO prs_perslid (prs_perslid_module,
                         prs_srtperslid_key,
                         prs_afdeling_key,
                         prs_perslid_naam,
                         prs_perslid_oslogin,
                         prs_perslid_flags,
                         prs_perslid_apikey)
   SELECT p.prs_perslid_module,
          p.prs_srtperslid_key,
          p.prs_afdeling_key,
          'Pseudo-user tbv. RELIMP-API',
          '_EXACT',
          0,
          'VqaBIXoAthDvnWHb'
     FROM prs_perslid p
    WHERE p.prs_perslid_oslogin = '_FACILITOR';

COMMIT;

-- Backoffice:Personenbeheer-rapport = 40
CREATE OR REPLACE VIEW svrz_v_rap_import_log AS SELECT NULL x FROM DUAL;
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 ('BEHEER: Import logging', 'svrz_v_rap_import_log',
             NULL,
             NULL, NULL,
             0, 0,
             0,
             'E=Error/Fout | W=Waarschuwing | I=Informatie | S=Samenvatting.',
             40,
             0
            );

COMMIT;
BEGIN adm.systrackscriptId('$Id$'); END;
/
SPOOL OFF
@svrz.sql
