Browse Source

Build costage, new fact table, data integrity added, mask 43000 joins on student status begun

COStage_0.2_Release
Daniel Quathamer 3 years ago
parent
commit
507e9ea1ab
  1. 41
      build.xml
  2. 269
      src-modules/module/costage/conf/costage.xml
  3. 8
      src-modules/module/costage/masken/43000_felderinfo.unl
  4. 416
      src-modules/module/costage/masken/43000_maskeninfo.unl
  5. 1
      src-modules/module/costage/schluesseltabellen/sx_repository.unl
  6. 56
      src-modules/module/costage/schluesseltabellen/sx_repository_fuellen.sql
  7. 28
      src-modules/module/costage/schluesseltabellen/sx_repository_fuellen.x
  8. 2
      src-modules/module/costage/schluesseltabellen/sx_repository_loeschen.sql

41
build.xml

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ModuleCreation" default="module_copy_source" basedir=".">
<!--Aufruf mit
ant -DMODULE_PATH=/home/superx/devel_module/referenz/db/module/costage -DBASE_DIR=. -DMODULE=costage call_module_scripts_create_ant
-->
<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="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>
</project>

269
src-modules/module/costage/conf/costage.xml

@ -258,7 +258,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> @@ -258,7 +258,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<table name="costage_st_studienstatus" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studienstatus_nr" type ="DECIMAL" size ="(38,0)" default ="" notnull ="true" />
<columns>
<column name="st_studienstatus_nr" type ="DECIMAL" size ="(38,0)" default ="" notnull ="true" />
<column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studienstatustyp" type ="VARCHAR" size ="240" default ="" notnull ="true" />
<column name="beginn_datum" type ="DATETIME" size ="7" default ="" notnull ="true" />
@ -328,7 +329,36 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> @@ -328,7 +329,36 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</rs></foreignKeys>
</table>
<table name="costage_st_studien_aggr" thema="Studierende" typ="Hilfstabelle" releaseUnload="empty">
<columns><column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Studium (Nr.)" />
<column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Studierendenstammdaten (Nr.)" />
<column name="matrikelnummer" type ="INTEGER" size ="8" default ="" notnull ="false" description="Matrikelnummer" />
<column name="geschlecht" type ="VARCHAR" size ="1" default ="" notnull ="false" description="Geschlecht" />
<column name="st_land1_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Staatsangehörigkeit (erste)" />
<column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (Nr.)" />
<column name="st_absz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Abschluss" />
<column name="fachkennzeichen" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Fachkennzeichen" />
<column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Art des Studiums" />
<column name="studiengangs_typ_kb" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Typ des Studiengangs" />
<column name="studientyp_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" description="Typ des Studiums" />
<column name="studienform_name" type ="VARCHAR" size ="100" default ="" notnull ="false" description="Studienform" />
<column name="studienform_statistik_code" type ="INTEGER" size ="2" default ="" notnull ="false" description="Studienform (amtl.)" />
<column name="st_studienstatus_nr" type ="DECIMAL" size ="(38,0)" default ="" notnull ="false" description="Studienstatus (Nr.)" />
<column name="studienstatustyp" type ="VARCHAR" size ="240" default ="" notnull ="false" description="Studienstatus" />
<column name="hoererstatus_name" type ="VARCHAR" size ="240" default ="" notnull ="false" description="Hörerstatus" />
<column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Semester" />
<column name="fachsemester" type ="DECIMAL" size ="(38,0)" default ="" notnull ="false" description="Fachsemester" />
<column name="primaerflag" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Primärfach" />
<column name="alter_jahre" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Alter in Jahren" />
<column name="summe" type ="INTEGER" size ="2" default ="" notnull ="false" description="Summe" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<views>
@ -353,7 +383,72 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema> @@ -353,7 +383,72 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema>
</masken>
<data-integrity>
<!--costage_st_studierendenstammdaten-->
<relation from="costage_st_laender" to="costage_st_studierendenstammdaten" delete="FALSE"
displayType="select" visibleFields="name" format="%s">
<relation-column from="st_land_nr" to="st_land1_nr" />
</relation>
<relation from="costage_st_laender" to="costage_st_studierendenstammdaten" delete="FALSE"
displayType="select" visibleFields="name" format="%s">
<relation-column from="st_land_nr" to="st_land2_nr" />
</relation>
<!--costage_st_studien-->
<relation from="costage_st_studierendenstammdaten" to="costage_st_studien" delete="FALSE"
displayType="select" visibleFields="matrikelnummer" format="%s">
<relation-column from="st_studstamm_nr" to="st_studstamm_nr" />
</relation>
<relation from="costage_st_studiengaenge" to="costage_st_studien" delete="FALSE"
displayType="select" visibleFields="studiengangs_identifikator" format="%s">
<relation-column from="st_studiengang_nr" to="st_studiengang_nr" />
</relation>
<!--costage_st_studiengaenge-->
<relation from="costage_st_abschlussziele_lokal" to="costage_st_studiengaenge" delete="FALSE"
displayType="select" visibleFields="name" format="%s">
<relation-column from="st_absz_nr" to="st_absz_nr" />
</relation>
<!--costage_st_fachsemester-->
<relation from="costage_st_studien" to="costage_st_fachsemester" delete="FALSE"
displayType="select" visibleFields="st_studium_nr" format="%s">
<relation-column from="st_studium_nr" to="st_studium_nr" />
</relation>
<relation from="costage_st_semester" to="costage_st_fachsemester" delete="FALSE"
displayType="select" visibleFields="semester_bezeichnung" format="%s">
<relation-column from="st_sem_nr" to="st_sem_nr" />
</relation>
<!--costage_st_studienstatus-->
<relation from="costage_st_studien" to="costage_st_studienstatus" delete="FALSE"
displayType="select" visibleFields="st_studium_nr" format="%s">
<relation-column from="st_studium_nr" to="st_studium_nr" />
</relation>
<relation from="costage_st_semester" to="costage_st_studienstatus" delete="FALSE"
displayType="select" visibleFields="semester_bezeichnung" format="%s">
<relation-column from="st_sem_nr" to="st_sem_nr" />
</relation>
<!--costage_st_studien_aggr-->
<relation from="costage_st_studien" to="costage_st_studien_aggr" delete="FALSE"
displayType="select" visibleFields="st_studium_nr" format="%s">
<relation-column from="st_studium_nr" to="st_studium_nr" />
</relation>
<relation from="costage_st_semester" to="costage_st_studien_aggr" delete="FALSE"
displayType="select" visibleFields="semester_bezeichnung" format="%s">
<relation-column from="st_sem_nr" to="st_sem_nr" />
</relation>
<relation from="costage_st_abschlussziele_lokal" to="costage_st_studien_aggr" delete="FALSE"
displayType="select" visibleFields="name" format="%s">
<relation-column from="st_absz_nr" to="st_absz_nr" />
</relation>
<relation from="costage_st_studiengaenge" to="costage_st_studien_aggr" delete="FALSE"
displayType="select" visibleFields="studiengangs_identifikator" format="%s">
<relation-column from="st_studiengang_nr" to="st_studiengang_nr" />
</relation>
<relation from="costage_st_laender" to="costage_st_studien_aggr" delete="FALSE"
displayType="select" visibleFields="name" format="%s">
<relation-column from="st_land_nr" to="st_land1_nr" />
</relation>
</data-integrity>
</database>
@ -389,6 +484,12 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema> @@ -389,6 +484,12 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema>
<etl-step name="Transformation" type="trans">
<action>
</action>
</etl-step>
<etl-step name="Aggregation" type="aggr">
<action>
<nativeaction sql="" scriptfile="$ETL_PFAD/hilfstabellen/costage_st_studien_aggr_fuellen.sql" database=""/>
</action>
</etl-step>
</etl>
@ -396,11 +497,43 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema> @@ -396,11 +497,43 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema>
<install>
<install-step name="Füllen der Modul-Tabellen">
<action error="stop">
<nativeaction sql="create table tmp_templates(tid integer,
id char(200) not null,
content text not null,
description char(200) ,
comment char(200) ,
version integer
)
;" database=""/>
<nativeaction sql="create table tmp_repository(
tid SERIAL not null,
id CHAR(200) not null,
content TEXT ,
caption CHAR(200) ,
comment TEXT ,
version SMALLINT ,
art CHAR(200) ,
art2 CHAR(200) ,
art3 CHAR(200) ,
sachgebiete_id INTEGER ,
sort1 INTEGER ,
sort2 INTEGER ,
sort3 INTEGER ,
geaendert_am DATE ,
aktiv smallint ,
gueltig_seit DATE ,
gueltig_bis DATE
);" scriptfile="" database=""/>
</action>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_templates"><file path="$COSTAGE_PFAD/schluesseltabellen/fm_templates.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_repository"><file path="$COSTAGE_PFAD/schluesseltabellen/sx_repository.unl"/></loadtable>
</action>
<action>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sx_repository_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/fm_templates_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<!--<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sx_jobs_fuellen.sql" database=""/>-->
</action>
</install-step>
</install>
@ -417,14 +550,33 @@ comment char(200) , @@ -417,14 +550,33 @@ comment char(200) ,
version integer
)
;" database=""/>
<nativeaction sql="create table tmp_repository(
tid SERIAL not null,
id CHAR(200) not null,
content TEXT ,
caption CHAR(200) ,
comment TEXT ,
version SMALLINT ,
art CHAR(200) ,
art2 CHAR(200) ,
art3 CHAR(200) ,
sachgebiete_id INTEGER ,
sort1 INTEGER ,
sort2 INTEGER ,
sort3 INTEGER ,
geaendert_am DATE ,
aktiv smallint ,
gueltig_seit DATE ,
gueltig_bis DATE
);" scriptfile="" database=""/>
</action>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_templates"><file path="$COSTAGE_PFAD/schluesseltabellen/fm_templates.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_repository"><file path="$COSTAGE_PFAD/schluesseltabellen/sx_repository.unl"/></loadtable>
</action>
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="co_step_type"><file path="$COSTAGE_PFAD/schluesseltabellen/co_step_type.unl"/></loadtable>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/co_step_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sx_repository_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/fm_templates_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
</action>
@ -444,106 +596,7 @@ version integer @@ -444,106 +596,7 @@ version integer
<dbforms>
<form name="co_job_edit"
table="co_job"
path="/edit/co/co_job_edit.jsp"
followUp=""
caption="Laderoutinen verwalten"
orderBy="caption"
gotoHt=""
helpfile=""
maxRows="1"
mode="update_insert_delete_copy">
<description>In diesem Formular können Sie Laderoutinen verwalten.</description>
<filters>
<filter mandatory="true" type="equals">tid</filter>
</filters>
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="custom_job" visibleSize="50" nullFieldValue="" />
<customfield name="systeminfo_id" visibleSize="50" nullFieldValue="" />
<customfield name="Parameter" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_job_param" parentField="tid" childField="co_job_id"
orderBy="sortnr" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="job_id" type="hidden" overrideValue="tid" />
<customfield name="name" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="param_default" nullFieldValue="" visibleSize="30" />
</customfield>
<customfield name="Ladeschritte" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_step_relation" parentField="tid" childField="job_id"
orderBy="sortnr" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="job_id" type="hidden" overrideValue="tid" />
<customfield name="step_id" nullFieldValue="" visibleSize="30" />
<customfield name="parent_step_id" nullFieldValue="" visibleSize="30" />
<customfield name="force_continue" nullFieldValue="" pattern="" visibleSize="10" />
<customfield name="step_active" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="sortnr" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="custom_step" nullFieldValue="" pattern="" visibleSize="20" />
<customfield type="link" name="Details" path="/superx/edit/co/co_step_edit.jsp" linkVar="tid" linkid="step_id"/>
</customfield>
</form>
<form name="co_step_edit"
table="co_step"
path="/edit/co/co_step_edit.jsp"
followUp=""
caption="Ladeschritt verwalten"
orderBy=""
gotoHt=""
helpfile=""
maxRows="1"
mode="full">
<description>In diesem Formular können Sie Ladeschritte verwalten.</description>
<filters>
<filter mandatory="true" type="equals">tid</filter>
</filters>
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="caption" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" nullFieldValue="" visibleSize="30" />
<customfield name="systeminfo_id" nullFieldValue="" pattern="" visibleSize="10" />
<customfield name="step_type_id" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="custom_step" nullFieldValue="" pattern="" visibleSize="30" />
<customfield name="logfile" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="Eigenschaften" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_step_property" parentField="tid" childField="co_step_id"
orderBy="prop_name" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="co_step_id" type="hidden" overrideValue="tid" />
<customfield name="prop_name" nullFieldValue="" visibleSize="30" />
<customfield name="prop_value" visibleSize="50" nullFieldValue="" />
</customfield>
</form>
<form name="co_step_type_list"
table="co_step_type"
path="/edit/co/co_step_type_list.jsp"
followUp=""
caption="Arten von Ladeschritten verwalten"
orderBy="caption"
gotoHt=""
helpfile=""
maxRows="*"
mode="full">
<description>In diesem Formular können Sie Arten von Ladeschritten verwalten.</description>
<filters>
</filters>
<field-selection complete="true" />
</form>
</dbforms>
</module>

8
src-modules/module/costage/masken/43000_felderinfo.unl

@ -1,11 +1,11 @@ @@ -1,11 +1,11 @@
43000^Köpfe oder Fälle ?^-3^0^0^130^150^1^sql^30^1^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle;^hidden^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Köpfe';^
43000^Köpfe oder Fälle ?^-3^0^0^130^150^1^sql^30^1^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle;^hidden^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^
43001^Seit Semester^1^0^0^130^80^1^integer^30^1^1^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
order by 1 DESC;^^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
where today()-(5*365) between semester_anfang and semester_ende;^
43002^Fächer^3^0^0^130^200^6^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^hidden^^
43003^bis Fachsemester^23^330^-1^130^100^1^integer^30^0^0^^hidden^^
43004^Hörerstatus^18^0^0^130^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^hidden^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^
43005^Stichtag^-2^330^-1^130^100^1^sql^30^1^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^hidden^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^
43005^Matrikelnr.^100^330^-1^130^100^1^char^30^0^0^ ^ ^ ^
43006^Status^19^330^-1^130^180^1^sql^30^0^1^<<SQL>> select apnr,eintrag from sos_status order by 2^ ^<<SQL>> select apnr,eintrag from sos_status where eintrag='Alle ohne Beurl.';^
43007^Bis Semester^2^330^-1^130^100^1^integer^30^0^1^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
order by 1 DESC;^Eintrag^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
@ -14,7 +14,9 @@ @@ -14,7 +14,9 @@
43009^Fachkennz.^9^330^-1^130^150^1^char^30^0^1^<<SQL>> select apnr,druck from sos_k_kzfa order by 2^hidden^^
43010^Vertiefung^4^330^-1^130^100^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=39 order by 2;^hidden^^
43011^ab Fachsemester^22^0^0^130^100^1^integer^30^0^0^^hidden^^
43012^Filter Studierende^120^0^0^130^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='SOS_STUD_FILTER' order by 2;^hidden^^
43012^Studiengangstyp^120^0^0^130^150^1^char^20^0^1^<<SQL>> select 'ETSG','Einfach- und Teilstudiengänge' from xdummy\
union select 'EMSG','Einfach- und Mehrfachstudiengänge' from xdummy\
order by 2;^ ^<<SQL>> select 'ETSG','Einfach- und Teilstudiengänge' from xdummy^
43013^Trennen nach^121^330^-1^130^100^1^char^20^0^1^<<SQL>> \
select 'Fach' from xdummy \
union \

416
src-modules/module/costage/masken/43000_maskeninfo.unl

@ -1,198 +1,192 @@ @@ -1,198 +1,192 @@
43000^Studierende (Zeitreihe) CO Basisdaten^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#if "<<Köpfe oder Fälle ?>>"?index_of("S.gewichtung") != -1 ||"<<Köpfe oder Fälle ?>>"?index_of("gew") != -1 || "<<Köpfe oder Fälle ?>>"?index_of("vzae") != -1 || "<<Köpfe oder Fälle ?>>"?index_of("ffaelle") != -1>\
<#assign feldtyp="decimal(21,9)" />\
<#else>\
<#assign feldtyp="integer" />\
</#if>\
\
<#assign lehr_stg_ab="lehr_stg_ab"/>\
<#assign quelltabelle='sos_stg_aggr'/>\
<#if "<<Köpfe oder Fälle ?>>"?index_of("S.gewichtung_id=")!=-1>\
<#assign lehr_stg_ab="lehr_stg_ab_gew"/>\
<#assign quelltabelle='sos_stud_gewichtung'/>\
<#assign studiengangstyp="" />\
/* <#assign studiengangstyp=<<Studiengangstyp>> /> */\
<#assign studiengangstyp_filter="1=1" />\
\
<#if studiengangstyp=="ETSG">\
<#assign studiengangstyp_filter="SG.studiengangs_typ_kb in ('ESG','TSG')" />\
<#elseif studiengangstyp=="EMSG">\
<#assign studiengangstyp_filter="SG.studiengangs_typ_kb in ('ESG','MSG')" />\
</#if>\
\
/* <#assign extension= <<Trennen nach>> > */\
\
create temp table tmp_studis1 \
(semester integer,\
semester_bezeichnung varchar(255),\
semester_sort varchar(10),\
m_1fs ${feldtyp}, \
w_1fs ${feldtyp},\
gesamt_1fs ${feldtyp},\
m_gesamt ${feldtyp},\
w_gesamt ${feldtyp},\
gesamt ${feldtyp}\
)\
<@informixnolog/>;\
\
create temp table tmp_studis2\
(semester integer,\
semester_bezeichnung varchar(255),\
semester_sort varchar(10),\
m_1fs ${feldtyp}, \
w_1fs ${feldtyp},\
gesamt_1fs ${feldtyp},\
m_gesamt ${feldtyp},\
w_gesamt ${feldtyp},\
gesamt ${feldtyp}\
)\
<@informixnolog/>;\
\
--'ETSG','Einfach- und Teilstudiengänge' \
--zun. temp. Tabelle\
\
SELECT\
val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) as semester,\
SEM.semester_id as semester_sort,\
SEM.semester_bezeichnung,\
G.stp_stp_nr as studeingang_nr ,--substr(F.stgnr,1,1), TODO paßt das?\
F.st_stdfach_nr as fach_nr,--substr(F.stgnr,length(F.stgnr),1),\
ST.studienstatustyp as status,\
FS.fachsemester as fach_sem_zahl,\
H.hoererstatus_kb as hrst,\
V.studienform_statistik_code as stufrm,\
ST.gueltig_ab as ruebeudat, --TODO: jeweils letzten Datensatz pro Semester\
ST.gueltig_ab as endedat,--TODO: jeweils letzten Datensatz pro Semester\
ST.gueltig_ab as anfdat,--TODO: jeweils letzten Datensatz pro Semester\
'H' as primaerfach,\
F.unikey,\
S.geschlecht,\
val('20' || replace(replace(SM.semester_id,'S','1'),'W','2')) as semester,--H.st_sem_nr,\
SM.semester_bezeichnung,\
SG.st_absz_nr as abschluss,\
SG.st_skz_nr as fach,\
SG.studiengangs_identifikator,\
SG.studiengangs_bezeichnung,\
SM.st_sem_nr,\
ST.st_studium_nr,\
S.st_studstamm_nr,\
ST.st_studiengang_nr,\
SG.studiengangs_typ_kb,\
SA.studienstatustyp,\
SA.beginn_datum,\
SA.gueltig_ab, \
null::varchar(255) as abschluss_str,\
null::integer as st_studiengang_nr_msg,\
null::integer as st_studiengang_nr_tsg,\
null::integer as studienfach_sortierung,\
''::varchar(255) as hoererstatus_name,\
\
null::integer as fachsemester,\
count(*) as summe\
into temp tmp_studien\
from \
costage_st_hoererstatus H,\
costage_st_studierendenstammdaten S,\
costage_st_studienstatus ST,\
costage_st_studiengaenge G,\
costage_st_studienkennzahlen F,\
costage_st_abschlussziele_lokal A,\
costage_st_fachsemester FS,\
costage_st_semester SEM,\
costage_st_studien V ,\
costage_st_hauptstudien K\
FROM costage_st_studierendenstammdaten S,\
costage_st_studien ST,\
-- costage_st_hoererstatus H,\
costage_st_semester SM,\
costage_st_studiengaenge SG ,\
costage_st_studienstatus SA\
\
where \
K.st_studium_nr=V.st_studium_nr\
and SEM.st_sem_nr=K.st_sem_nr\
and F.st_skz_nr=G.st_skz_nr\
and V.st_studiengang_nr=G.st_studiengang_nr\
and FS.st_studium_nr=V.st_studium_nr\
and SEM.st_sem_nr=FS.st_sem_nr\
and FS.fachsemestertyp='FS' --TODO: klin.Semester=KS\
and G.st_absz_nr=A.st_absz_nr\
and S.st_studstamm_nr=V.st_studstamm_nr\
and H.st_studstamm_nr=S.st_studstamm_nr\
and H.st_sem_nr=SEM.st_sem_nr\
and ST.st_studium_nr=V.st_studium_nr\
and ST.st_sem_nr=SEM.st_sem_nr\
and date(SEM.semester_anfang) >= date_val('01.01.2000')\
--and S.matrikelnummer='7344750'\
--and SEM.st_sem_nr=178\
and val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) >= <<Seit Semester>>\
/* and val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) <= <<Bis Semester>> */\
\
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\
\
--AND F.semester >= $start_stud_sem\
S.st_studstamm_nr = ST.st_studstamm_nr\
and ST.st_studiengang_nr=SG.st_studiengang_nr\
--and ST.st_studium_nr=SA.st_studium_nr\
--and SM.st_sem_nr=SA.st_sem_nr\
--and F.st_studium_nr=SA.st_studium_nr\
-- and F.st_studium_nr=ST.st_studium_nr\
-- and F.st_sem_nr=SM.st_sem_nr\
-- and F.fachsemestertyp='FS'\
and S.matrikelnummer is not null\
--and H.st_sem_nr = ST.\
and val('20' || replace(replace(SM.semester_id,'S','1'),'W','2')) >= <<Seit Semester>>\
/* and val('20' || replace(replace(SM.semester_id,'S','1'),'W','2')) <= <<Bis Semester>> */\
/* and S.matrikelnummer =<<Matrikelnr.>> */\
and ${studiengangstyp_filter}\
and SA.st_studium_nr=ST.st_studium_nr\
and SA.st_sem_nr=SM.st_sem_nr\
and SA.studienstatustyp not in ('a','o') -- Excluded the status for a: Studienplatz angenommen and o: Studium offen (noch keine Weitermeldung erfolgt)\
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14\
--,SM.semester_bezeichnung\
order by 1;\
\
update tmp_studien \
set abschluss_str=A.name\
from costage_st_abschlussziele_lokal A\
where A.st_absz_nr=tmp_studien.abschluss\
;\
\
insert into tmp_studis1(semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs, \
w_1fs,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt ,\
gesamt)\
\
select semester,\
semester_bezeichnung,\
semester_sort,\
(case when geschlecht='M' and fach_sem_zahl=1 then summe else 0 end) as m_1fs,\
(case when geschlecht='W' and fach_sem_zahl=1 then summe else 0 end) as w_1fs,\
(case when fach_sem_zahl=1 then summe else 0 end) as gesamt_1fs,\
(case when geschlecht='M' then summe else 0 end) as m_gesamt,\
(case when geschlecht='W' then summe else 0 end) as w_gesamt,\
summe\
from tmp_studien S\
--group by semester,semester_bezeichnung,semester_sort, geschlecht,fach_sem_zahl\
; \
\
\
\
insert into tmp_studis2(semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs , \
w_1fs ,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt,\
gesamt)\
\
select semester ,\
semester_bezeichnung,\
semester_sort,\
sum(m_1fs ), \
sum(w_1fs ),\
sum(gesamt_1fs),\
sum(m_gesamt) ,\
sum(w_gesamt),\
sum(gesamt)\
from tmp_studis1\
group by 1,2,3;\
\
\
update tmp_studis2\
set gesamt = null where gesamt = 0;\
update tmp_studis2\
set gesamt_1fs = null where gesamt_1fs = 0;\
update tmp_studis2\
set w_gesamt = null where w_gesamt = 0;\
\
\
<@selectintotmp \
select="semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs , \
w_1fs ,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt,\
gesamt"\
source="tmp_studis2"\
target="tmp_studis">\
order by semester_sort desc\
</@selectintotmp>\
<@informixnolog/>;\
\
\
-- insert into tmp_studis (eintrag)\
-- values ("");\
\
\
drop table tmp_studis1;\
drop table tmp_studis2;\
drop table tmp_studien;\
\
-- Falls Division durch 0 vorkommen sollte, Division durch NULL ist möglich\
\
select semester_bezeichnung, \
gesamt,\
gesamt_1fs, \
round((100*gesamt_1fs)::decimal(21,9)/gesamt,2),\
'',\
w_gesamt, round((100*w_gesamt)::decimal(21,9)/gesamt,2),\
w_1fs, round((100*w_1fs)::decimal(21,9)/gesamt_1fs,2)\
from tmp_studis \
order by semester_sort desc \
;^--Freemarker Template\
/* <#assign extension= <<Trennen nach>> > */\
\
XIL List\
\
update tmp_studien\
set hoererstatus_name=H.hoererstatus_name\
from costage_st_hoererstatus H\
where tmp_studien.st_studstamm_nr = H.st_studstamm_nr\
and tmp_studien.st_sem_nr = H.st_sem_nr\
;\
\
update tmp_studien\
set fachsemester=F.fachsemester\
from costage_st_fachsemester F\
where F.st_studium_nr=tmp_studien.st_studium_nr\
and F.st_sem_nr=tmp_studien.st_sem_nr\
and F.fachsemestertyp='FS'\
;\
\
\
/*\
--ESG löschen wenn inaktiv:\
delete from tmp_studien\
where studiengangs_typ_kb ='ESG'\
and studienstatustyp is null;\
\
--MSG inaktiv, dann MSG und TSG löschen: \
\
select T.st_sem_nr,\
T.st_studium_nr,\
T.st_studstamm_nr,\
T.st_studiengang_nr,\
T.studiengangs_typ_kb,\
MTSG.st_studiengang_nr_tsg\
\
into temp tmp_studien_ungueltig\
from tmp_studien T left outer join costage_st_studiengaenge_mtsg MTSG\
on (MTSG.st_studiengang_nr_msg=T.st_studiengang_nr)\
where T.studiengangs_typ_kb ='MSG'\
and T.studienstatustyp is null\
;\
\
select T.st_sem_nr,\
T.st_studium_nr,\
T.st_studstamm_nr,\
T.st_studiengang_nr,\
T.studiengangs_typ_kb,\
MTSG.st_studiengang_nr_tsg\
\
into temp tmp_studien_gueltig\
from tmp_studien T left outer join costage_st_studiengaenge_mtsg MTSG\
on (MTSG.st_studiengang_nr_msg=T.st_studiengang_nr)\
where T.studiengangs_typ_kb ='MSG'\
and T.studienstatustyp is not null\
;\
\
--MSG löschen\
delete from tmp_studien\
where studiengangs_typ_kb ='MSG'\
and (st_sem_nr,\
st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr) in \
(select st_sem_nr,\
st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr\
from tmp_studien_ungueltig)\
;\
--TSG löschen:\
\
delete from tmp_studien\
where studiengangs_typ_kb ='TSG'\
and (st_sem_nr,\
--st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr) in \
(select st_sem_nr,\
--st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr_tsg\
from tmp_studien_ungueltig)\
and (st_sem_nr,\
st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr) not in \
(select st_sem_nr,\
st_studium_nr,\
st_studstamm_nr,\
st_studiengang_nr_tsg\
from tmp_studien_gueltig)\
;\
drop table tmp_studien_ungueltig;\
drop table tmp_studien_gueltig;\
*/\
--final selection:\
select semester_bezeichnung,\
--abschluss,\
--fach,\
studiengangs_identifikator,\
studiengangs_bezeichnung,\
abschluss_str,\
hoererstatus_name,\
studienstatustyp,\
studiengangs_typ_kb,\
st_studiengang_nr,\
st_studiengang_nr_msg,\
st_studiengang_nr_tsg,\
studienfach_sortierung,\
fachsemester,\
sum(summe)::integer as summe,\
beginn_datum,\
gueltig_ab\
from tmp_studien\
group by semester,1,2,3,4,5,6,7,8,9,10,11,12,14,15\
order by semester,1,2,3,4,5,6,7,8,9,10,11,12,14,15;^XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
@ -200,37 +194,41 @@ XIL List\ @@ -200,37 +194,41 @@ XIL List\
Column CID=0 heading_text="@@sos_semester@@" explanation="@@@sos_semester@@@" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=1 heading_text="Gesamt-\
zahl" explanation="@@@sos_gesamtzahl@@@" center_heading\
row_selectable col_selectable rightJust heading_platform\
readonly\
Column CID=0 heading_text="Studiengang ID" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Studiengang\\nName" explanation="Fach" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Abschluss" explanation="Abschluss" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Hörerstatus" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Studienstatus" explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=2 heading_text="1. @@FS@@\
gesamt" explanation="@@@sos_1fs_ges@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="Studiengangtyp" explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=3 heading_text="1. @@FS@@\
in %" explanation="@@@sos_1fs_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="Studiengang Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=6 heading_text=" " explanation="" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=1\
Column CID=7 heading_text="dar.\
Frauen" explanation="@@@sos_frauen_sem@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="MSG Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=8 heading_text="Frauen\
in %" explanation="@@@sos_frauen_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="TSG Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=9 heading_text="1. @@FS@@\
Frauen" explanation="@@@sos_frauen_1fs@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="Fachnr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=10 heading_text="1. @@FS@@\
Frauen\
in %" explanation="@@@sos_frauen_1fs_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
Column CID=0 heading_text="Fachsemester" explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=1 heading_text="Gesamtzahl" explanation="@@@sos_gesamtzahl@@@" center_heading\
row_selectable col_selectable rightJust heading_platform\
readonly\
width=8\
@@@^Semester^Anzahl^Zeitreihe zur Anzeige des Datenbestandes aus CO^drop table tmp_studis;^-leer-^2^700^360^0^1^^
@@@^Semester^Anzahl^Zeitreihe zur Anzeige des Datenbestandes aus CO^drop table tmp_studien;^-leer-^2^700^360^0^1^ ^

1
src-modules/module/costage/schluesseltabellen/sx_repository.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
1^COSTAGE_STUDENT_FILTER^1=1^Filter Studierende für CO^Hier werden Studierende für Auswertungen aus CO gefiltert^^COSTAGE_STUD_FILTER^^^310^1^0^0^^1^01.01.1900^31.12.3000^

56
src-modules/module/costage/schluesseltabellen/sx_repository_fuellen.sql

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
--freemarker template
<#if SQLdialect='Postgres'>
select sp_update_sequence('sx_repository');
</#if>
delete from tmp_repository where id in (select id from sx_repository);
insert into sx_repository
(
id,
content,
caption,
comment,
version,
art,
art2,
art3,
sachgebiete_id,
sort1,
sort2,
sort3,
geaendert_am,
aktiv,
gueltig_seit,
gueltig_bis
)
SELECT
id,
content,
caption,
comment,
version,
art,
art2,
art3,
sachgebiete_id,
sort1,
sort2,
sort3,
geaendert_am,
aktiv,
gueltig_seit,
gueltig_bis
FROM tmp_repository;
<#if SQLdialect='Postgres'>
select sp_update_sequence('sx_repository');
</#if>
drop table tmp_repository;

28
src-modules/module/costage/schluesseltabellen/sx_repository_fuellen.x

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
#!/bin/bash
DOQUERY "create table tmp_repository(
tid SERIAL not null,
id CHAR(200) not null,
content TEXT ,
caption CHAR(200) ,
comment TEXT ,
version SMALLINT ,
art CHAR(200) ,
art2 CHAR(200) ,
art3 CHAR(200) ,
sachgebiete_id INTEGER ,
sort1 INTEGER ,
sort2 INTEGER ,
sort3 INTEGER ,
geaendert_am DATE ,
aktiv smallint ,
gueltig_seit DATE ,
gueltig_bis DATE
);"
sx_auto_upload_table.x tmp_repository sx_repository.unl
DOSQL sx_repository_fuellen.sql

2
src-modules/module/costage/schluesseltabellen/sx_repository_loeschen.sql

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
delete from sx_repository where sachgebiete_id in (300);
Loading…
Cancel
Save