From 9273533bb25d49b39712498164e3f41a1f145d67 Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Fri, 23 Feb 2024 15:47:39 +0100 Subject: [PATCH] =?UTF-8?q?Flexible=20Tabellenausgabe=20von=20virtuellen?= =?UTF-8?q?=20Best=C3=A4nden=20#4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-modules/module/rpta/conf/rpta.xml | 56 +++--- .../module/rpta/masken/45000_felderinfo.unl | 26 +++ .../rpta/masken/45000_maske_system_bez.unl | 1 + .../rpta/masken/45000_masken_felder_bez.unl | 15 ++ .../module/rpta/masken/45000_maskeninfo.unl | 168 ++++++++++++++++++ .../rpta/masken/45000_sachgeb_maske_bez.unl | 1 + .../schluesseltabellen/rpta_column_type.unl | 3 + 7 files changed, 246 insertions(+), 24 deletions(-) create mode 100644 src-modules/module/rpta/masken/45000_felderinfo.unl create mode 100644 src-modules/module/rpta/masken/45000_maske_system_bez.unl create mode 100644 src-modules/module/rpta/masken/45000_masken_felder_bez.unl create mode 100644 src-modules/module/rpta/masken/45000_maskeninfo.unl create mode 100644 src-modules/module/rpta/masken/45000_sachgeb_maske_bez.unl diff --git a/src-modules/module/rpta/conf/rpta.xml b/src-modules/module/rpta/conf/rpta.xml index 8c56252..941139c 100644 --- a/src-modules/module/rpta/conf/rpta.xml +++ b/src-modules/module/rpta/conf/rpta.xml @@ -1,6 +1,6 @@ - @@ -14,15 +14,17 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> Schlüsseltabelle für Spaltendefinitionen - + - + Physische Spalte/Logische Spalte/Lookup - Bei logischen Spalten/Lookup + Bei logischen Spalten/Lookup - Bei String-Spalten + Bei String-Spalten + + Erläuterungstext @@ -46,7 +48,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> Spaltentypen - + @@ -69,9 +71,10 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> Spaltenlayouts - + + @@ -90,13 +93,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> -Spalten zu Resultsets - @@ -113,7 +115,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> -
+--> Spalten zu Layouts @@ -146,9 +148,9 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> - - - + + + @@ -212,14 +214,20 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> parent="Berichtsassistent">Abfragen zur Administration von Berichtsassistent - + @@ -232,7 +240,7 @@ x - @@ -241,10 +249,7 @@ x - - - + @@ -347,11 +352,13 @@ mode="full"> + mode="edit_delete"> + @@ -437,13 +444,14 @@ mode="full"> + - - + + diff --git a/src-modules/module/rpta/masken/45000_felderinfo.unl b/src-modules/module/rpta/masken/45000_felderinfo.unl new file mode 100644 index 0000000..bd2a558 --- /dev/null +++ b/src-modules/module/rpta/masken/45000_felderinfo.unl @@ -0,0 +1,26 @@ +45000^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<>SELECT \ + uniquename,\ + caption,\ + resultset_id\ +FROM rpta_column_layout \ +order by 2\ + ;^^<>SELECT \ + uniquename,\ + caption,\ + resultset_id\ +FROM rpta_column_layout \ +order by 2\ + ;^ +45001^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;^ +45002^Fächer^30^0^0^130^200^6^char^1000^0^12^<> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ +45003^Abschluss^40^0^0^100^200^3^char^1500^0^1^<> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ +45004^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ +45005^Spaltenlayouts bearbeiten^110^0^0^140^80^1^char^255^0^18^ ^ ^<> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^ +45006^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^apnr, eintrag^ ^ +45007^Bis Semester^20^350^-1^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;^ +45008^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ +45009^Studiengang^25^0^0^140^150^50^char^1000^0^12^<> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ +45011^Stichtag^23^330^-1^130^100^1^sql^30^1^1^<> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^ +45012^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<> select apnr, eintrag from hoererstatus where eintrag='alle';^ +45018^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^apnr, eintrag^<> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ +45022^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;^ ^ ^ diff --git a/src-modules/module/rpta/masken/45000_maske_system_bez.unl b/src-modules/module/rpta/masken/45000_maske_system_bez.unl new file mode 100644 index 0000000..4b9d115 --- /dev/null +++ b/src-modules/module/rpta/masken/45000_maske_system_bez.unl @@ -0,0 +1 @@ +45000^7^ diff --git a/src-modules/module/rpta/masken/45000_masken_felder_bez.unl b/src-modules/module/rpta/masken/45000_masken_felder_bez.unl new file mode 100644 index 0000000..8d3ee34 --- /dev/null +++ b/src-modules/module/rpta/masken/45000_masken_felder_bez.unl @@ -0,0 +1,15 @@ +45000^45000^ +45000^45001^ +45000^45002^ +45000^45003^ +45000^45004^ +45000^45005^ +45000^45006^ +45000^45007^ +45000^45008^ +45000^45009^ +45000^45011^ +45000^45012^ +45000^45013^ +45000^45018^ +45000^45022^ diff --git a/src-modules/module/rpta/masken/45000_maskeninfo.unl b/src-modules/module/rpta/masken/45000_maskeninfo.unl new file mode 100644 index 0000000..671fb66 --- /dev/null +++ b/src-modules/module/rpta/masken/45000_maskeninfo.unl @@ -0,0 +1,168 @@ +45000^Tabellenausgabe Studierende (amtlich und intern)^--Freemarker Template\ +<#include "SQL_lingua_franca"/>\ +<#include "SuperX_general"/>\ +--\ +--Autor D. Quathamer 2024\ +\ +\ +SELECT distinct name,\ +0::smallint as is_virtual,\ +name as runtime_tablename\ + from sx_tables\ + where name in ('${my_base_rs}')\ + and 0=(select count(*) from rpta_resultset R where R.uniquename='${my_base_rs}')\ + union\ + select R.uniquename,\ + 1::smallint as is_virtual,\ + 'tmp_' || R.uniquename as runtime_tablename\ + from rpta_resultset R where R.uniquename='${my_base_rs}'\ + ;\ + ]]>\ +\ +\ +>;\ +\ +]]>\ +>\ +order by CL.sortnr\ + ;\ +]]>\ +\ +\ +<#assign filter="<>\ +/* and sem_rueck_beur_ein >= <> */\ +/* and sem_rueck_beur_ein <= <> */\ +/* and stichtag = <> */\ +/* and <> */\ +/* and <>*/\ +/* and abschluss in (<>) */\ +/* and geschlecht = <> */\ +/* and fach_sem_zahl <= <> */\ +" />\ +\ +<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ +/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<> */\ +/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<> */\ +\ +\ +<#if basetable.is_virtual==1>\ +\ +create temp table ${basetable.runtime_tablename} as\ +select ${rpta_resultset.fieldclause} \ +from ${rpta_resultset.joinclause} \ +where 1=1\ +<#if rpta_resultset.whereclause != ""> \ +${rpta_resultset.whereclause} \ +and ${filter}\ +;\ +\ +\ +\ +\ +select \ +--zuerst die Basisdaten:\ +<#foreach column in columns>\ +<#if column.coltype="physicalColumn">\ +${column.colname},\ +<#elseif column.coltype="logicalColumn">\ +${column.colfunction} as ${column.colname},\ +<#elseif column.coltype="lookupColumn">\ +(${column.colfunction}) as ${column.colname},\ +\ +\ +null::char(1) as dummycol\ +into temp tmp_stud\ +from ${basetable.runtime_tablename}\ +<#if rpta_column_layout.whereclause !="">\ +where ${rpta_column_layout.whereclause}\ +\ +;\ +\ +\ +--ergebnistabelle:\ +select \ +--zuerst die nicht-Aggregate:\ +<#assign groupby=0 />\ +<#foreach column in columns>\ +<#if column.is_aggregate==0>\ +<#assign groupby=groupby+1 />\ +${column.colname},\ +\ +\ +--dann die Aggregate:\ +<#foreach column in columns>\ +<#if column.is_aggregate==1>\ +sum(${column.colname}) as ${column.colname},\ +\ +\ +null::char(1) as dummycol\ +into temp tmp_stud2\ +from tmp_stud\ +group by\ +<#list 1..groupby as i>${i}\ +<#if i != groupby>\ +,\ +\ +\ +;\ +\ +select \ +<#foreach column in columns>\ +${column.colname}\ +<#if column_has_next>,\ +\ +from tmp_stud2\ +order by <#list 1..groupby as i>${i}\ +<#if i != groupby>\ +,\ +\ +\ +;\ +<#if basetable.is_virtual==1>\ +drop table if exists ${basetable.runtime_tablename};\ +\ +\ +\ +drop table if exists tmp_stud;^--Freemarker Template\ + XIL List\ + sizable_columns horizontal_scrolling\ + drop_and_delete movable_columns \ + white_space_color=COLOR_WHITE fixed_columns=1\ + min_heading_height=55\ +<#foreach column in columns>\ +Column CID=0 heading_text="${column.caption}" center_heading explanation="${column.description}"\ + row_selectable heading_platform readonly\ + width=${column.visible_width} text_size=60\ +\ +@@@^Studienfach^Anzahl bzw. Anteil^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^^ diff --git a/src-modules/module/rpta/masken/45000_sachgeb_maske_bez.unl b/src-modules/module/rpta/masken/45000_sachgeb_maske_bez.unl new file mode 100644 index 0000000..085486c --- /dev/null +++ b/src-modules/module/rpta/masken/45000_sachgeb_maske_bez.unl @@ -0,0 +1 @@ +16^45000^ diff --git a/src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl b/src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl index e69de29..cefb820 100644 --- a/src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl +++ b/src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl @@ -0,0 +1,3 @@ +1^physicalColumn^Physische Spalte^ +2^logicalColumn^Logische Spalte^ +3^lookupColumn^Lookup-Spalte^