Daniel Quathamer
2 years ago
11 changed files with 367 additions and 0 deletions
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project name="ModuleCreation" default="all" basedir="."> |
||||
<!--Aufruf mit |
||||
|
||||
ant -DMODULE_PATH=$MEINMODUL_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=meinmodul all |
||||
|
||||
So erzeugen Sie dann ein SuperX-Paket: |
||||
ant -DMODULE_PATH=$MEINMODUL_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=meinmodul dist |
||||
|
||||
|
||||
--> |
||||
<dirname file="${ant.file}" property="moduleCreateBaseDir" /> |
||||
<property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." /> |
||||
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
||||
<path id="classpath"> |
||||
<!--WEB-INF/lib--> |
||||
<fileset dir="${WEBAPP}/WEB-INF"> |
||||
<include name="lib/**/*.jar" /> |
||||
<include name="classes" /> |
||||
</fileset> |
||||
</path> |
||||
<condition property="isWindoze"> |
||||
<os family="windows" /> |
||||
</condition> |
||||
|
||||
<condition property="isUnix"> |
||||
<os family="unix" /> |
||||
</condition> |
||||
<target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> |
||||
<antcall target="module_copy_source" /> |
||||
<antcall target="call_module_scripts_create_ant" /> |
||||
</target> |
||||
<target name="module_copy_source" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> |
||||
<echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" /> |
||||
<copy todir="${MODULE_PATH}" overwrite="true"> |
||||
<fileset dir="${BASE_DIR}/src-modules/module/${MODULE}" /> |
||||
</copy> |
||||
</target> |
||||
<target name="call_module_scripts_create_ant" description="Call to module_scripts_create_ant"> |
||||
<subant target="all"> |
||||
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> |
||||
<property name="MODULE" value="${MODULE}" /> |
||||
<property name="DATABASE" value="POSTGRES" /> |
||||
<property name="WEBAPP_EXT_MODULE" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
||||
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
||||
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" /> |
||||
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" /> |
||||
</subant> |
||||
</target> |
||||
<target name="dist" description="Create Download package"> |
||||
<subant target="erzeuge_paket"> |
||||
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />--> |
||||
<property name="MODULE" value="${MODULE}" /> |
||||
<property name="PFAD" value="/home/superx/fertige_module" /> |
||||
<property name="DATABASE" value="POSTGRES" /> |
||||
<property name="ENCODING" value="utf8" /> |
||||
<property name="PLATFORM" value="superx" /> |
||||
|
||||
<property name="WEBAPP_EXT_MODULE" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
||||
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" /> |
||||
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" /> |
||||
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" /> |
||||
</subant> |
||||
</target> |
||||
</project> |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash |
||||
#Synchronisierung webapp zum Zielpfad |
||||
|
||||
ant -DMODULE_PATH=$MEINMODUL_PFAD -DBASE_DIR=. -DMODULE=meinmodul all |
||||
|
||||
|
||||
|
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
**/*log* |
||||
**/*err* |
||||
**/*tmp* |
||||
**/*.alt |
||||
**/*.out |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
WEB-INF/conf/edustore/db/bin/SQL_ENV_xcube.sam |
@ -0,0 +1,79 @@
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd">--> |
||||
<module name="xcube" version="0.1" sachgebiet_id="1000" sachgebiet="xcube" systeminfo_id="1000" system="xcube" thema="Datenwürfel" thema_parent=""> |
||||
<database name="superx" version="2.1" system="superx"> |
||||
<table name="xcube_dims"> |
||||
<columns><column name="id" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="apnr" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="name" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="sort1" type ="INTEGER" size ="10" default ="" notnull ="false" /> |
||||
<column name="parent" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="strukturstr" type ="VARCHAR" size ="2147483647" default ="" notnull ="false" /> |
||||
</columns> |
||||
<indexes></indexes> |
||||
<primaryKeys><rs> |
||||
</rs></primaryKeys> |
||||
<foreignKeys></foreignKeys> |
||||
<importedKeys></importedKeys> |
||||
<privileges><rs> |
||||
</rs></privileges> |
||||
</table> |
||||
<table name="xcube_dimconfig"> |
||||
<columns><column name="maskeninfo_id" type ="INTEGER" size ="10" default ="" notnull ="true" /> |
||||
<column name="table_name" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="name" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="generic_dimension" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="is_sicht" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="is_rowdim" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="is_coldim" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="is_rowdefault" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="is_coldefault" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="is_secondcoldim" type ="SMALLINT" size ="5" default ="" notnull ="false" /> |
||||
<column name="specific_restriction" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="tid" type ="INTEGER" size ="10" default ="" notnull ="true" /> |
||||
<column name="specific_2ndcol_restriction" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
<column name="sortfield" type ="VARCHAR" size ="255" default ="" notnull ="false" /> |
||||
</columns> |
||||
<indexes></indexes> |
||||
<primaryKeys><rs> |
||||
</rs></primaryKeys> |
||||
<foreignKeys></foreignKeys> |
||||
<importedKeys></importedKeys> |
||||
<privileges><rs> |
||||
</rs></privileges> |
||||
</table> |
||||
|
||||
|
||||
<functions> |
||||
</functions> |
||||
<views> |
||||
|
||||
</views> |
||||
|
||||
<themen> |
||||
</themen> |
||||
<masken> |
||||
</masken> |
||||
</database> |
||||
<install> |
||||
<install-step> |
||||
<action error="cont"> |
||||
</action> |
||||
</install-step> |
||||
</install> |
||||
|
||||
<upgrade> |
||||
<upgrade-step> |
||||
<action error="cont"> |
||||
</action> |
||||
</upgrade-step> |
||||
</upgrade> |
||||
|
||||
<etl> |
||||
|
||||
<etl-step name="Aktualisieren der xcube-Tabellen" type="trans"> |
||||
<action error="stop"> |
||||
</action> |
||||
</etl-step> |
||||
</etl> |
||||
</module> |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
99990031^Ansicht in Ergebniszeilen^200^0^0^150^200^1^char^30^1^1^<<SQL>> select F.name,F.caption from sx_fields F,xcube_dimconfig C where F.table_name=C.table_name and F.name=C.name and C.table_name='kenn_vtbu_cube' and is_rowdim=1 order by 1^^<<SQL>> select F.name,F.caption from sx_fields F,xcube_dimconfig C where F.table_name=C.table_name and F.name=C.name and C.table_name='kenn_vtbu_cube' and is_rowdim=1 and is_rowdefault=1^ |
||||
99990032^Haushaltsjahr^7^0^0^100^50^1^integer^30^1^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='KENN-Jahr' order by 1;^^<<SQL>> select year(today()) -1 from xdummy;^ |
||||
99990033^Zeitraum^10^200^-1^100^100^1^sql^30^0^1^<<SQL>> select apnr,druck from kenn_quartale order by 1;^^^ |
||||
99990034^Ansicht in Ergebnisspalten^300^0^0^150^200^1^char^30^1^1^<<SQL>> select F.name,F.caption from sx_fields F,xcube_dimconfig C where F.table_name=C.table_name and F.name=C.name and C.table_name='kenn_vtbu_cube' and is_coldim=1 order by 1;^^<<SQL>> select F.name,F.caption from sx_fields F,xcube_dimconfig C where F.table_name=C.table_name and F.name=C.name and C.table_name='kenn_vtbu_cube' and is_coldim=1 and is_coldefault=1^ |
||||
99990035^Hochschule^0^0^0^100^200^1^char^30^1^12^<<SQL>> select tid, type, name , sortnr from sichten where art in ('KENN-Kostenstellen-Sicht', 'KENN-Hochschulen-Sicht') order by sortnr,name;^^^ |
||||
99990036^Lehreinheit anzeigen^90^200^-1^100^100^1^char^30^1^1^<<SQL>> select 'j','Ja' from xdummy union select 'n','Nein' from xdummy;^hidden^<<SQL>> select 'j','Ja' from xdummy^ |
||||
99990037^Kostenträger^1^0^0^100^200^1^char^30^0^12^<<SQL>> select tid,type,name from sichten where art='KENN-Kostenträger-Sicht' and name_intern like '%lehre%' and aktiv=1 order by type,name^^^ |
||||
99990038^Filter auf Ebene^80^0^0^100^20^1^integer^30^0^0^^hidden^^ |
||||
99990039^Primär/Sekundär^2^200^-1^100^200^1^char^30^0^1^<<SQL>> select key,name from joolap_blueprints where blueprint='bluep_kenn_pr_sek' order by 2^ ^ ^ |
||||
99990040^Kostenartenblock^100^0^0^100^200^1^char^30^0^1^<<SQL>>select art2,caption from sx_repository where aktiv=1 and art='KENN_KOA_BLOCK' and art2 not like '_ERL%' order by 2^hidden^^ |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
99990030^109^ |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
99990030^99990031^ |
||||
99990030^99990032^ |
||||
99990030^99990033^ |
||||
99990030^99990034^ |
||||
99990030^99990035^ |
||||
99990030^99990036^ |
||||
99990030^99990037^ |
||||
99990030^99990038^ |
||||
99990030^99990039^ |
||||
99990030^99990040^ |
@ -0,0 +1,188 @@
@@ -0,0 +1,188 @@
|
||||
99990030^xCube Sekundärkosten^-- Personal nach Finanzierung (der amtl. Statistik)\ |
||||
--freemarker template\ |
||||
<sqlvars>\ |
||||
<sqlvar name="tablename">select 'kenn_vtbu_cube' from xdummy</sqlvar>\ |
||||
<sqlvar name="coldef" type="hash"><![CDATA[select F.name,F.caption,F.foreignkey_tab,F.foreignkey_col,\ |
||||
F.foreignkey_cap,nvl(F.foreignkey_cond,''::varchar(1)) as foreignkey_cond,\ |
||||
nvl(C.specific_restriction,''::varchar(1)) as specific_restriction,\ |
||||
C.sortfield\ |
||||
from sx_fields F,xcube_dimconfig C where C.table_name=F.table_name and F.name=C.name \ |
||||
and C.maskeninfo_id=${Maskennummer} and F.table_name='${tablename}' \ |
||||
and F.name=<<Ansicht in Ergebnisspalten>>]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="ergspalten" type='hashsequence'><![CDATA[\ |
||||
select distinct ${coldef.foreignkey_col} as apnr,${coldef.foreignkey_cap} as name,\ |
||||
1::smallint as detailgesamtsort,${coldef.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\ |
||||
--and ${coldef.foreignkey_col} in (select distinct ${coldef.name} from ${tablename} where\ |
||||
--Hier allgemeine Einschränkungen\ |
||||
--jahr=<<Jahr>> \ |
||||
--)\ |
||||
union\ |
||||
select 'gesamt','Gesamt',2::smallint as detailgesamtsort,null as ${coldef.sortfield} from xdummy\ |
||||
order by detailgesamtsort,${coldef.sortfield},name; \ |
||||
]]>\ |
||||
</sqlvar>\ |
||||
\ |
||||
\ |
||||
\ |
||||
<sqlvar name="rowdef" type="hash"><![CDATA[select F.name,F.caption,C.is_sicht,foreignkey_tab,foreignkey_col,foreignkey_cap,\ |
||||
nvl(F.foreignkey_cond,''::varchar(1)) as foreignkey_cond,\ |
||||
nvl(C.specific_restriction,''::varchar(1)) as specific_restriction\ |
||||
from sx_fields F,xcube_dimconfig C where F.table_name=C.table_name and F.name=C.name \ |
||||
and F.table_name='${tablename}' and F.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 from ${rowdef.foreignkey_tab}\ |
||||
where 1=1\ |
||||
<#if rowdef.foreignkey_cond!=''> and ${rowdef.foreignkey_cond} </#if>\ |
||||
${rowdef.specific_restriction} \ |
||||
union\ |
||||
select 2,'gesamt','Gesamt' from xdummy\ |
||||
order by level,name; \ |
||||
<#else>\ |
||||
select 'nicht relevant' from xdummy;</#if>\ |
||||
]]>\ |
||||
</sqlvar>\ |
||||
</sqlvars>\ |
||||
\ |
||||
<#assign aggrfunction="sum(betrag)"/>\ |
||||
\ |
||||
\ |
||||
\ |
||||
create temp table tmp_rohdaten (\ |
||||
colattrib varchar(255), <@addcomment comment=coldef.caption/>\ |
||||
rowattrib varchar(255), <@addcomment comment=rowdef.caption/>\ |
||||
value decimal(17,5));\ |
||||
insert into tmp_rohdaten (colattrib,rowattrib,value)\ |
||||
select ${coldef.name}::varchar(255), \ |
||||
${rowdef.name}::varchar(255), ${aggrfunction}\ |
||||
from \ |
||||
kenn_vtbu_cube V\ |
||||
where \ |
||||
<<Haushaltsjahr>> = V.jahr \ |
||||
/* and V.projnr in <@printkeys Kostenträger.allNeededKeys/> --<<Kostenträger>> */\ |
||||
/* and V.prim_sek =<<Primär/Sekundär>> */\ |
||||
and V.hs_nr::char(10) in <@printkeys .vars["Hochschule"].allNeededKeys />\ |
||||
\ |
||||
group by 1,2;\ |
||||
create index ix_tmp_roh1 on tmp_rohdaten (colattrib,rowattrib);\ |
||||
\ |
||||
create temp table tmp_erg (\ |
||||
ebene integer,\ |
||||
col1 varchar(255),\ |
||||
name varchar(255),\ |
||||
<#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/>;\ |
||||
<#assign sortnr=0/>\ |
||||
\ |
||||
\ |
||||
<#if rowdef.is_sicht==1> \ |
||||
<#assign zeilendef=.vars[rowdef.caption].elements/> --ermittel des SichtObjekts anhand des Feldnames (aus felderinfo)\ |
||||
<#else>\ |
||||
<#assign zeilendef=nichtsicht_ergzeilen/>\ |
||||
</#if>\ |
||||
\ |
||||
<#foreach zeile in zeilendef>\ |
||||
<#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 art='gesamt'/>\ |
||||
\ |
||||
</#foreach>\ |
||||
</#foreach>\ |
||||
\ |
||||
<#macro updateval i col row art>\ |
||||
update tmp_erg T set c${i}=\ |
||||
(select nvl(sum(value),0) from tmp_rohdaten R where 1=1 \ |
||||
<#if col.apnr!='gesamt'>\ |
||||
and R.colattrib='${col.apnr}' \ |
||||
</#if>\ |
||||
\ |
||||
<#if rowdef.is_sicht==1>\ |
||||
and R.rowattrib in ${row.subkeys}\ |
||||
<#else>\ |
||||
<#if row.key!='gesamt'> and R.rowattrib='${row.key}' </#if>\ |
||||
</#if>\ |
||||
) where T.col1='${row.key}'\ |
||||
;\ |
||||
</#macro>\ |
||||
\ |
||||
drop table tmp_rohdaten;\ |
||||
\ |
||||
\ |
||||
\ |
||||
--Leerzeilen entfernen\ |
||||
delete from tmp_erg where\ |
||||
<#assign i=0/>\ |
||||
<#foreach spalte in ergspalten>\ |
||||
<#assign i=i+1/>\ |
||||
c${i}=0 <#if spalte_has_next> and </#if>\ |
||||
</#foreach>;\ |
||||
\ |
||||
<#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==1>ebene,col1,</#if>\ |
||||
name,\ |
||||
<#assign i=0/>\ |
||||
<#foreach spalte in ergspalten>\ |
||||
<#assign i=i+1/>\ |
||||
c${i}::integer <#if spalte_has_next>,</#if>\ |
||||
</#foreach>\ |
||||
\ |
||||
from tmp_erg 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\ |
||||
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==1>\ |
||||
Column CID=0 heading_text="Ebene" center_heading\ |
||||
row_selectable heading_platform readonly\ |
||||
width=10 text_size=8\ |
||||
Column CID=20 heading_text="${.vars["Ansicht in ErgebniszeilenObject"].selectedItems[0].name}Nr" center_heading\ |
||||
row_selectable heading_platform readonly\ |
||||
width=10 text_size=10\ |
||||
</#if>\ |
||||
Column CID=20 heading_text="${.vars["Ansicht in ErgebniszeilenObject"].selectedItems[0].name}" center_heading\ |
||||
row_selectable heading_platform readonly\ |
||||
width=10 text_size=10\ |
||||
<#foreach spalte in ergspalten>\ |
||||
Column CID=1 heading_text="${spalte.name}" center_heading\ |
||||
row_selectable heading_platform readonly\ |
||||
width=12\ |
||||
</#foreach>\ |
||||
\ |
||||
\ |
||||
@@@^^^Kostenwürfel nach Produktbereich^drop table tmp_erg;^^2^600^400^0^1^<<SQL>> select 'Letzte Lieferung: ' || date_str(max(datum)) from kenn_lieferung where (1 =0 /* or hs_nr::char(10) in (<<Hochschule>>) */ /* or hs_nr::char(10) in (select key_apnr from organigramm where parent in (<<Hochschule>>)) */ /* or <<Hochschule>>='0' */ ) and kennzahl ='KOTN'^ |
Loading…
Reference in new issue