From d5e954f802ae44cb0e039a901d71b27f6aa87d2f Mon Sep 17 00:00:00 2001 From: Andre Knieschewski Date: Thu, 7 May 2026 14:42:33 +0200 Subject: [PATCH] =?UTF-8?q?Kompatiblit=C3=A4t=20zu=20altem=20SOS=20Modul?= =?UTF-8?q?=20hergestellt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/rpta/masken/48000_felderinfo.unl | 65 ++++++++++--------- .../module/rpta/masken/48000_maskeninfo.unl | 24 +++---- .../module/rpta/masken/48490_felderinfo.unl | 65 ++++++++++--------- .../module/rpta/masken/48490_maskeninfo.unl | 34 +++------- 4 files changed, 92 insertions(+), 96 deletions(-) diff --git a/src-modules/module/rpta/masken/48000_felderinfo.unl b/src-modules/module/rpta/masken/48000_felderinfo.unl index 85213a9..f8c4e4f 100644 --- a/src-modules/module/rpta/masken/48000_felderinfo.unl +++ b/src-modules/module/rpta/masken/48000_felderinfo.unl @@ -3,30 +3,32 @@ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_gew')\ and R.systeminfo_id=7)\ -and 1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and id='<>')\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr ILIKE '%gew%')\ + )\ union\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat','sos_stud_astat_archiv')\ and R.systeminfo_id=7)\ -and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and id='<>')\ - or 1=(select 1 from koepfe_oder_faelle where apnr='<>')\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr NOT ILIKE '%gew%')\ )\ order by sortnr, caption;^ ^<> --Freemarker Template\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_gew')\ and R.systeminfo_id=7)\ -and 1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and id='<>')\ -\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr ILIKE '%gew%')\ + )\ union\ -\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat','sos_stud_astat_archiv')\ -and R.systeminfo_id=7) and uniquename='sos_stud_astat_rsz'\ -and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and id='<>')\ - or 1=(select 1 from koepfe_oder_faelle where apnr='<>')\ +and R.systeminfo_id=7)\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr NOT ILIKE '%gew%')\ )\ order by sortnr, caption\ limit 1;^ @@ -48,7 +50,7 @@ limit 1;^ 48016^Matrikel-Nr.^35^350^-1^140^80^1^char^30^0^13^^ ^ ^ 48018^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<>SELECT id, caption\ FROM (\ - SELECT sort1, id, caption\ + SELECT sort1, 'R_' || id as id, caption\ FROM sx_repository\ WHERE aktiv = 1\ AND today() BETWEEN gueltig_seit AND gueltig_bis\ @@ -56,9 +58,10 @@ FROM (\ \ UNION ALL\ \ - SELECT 999999 AS sort1, apnr AS id, eintrag AS caption\ + SELECT 999999 AS sort1, 'K_' || tid AS id, eintrag AS caption\ FROM koepfe_oder_faelle\ - WHERE apnr NOT ILIKE '%gew%'\ + WHERE 1=1\ + --AND apnr NOT ILIKE '%gew%'\ AND NOT EXISTS (\ SELECT 1\ FROM sx_repository\ @@ -68,25 +71,29 @@ FROM (\ )\ ) x\ ORDER BY sort1, caption;^ ^<>SELECT id, caption\ -FROM sx_repository\ -WHERE aktiv = 1\ - AND today() BETWEEN gueltig_seit AND gueltig_bis\ - AND art = 'SOS_KOEPFE_FAELLE_RPTA'\ - AND caption = 'Fälle'\ +FROM (\ + SELECT sort1, 'R_' || id as id, caption\ + FROM sx_repository\ + WHERE aktiv = 1\ + AND today() BETWEEN gueltig_seit AND gueltig_bis\ + AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ + AND caption = 'Fälle'\ \ -UNION ALL\ + UNION ALL\ \ -SELECT apnr AS id, eintrag AS caption\ -FROM koepfe_oder_faelle\ -WHERE eintrag = 'Fälle'\ - AND apnr NOT ILIKE '%gew%'\ - AND NOT EXISTS (\ - SELECT 1\ - FROM sx_repository\ - WHERE aktiv = 1\ - AND today() BETWEEN gueltig_seit AND gueltig_bis\ - AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ - );^ + SELECT 999999 AS sort1, 'K_' || tid AS id, eintrag AS caption\ + FROM koepfe_oder_faelle\ + WHERE eintrag = 'Fälle'\ + --AND apnr NOT ILIKE '%gew%'\ + AND NOT EXISTS (\ + SELECT 1\ + FROM sx_repository\ + WHERE aktiv = 1\ + AND today() BETWEEN gueltig_seit AND gueltig_bis\ + AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ + )\ +) x\ +ORDER BY sort1, caption;^ 48019^Status^340^330^-1^130^180^1^sql^30^0^1^<> select apnr,eintrag from sos_status order by 2^ ^ ^ 48022^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ 48023^Spalten^3001^0^0^150^190^10^char^30^0^1^<>\ diff --git a/src-modules/module/rpta/masken/48000_maskeninfo.unl b/src-modules/module/rpta/masken/48000_maskeninfo.unl index 9140aca..2d7c9d9 100644 --- a/src-modules/module/rpta/masken/48000_maskeninfo.unl +++ b/src-modules/module/rpta/masken/48000_maskeninfo.unl @@ -85,6 +85,15 @@ and substring('' || tid from 5 for 1)='<>'\ ;\ \ ]]>\ +>'\ +union\ +select content from sx_repository where 'R_' || tid='<>'\ +limit 1;\ +]]>\ +\ +\ \ \ <#assign jahr_param="" />\ @@ -111,8 +120,7 @@ and substring('' || tid from 5 for 1)='<>'\ <#assign semester_filter = semester_filter+ " and 1=1 and sem_rueck_beur_ein = "+endsemester /> \ \ \ -<#if "<>"?contains("KoF_RPTA")>\ -<#assign filter="${<>}\ +<#assign filter="${(koepfe_oder_faelle_prep?has_content)?then(koepfe_oder_faelle_prep, '1=1')}\ /* and sem_rueck_beur_ein = <> */\ /* and stichtag = <> */\ /* and <> */\ @@ -122,18 +130,6 @@ and substring('' || tid from 5 for 1)='<>'\ /* and substring('' || sem_rueck_beur_ein from 5 for 1)='<>' */\ /* and ${<>} */\ " />\ -<#else>\ -<#assign filter="<>\ -/* and sem_rueck_beur_ein = <> */\ -/* and stichtag = <> */\ -/* and <> */\ -/* and <>*/\ -/* and geschlecht = <> */\ -/* and fach_sem_zahl <= <> */\ -/* and substring('' || sem_rueck_beur_ein from 5 for 1)='<>' */\ -/* and ${<>} */\ -" />\ -\ \ --die Maske 48000 wird auch im dashboard benutzt.\ --dort gibt es die Spalte kz_rueck_beur_ein nicht im optimierten Resultset, daher:\ diff --git a/src-modules/module/rpta/masken/48490_felderinfo.unl b/src-modules/module/rpta/masken/48490_felderinfo.unl index 639f4a2..ca5a0ad 100644 --- a/src-modules/module/rpta/masken/48490_felderinfo.unl +++ b/src-modules/module/rpta/masken/48490_felderinfo.unl @@ -1,6 +1,6 @@ 48490^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<>SELECT id, caption\ FROM (\ - SELECT sort1, id, caption\ + SELECT sort1, 'R_' || id as id, caption\ FROM sx_repository\ WHERE aktiv = 1\ AND today() BETWEEN gueltig_seit AND gueltig_bis\ @@ -8,9 +8,10 @@ FROM (\ \ UNION ALL\ \ - SELECT 999999 AS sort1, apnr AS id, eintrag AS caption\ + SELECT 999999 AS sort1, 'K_' || tid AS id, eintrag AS caption\ FROM koepfe_oder_faelle\ - WHERE apnr NOT ILIKE '%gew%'\ + WHERE 1=1\ + --AND apnr NOT ILIKE '%gew%'\ AND NOT EXISTS (\ SELECT 1\ FROM sx_repository\ @@ -20,25 +21,29 @@ FROM (\ )\ ) x\ ORDER BY sort1, caption;^ ^<>SELECT id, caption\ -FROM sx_repository\ -WHERE aktiv = 1\ - AND today() BETWEEN gueltig_seit AND gueltig_bis\ - AND art = 'SOS_KOEPFE_FAELLE_RPTA'\ - AND caption = 'Fälle'\ +FROM (\ + SELECT sort1, 'R_' || id as id, caption\ + FROM sx_repository\ + WHERE aktiv = 1\ + AND today() BETWEEN gueltig_seit AND gueltig_bis\ + AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ + AND caption = 'Fälle'\ \ -UNION ALL\ + UNION ALL\ \ -SELECT apnr AS id, eintrag AS caption\ -FROM koepfe_oder_faelle\ -WHERE eintrag = 'Fälle'\ - AND apnr NOT ILIKE '%gew%'\ - AND NOT EXISTS (\ - SELECT 1\ - FROM sx_repository\ - WHERE aktiv = 1\ - AND today() BETWEEN gueltig_seit AND gueltig_bis\ - AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ - );^ + SELECT 999999 AS sort1, 'K_' || tid AS id, eintrag AS caption\ + FROM koepfe_oder_faelle\ + WHERE eintrag = 'Fälle'\ + --AND apnr NOT ILIKE '%gew%'\ + AND NOT EXISTS (\ + SELECT 1\ + FROM sx_repository\ + WHERE aktiv = 1\ + AND today() BETWEEN gueltig_seit AND gueltig_bis\ + AND art IN ('SOS_KOEPFE_FAELLE_RPTA','SOS_KOEPFE_FAELLE_RPTA_GEW')\ + )\ +) x\ +ORDER BY sort1, caption;^ 48491^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<> --freemarker template \ select tid, eintrag from semester \ <#if K_VIZ_ZEITR_SEM_ANZ?exists>\ @@ -67,30 +72,32 @@ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_sos_lab_stg_gew')\ and R.systeminfo_id=7)\ -and 1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and id='<>')\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr ILIKE '%gew%')\ + )\ union\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_sos_lab_aggr','rpta_sos_lab_stg','rpta_sos_lab_stg_archiv')\ and R.systeminfo_id=7)\ -and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and id='<>')\ - or 1=(select 1 from koepfe_oder_faelle where apnr='<>')\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr NOT ILIKE '%gew%')\ )\ order by sortnr, caption;^ ^<> --Freemarker Template\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_sos_lab_stg_gew')\ and R.systeminfo_id=7)\ -and 1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and id='<>')\ -\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA_GEW' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr ILIKE '%gew%')\ + )\ union\ -\ SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('rpta_sos_lab_aggr')\ -and R.systeminfo_id=7) and uniquename='rpta_sos_lab_aggr_sem'\ -and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and id='<>')\ - or 1=(select 1 from koepfe_oder_faelle where apnr='<>')\ +and R.systeminfo_id=7)\ +and (1=(select 1 from sx_repository where art='SOS_KOEPFE_FAELLE_RPTA' and 'R_' || id='<>')\ + or 1=(select 1 from koepfe_oder_faelle where 'K_' || tid='<>' AND apnr NOT ILIKE '%gew%')\ )\ order by sortnr, caption\ limit 1;^ diff --git a/src-modules/module/rpta/masken/48490_maskeninfo.unl b/src-modules/module/rpta/masken/48490_maskeninfo.unl index a48bbe1..97a5d89 100644 --- a/src-modules/module/rpta/masken/48490_maskeninfo.unl +++ b/src-modules/module/rpta/masken/48490_maskeninfo.unl @@ -82,6 +82,14 @@ and substring('' || tid from 5 for 1)='<>'\ ;\ \ ]]>\ +>'\ +union\ +select content from sx_repository where 'R_' || tid='<>'\ +limit 1;\ +]]>\ +\ \ \ <#assign jahr_param="" />\ @@ -109,30 +117,9 @@ and substring('' || tid from 5 for 1)='<>'\ \ \ \ -<#if "<>"?contains("KoF_RPTA")>\ -<#if my_base_rs = "rpta_sos_lab_aggr">\ -<#assign filter="${<>}\ -/* and sem_der_pruefung = <> */\ -/* and stichtag = <> */\ -/* and geschlecht = <> */\ -/* and fach_sem_zahl <= <> */\ -/* and substring('' || sem_der_pruefung from 5 for 1)='<>' */\ -/* and pstatus=<> */\ -" />\ -<#elseif my_base_rs = "rpta_sos_lab_stg">\ -<#assign filter="${<>}\ -/* and sem_d_abg_pruefung = <> */\ -/* and stichtag = <> */\ -/* and geschlecht = <> */\ -/* and fach_sem_zahl <= <> */\ -/* and substring('' || sem_der_pruefung from 5 for 1)='<>' */\ -/* and pstatus=<> */\ -" />\ -\ \ -<#else>\ <#if my_base_rs = "rpta_sos_lab_aggr">\ -<#assign filter="<>\ +<#assign filter="${(koepfe_oder_faelle_prep?has_content)?then(koepfe_oder_faelle_prep, '1=1')}\ /* and sem_der_pruefung = <> */\ /* and stichtag = <> */\ /* and geschlecht = <> */\ @@ -141,7 +128,7 @@ and substring('' || tid from 5 for 1)='<>'\ /* and pstatus=<> */\ " />\ <#elseif my_base_rs = "rpta_sos_lab_stg">\ -<#assign filter="<>\ +<#assign filter="${(koepfe_oder_faelle_prep?has_content)?then(koepfe_oder_faelle_prep, '1=1')}\ /* and sem_d_abg_pruefung = <> */\ /* and stichtag = <> */\ /* and geschlecht = <> */\ @@ -151,7 +138,6 @@ and substring('' || tid from 5 for 1)='<>'\ " />\ \ \ -\ \ \ \