Browse Source

aktueller Stand

xcube0.1
Gitea 1 year ago
parent
commit
94e3626613
  1. 23
      src-modules/module/xcube/masken/19620_felderinfo.unl
  2. 1
      src-modules/module/xcube/masken/19620_maske_system_bez.unl
  3. 23
      src-modules/module/xcube/masken/19620_masken_felder_bez.unl
  4. 301
      src-modules/module/xcube/masken/19620_maskeninfo.unl
  5. 1
      src-modules/module/xcube/masken/19620_sachgeb_maske_bez.unl
  6. 2
      src-modules/module/xcube/masken/21000_felderinfo.unl
  7. 4
      src-modules/module/xcube/masken/21000_maskeninfo.unl
  8. 4
      src-modules/module/xcube/masken/21030_maskeninfo.unl
  9. 2
      src-modules/module/xcube/masken/21100_felderinfo.unl
  10. 4
      src-modules/module/xcube/masken/21100_maskeninfo.unl
  11. 28
      src-modules/module/xcube/masken/21200_felderinfo.unl
  12. 1
      src-modules/module/xcube/masken/21200_maske_system_bez.unl
  13. 31
      src-modules/module/xcube/masken/21200_masken_felder_bez.unl
  14. 430
      src-modules/module/xcube/masken/21200_maskeninfo.unl
  15. 1
      src-modules/module/xcube/masken/21200_sachgeb_maske_bez.unl
  16. 14
      src-modules/module/xcube/schluesseltabellen/sichten_fuellen.sql
  17. 76
      src-modules/module/xcube/schluesseltabellen/xcube_dims_install.sql
  18. 94
      src-modules/module/xcube/schluesseltabellen/xcube_install.sql
  19. 33
      src-modules/module/xcube/schluesseltabellen/xcube_install_restrictions.sql

23
src-modules/module/xcube/masken/19620_felderinfo.unl

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
19620^Beschäftigungsstelle (Person)^0^0^0^150^150^1^char^30^0^12^<<SQL>>select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Besch./Kostenstellen-Sicht') and aktiv=1 order by sortnr,type,name;^^^
19621^Datum^1^300^-1^100^80^1^date^10^0^0^^^<<SQL>> select today() from xdummy^
19622^Kostenstelle (Person)^3^0^0^100^150^3^char^30^0^12^<<SQL>> select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Kostenstellen-Sicht','SVA-Kst-spezial') and aktiv=1 order by sortnr,type,name;^^^
19623^Dienstart^4^0^0^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Dienstart' and aktiv=1 order by type,name;^^^
19624^BVL-Gruppe^5^300^-1^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA BVL-Gruppen' and aktiv=1 order by type,name;^^^
19625^Amtsbezeichnung^6^0^0^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Amtsdienstbez.' and aktiv=1 order by type,name;^^^
19626^Personalzählung^121^0^0^110^150^1^sql^20^1^1^<<SQL>> SELECT 'v','Vollzeit-Äquiv.' from xdummy union select 'k','Köpfe' from xdummy ;^^<<SQL>> select 'v','Vollzeit-Äquiv.' from xdummy;^
19627^Alter (bis)^11^130^-1^100^70^1^integer^5^0^0^^^^
19628^Befristet bis^12^300^-1^100^80^1^date^10^0^0^^^^
19629^Beurlaubung^3^300^-1^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA-Beurlaubung-Sicht' and aktiv=1 order by type,name;^^^
19630^Vertragsart^7^300^-1^100^160^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA-Vertragsart-Sicht' and aktiv=1 order by type,name;^^^
19631^Filter Personal^110^0^0^100^150^1^sql^20^0^1^<<SQL>> SELECT content,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SVA_PERS_FILTER' order by 2;^^^
19632^Staatsangehörigkeit^120^0^0^100^120^1^sql^30^0^1^<<SQL>> select '!=0','Alle ohne Deutschland' from xdummy union select '=' || astat, trim(druck) || ' (' || trim(apnr) || ')' from sva_k_staat order by 2;^^^
19633^Geschlecht^100^300^-1^100^70^1^integer^4^0^1^<<SQL>> select tid, beschreibung from konstanten where tid in (1,2);^^^
19634^Geldgeber^115^300^-1^100^120^3^char^20^0^12^<<SQL>>select tid,type,name from sichten where art ='Geldgeber-Sicht (SVA)' and aktiv=1 order by sortnr,type,name;^^^
19635^tablestylesheet^122^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=19460^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=19620 and S.ord=1^
19636^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
19637^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('sva_k_vertragsart','sva_k_amtsdienst','sva_k_dienstart','sva_k_bvlgruppe') order by 2^^^
19638^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>> select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F, sx_tables T where F.table_name=T.name and F.currentlyused=1 and (F.table_name ='sva_pbv_aggr' /* or F.table_name in (<<Weitere Tabellen>>) */) order by 2;^^^
19639^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
19640^oder Stichtag^2^0^0^100^150^1^integer^20^0^1^<<SQL>> SELECT tid,date_str(stichtag),stichtag from sva_stichtag where bereich='p' order by 3 desc;^^^
19641^Beschv.-Nr.^102^0^0^100^70^1^char^100^0^0^^^^
19642^Pers.-Nr.^101^0^0^100^70^1^char^100^0^999^^^^

1
src-modules/module/xcube/masken/19620_maske_system_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
19620^6^

23
src-modules/module/xcube/masken/19620_masken_felder_bez.unl

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
19620^19620^
19620^19621^
19620^19622^
19620^19623^
19620^19624^
19620^19625^
19620^19626^
19620^19627^
19620^19628^
19620^19629^
19620^19630^
19620^19631^
19620^19632^
19620^19633^
19620^19634^
19620^19635^
19620^19636^
19620^19637^
19620^19638^
19620^19639^
19620^19640^
19620^19641^
19620^19642^

301
src-modules/module/xcube/masken/19620_maskeninfo.unl

@ -0,0 +1,301 @@ @@ -0,0 +1,301 @@
19620^Personal Datenblatt (Stichtag)^--Freemarker Template\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/> \
\
\
\
<sqlvars>\
<sqlvar name="get_tables"><![CDATA[\
<#assign srctable="sva_pbv_aggr" />\
<#if "<<oder Stichtag>>" !="">\
<#assign srctable="sva_pbv_aggr_stich" />\
</#if>\
SELECT distinct name,name\
from sx_tables\
where name in ('${srctable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 2;]]>\
</sqlvar>\
<sqlvar name="get_table_joins"><![CDATA[\
<#assign srctable="sva_pbv_aggr" />\
<#if "<<oder Stichtag>>" !="">\
<#assign srctable="sva_pbv_aggr_stich" />\
</#if>\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \
from sx_fields where table_name in ('${srctable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('${srctable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
<#assign srctable="sva_pbv_aggr" />\
<#if "<<oder Stichtag>>" !="">\
<#assign srctable="sva_pbv_aggr_stich" />\
</#if>\
SELECT name,\
caption,\
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\
|| '#' || trim(string_not_null(foreignkey_cap))\
|| '#' || trim(string_not_null(foreignkey_cond))\
|| '#' || trim(string_not_null(foreignkey_func))\
|| '#' || trim(string_not_null(table_name)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('${srctable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="get_felder_fk"><![CDATA[\
<#assign srctable="sva_pbv_aggr" />\
<#if "<<oder Stichtag>>" !="">\
<#assign srctable="sva_pbv_aggr_stich" />\
</#if>\
SELECT name,\
caption,\
(trim(table_name)\
|| '#' || trim(string_not_null(foreignkey_tab)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('${srctable}' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="datum"><![CDATA[\
SELECT date_str(stichtag) from sva_stichtag where '' || tid='<<oder Stichtag>>'\
union \
select '' /* || <<Datum>> */ \
from xdummy \
where 1=1\
/* and <<Datum>> != '' */\
and '<<oder Stichtag>>' = ''\
;]]>\
</sqlvar>\
</sqlvars>\
\
\
\
<@generate_multitable_list />\
<@generate_field_list_multitable aggregationsfeld="*" aggregatfunktion="count(" />\
<@generate_foreign_fields_multitable />\
\
\
<#assign stichtag_fld="" />\
<#assign datumsfilter="and 1=0" />\
/* <#assign stichtag_fld="<<oder Stichtag>>" /> */\
<#if stichtag_fld == "" && "<<Datum>>" != "">\
<#assign srctable="sva_pbv_aggr" />\
<#assign datumsfilter="and date_val(<<Datum>>) between d_besch_von and d_besch_bis" />\
<#else>\
<#assign srctable="sva_pbv_aggr_stich" />\
<#assign datumsfilter="and stichtag="+stichtag_fld />\
</#if>\
\
<#assign filter= datumsfilter + " \
/* and ca501_staat <<Staatsangehörigkeit>> */\
/* and geschlecht= <<Geschlecht>> */\
/* and trunc(( date_val(${datum}) - geburtsdatum) / 365.25 , 0) >= <<Alter (von)>> */\
/* and trunc(( date_val(${datum}) - geburtsdatum) / 365.25 , 0) <= <<Alter (bis)>> */\
/* and d_befristung <= date_val(<<Befristet bis>>)*/\
/* and <<Filter Personal>> */\
" />\
<#if "<<Beurlaubung>>"!="">\
<#if "<<Beurlaubung>>"=="'_AOB'"> <#assign filter=filter + " and beurl_art is null "/>\
<#else> <#assign filter=filter + " and beurl_art in "+Beurlaubung.allNeededKeys+" "/>\
</#if>\
</#if>\
<#if .vars["Pers.-Nr."]?exists&& "<<Pers.-Nr.>>"!="">\
<#assign filter=filter+" and personal_nr in (<<Pers.-Nr.>>)"?replace("'","")+" "/>\
</#if>\
<#if .vars["Beschv.-Nr."]?exists&& "<<Beschv.-Nr.>>"!="">\
<#assign filter=filter+" and besch_verh_nr in (<<Beschv.-Nr.>>)"?replace("'","")+" "/>\
</#if>\
\
\
<#assign filter = filter + "and ch110_besch_st in "+.vars["Beschäftigungsstelle (Person)"].allNeededKeys /> \
/* \
<#assign filter = filter + "and ( kostenstelle in "+.vars["Kostenstelle (Person)"].allNeededKeys +" )" /> --<<Kostenstelle (Person)>> */\
/* \
<#assign filter = filter + "and (ch212_geldgeber in "+.vars["Geldgeber"].allNeededKeys +")" /> --<<Geldgeber>> */\
/* \
<#assign filter = filter + "and (vertart in "+.vars["Vertragsart"].allNeededKeys +")" /> --<<Vertragsart>> */\
/* \
<#assign filter = filter + "and (ca109_key_bvl in "+.vars["BVL-Gruppe"].allNeededKeys +")" /> --<<BVL-Gruppe>> */\
/* \
<#assign filter = filter + "and (ca108_amtsbez in "+.vars["Amtsbezeichnung"].allNeededKeys +")" /> --<<Amtsbezeichnung>> */\
/* \
<#assign filter = filter + "and (ca107_dienstart in"+.vars["Dienstart"].allNeededKeys +")" /> --<<Dienstart>> */\
\
<#assign field_list_select_orig=field_list_select />\
<#assign field_list_groupby_orig=field_list_groupby />\
\
<#if "<<Personalzählung>>" = "k" >\
--dafür werden drei Merkmale gebraucht: Personal-Nr., vzae und drittmittel: \
<#if field_list_select?index_of("tid") == -1>\
<#assign field_list_select=field_list_select+",tid as "+srctable+"_tid" />\
</#if>\
<#if field_list_groupby?index_of("tid") == -1>\
<#assign field_list_groupby=field_list_groupby+",tid" />\
</#if>\
<#if field_list_select?index_of("personal_nr") == -1>\
<#assign field_list_select=field_list_select+",personal_nr as "+srctable+"_personal_nr" />\
</#if>\
<#if field_list_groupby?index_of("personal_nr") == -1>\
<#assign field_list_groupby=field_list_groupby+",personal_nr" />\
</#if>\
<#if field_list_select?index_of("vzae") == -1>\
<#assign field_list_select=field_list_select+",vzae as "+srctable+"_vzae" />\
</#if>\
<#if field_list_groupby?index_of("vzae") == -1>\
<#assign field_list_groupby=field_list_groupby+",vzae" />\
</#if>\
<#if field_list_select?index_of("drittmittel") == -1>\
<#assign field_list_select=field_list_select+",drittmittel as "+srctable+"_drittmittel" />\
</#if>\
<#if field_list_groupby?index_of("drittmittel") == -1>\
<#assign field_list_groupby=field_list_groupby+",drittmittel" />\
</#if>\
\
<#else>\
<#assign field_list_select=field_list_select+",sum(vzae) as summe" />\
</#if>\
\
<@generate_resultset_multitable tabellen=table_list\
p_show_keys=<<Schlüssel anzeigen>>\
p_field_list_select=field_list_select\
p_foreign_fields=foreign_fields\
p_filter=filter\
p_field_list_groupby=field_list_groupby \
p_join_clause=join_clause\
/>\
\
<#assign field_list_select_tmp_tabelle="summe" />\
\
<#if get_felder_fk?has_content >\
<#assign field_list_select_tmp_tabelle="" />\
<#assign rownum=1 />\
<#foreach row_feld in get_felder_fk>\
<#assign feldname=row_feld.key />\
<#assign caption=row_feld.name />\
<#assign zaehler=1 />\
<#list row_feld.strukturStr?split("#") as row>\
<#if zaehler=1>\
<#assign table_name=row />\
</#if>\
<#if zaehler=2>\
<#assign foreignkey_tab=row />\
</#if>\
<#if zaehler=3>\
<#assign foreignkey_uniquename=row />\
</#if>\
<#assign zaehler= zaehler+1 />\
</#list>\
<#if foreignkey_tab != "">\
<#assign field_list_select_tmp_tabelle=field_list_select_tmp_tabelle+table_name+"_"+feldname+"_str" />\
<#if <<Schlüssel anzeigen>>=1>\
<#if !foreignkey_uniquename?exists || foreignkey_uniquename=="">\
<#assign field_list_select_tmp_tabelle=field_list_select_tmp_tabelle+","+table_name+"_"+feldname />\
<#else>\
<#assign field_list_select_tmp_tabelle=field_list_select_tmp_tabelle+","+table_name+"_"+feldname+"_uniquename" />\
</#if>\
</#if>\
<#else>\
<#assign field_list_select_tmp_tabelle=field_list_select_tmp_tabelle+" " + table_name+"_"+feldname />\
</#if>\
<#if rownum &lt; get_felder_fk?size>\
<#assign field_list_select_tmp_tabelle=field_list_select_tmp_tabelle+"," />\
</#if>\
<#assign rownum= rownum+1 />\
<#assign foreignkey_uniquename="" />\
</#foreach>\
</#if>\
\
<#if "<<Personalzählung>>" = "k" >\
create temp table tmp_doppelt(\
tid integer,\
personal_nr integer,\
vzae decimal(7,2))\
;\
insert into tmp_doppelt(personal_nr,vzae)\
select ${srctable}_personal_nr,max(${srctable}_vzae) from tmp_tabelle\
group by 1;\
--erste Priorität hat PLAN-Finanzierung:\
update tmp_doppelt set tid=(\
select min(A.${srctable}_tid) from tmp_tabelle A\
where A.${srctable}_personal_nr=tmp_doppelt.personal_nr\
and A.${srctable}_vzae=tmp_doppelt.vzae\
and (A.${srctable}_drittmittel !=1 or A.${srctable}_drittmittel is null)\
);\
--zweite Priorität hat Drittmittel-Finanzierung:\
update tmp_doppelt set tid=(\
select min(A.${srctable}_tid) from tmp_tabelle A\
where A.${srctable}_personal_nr=tmp_doppelt.personal_nr\
and A.${srctable}_vzae=tmp_doppelt.vzae\
and A.${srctable}_drittmittel =1 )\
where tid is null\
;\
<@selectintotmp select=field_list_select_tmp_tabelle+", count(distinct T."+srctable+"_personal_nr) as summe"\
target="tmp_tabelle2"\
source="tmp_tabelle T, tmp_doppelt D">\
where D.tid=T.${srctable}_tid\
group by ${field_list_select_tmp_tabelle}\
</@selectintotmp> <@informixnolog/>;\
\
drop table tmp_doppelt;\
drop table tmp_tabelle;\
</#if>\
\
\
\
select ${field_list_select_tmp_tabelle},summe\
from tmp_tabelle<#if "<<Personalzählung>>" = "k" >2</#if>\
;^--Freemarker Template \
<sqlvars>\
<sqlvar name="get_felder"><![CDATA[\
<#assign srctable="sva_pbv_aggr" />\
<#if "<<oder Stichtag>>" !="">\
<#assign srctable="sva_pbv_aggr_stich" />\
</#if>\
SELECT caption,\
foreignkey_tab,\
description as strukturStr\
from sx_fields\
where table_name in ('${srctable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
\
order by 1;\
]]>\
</sqlvar>\
</sqlvars>\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if get_felder?has_content >\
<#foreach myfield in get_felder>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.name != ''&& <<Schlüssel anzeigen>>==1>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
Column CID=${i} heading_text="Summe" explanation="Summe VZÄ oder Köpfe" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
@@@^^^Flexible Auswertung von Personalstatistik^drop table tmp_tabelle<#if "<<Personalzählung>>" = "k" >2</#if>;^^2^700^360^^^<<SQL>> select 'Achtung: Das Datum des Buttons Beschäftigungsstelle (Person) unterscheidet sich vom ausgewählten Datum im Maskenfeld.' from xdummy where <<Beschäftigungsstelle (Person)-Stand>> != date_val(<<Datum>>)^

1
src-modules/module/xcube/masken/19620_sachgeb_maske_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
10^19620^

2
src-modules/module/xcube/masken/21000_felderinfo.unl

@ -49,4 +49,4 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi @@ -49,4 +49,4 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi
21028^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<<SQL>> select '_graph','Balken (horiz. linksb.)' from xdummy\
union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\
union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy^^^
21029^Zeilenfilter bis Ebene^140^0^0^140^10^1^integer^30^0^0^ ^^^
21029^Zeilenfilter bis Ebene^140^0^0^140^80^1^integer^30^0^0^ ^^^

4
src-modules/module/xcube/masken/21000_maskeninfo.unl

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
21000^Studierende XCUBE^--freemarker template\
21000^Studierende Xcube^--freemarker template\
-- Maskenfelder -Leere Zeilen ausblenden, leere SPalten ausblenden?\
<sqlvars>\
<sqlvar name="table_name">select table_name from xcube where maskeninfo_id=${Maskennummer}</sqlvar>\
@ -432,5 +432,5 @@ Column CID=1 heading_text="${spalte.name}" center_heading\ @@ -432,5 +432,5 @@ Column CID=1 heading_text="${spalte.name}" center_heading\
row_selectable heading_platform readonly explanation="Ausprägung ${spalte.name}"\
width=12\
</#foreach>\
@@@^Altersgruppe^Anzahl^Dynamische Darstellung von Studierendenzahlen^drop table tmp_erg;\
@@@^Altersgruppe^Anzahl^Kreuztabellen zu Studierendenzahlen^drop table tmp_erg;\
drop table tmp_cellmax;^ ^3^700^360^0^1^ ^

4
src-modules/module/xcube/masken/21030_maskeninfo.unl

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
21030^Datenwürfel verwalten^--freemarker template\
21030^Kreuztabellen (Xcubes) verwalten^--freemarker template\
\
SELECT --X.tid,\
X.name,\
@ -41,4 +41,4 @@ Column CID=0 heading_text="Maske Nummer" center_heading\ @@ -41,4 +41,4 @@ Column CID=0 heading_text="Maske Nummer" center_heading\
Column CID=0 heading_text="Bearbeiten" center_heading\
row_selectable col_selectable heading_platform readonly\
width=5 text_size=100\
@@@^^^Dimensionen und Datenwürfel (xCubes) verwalten^ ^^1^440^360^0^1^^
@@@^^^Dimensionen und Kreuztabellen (Xcubes) verwalten^ ^^1^440^360^0^1^^

2
src-modules/module/xcube/masken/21100_felderinfo.unl

@ -50,4 +50,4 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi @@ -50,4 +50,4 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi
21128^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<<SQL>> select '_graph','Balken (horiz. linksb.)' from xdummy\
union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\
union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy^^^
21129^Zeilenfilter bis Ebene^140^0^0^140^10^1^integer^30^0^0^ ^^^
21129^Zeilenfilter bis Ebene^140^0^0^140^80^1^integer^30^0^0^ ^^^

4
src-modules/module/xcube/masken/21100_maskeninfo.unl

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
21100^Abschlussprüfungen XCUBE^--freemarker template\
21100^Abschlussprüfungen Xcube^--freemarker template\
-- Maskenfelder -Leere Zeilen ausblenden, leere SPalten ausblenden?\
<sqlvars>\
<sqlvar name="table_name">select table_name from xcube where maskeninfo_id=${Maskennummer}</sqlvar>\
@ -426,5 +426,5 @@ Column CID=1 heading_text="${spalte.name}" center_heading\ @@ -426,5 +426,5 @@ Column CID=1 heading_text="${spalte.name}" center_heading\
row_selectable heading_platform readonly explanation="Ausprägung ${spalte.name}"\
width=12\
</#foreach>\
@@@^Altersgruppe^Anzahl^Dynamische Darstellung von Studierendenzahlen^drop table tmp_erg;\
@@@^Altersgruppe^Anzahl^Kreuztabellen zu Zahlen für Abschlussprüfungen^drop table tmp_erg;\
drop table tmp_cellmax;^ ^3^700^360^0^1^ ^

28
src-modules/module/xcube/masken/21200_felderinfo.unl

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
21200^Beschäftigungsstelle (Person)^0^0^0^150^150^1^char^30^0^12^<<SQL>>select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Besch./Kostenstellen-Sicht') and aktiv=1 order by sortnr,type,name;^^^
21201^Datum^1^300^-1^100^80^1^date^10^0^0^^^<<SQL>> select today() from xdummy^
21202^Kostenstelle (Person)^3^0^0^100^150^3^char^30^0^12^<<SQL>> select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Kostenstellen-Sicht','SVA-Kst-spezial') and aktiv=1 order by sortnr,type,name;^^^
21203^Dienstart^4^0^0^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Dienstart' and aktiv=1 order by type,name;^^^
21204^BVL-Gruppe^5^300^-1^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA BVL-Gruppen' and aktiv=1 order by type,name;^^^
21205^Amtsbezeichnung^6^0^0^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Amtsdienstbez.' and aktiv=1 order by type,name;^^^
21206^Personalzählung^121^0^0^110^150^1^sql^20^1^1^<<SQL>> SELECT 'v','Vollzeit-Äquiv.' from xdummy ;^^<<SQL>> select 'v','Vollzeit-Äquiv.' from xdummy;^
21207^Alter (bis)^11^130^-1^100^70^1^integer^5^0^0^^^^
21208^Befristet bis^12^300^-1^100^80^1^date^10^0^0^^^^
21209^Beurlaubung^3^300^-1^100^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA-Beurlaubung-Sicht' and aktiv=1 order by type,name;^^^
21210^Vertragsart^7^300^-1^100^160^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA-Vertragsart-Sicht' and aktiv=1 order by type,name;^^^
21211^Filter Personal^110^0^0^100^150^1^sql^20^0^1^<<SQL>> SELECT content,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SVA_PERS_FILTER' order by 2;^^^
21212^Staatsangehörigkeit^120^0^0^100^120^1^sql^30^0^1^<<SQL>> select '!=0','Alle ohne Deutschland' from xdummy union select '=' || astat, trim(druck) || ' (' || trim(apnr) || ')' from sva_k_staat order by 2;^^^
21213^Geschlecht^100^300^-1^100^70^1^integer^4^0^1^<<SQL>> select tid, beschreibung from konstanten where tid in (1,2);^^^
21214^Geldgeber^115^300^-1^100^120^3^char^20^0^12^<<SQL>>select tid,type,name from sichten where art ='Geldgeber-Sicht (SVA)' and aktiv=1 order by sortnr,type,name;^^^
21220^oder Stichtag^2^0^0^100^150^1^integer^20^0^1^<<SQL>> SELECT tid,date_str(stichtag),stichtag from sva_stichtag where bereich='p' order by 3 desc;^^^
21221^Beschv.-Nr.^102^0^0^100^70^1^char^100^0^999^^^^
21222^Pers.-Nr.^101^0^0^100^70^1^char^100^0^999^^^^
21223^Ansicht in Ergebniszeilen^121^0^0^100^200^1^char^200^1^1^<<SQL>> select name,caption from xcube_dimconfig where maskeninfo_id=${Maskennummer} and is_rowdim=1 order by 2^^<<SQL>> select name,caption from xcube_dimconfig where maskeninfo_id=${Maskennummer} and is_rowdefault=1^
21224^Ansicht in Ergebnisspalten^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select name,caption from xcube_dimconfig where maskeninfo_id=${Maskennummer} and is_coldim=1 order by 2^^<<SQL>> select name,caption from xcube_dimconfig where maskeninfo_id=${Maskennummer} and is_coldefault=1^
21225^Leere Zeilen ausblenden^130^350^-1^140^80^1^char^30^0^1^<<SQL>> select 'ja','ja' from xdummy union select 'nein','nein' from xdummy^ ^<<SQL>> select 'ja','ja' from xdummy^
21226^Zeilenfilter bis Ebene^140^0^0^140^80^1^integer^30^0^0^ ^^^
21227^Leere Spalten ausblenden^2020^0^0^100^100^1^char^30^0^1^<<SQL>> select 'ja','ja' from xdummy union select 'nein','nein' from xdummy^^<<SQL>> select 'ja','ja' from xdummy^
21228^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<<SQL>> select '_graph','Balken (horiz. linksb.)' from xdummy\
union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\
union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy^^^
21229^Kennzahl^3000^350^-1^150^180^1^integer^200^1^1^<<SQL>> select tid,name from xcube_kennzahl where maskeninfo_id=${Maskennummer} order by sortnr,name;^hidden^<<SQL>> select tid,name from xcube_kennzahl where maskeninfo_id=${Maskennummer} and is_default=1^
21230^Alter^39^0^0^140^80^1^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('XCUBE-Alter-Sicht') order by 3,2;^^^

1
src-modules/module/xcube/masken/21200_maske_system_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
21200^6^

31
src-modules/module/xcube/masken/21200_masken_felder_bez.unl

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
21200^21200^
21200^21201^
21200^21202^
21200^21203^
21200^21204^
21200^21205^
21200^21206^
21200^21207^
21200^21208^
21200^21209^
21200^21210^
21200^21211^
21200^21212^
21200^21213^
21200^21214^
21200^21215^
21200^21216^
21200^21217^
21200^21218^
21200^21219^
21200^21220^
21200^21221^
21200^21222^
21200^21223^
21200^21224^
21200^21225^
21200^21226^
21200^21227^
21200^21228^
21200^21229^
21200^21230^

430
src-modules/module/xcube/masken/21200_maskeninfo.unl

@ -0,0 +1,430 @@ @@ -0,0 +1,430 @@
21200^Personal Xcube^--freemarker template\
-- Maskenfelder -Leere Zeilen ausblenden, leere SPalten ausblenden?\
<sqlvars>\
<sqlvar name="table_name">select table_name from xcube where maskeninfo_id=${Maskennummer}</sqlvar>\
<sqlvar name="aggrfunction">select aggrfunction from xcube_kennzahl where maskeninfo_id=${Maskennummer} and tid=<<Kennzahl>></sqlvar>\
<sqlvar name="aggrfunction_restriction">select nvl(restriction,''::char(1)) from xcube_kennzahl \
where maskeninfo_id=${Maskennummer} and tid=<<Kennzahl>>\
</sqlvar>\
<sqlvar name="datatype">select nvl(datatype,'decimal(17,2)'::varchar(30)) from xcube_kennzahl \
where maskeninfo_id=${Maskennummer} and tid=<<Kennzahl>></sqlvar>\
--benoetigt falls Kennzahlen in Zeilen oder Spalten\
<sqlvar name="kennzahlen" type="hashsequence">select apnr,aggrfunction,\
nvl(restriction,''::char(1)) as restriction \
from xcube_kennzahl where maskeninfo_id=${Maskennummer}</sqlvar>\
<sqlvar name="restriction" type="string"><![CDATA[<sximport>select restriction from xcube where maskeninfo_id=<<Maskennummer>></sximport>]]></sqlvar>\
<sqlvar name="coldef" type="hash"><![CDATA[select name,\
caption,\
foreignkey_tab,\
foreignkey_col,\
foreignkey_cap,\
nvl(foreignkey_cond,''::varchar(1))\
as foreignkey_cond,\
--nvl(C.specific_restriction,''::varchar(1)) as specific_restriction,\
sortfield,\
is_sicht,\
calc_gesamt,\
is_virtual,\
vcsql,\
nvl(attrib_nachbearbeitung,''::char(1)) as attrib_nachbearbeitung\
from xcube_dimconfig where \
maskeninfo_id=${Maskennummer} \
and name=<<Ansicht in Ergebnisspalten>>]]>\
</sqlvar>\
<sqlvar name="nichtsicht_ergspalten" type='hashsequence'><![CDATA[\
<#if coldef.is_sicht=0>\
select distinct ${coldef.foreignkey_col}::varchar(255) as apnr,\
${coldef.foreignkey_cap} as name,\
1::smallint as detailgesamtsort,\
${coldef.sortfield} as tmp_sortfield\
from ${coldef.foreignkey_tab} where \
1=1 \
<#if coldef.foreignkey_cond!=''> and ${coldef.foreignkey_cond} </#if>\
--{coldef.specific_restriction} \
--ausblenden von Spalten, die gar nicht in konkretem Teilergebnis vorkommen, geht derzeit nicht für virtuelle Spalten und nachbearbeitung, -> Kernmodul\
<#if coldef.is_virtual?number=0&&coldef.attrib_nachbearbeitung=''&&"<<Leere Spalten ausblenden>>"="'ja'">\
and ${coldef.foreignkey_col}::varchar(255) in (select distinct ${coldef.name}::varchar(255) from ${table_name} where \
${restriction} \
)\
</#if>\
<#if coldef.calc_gesamt?number=1> \
union\
select 'gesamt','Gesamt',\
2::smallint as detailgesamtsort,\
null as tmp_sortfield from xdummy\
</#if>\
order by detailgesamtsort,\
tmp_sortfield,\
name;\
<#else>\
select 'Sichtspalten aktiv' from xdummy;\
</#if>\
]]>\
</sqlvar>\
\
\
\
<sqlvar name="rowdef" type="hash"><![CDATA[select name,caption,is_sicht,calc_gesamt,foreignkey_tab,foreignkey_col,foreignkey_cap,\
nvl(foreignkey_cond,''::varchar(1)) as foreignkey_cond,\
--nvl(C.specific_restriction,''::varchar(1)) as specific_restriction,\
sortfield,is_virtual,vcsql,nvl(attrib_nachbearbeitung,''::char(1)) as attrib_nachbearbeitung\
from xcube_dimconfig C where maskeninfo_id=${Maskennummer} and name=<<Ansicht in Ergebniszeilen>>]]>\
</sqlvar>\
--nur bei wenn Ergzeilen_def nicht vom Typ Sicht relevant\
<sqlvar name="nichtsicht_ergzeilen" type='hashsequence'><![CDATA[\
<#if rowdef.is_sicht=0>\
select 1::smallint as level, \
${rowdef.foreignkey_col}::varchar(255) as key,--hier wird zur Vereinheitlichung mit Sichten Bezeichung "key" für eigentlichen Schluessel benoetigt\
${rowdef.foreignkey_cap} as name,\
${rowdef.sortfield} as tmp_sortfield \
from ${rowdef.foreignkey_tab}\
where 1=1\
<#if rowdef.foreignkey_cond!=''> and ${rowdef.foreignkey_cond} </#if>\
--{rowdef.specific_restriction} \
<#if rowdef.calc_gesamt?number=1>\
union\
select 2,'gesamt','Gesamt',null as ${rowdef.sortfield} from xdummy\
</#if>\
order by level,tmp_sortfield; \
<#else>\
select 'nicht relevant' from xdummy;</#if>\
]]>\
</sqlvar>\
\
<sqlvar name="zweiteRowDef" type="hash"><![CDATA[\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">\
select name,caption,\
is_sicht,\
calc_gesamt,\
foreignkey_tab,\
foreignkey_col,\
foreignkey_cap,\
nvl(foreignkey_cond,''::varchar(1)) as foreignkey_cond,\
--nvl(C.specific_restriction,''::varchar(1)) as specific_restriction,\
C.sortfield\
from xcube_dimconfig where maskeninfo_id=${Maskennummer} and name=<<2.Ansicht in Zeilen>>\
<#else>\
select 'keine zweite RowDef' from xdummy;\
</#if>\
]]>\
</sqlvar>\
--nur bei wenn Ergzeilen_def nicht vom Typ Sicht relevant\
<sqlvar name="zweiteRow_nichtsicht_ergzeilen" type='hashsequence'><![CDATA[\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>"&&zweiteRowDef.is_sicht=0>\
select 1::smallint as level, \
${zweiteRowDef.foreignkey_col}::varchar(255) as key,--hier wird zur Vereinheitlichung mit Sichten Bezeichung "key" für eigentlichen Schluessel benoetigt\
${zweiteRowDef.foreignkey_cap} as name,\
${zweiteRowDef.sortfield} as tmp_sortfield \
from ${zweiteRowDef.foreignkey_tab}\
where 1=1\
<#if zweiteRowDef.foreignkey_cond!=''> and ${zweiteRowDef.foreignkey_cond} </#if>\
--{zweiteRowDef.specific_restriction} \
<#if zweiteRowDef.calc_gesamt?number=1>\
union\
select 2,'gesamt','Gesamt',null as ${zweiteRowDef.sortfield} from xdummy\
</#if>\
order by level,tmp_sortfield; \
<#else>\
select 'nicht relevant' from xdummy;</#if>\
]]>\
</sqlvar>\
\
\
</sqlvars>\
\
<#function kennzahlInRowOrCol>\
--TODO auch 2. Dimension in Zeilen/Spalten\
<#if coldef.name="xckennzahl"||rowdef.name="xckennzahl"> <#return 1><#else> return <#return 0> </#if>\
</#function>\
\
<#function hasVirtualColumns>\
--TODO auch 2. Dimension in Zeilen/Spalten\
<#if coldef.is_virtual?number=1||rowdef.is_virtual?number=1> <#return 1><#else> return <#return 0> </#if>\
</#function>\
<#assign graph_col= "col" />\
/* <#assign graph_col=<<Spaltenvisualisierung>> /> */\
\
create temp table tmp_cellmax (maxvalue ${datatype} );\
insert into tmp_cellmax values(0);\
\
\
<#if hasVirtualColumns()=1||kennzahlInRowOrCol()=1>\
select * into temp tmp_rohdaten from \
${table_name}\
where \
${restriction};\
<#if coldef.is_virtual?number=1> alter table tmp_rohdaten add column ${coldef.name} varchar(255); ${coldef.vcsql}; </#if>\
<#if rowdef.is_virtual?number=1> alter table tmp_rohdaten add column ${rowdef.name} varchar(255); ${rowdef.vcsql}; </#if>\
--create index ix_tmp_r1 on tmp_rohdaten(${coldef.name},${rowdef.name}); --Todo nicht xckennzahl ggfs. für 2. Dimension in Spalten\
</#if>\
\
\
<#if kennzahlInRowOrCol()=0>\
create temp table tmp_cache (\
colattrib varchar(255), <@addcomment comment=coldef.caption/>\
rowattrib varchar(255), <@addcomment comment=rowdef.caption/>\
row2attrib varchar(255),\
value decimal(17,5));\
insert into tmp_cache (colattrib,rowattrib,<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">row2attrib, </#if> value)\
select ${coldef.name}::varchar(255), \
${rowdef.name}::varchar(255),\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">${zweiteRowDef.name}::varchar(255),</#if>\
${aggrfunction}\
\
<#if hasVirtualColumns()=0> \
from ${table_name} where \
${restriction}\
<#if (aggrfunction_restriction?length>0)> and ${aggrfunction_restriction} </#if>\
<#else>\
from tmp_rohdaten\
</#if>\
\
group by 1,2 <#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">,${zweiteRowDef.name}</#if> ;\
create index ix_tmp_roh1 on tmp_cache (colattrib,rowattrib,row2attrib);\
</#if>\
\
--moegliche attrib_nachbearbeitung\
<#if kennzahlInRowOrCol()=0> \
<#assign tmp_table="tmp_cache"/> <#assign rowfield="rowattrib"/> <#assign colfield="colattrib"/> \
<#else>\
<#assign tmp_table="tmp_rohdaten"/> <#assign rowfield=rowdef.name/> <#assign colfield=coldef.name/> \
</#if>\
\
<#if (rowdef.attrib_nachbearbeitung?length>1)>\
${rowdef.attrib_nachbearbeitung?replace("<<tmp_table>>",tmp_table)?replace("<<col>>",rowfield)};\
-- z.B. update tmp_cache R set rowattrib='s_'||rowattrib;\
</#if>\
<#if (coldef.attrib_nachbearbeitung?length>1)>\
${coldef.attrib_nachbearbeitung?replace("<<tmp_table>>",tmp_table)?replace("<<col>>",colfield)};\
-- z.B. update tmp_cache R set rowattrib='s_'||rowattrib;\
</#if>\
\
\
\
\
<#if coldef.is_sicht&gt;0>\
<#assign ergspalten=.vars[coldef.caption].elements/>\
<#else>\
<#assign ergspalten=nichtsicht_ergspalten/>\
</#if>\
create temp table tmp_erg (\
ebene integer,\
col1 varchar(255),\
name varchar(255),\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">col2 varchar(255),</#if>\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
c${i} decimal(17,5) default 0, <@addcomment comment=spalte.name/>\
\
</#foreach>\
sortnr integer\
) <@informixnolog/>;\
\
create index ix_tmp_erg on tmp_erg (sortnr);\
\
<#if rowdef.is_sicht&gt;0> \
<#assign zeilendef=.vars[rowdef.caption].elements/> --ermittelt des SichtObjekts anhand des Feldnames (aus felderinfo)\
<#else>\
<#assign zeilendef=nichtsicht_ergzeilen/>\
</#if>\
<#assign sortnr=0/>\
<#foreach zeile in zeilendef>\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">\
<#foreach zeile2 in zweiteRow_nichtsicht_ergzeilen>\
<#assign sortnr=sortnr+1/>\
insert into tmp_erg (ebene,col1,name,col2,sortnr)\
values (${zeile.level},'${zeile.key}','${zeile.name}','${zeile2.name}',${sortnr});\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
<@updateval i=i col=spalte row=zeile row2=zeile2 sortnr=sortnr/>\
</#foreach>\
</#foreach>\
<#else>\
/* <#if zeile.level &lt;= <<Zeilenfilter bis Ebene>> > */\
<#assign sortnr=sortnr+1/>\
insert into tmp_erg (ebene,col1,name,sortnr)\
values (${zeile.level},'${zeile.key}','${zeile.name}',${sortnr});\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
<@updateval i=i col=spalte row=zeile row2='' sortnr=sortnr/>\
</#foreach>\
/* </#if> --<<Zeilenfilter bis Ebene>> */\
</#if> \
</#foreach>\
\
<#macro updateval i col row row2 sortnr>\
update tmp_erg T set c${i}=\
<#if kennzahlInRowOrCol()=0>\
(select nvl(sum(value),0) from tmp_cache R where 1=1 \
<@colrestriction col=col/>\
<@rowrestriction row=row row2=row2/>\
) \
<#else> -- Kennzahl ist in Zeile oder Spalte\
(select <@kennzahlSelect row=row col=col/>\
from tmp_rohdaten R where 1=1 \
<#if rowdef.name="xckennzahl"> <@kennzahlrestrict row=row col=col/> <#else> <@rowrestriction row=row row2=row2 rowattribname=rowdef.name/></#if>\
<#if coldef.name="xckennzahl"> <@kennzahlrestrict row=row col=col/> <#else> <@colrestriction col=col colattribname=coldef.name/></#if>\
\
)\
</#if>\
where T.sortnr='${sortnr}'\
;\
</#macro>\
\
<#macro kennzahlrestrict row col>\
<#if coldef.name="xckennzahl">\
<#foreach k in kennzahlen>\
<#if (col.apnr=k.apnr&&k.restriction?length>0)> and ${k.restriction} </#if>\
</#foreach>\
</#if>\
<#if rowdef.name="xckennzahl">\
<#foreach k in kennzahlen>\
<#if (row.key=k.apnr&&k.restriction?length>0)> and ${k.restriction} </#if>\
</#foreach>\
</#if>\
</#macro>\
\
<#macro kennzahlSelect row col>\
<#if coldef.name="xckennzahl">\
<#foreach k in kennzahlen>\
<#if col.apnr=k.apnr> ${k.aggrfunction} </#if>\
</#foreach>\
</#if>\
<#if rowdef.name="xckennzahl">\
<#foreach k in kennzahlen>\
<#if row.key=k.apnr> ${k.aggrfunction} </#if>\
</#foreach>\
</#if>\
\
\
</#macro>\
\
\
\
<#macro colrestriction col colattribname='R.colattrib'>\
<#if coldef.is_sicht==1>\
and ${colattribname}::varchar(255) in ${col.subkeys}\
<#elseif coldef.is_sicht=2>\
and (${col.strukturStr?replace('$1',' '+colattribname+"::varchar(255)")}) \
<#else>\
<#if col.apnr!='gesamt'>\
and ${colattribname}::varchar(255)='${col.apnr}' \
</#if>\
</#if>\
</#macro>\
\
<#macro rowrestriction row row2 rowattribname='R.rowattrib' >\
<#if rowdef.is_sicht==1>\
and ${rowattribname}::varchar(255) in ${row.subkeys}\
<#elseif rowdef.is_sicht==2>\
and ( ${row.strukturStr?replace('$1',' '+rowattribname+"::varchar(255)")} ) \
<#else>\
<#if row.key!='gesamt'> and ${rowattribname}::varchar(255)='${row.key}' </#if>\
</#if>\
<#if row2?is_hash> and R.row2attrib='${row2.key}' </#if> \
</#macro>\
\
drop table if exists tmp_cache;\
\
drop table if exists tmp_rohdaten;\
\
-- Kennzahl in Spalten/Zeilen ggfs. null\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
update tmp_erg set c${i}=0 where c${i} is null; \
</#foreach>\
<#assign lastcol=i />\
\
--Wenn Grafikfunktion eingeschaltet ist, wird Maximalwert ermittelt:\
<#if i != 0 && graph_col != "col" >\
\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
<#if i == lastcol>\
update tmp_cellmax set maxvalue = (select max(c${i}) from tmp_erg) \
where tmp_cellmax.maxvalue < (select max(c${i}) from tmp_erg) ;\
</#if> \
</#foreach>\
\
</#if>\
\
<#if "<<Leere Zeilen ausblenden>>"="'ja'">\
delete from tmp_erg where 1=1\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
and c${i}=0\
</#foreach>;\
</#if>\
<#if "<<Ansicht in Ergebniszeilen>>"="'institution'">\
update tmp_erg set name=replace(name,col1||' - ','');\
update tmp_erg set col1=(select max(uniquename) from organigramm where col1=trim(key_apnr))\
where substring(col1 from 1 for 1)='_';\
--vorher war ggfs _3 zu O005030, auch O005030 in Namen ersetzen\
update tmp_erg set name=replace(name,col1||' - ','');\
</#if> \
\
\
\
\
select \
<#if rowdef.is_sicht&gt;0>ebene,</#if>\
name\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">,col2</#if>\
<#assign i=0/>\
<#assign i=0/>\
<#foreach spalte in ergspalten>\
<#assign i=i+1/>\
<#if i != lastcol && graph_col != "col" >\
<#if graph_col == "_graphbaralternating">\
--bei symmetr. Balken jeder 2. Balken rechtsbündig\
<#if i % 2 == 0>\
, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graph${i}\
<#else>\
, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graphbarright${i}\
</#if>\
<#else>\
, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as ${graph_col}${i}\
</#if>\
\
<#else>\
, c${i}::${datatype} as col${i}\
</#if>\
\
</#foreach>\
from tmp_erg, tmp_cellmax order by sortnr;^--freemarker Template\
XIL List\
sizable_columns horizontal_scrolling\
drop_and_delete movable_columns\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#if rowdef.is_sicht&gt;0>\
Column CID=0 heading_text="Ebene" center_heading\
row_selectable heading_platform readonly explanation="Hierarchieebene"\
width=5 text_size=8\
</#if>\
Column CID=20 heading_text="${.vars["Ansicht in ErgebniszeilenObject"].selectedItems[0].name}" center_heading\
row_selectable heading_platform readonly explanation="Schlüssel: ${.vars["Ansicht in ErgebniszeilenObject"].selectedItems[0].name}Nr"\
width=30 text_size=30\
<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">\
Column CID=20 heading_text="${.vars["2.Ansicht in ZeilenObject"].selectedItems[0].name}" center_heading\
row_selectable heading_platform readonly\
width=20 text_size=10 explanation="${.vars["2.Ansicht in ZeilenObject"].selectedItems[0].name}"\
</#if>\
<#if coldef.is_sicht&gt;0>\
<#assign ergspalten=.vars[coldef.caption].elements/>\
<#else>\
<#assign ergspalten=nichtsicht_ergspalten/>\
</#if>\
<#foreach spalte in ergspalten>\
Column CID=1 heading_text="${spalte.name}" center_heading\
row_selectable heading_platform readonly explanation="Ausprägung ${spalte.name}"\
width=12\
</#foreach>\
@@@^Altersgruppe^Anzahl^Kreuztabellen zu Personalzahlen^drop table tmp_erg;\
drop table tmp_cellmax;^ ^3^700^360^0^1^ ^

1
src-modules/module/xcube/masken/21200_sachgeb_maske_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
10^21200^

14
src-modules/module/xcube/schluesseltabellen/sichten_fuellen.sql

@ -23,7 +23,19 @@ select setval('sichten_tid_seq',(select max(tid) from sichten)); @@ -23,7 +23,19 @@ select setval('sichten_tid_seq',(select max(tid) from sichten));
{"name_intern":"xcube_dim_note",
"name":"Note (gruppiert)",
"quelle":"<<SQL>> select name,apnr,parent,strukturstr from xcube_dims where id=''note'' order by 2",
"art":"XCUBE-Note-Sicht"}
"art":"XCUBE-Note-Sicht"},
{"name_intern":"xcube_dim_alter1",
"name":"Alter (starke Aufteilung)",
"quelle":"<<SQL>> select name,apnr,parent,strukturstr from xcube_dims where id=''alter1'' order by 2",
"art":"XCUBE-Alter-Sicht"},
{"name_intern":"xcube_dim_alter2",
"name":"Alter (spez. für Studierende/Prüf.)",
"quelle":"<<SQL>> select name,apnr,parent,strukturstr from xcube_dims where id=''alter2'' order by 2",
"art":"XCUBE-Alter-Sicht"},
{"name_intern":"xcube_dim_alter3",
"name":"Alter (einzeln)",
"quelle":"<<SQL>> select name,apnr,parent,strukturstr from xcube_dims where id=''alter3'' order by 2",
"art":"XCUBE-Alter-Sicht"}
] />

76
src-modules/module/xcube/schluesseltabellen/xcube_dims_install.sql

@ -86,6 +86,82 @@ values @@ -86,6 +86,82 @@ values
('alter', 'a99', 'gesamt','>=60 Jahre','$1::numeric(14,2)>=60.00',100);
</#if>
delete from xcube_dims where id='alter1';
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
values
('alter1','gesamt',null,'alle','1=1',1),
('alter1', 'b2', 'gesamt','16-17 Jahre','$1::numeric(14,2)>=16.00 and $1::numeric(14,2)<18.00',20),
('alter1', 'b3', 'gesamt','18-20 Jahre','$1::numeric(14,2)>=18.00 and $1::numeric(14,2)<21.00',30),
('alter1', 'b4', 'gesamt','21-24 Jahre','$1::numeric(14,2)>=21.00 and $1::numeric(14,2)<25.00',40),
('alter1', 'b5', 'gesamt','25-29 Jahre','$1::numeric(14,2)>=25.00 and $1::numeric(14,2)<30.00',50),
('alter1', 'b6', 'gesamt','30-39 Jahre','$1::numeric(14,2)>=30.00 and $1::numeric(14,2)<40.00',60),
('alter1', 'b7', 'gesamt','40-49 Jahre','$1::numeric(14,2)>=40.00 and $1::numeric(14,2)<50.00',70),
('alter1', 'b8', 'gesamt','50-54 Jahre','$1::numeric(14,2)>=50.00 and $1::numeric(14,2)<55.00',80),
('alter1', 'b9', 'gesamt','55-60 Jahre','$1::numeric(14,2)>=55.00 and $1::numeric(14,2)<61.00',90),
('alter1', 'b90', 'gesamt','61 Jahre','$1::numeric(14,2)>=61.00 and $1::numeric(14,2)<62.00',91),
('alter1', 'b91', 'gesamt','62 Jahre','$1::numeric(14,2)>=62.00 and $1::numeric(14,2)<63.00',92),
('alter1', 'b92', 'gesamt','63 Jahre','$1::numeric(14,2)>=63.00 and $1::numeric(14,2)<64.00',93),
('alter1', 'b93', 'gesamt','64 Jahre','$1::numeric(14,2)>=64.00 and $1::numeric(14,2)<65.00',94),
('alter1', 'b94', 'gesamt','65 Jahre','$1::numeric(14,2)>=65.00 and $1::numeric(14,2)<66.00',95),
('alter1', 'b95', 'gesamt','66 Jahre','$1::numeric(14,2)>=66.00 and $1::numeric(14,2)<67.00',96),
('alter1', 'b96', 'gesamt','67 Jahre','$1::numeric(14,2)>=67.00 and $1::numeric(14,2)<68.00',97),
('alter1', 'b99', 'gesamt','>=68 Jahre','$1::numeric(14,2)>=68.00',100);
<#list 16..17 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b2', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 18..20 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b3', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 21..24 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b4', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 25..29 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b5', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 30..39 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b6', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 40..49 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b7', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 50..54 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b8', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
<#list 55..60 as i>
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
select 'alter1', ${i}::char(10), 'b9', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i} from xdummy;
</#list>
delete from xcube_dims where id='alter2';
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
values
('alter2','gesamt',null,'alle','1=1',1),
('alter2', 'b2', 'gesamt','16-18 Jahre','$1::numeric(14,2)>=16.00 and $1::numeric(14,2)<19.00',20),
('alter2', 'b3', 'gesamt','19-20 Jahre','$1::numeric(14,2)>=19.00 and $1::numeric(14,2)<21.00',30),
('alter2', 'b4', 'gesamt','21-25 Jahre','$1::numeric(14,2)>=21.00 and $1::numeric(14,2)<26.00',40),
('alter2', 'b5', 'gesamt','26-30 Jahre','$1::numeric(14,2)>=26.00 and $1::numeric(14,2)<31.00',50),
('alter2', 'b6', 'gesamt','31-40 Jahre','$1::numeric(14,2)>=31.00 and $1::numeric(14,2)<41.00',60),
('alter2', 'b7', 'gesamt','41-50 Jahre','$1::numeric(14,2)>=41.00 and $1::numeric(14,2)<51.00',70),
('alter2', 'b99', 'gesamt','> 50 Jahre','$1::numeric(14,2)>=51.00',100);
delete from xcube_dims where id='alter3';
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1)
values
('alter3','gesamt',null,'alle','1=1',1);
INSERT INTO xcube_dims (id,apnr,parent, name,strukturstr,sort1) values
<#list 16..67 as i>
('alter3', ${i}::char(10), 'gesamt', ${i}::char(2) || ' Jahre' , '$1::numeric(14,2)>=${i}::numeric(14,2) and $1::numeric(14,2)<${i+1}::numeric(14,2)', ${i}),
</#list>
('alter3', '68', 'gesamt','68 Jahre','$1::numeric(14,2)>=68.00',100);
<#if TableFieldExists('sos_stg_aggr','ch27_grund_beurl')>
delete from xcube_dims where id='ch27_grund_beurl';
INSERT INTO xcube_dims (id,apnr,name,sort1)

94
src-modules/module/xcube/schluesseltabellen/xcube_install.sql

@ -13,6 +13,12 @@ @@ -13,6 +13,12 @@
"table_name":"sos_lab_aggr",
"maskeninfo_id":21100
} ,
{"name":"Personalwürfel",
"uniquename":"xcube_sva_pbv_aggr_stich",
"sachgebiet":10,
"table_name":"sva_pbv_aggr_stich",
"maskeninfo_id":21200
} ,
{"name":"Primärbuchungswürfel",
"uniquename":"xcube_cob_busa_aggr",
"sachgebiet":27,
@ -37,10 +43,17 @@ @@ -37,10 +43,17 @@
"restriction":"",
"datatype":"integer",
"is_default":1,
"sortnr":1},
{ "maskeninfo_id":21200,
"apnr":"personal",
"name":"Personal",
"aggrfunction":"sum(vzae)",
"restriction":"",
"is_default":1,
"sortnr":1},
{ "maskeninfo_id":21500,
"apnr":"kosten",
"name":"Kosten",
"name":"Kosten/Erlöse",
"aggrfunction":"sum(betrag*kokl_faktor)",
"restriction":"",
"is_default":1,
@ -188,14 +201,11 @@ @@ -188,14 +201,11 @@
"sortfield":"druck"},
{"maskeninfo_id":21000,
"name":"stg",
"caption":"Fach",
"caption":"Fächer",
"is_sicht":1,
"is_virtual":1,
"is_coldim":0,
"vcsql":"update tmp_rohdaten set stg=(select stg from dim_studiengang where tid=tid_stg)",
"foreignkey_tab":"k_stg",
"foreignkey_col":"stg",
"foreignkey_cap":"ltxt",
"sortfield":"ltxt"},
"is_coldim":0},
{"maskeninfo_id":21000,
"name":"kz_rueck_beur_ein",
"caption":"Status",
@ -206,7 +216,7 @@ @@ -206,7 +216,7 @@
"sortfield":"druck"},
<#--Entwicklung Prüfungswürfel-->
<#--Prüfungswürfel-->
{"maskeninfo_id":21100,
"name":"geschlecht",
"caption":"Geschlecht",
@ -268,14 +278,11 @@ @@ -268,14 +278,11 @@
"is_sicht":2},
{"maskeninfo_id":21100,
"name":"stg",
"caption":"Fach",
"caption":"Fächer",
"is_sicht":1,
"is_virtual":1,
"is_coldim":0,
"vcsql":"update tmp_rohdaten set stg=(select stg from dim_studiengang where tid=tid_stg)",
"foreignkey_tab":"k_stg",
"foreignkey_col":"stg",
"foreignkey_cap":"ltxt",
"sortfield":"ltxt"},
"is_coldim":0},
{"maskeninfo_id":21100,
"name":"fb",
"caption":"Fachbereich/Fakultät",
@ -325,6 +332,65 @@ @@ -325,6 +332,65 @@
"foreignkey_cap":"druck",
"sortfield":"druck"},
<#--Personalwürfel-->
{"maskeninfo_id":21200,
"name":"ca109_key_bvl",
"caption":"BVL-Gruppe",
"is_rowdefault":1,
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"geschlecht",
"caption":"Geschlecht",
"is_coldefault":1,
"foreignkey_tab":"konstanten",
"foreignkey_col":"tid::varchar(255)",
"foreignkey_cap":"beschreibung",
"foreignkey_cond":"tid in ('1','2')",
"sortfield":"beschreibung"},
{"maskeninfo_id":21200,
"name":"ch110_besch_st",
"caption":"Beschäftigungsstelle (Person)",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"kostenstelle",
"caption":"Kostenstelle (Person)",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"beurl_art",
"caption":"Beurlaubung",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"ca107_dienstart",
"caption":"Dienstart",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"ca108_amtsbez",
"caption":"Amtsbezeichnung",
"is_coldim":0,
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"vertart",
"caption":"Vertragsart",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"ch212_geldgeber",
"caption":"Geldgeber",
"is_sicht":1 },
{"maskeninfo_id":21200,
"name":"ca501_staat",
"caption":"Staatsangehörigkeit",
"foreignkey_tab":"sva_k_staat",
"foreignkey_col":"apnr::integer",
"foreignkey_cap":"druck",
"foreignkey_cond":"astat is not null",
"sortfield":"druck"},
{"maskeninfo_id":21200,
"name":"alter",
"caption":"Alter",
"is_sicht":2,
"is_virtual":1,
"vcsql":"update tmp_rohdaten set alter = trunc(((select stichtag from sva_stichtag where tid=tmp_rohdaten.stichtag) - geburtsdatum) / 365.25 , 0)"},
<#-- Primärbuchungswürfel -->
{"maskeninfo_id":21500,
"name":"jahr",

33
src-modules/module/xcube/schluesseltabellen/xcube_install_restrictions.sql

@ -37,9 +37,40 @@ update xcube set restriction='<<Köpfe oder Fälle ?>> @@ -37,9 +37,40 @@ update xcube set restriction='<<Köpfe oder Fälle ?>>
/* AND fach_sem_zahl <= <<bis Fachsemester>> */
' where maskeninfo_id=21100;
--Personalwürfel
update xcube set restriction='
<#assign datum_stichtag=''''>
<#if "<<oder Stichtag>>" ="">
<#assign datum_stichtag="(select stichtag from sva_stichtag where bereich=''p'' and beschreibung=''Tagesdatum'')"/>
<#else>
<#assign datum_stichtag="(select stichtag from sva_stichtag where tid = <<oder Stichtag>>)"/>
</#if>
<#if "<<oder Stichtag>>" =""> stichtag = (select tid from sva_stichtag where bereich=''p'' and beschreibung=''Tagesdatum'')
<#else> stichtag = <<oder Stichtag>>
</#if>
AND ch110_besch_st in <@printkeys .vars["Beschäftigungsstelle (Person)"].allNeededKeysList/> --<<Beschäftigungsstelle (Person)>>
/* and beurl_art in <@printkeys Beurlaubung.allNeededKeysList/> --<<Beurlaubung>> */
/* AND kostenstelle in <@printkeys .vars["Kostenstelle (Person)"].allNeededKeysList/> --<<Kostenstelle (Person)>> */
/* AND ca107_dienstart in <@printkeys Dienstart.allNeededKeysList/> --<<Dienstart>> */
/* AND ca109_key_bvl in <@printkeys .vars["BVL-Gruppe"].allNeededKeysList/> --<<BVL-Gruppe>> */
/* AND ca108_amtsbez in <@printkeys Amtsbezeichnung.allNeededKeysList/> --<<Amtsbezeichnung>> */
/* AND vertart in <@printkeys Vertragsart.allNeededKeysList/> --<<Vertragsart>> */
<#if "<<Alter (bis)>>"!=""> and ${Alter.selectedItems[0].strukturStr?replace("$1","alter")}</#if>
/* and ${datum_stichtag} between d_besch_von and d_besch_bis and d_befristung <= date_val(<<Befristet bis>>) */
/* and geschlecht = <<Geschlecht>> */
/* AND ch212_geldgeber in <@printkeys Geldgeber.allNeededKeysList/> --<<Geldgeber>> */
/* and ca501_staat <<Staatsangehörigkeit>> */
/* and <<Filter Personal>> */
<#if "<<Alter>>"!=""> and ${Alter.selectedItems[0].strukturStr?replace("$1","trunc((${datum_stichtag} - geburtsdatum) / 365.25 , 0)")}</#if>
' where maskeninfo_id=21200;
update xcube set restriction='
(bukz!=''PE'' or bukz is null)
/* and jahr=<<Haushaltsjahr>> */
/* and jahr >= <<Jahr von>> */
/* and jahr <= <<Jahr bis>> */
and fikrkey in <@printkeys Kostenarten.allNeededKeys />
and ch110_institut in <@printkeys Kostenstelle.allNeededKeys/>
/* AND <<Zeitraum>> */

Loading…
Cancel
Save