-- Customer specific once-script KFHT0.
--
-- (c) 2015 Facilitor B.V.
--
-- Support: +31 53 4800700
SET ECHO ON
SPOOL xKFHT0.lst
SET DEFINE OFF

CREATE TABLE kfht_imp_opdrstat_strukton
(
   mld_opdr_key    NUMBER (10),
   extern_nummer   VARCHAR2 (100),
   status          NUMBER (10),
   datumtijd       DATE,
   opmerking       VARCHAR2 (1000),
   totaal          NUMBER (8, 2)
);

COMMIT;

INSERT INTO prs_perslid (prs_perslid_module,
                         prs_srtperslid_key,
                         prs_afdeling_key,
                         prs_perslid_naam,
                         prs_perslid_voornaam,
                         prs_perslid_nr,
                         prs_perslid_oslogin,
                         prs_perslid_dienstverband)
   SELECT prs_perslid_module,
          prs_srtperslid_key,
          prs_afdeling_key,
          'Pseudo-user tbv. Strukton-koppeling',
          '-',
          'NIET VERWIJDEREN',
          '_STRUKTON',
          prs_perslid_dienstverband
     FROM prs_perslid
    WHERE prs_perslid_oslogin = '_FACILITOR';

COMMIT;

INSERT INTO fac_import_app (fac_import_app_code,
                            fac_import_app_oms,
                            fac_import_app_xsl,
                            fac_functie_key,
                            fac_import_app_folder,
                            fac_import_app_files,
                            fac_import_app_prefix)
    VALUES ('OPDRSTAT_STRUKTON',
            'Importeren opdrachtstatus vanuit Strukton',
            'import/strukton.xsl',
            93, -- PRSSYS
            'D:\Apps\Facilitor\Fplace5i\CUST\KFHT\import',
            'strukton*.xml',
            'KFHT');

/* Kanalen naar Strukton zoals in VENR-domein (voor HTC)! */
/* Formatted on 17-12-2015 10:36:24 (QP5 v5.136.908.31019) */
INSERT INTO prs_bedrijfadres (prs_bedrijf_key,
                              prs_bedrijfadres_type,
                              mld_typeopdr_key,
                              prs_bedrijfadres_url,
                              prs_bedrijfadres_ordermode,
                              prs_bedrijfadres_certificate,
                              prs_bedrijfadres_xsl,
                              prs_bedrijfadres_username,
                              prs_bedrijfadres_password)
     SELECT 236,                                        -- Strukton Worksphere
            'O',
            mld_typeopdr_key,
            'https://b2b.ws.strukton.com/XISOAPAdapter/MessageServlet?channel=Facilitor:BS_ServiceRequest:S_WS_CREATE',
            13,
            'LOCAL_MACHINE\My\Facilitor',
            'xsl/strukton.xsl',
            'Facilitor',
            'G@s2(VoyPt'
       FROM mld_typeopdr
      WHERE mld_typeopdr_key IN (5, 7, 8, 9)
   ORDER BY 3;

-- 93=PRSSYS
INSERT INTO fac_export_app (fac_export_app_code,
                            fac_export_app_oms,
                            fac_functie_key,
                            fac_export_app_charset,
                            fac_export_app_folder,
                            fac_export_app_prefix,
                            fac_export_app_file_prefix,
                            fac_export_app_postfix,
                            fac_export_app_log_postfix,
                            fac_export_app_flags,
                            fac_export_app_xsl,
                            fac_export_app_timestamp,
                            fac_export_app_datum)
    VALUES ('EXACT',
            'EXACT',
            93,
            NULL,
            '.\EXACT',
            'KFHT',
            'EXACT_',
            '.xml',
            '.log',
            0,
            NULL,
            'yymmdd_HHMMSS',
            NULL);

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