VEST#41990 -- Afvangen HEX

svn path=/Customer/trunk/; revision=36680
This commit is contained in:
Robin Stoker
2018-01-23 11:49:37 +00:00
parent 90e37f045d
commit 31517ab807

View File

@@ -28,8 +28,50 @@ AS
oracle_err_mes VARCHAR2 (200);
v_errormsg VARCHAR2 (400);
v_errorhint VARCHAR2 (400);
v_newline FAC_IMP_FILE.FAC_IMP_FILE_LINE%TYPE;
BEGIN
BEGIN
SELECT fac_imp_file_line
INTO v_newline
FROM fac_imp_file
WHERE fac_import_key = p_import_key
AND fac_imp_file_index = 1;
IF v_newline LIKE
CHR (TO_NUMBER ('EF', 'xx'))
|| CHR (TO_NUMBER ('BB', 'xx'))
|| CHR (TO_NUMBER ('BF', 'xx'))
|| '%'
THEN
-- EF BB BF aangetroffen
fac.imp_writelog (p_import_key,
'W',
'Byte Order Mark aangetroffen',
'Bestand heeft onbehandeld UTF-8 formaat.'
);
v_newline := SUBSTR (v_newline, 4);
END IF;
-- Verwijder de dubbele quotes
v_newline := REPLACE (v_newline, '"');
UPDATE fac_imp_file
SET fac_imp_file_line = v_newline
WHERE fac_import_key = p_import_key
AND fac_imp_file_index = 1;
EXCEPTION WHEN OTHERS
THEN
fac.imp_writelog (p_import_key,
'E',
'Fout bij controle op Byte Order Mark',
''
);
END;
v_errorhint := 'Generieke update';
-- de sequence array staat beschreven in PRS_PAC.SRC bij de prs.import_perslid proc
prs.import_perslid (p_import_key,
@@ -38,7 +80,7 @@ BEGIN
'7;4;0;8;0;0;0;0;0;0;'||
'0;0;0;0;0;0;0;0;0;0;'||
'0;0;0;0;0;0',
'"Achternaam";"Voornaam";"Tussenvoegsel";"SamAccountName";"Email";"Afdeling";"Functie";"Titel/Aanhef";"Geslacht";"Telefoonnummer";"Mobiel nummer";"Personeelsnummer";"Locatie";"Gebouw";"Verdieping";"Ruimte"'
'Achternaam;Voornaam;Tussenvoegsel;SamAccountName;Email;Afdeling;Functie;Titel/Aanhef;Geslacht;Telefoonnummer;Mobiel nummer;Personeelsnummer;Locatie;Gebouw;Verdieping;Ruimte%'
);
UPDATE fac_imp_perslid
@@ -81,7 +123,7 @@ CREATE OR REPLACE PROCEDURE vest_update_perslid (
AND p.prs_perslid_oslogin IS NOT NULL
AND i.prs_perslid_oslogin IS NULL
AND p.prs_perslid_verwijder IS NULL
AND p.prs_perslid_oslogin NOT LIKE '%_%'
AND substr (p.prs_perslid_oslogin, 1, 1) != '_'
ORDER BY 2;
v_count NUMBER;