FCLT#87173 Ontbrekende kolom taakcategorie in importsheets voor inspecties toevoegen
onnodige line wraps in fac_update_inspectie verwijderd. svn path=/Database/trunk/; revision=70569
This commit is contained in:
@@ -19393,12 +19393,9 @@ BEGIN
|
|||||||
LOOP
|
LOOP
|
||||||
BEGIN
|
BEGIN
|
||||||
v_count_tot := v_count_tot + 1;
|
v_count_tot := v_count_tot + 1;
|
||||||
v_aanduiding :=
|
v_aanduiding := rec_ins.ins_discipline_omschrijving
|
||||||
rec_ins.ins_discipline_omschrijving
|
|| ' - ' || rec_ins.ins_srtgroep_omschrijving
|
||||||
|| ' - '
|
|| '-' || rec_ins.ins_srtdeel_code
|
||||||
|| rec_ins.ins_srtgroep_omschrijving
|
|
||||||
|| '-'
|
|
||||||
|| rec_ins.ins_srtdeel_code
|
|
||||||
|| ' - ' || rec_ins.ctr_discipline_omschrijving;
|
|| ' - ' || rec_ins.ctr_discipline_omschrijving;
|
||||||
v_errorhint := 'Fout bij bepalen discipline';
|
v_errorhint := 'Fout bij bepalen discipline';
|
||||||
data_is_valid := 1;
|
data_is_valid := 1;
|
||||||
@@ -19406,31 +19403,29 @@ BEGIN
|
|||||||
IF rec_ins.ins_discipline_omschrijving IS NULL
|
IF rec_ins.ins_discipline_omschrijving IS NULL
|
||||||
THEN
|
THEN
|
||||||
data_is_valid := 0;
|
data_is_valid := 0;
|
||||||
fac.imp_writelog (
|
fac.imp_writelog ( p_import_key, 'E'
|
||||||
p_import_key,
|
, v_aanduiding
|
||||||
'E',
|
, 'Discipline mag niet leeg zijn: inspectie wordt niet toegevoegd.');
|
||||||
v_aanduiding,
|
|
||||||
'Discipline mag niet leeg zijn: inspectie wordt niet toegevoegd.');
|
|
||||||
ELSE
|
ELSE
|
||||||
SELECT ins_discipline_key, 'D'
|
SELECT ins_discipline_key, 'D'
|
||||||
INTO v_ins_srtinstallatie_key, v_ins_srtcontrole_niveau
|
INTO v_ins_srtinstallatie_key, v_ins_srtcontrole_niveau
|
||||||
FROM ins_tab_discipline
|
FROM ins_tab_discipline
|
||||||
WHERE UPPER (ins_discipline_omschrijving) =
|
WHERE UPPER (ins_discipline_omschrijving) = UPPER (rec_ins.ins_discipline_omschrijving)
|
||||||
UPPER (rec_ins.ins_discipline_omschrijving)
|
|
||||||
AND ins_discipline_module = 'INS'
|
AND ins_discipline_module = 'INS'
|
||||||
AND ins_discipline_verwijder IS NULL;
|
AND ins_discipline_verwijder IS NULL;
|
||||||
|
|
||||||
IF rec_ins.ins_srtgroep_omschrijving IS NOT NULL
|
IF rec_ins.ins_srtgroep_omschrijving IS NOT NULL
|
||||||
THEN
|
THEN
|
||||||
|
v_errorhint := 'Fout bij bepalen groepsoort';
|
||||||
SELECT ins_srtgroep_key, 'G'
|
SELECT ins_srtgroep_key, 'G'
|
||||||
INTO v_ins_srtinstallatie_key, v_ins_srtcontrole_niveau
|
INTO v_ins_srtinstallatie_key, v_ins_srtcontrole_niveau
|
||||||
FROM ins_srtgroep
|
FROM ins_srtgroep
|
||||||
WHERE UPPER (ins_srtgroep_omschrijving) =
|
WHERE UPPER (ins_srtgroep_omschrijving) = UPPER (rec_ins.ins_srtgroep_omschrijving)
|
||||||
UPPER (rec_ins.ins_srtgroep_omschrijving)
|
|
||||||
AND ins_srtgroep_module = 'INS'
|
AND ins_srtgroep_module = 'INS'
|
||||||
AND ins_srtgroep_verwijder IS NULL
|
AND ins_srtgroep_verwijder IS NULL
|
||||||
AND ins_discipline_key = v_ins_srtinstallatie_key;
|
AND ins_discipline_key = v_ins_srtinstallatie_key;
|
||||||
|
|
||||||
|
v_errorhint := 'Fout bij bepalen deelsoort';
|
||||||
IF rec_ins.ins_srtdeel_code IS NOT NULL
|
IF rec_ins.ins_srtdeel_code IS NOT NULL
|
||||||
THEN
|
THEN
|
||||||
SELECT ins_srtdeel_key, 'S'
|
SELECT ins_srtdeel_key, 'S'
|
||||||
@@ -19443,6 +19438,7 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
v_errorhint := 'Fout bij bepalen bits';
|
||||||
-- Alleen de gezette bits van de dagen van de week.
|
-- Alleen de gezette bits van de dagen van de week.
|
||||||
SELECT COALESCE(BITAND(rec_ins.ins_srtcontrole_bits, 127), 0)
|
SELECT COALESCE(BITAND(rec_ins.ins_srtcontrole_bits, 127), 0)
|
||||||
INTO v_week_bits
|
INTO v_week_bits
|
||||||
@@ -19452,6 +19448,7 @@ BEGIN
|
|||||||
INTO v_maand_bits
|
INTO v_maand_bits
|
||||||
FROM DUAL;
|
FROM DUAL;
|
||||||
|
|
||||||
|
v_errorhint := 'Fout bij bepalen takcategorie';
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT ins_discipline_key
|
SELECT ins_discipline_key
|
||||||
INTO v_ctr_discipline_key
|
INTO v_ctr_discipline_key
|
||||||
@@ -19465,13 +19462,17 @@ BEGIN
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
|
|
||||||
IF rec_ins.ins_srtcontrole_omschrijving IS NOT NULL AND
|
IF ( rec_ins.ins_srtcontrole_omschrijving IS NOT NULL
|
||||||
rec_ins.ins_srtcontrole_periode IS NOT NULL AND
|
AND rec_ins.ins_srtcontrole_periode IS NOT NULL
|
||||||
((rec_ins.ins_srtcontrole_eenheid = 0)
|
AND ( (rec_ins.ins_srtcontrole_eenheid = 0)
|
||||||
OR (rec_ins.ins_srtcontrole_eenheid > 0 AND MOD(rec_ins.ins_srtcontrole_periode, 1) = 0)) AND
|
OR (rec_ins.ins_srtcontrole_eenheid > 0 AND MOD(rec_ins.ins_srtcontrole_periode, 1) = 0)
|
||||||
rec_ins.ins_srtcontrole_eenheid IS NOT NULL AND
|
)
|
||||||
rec_ins.ins_srtcontrole_mode IS NOT NULL AND
|
AND rec_ins.ins_srtcontrole_eenheid IS NOT NULL
|
||||||
(rec_ins.ins_srtcontrole_mode = 1 OR (rec_ins.ins_srtcontrole_mode = 0 AND v_week_bits > 0 AND v_maand_bits > 0))
|
AND rec_ins.ins_srtcontrole_mode IS NOT NULL
|
||||||
|
AND ( (rec_ins.ins_srtcontrole_mode = 1)
|
||||||
|
OR (rec_ins.ins_srtcontrole_mode = 0 AND v_week_bits > 0 AND v_maand_bits > 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO ins_srtcontrole (ins_srtinstallatie_key,
|
INSERT INTO ins_srtcontrole (ins_srtinstallatie_key,
|
||||||
ins_srtcontrole_niveau,
|
ins_srtcontrole_niveau,
|
||||||
@@ -19499,11 +19500,9 @@ BEGIN
|
|||||||
THEN v_errorhint := 'Periode moet een geheel getal zijn voor dagelijkse, wekelijkse, maandelijkse en jaarlijkse taken: inspectie wordt niet toegevoegd.';
|
THEN v_errorhint := 'Periode moet een geheel getal zijn voor dagelijkse, wekelijkse, maandelijkse en jaarlijkse taken: inspectie wordt niet toegevoegd.';
|
||||||
ELSE v_errorhint := 'Één of meerdere van de verplichte velden "Omschrijving", "Period", "Eenheid" of "Mode" zijn niet ingevuld: inspectie wordt niet toegevoegd.';
|
ELSE v_errorhint := 'Één of meerdere van de verplichte velden "Omschrijving", "Period", "Eenheid" of "Mode" zijn niet ingevuld: inspectie wordt niet toegevoegd.';
|
||||||
END IF;
|
END IF;
|
||||||
fac.imp_writelog (
|
fac.imp_writelog ( p_import_key, 'E'
|
||||||
p_import_key,
|
, v_aanduiding
|
||||||
'E',
|
, v_errorhint);
|
||||||
v_aanduiding,
|
|
||||||
v_errorhint);
|
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
EXCEPTION
|
EXCEPTION
|
||||||
@@ -19513,10 +19512,9 @@ BEGIN
|
|||||||
oracle_err_num := SQLCODE;
|
oracle_err_num := SQLCODE;
|
||||||
oracle_err_mes := SUBSTR (SQLERRM, 1, 200);
|
oracle_err_mes := SUBSTR (SQLERRM, 1, 200);
|
||||||
v_errormsg := 'OTHERS (error ' || oracle_err_num || '/' || oracle_err_mes || ')';
|
v_errormsg := 'OTHERS (error ' || oracle_err_num || '/' || oracle_err_mes || ')';
|
||||||
fac.imp_writelog (p_import_key,
|
fac.imp_writelog ( p_import_key, 'E'
|
||||||
'E',
|
, v_aanduiding || v_errormsg
|
||||||
v_aanduiding || v_errormsg,
|
, v_errorhint);
|
||||||
v_errorhint);
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
END;
|
END;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
@@ -19525,12 +19523,10 @@ EXCEPTION
|
|||||||
THEN
|
THEN
|
||||||
oracle_err_num := SQLCODE;
|
oracle_err_num := SQLCODE;
|
||||||
oracle_err_mes := SUBSTR (SQLERRM, 1, 150);
|
oracle_err_mes := SUBSTR (SQLERRM, 1, 150);
|
||||||
v_errormsg :=
|
v_errormsg := v_errormsg || 'ORACLE (error ' || oracle_err_num || '/' || oracle_err_mes || ')';
|
||||||
v_errormsg || 'ORACLE (error ' || oracle_err_num || '/' || oracle_err_mes || ')';
|
fac.imp_writelog ( p_import_key, 'E'
|
||||||
fac.imp_writelog (p_import_key,
|
, 'Importproces inspecties afgebroken!'
|
||||||
'E',
|
, v_errormsg);
|
||||||
'Importproces inspecties afgebroken!',
|
|
||||||
v_errormsg);
|
|
||||||
END fac_update_inspectie;
|
END fac_update_inspectie;
|
||||||
/
|
/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user