UWVA#17591 concept

svn path=/Customer/trunk/; revision=14263
This commit is contained in:
Jos Groot Lipman
2010-07-13 21:19:22 +00:00
parent a8cea05f52
commit 85b6476452

View File

@@ -2,8 +2,8 @@
-- Upgraded for version 5i
--
-- (c) 2005-2010 SG|Facilitor bv
-- $Revision: 313 $
-- $Modtime: 7-07-10 22:28 $
-- $Revision: 314 $
-- $Modtime: 9-07-10 16:46 $
--
-- Support: +31 53 4800700
@@ -691,7 +691,7 @@ BEGIN
p_applrun,
'I',
'Facilitor KPN import version ' || currentversion,
'$Revision: 313 $');
'$Revision: 314 $');
-- How many active records are now present?
SELECT COUNT ( * )
@@ -1946,7 +1946,7 @@ BEGIN
INTO currentversion
FROM fac_module;
fac.imp_writelog (p_applname, p_applrun, 'I', 'Facilitor PVIEW import version ' || currentversion, '$Revision: 313 $');
fac.imp_writelog (p_applname, p_applrun, 'I', 'Facilitor PVIEW import version ' || currentversion, '$Revision: 314 $');
-- -- #Import
SELECT DECODE (COUNT (*), 0, 1, COUNT (*)) -- DECODE ivm vermijden deling door 0
@@ -12025,7 +12025,7 @@ BEGIN
p_applrun,
'I',
'Facilitor BUDGETH import version ' || currentversion,
'$Revision: 313 $'
'$Revision: 314 $'
);
FOR NEXT_RECORD IN c_cursor
@@ -17566,7 +17566,7 @@ BEGIN
p_applrun,
'F',
'Gebruikerstabel Medewerkertype is onvolledig',
'$Revision: 313 $'
'$Revision: 314 $'
);
END IF;
@@ -17580,7 +17580,7 @@ BEGIN
'I',
'Facilitor ABS import version '
|| currentversion,
'$Revision: 313 $'
'$Revision: 314 $'
);
-- -- #Import
@@ -21934,31 +21934,44 @@ WHERE fclt_f_probleem is not null;
-- UWVA#17591
-- zet de huidige opp af tegen de laatstgescande waarden
-- beschouwt bewust de primaire oppervlakte als maatgevend
CREATE OR REPLACE FORCE VIEW uwva_v_thema_oppmutatie
CREATE OR REPLACE FORCE VIEW UWVA_V_THEMA_OPPMUTATIE
(
alg_ruimte_key,
waarde,
hoeveeldan
ALG_RUIMTE_KEY,
WAARDE,
HOEVEELDAN,
DIFFTXT
)
AS
SELECT r.alg_ruimte_key, 'Meer', COALESCE (c.cad_imp_contour_opp, 0) - COALESCE (r.alg_ruimte_bruto_vloeropp, 0)
FROM alg_v_aanwezigruimte r, cad_imp_contour c, uwva_v_sync_alg_ruimte s
WHERE s.alg_ruimte_key = r.alg_ruimte_key
AND s.cadlabel = c.cad_imp_contour_nr
AND COALESCE (c.cad_imp_contour_opp, 0) - COALESCE (r.alg_ruimte_bruto_vloeropp, 0) > 0
UNION ALL
SELECT r.alg_ruimte_key, 'Minder', COALESCE (c.cad_imp_contour_opp, 0) - COALESCE (r.alg_ruimte_bruto_vloeropp, 0)
FROM alg_v_aanwezigruimte r, cad_imp_contour c, uwva_v_sync_alg_ruimte s
WHERE s.alg_ruimte_key = r.alg_ruimte_key
AND s.cadlabel = c.cad_imp_contour_nr
AND COALESCE (c.cad_imp_contour_opp, 0) - COALESCE (r.alg_ruimte_bruto_vloeropp, 0) < 0
UNION ALL
SELECT r.alg_ruimte_key, 'Gelijk', 0
FROM alg_v_aanwezigruimte r, cad_imp_contour c, uwva_v_sync_alg_ruimte s
WHERE s.alg_ruimte_key = r.alg_ruimte_key
AND s.cadlabel = c.cad_imp_contour_nr
AND COALESCE (c.cad_imp_contour_opp, 0) - COALESCE (r.alg_ruimte_bruto_vloeropp, 0) = 0;
WITH match_ruimte
AS (SELECT r.alg_ruimte_key,
COALESCE (c.cad_imp_contour_opp, 0)
- COALESCE (r.alg_ruimte_bruto_vloeropp, 0)
diff,
TO_CHAR (COALESCE (r.alg_ruimte_bruto_vloeropp, 0))
|| '->'
|| TO_CHAR (COALESCE (c.cad_imp_contour_opp, 0))
difftxt
FROM alg_v_aanwezigruimte r,
cad_imp_contour c,
cad_tekening ct,
uwva_v_sync_alg_ruimte s
WHERE s.alg_ruimte_key = r.alg_ruimte_key
AND s.cadlabel = c.cad_imp_contour_nr
AND ct.cad_tekening_key = c.cad_tekening_key
AND ct.alg_verdieping_key = r.alg_verdieping_key)
SELECT alg_ruimte_key,
case when diff > 0.1 then 'Meer' when diff < -0.1 then 'Minder' else 'Gelijk' end,
case when ABS (diff) > 0.1 then diff else 0 end,
case when ABS (diff) > 0.1 then difftxt else '' end
FROM match_ruimte;
CREATE OR REPLACE FORCE VIEW UWVA_V_LABEL_OPPMUTATIE
(
ALG_RUIMTE_KEY,
WAARDE
)
AS
SELECT ALG_RUIMTE_KEY, DIFFTXT FROM UWVA_V_THEMA_OPPMUTATIE;
-- UWVA#16353 - Klantspecifieke variant voor UWV van 'FIP Externe Bedrijven'!
/* Formatted on 25-11-2009 15:50:08 (QP5 v5.115.810.9015) */
@@ -26168,7 +26181,7 @@ CREATE OR REPLACE FORCE VIEW uwva_v_rap_cad_notindb
(
fclt_f_locatie,
fclt_f_gebouw,
fclt_f_verdieping,
fclt_f_verdieping,
cadlabel
)
AS
@@ -26178,7 +26191,7 @@ AS
NULL, '',
v.alg_verdieping_code || ' - ')
|| v.alg_verdieping_omschrijving
verd,
verd,
r.alg_ruimte_nr cad_ruimte_nr
FROM alg_locatie l,
alg_gebouw g,
@@ -26248,7 +26261,7 @@ CREATE OR REPLACE FORCE VIEW uwva_v_rap_cad_notintek
(
fclt_f_locatie,
fclt_f_gebouw,
fclt_f_verdieping,
fclt_f_verdieping,
ruimtenummer
)
AS
@@ -26258,7 +26271,7 @@ AS
NULL, '',
v.alg_verdieping_code || ' - ')
|| v.alg_verdieping_omschrijving
verd,
verd,
a.ALG_RUIMTE_NR
FROM alg_locatie l,
alg_gebouw g,
@@ -26321,6 +26334,7 @@ AS
AND a.alg_ruimte_key(+) = r.alg_ruimte_key
AND s.alg_srtruimte_key(+) = a.alg_srtruimte_key
AND CAD_IMP_CONTOUR_OPP is null
AND a.alg_ruimte_nr not like '000%'
ORDER BY 1,2,3,4;
BEGIN fac.registercustversion('UWVA', 50); END;