diff --git a/src-modules/module/rpta/masken/48000_felderinfo.unl b/src-modules/module/rpta/masken/48000_felderinfo.unl index 27f9740..85213a9 100644 --- a/src-modules/module/rpta/masken/48000_felderinfo.unl +++ b/src-modules/module/rpta/masken/48000_felderinfo.unl @@ -9,12 +9,27 @@ 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='<>')\ -order by sortnr, caption;^ ^<>SELECT uniquename,\ - caption\ +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='<>')\ + )\ +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='<>')\ +\ +union\ +\ +SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ -where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\ -and R.systeminfo_id=7) and uniquename='sos_stud_astat_rsz';^ +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='<>')\ + )\ +order by sortnr, caption\ +limit 1;^ 48001^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<> select tid, eintrag from semester order by tid DESC;^ ^<> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ 48002^Fächer^30^0^0^130^200^6^integer^1000^0^12^<> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ 48003^Abschluss^40^0^0^100^200^3^char^1500^0^12^<> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ @@ -31,7 +46,47 @@ and R.systeminfo_id=7) and uniquename='sos_stud_astat_rsz';^ 48014^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^ ^ ^ 48015^Nur Endsemester^21^0^0^140^80^1^integer^30^0^1^<> select 1,'ja' from xdummy^Eintrag^ ^ 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 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') order by sort1, 2;^ ^<> 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';^ +48018^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<>SELECT id, caption\ +FROM (\ + SELECT sort1, 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')\ +\ + UNION ALL\ +\ + SELECT 999999 AS sort1, apnr AS id, eintrag AS caption\ + FROM koepfe_oder_faelle\ + WHERE 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;^ ^<>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'\ +\ +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')\ + );^ 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 75e86b5..9140aca 100644 --- a/src-modules/module/rpta/masken/48000_maskeninfo.unl +++ b/src-modules/module/rpta/masken/48000_maskeninfo.unl @@ -111,6 +111,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="${<>}\ /* and sem_rueck_beur_ein = <> */\ /* and stichtag = <> */\ @@ -121,6 +122,18 @@ 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 2cd0ad1..e3812bb 100644 --- a/src-modules/module/rpta/masken/48490_felderinfo.unl +++ b/src-modules/module/rpta/masken/48490_felderinfo.unl @@ -1,4 +1,44 @@ -48490^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<> select apnr, eintrag from koepfe_oder_faelle order by 2^ ^<> select apnr, eintrag from koepfe_oder_faelle where eintrag='Fälle';^ +48490^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<>SELECT id, caption\ +FROM (\ + SELECT sort1, 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')\ +\ + UNION ALL\ +\ + SELECT 999999 AS sort1, apnr AS id, eintrag AS caption\ + FROM koepfe_oder_faelle\ + WHERE 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;^ ^<>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'\ +\ +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')\ + );^ 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>\ @@ -33,12 +73,27 @@ 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='<>')\ -order by sortnr, caption;^ ^<>SELECT uniquename,\ - caption\ +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='<>')\ + )\ +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='<>')\ +\ +union\ +\ +SELECT uniquename, caption, sortnr\ FROM rpta_column_layout \ -where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='rpta_sos_lab_aggr'\ -and R.systeminfo_id=7) and uniquename='rpta_sos_lab_aggr_sem';^ +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='<>')\ + )\ +order by sortnr, caption\ +limit 1;^ 48509^Semestertyp^5^350^-1^140^80^1^integer^255^0^1^<> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^Eintrag^ ^ 48510^##line##^30^0^0^100^100^1^char^5000^0^8^^ ^1^ 48511^Abschluss^7^0^0^100^200^3^char^1500^0^12^<> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ diff --git a/src-modules/module/rpta/masken/48490_maskeninfo.unl b/src-modules/module/rpta/masken/48490_maskeninfo.unl index 17b2d7b..a48bbe1 100644 --- a/src-modules/module/rpta/masken/48490_maskeninfo.unl +++ b/src-modules/module/rpta/masken/48490_maskeninfo.unl @@ -108,6 +108,29 @@ and substring('' || tid from 5 for 1)='<>'\ <#assign semester_filter = semester_filter+ " and 1=1 and sem_der_pruefung = "+endsemester /> \ \ \ +\ +<#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="<>\ /* and sem_der_pruefung = <> */\ @@ -128,6 +151,11 @@ and substring('' || tid from 5 for 1)='<>'\ " />\ \ \ +\ +\ +\ +\ +\ <#assign filter= filter + " and " + jahr_filter />\ \ <#assign filter= filter + " and " + semester_filter />\