Browse Source

Denormalize DP Nr., Subject Nr. #1

COStage_0.2_Release
Daniel Quathamer 3 years ago
parent
commit
bd4a387866
  1. 13
      build.xml
  2. 6
      excludes.txt.sam
  3. 2
      includes.txt.sam
  4. 21
      rsync_to_h1.x
  5. 13
      src-modules/module/costage/bin/SQL_ENV_costage.sam
  6. 113
      src-modules/module/costage/conf/costage.xml
  7. 51
      src-modules/module/costage/datentabellen/trans_costage_st_studierendenstammdaten.sql
  8. 146
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  9. 8
      src-modules/module/costage/hilfstabellen/vacuum_pg.sql
  10. 24
      src-modules/module/costage/masken/43020_felderinfo.unl
  11. 1
      src-modules/module/costage/masken/43020_maske_system_bez.unl
  12. 15
      src-modules/module/costage/masken/43020_masken_felder_bez.unl
  13. 233
      src-modules/module/costage/masken/43020_maskeninfo.unl
  14. 1
      src-modules/module/costage/masken/43020_sachgeb_maske_bez.unl
  15. 4
      src-modules/module/costage/schluesseltabellen/semester_bereinigen.sql
  16. 30
      src-modules/module/costage/schluesseltabellen/trans_costage_st_semester.sql
  17. 43
      src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql

13
build.xml

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="ModuleCreation" default="module_copy_source" basedir="."> <project name="ModuleCreation" default="all" basedir=".">
<!--Aufruf mit <!--Aufruf mit
ant -DMODULE_PATH=/home/superx/devel_module/referenz/db/module/costage -DBASE_DIR=. -DMODULE=costage call_module_scripts_create_ant ant -DMODULE_PATH=/home/superx/devel_module/referenz/db/module/costage -DBASE_DIR=. -DMODULE=costage all
So erzeugen Sie dann ein Paket:
ant -f ../../conf/build.xml -DMODULE=costage -DPFAD=/home/superx/fertige_module -DDATABASE=POSTGRES -DENCODING=utf8 -DPLATFORM=superx -DWEBAPP_DIR=$WEBAPP erzeuge_paket
--> -->
<dirname file="${ant.file}" property="moduleCreateBaseDir" /> <dirname file="${ant.file}" property="moduleCreateBaseDir" />
<property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." /> <property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." />
@ -20,7 +24,10 @@ ant -DMODULE_PATH=/home/superx/devel_module/referenz/db/module/costage -DBASE_D
<condition property="isUnix"> <condition property="isUnix">
<os family="unix" /> <os family="unix" />
</condition> </condition>
<target name="all" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<antcall target="call_module_scripts_create_ant" />
<antcall target="module_copy_source" />
</target>
<target name="module_copy_source" description="Gruppe: Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum"> <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}" /> <echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" />
<copy todir="${MODULE_PATH}" overwrite="true"> <copy todir="${MODULE_PATH}" overwrite="true">

6
excludes.txt.sam

@ -1,6 +0,0 @@
#files or directories to be excluded:
.*
excludes*
includes*
rsync_to_h1.x

2
includes.txt.sam

@ -1,2 +0,0 @@
#Dateiliste
README.txt.sam

21
rsync_to_h1.x

@ -1,21 +0,0 @@
#!/bin/bash
#Synchronisierung webapp zum Zielserver
#Benutzer Variablen:
#REMOTE_HOST ->Ziel-Hostname
#REMOTE_USER ->Ziel-Benutzerkennung
#REMOTE_DIR -> Zielpfad
#TODO: in LOCAL_DIR gelöschte Dateien werden nicht im REMOTE_DIR gelöscht
if [ "$LOCAL_DIR" = "" ]
then
LOCAL_DIR=`pwd`
fi
if [ "$REMOTE_HOST" = "" ]
then
rsync -L -rauvz --delete --include="*/" --include-from=includes.txt.sam --exclude="*" $LOCAL_DIR/* $REMOTE_DIR
else
rsync -L -rauvz --delete --include="*/" --include-from=includes.txt.sam --exclude="*" -e ssh $LOCAL_DIR/* "$REMOTE_USER"@"$REMOTE_HOST":$REMOTE_DIR
fi

13
src-modules/module/costage/bin/SQL_ENV_costage.sam

@ -0,0 +1,13 @@
#Beispielumgebung für das COSTAGE-Modul:
#SUPERX_MODULE=$SUPERX_DIR/db/module
#SUPERX_ROHDATEN=rohdaten
COSTAGE_PFAD=$SUPERX_MODULE/costage; export COSTAGE_PFAD
COSTAGE_ERRORDAT=$COSTAGE_PFAD/costage_update.err; export COSTAGE_ERRORDAT
#Hier stehen die Rohdaten (im Unterverzeichnis unl)
COSTAGE_LOAD_PFAD=$COSTAGE_PFAD/$SUPERX_ROHDATEN; export COSTAGE_LOAD_PFAD
COSTAGE_ERRORMAIL=$ERRORMAIL; export COSTAGE_ERRORMAIL
COSTAGE_LOGMAIL=$LOGMAIL; export COSTAGE_LOGMAIL

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd"> --> <!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd"> -->
<module name="costage" version="0.1" sachgebiet_id="310" <module name="costage" version="0.2b" sachgebiet_id="310"
sachgebiet="CO Basisdaten" systeminfo_id="310" sachgebiet="CO Basisdaten" systeminfo_id="310"
system="CO Basisdaten" thema="CO Basisdaten" thema_parent="Studierende, Prüfungen"> system="CO Basisdaten" thema="CO Basisdaten" thema_parent="Studierende, Prüfungen">
<database name="superx" system="superx"> <database name="superx" system="superx">
@ -169,6 +169,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<column name="semester_ende" type ="DATETIME" size ="7" default ="" notnull ="true" /> <column name="semester_ende" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="semester_bezeichnung" type ="VARCHAR" size ="22" default ="" notnull ="true" /> <column name="semester_bezeichnung" type ="VARCHAR" size ="22" default ="" notnull ="true" />
<column name="studienjahr" type ="VARCHAR" size ="20" default ="" notnull ="true" /> <column name="studienjahr" type ="VARCHAR" size ="20" default ="" notnull ="true" />
<column name="semester_tid" type ="INTEGER" size ="8" default ="" notnull ="false" ><comment>Semester nach SuperX-Nontation, d.h. JJJJ+1 (bei SoSe) oder 2 (bei Wise)</comment></column>
</columns> </columns>
<indexes></indexes> <indexes></indexes>
<primaryKeys><rs> <primaryKeys><rs>
@ -177,7 +178,20 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</rs></foreignKeys> </rs></foreignKeys>
</table> </table>
<table name="costage_st_semester_neu" thema="Studierende" typ="Ladetabelle" releaseUnload="empty">
<columns><column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="semester_id" type ="VARCHAR" size ="3" default ="" notnull ="true" />
<column name="semester_anfang" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="semester_ende" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="semester_bezeichnung" type ="VARCHAR" size ="22" default ="" notnull ="true" />
<column name="studienjahr" type ="VARCHAR" size ="20" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienarten" thema="Studierende" typ="Datentabelle" releaseUnload="empty"> <table name="costage_st_studienarten" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" /> <columns><column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="kurzbezeichnung" type ="VARCHAR" size ="10" default ="" notnull ="true" /> <column name="kurzbezeichnung" type ="VARCHAR" size ="10" default ="" notnull ="true" />
@ -218,7 +232,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</table> </table>
<table name="costage_st_studiengaenge" thema="Studierende" typ="Datentabelle" releaseUnload="empty"> <table name="costage_st_studiengaenge_neu" thema="Studierende" typ="Ladetabelle" releaseUnload="empty">
<columns><column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="true" /> <columns><column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studiengangs_identifikator" type ="VARCHAR" size ="4000" default ="" notnull ="false" /> <column name="studiengangs_identifikator" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="studiengangs_bezeichnung" type ="VARCHAR" size ="4000" default ="" notnull ="false" /> <column name="studiengangs_bezeichnung" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
@ -239,7 +253,31 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</rs></foreignKeys> </rs></foreignKeys>
</table> </table>
<table name="costage_st_studiengaenge" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studiengangs_identifikator" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="studiengangs_bezeichnung" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="st_absz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_skz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="fachkennzeichen" type ="VARCHAR" size ="10" default ="" notnull ="false" />
<column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studiengangs_typ_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="studiengangs_typ_kb" type ="VARCHAR" size ="10" default ="" notnull ="false" />
<column name="studientyp_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="studientyp_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="stp_stp_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="stg" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienfach"/>
<column name="abschluss" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienfach"/>
<column name="stuart" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienfach"/>
<column name="stufrm" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienfach"/>
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienkennzahlen" thema="Studierende" typ="Datentabelle" releaseUnload="empty"> <table name="costage_st_studienkennzahlen" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_skz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" /> <columns><column name="st_skz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="skz_key" type ="VARCHAR" size ="4" default ="" notnull ="true" /> <column name="skz_key" type ="VARCHAR" size ="4" default ="" notnull ="true" />
@ -307,7 +345,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</table> </table>
<table name="costage_st_studierendenstammdaten" thema="Studierende" typ="Datentabelle" releaseUnload="empty"> <table name="costage_st_studierendenstammdaten_neu" thema="Studierende" typ="Ladetabelle" releaseUnload="empty">
<columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" /> <columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="matrikelnummer" type ="VARCHAR" size ="12" default ="" notnull ="false" /> <column name="matrikelnummer" type ="VARCHAR" size ="12" default ="" notnull ="false" />
<column name="vorname" type ="VARCHAR" size ="255" default ="" notnull ="true" /> <column name="vorname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
@ -329,28 +367,47 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</rs></foreignKeys> </rs></foreignKeys>
</table> </table>
<table name="costage_st_studierendenstammdaten" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="matrikelnummer" type ="INTEGER" size ="12" default ="" notnull ="false" />
<column name="vorname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="familienname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="geburtsdatum" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="st_land1_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_land2_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="geburt_st_land_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="personentyp_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="personentyp_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="aufnahmedatum" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="abmeldungsdatum" type ="DATETIME" size ="7" default ="" notnull ="false" />
<column name="geschlecht" type ="INTEGER" size ="1" default ="" notnull ="false" description="Geschlecht" />
<column name="d_geburt" type ="DATE" size ="4" default ="" notnull ="false" />
<column name="ca12_staat" type ="INTEGER" size ="8" default ="" notnull ="false" description="Staatsangehörigkeit (erste)" />
<column name="second_nationality" type ="INTEGER" size ="4" default ="" notnull ="false" description="Amtl. Schluessel fuer zweite Staatsangehoerigkeit" currentlyUsed="false"/>
<column name="d_exmatr" type ="DATE" size ="4" default ="" notnull ="false" description="Datum der Exmatr. (obsolet)"/>
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studien_aggr" thema="Studierende" typ="Hilfstabelle" releaseUnload="empty"> <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.)" /> <columns><column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Studium (ID)" />
<column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Studierendenstammdaten (Nr.)" /> <column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Studierendenstammdaten (ID)" />
<column name="matrikelnummer" type ="INTEGER" size ="8" default ="" notnull ="false" description="Matrikelnummer" /> <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_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (ID)" />
<column name="st_land1_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Staatsangehörigkeit (erste)" /> <column name="st_studienstatus_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studienstatus (ID)" />
<column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (Nr.)" /> <column name="status" type ="SMALLINT" size ="4" default ="" notnull ="false" description="Studienstatus" />
<column name="st_absz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" description="Abschluss" /> <column name="hrst" type ="CHAR" size ="10" default ="" notnull ="false" description="Hörerstatus" />
<column name="fachkennzeichen" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Fachkennzeichen" /> <column name="semester" type ="INTEGER" size ="8" default ="" notnull ="true" description="Semester" />
<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="fachsemester" type ="DECIMAL" size ="(38,0)" default ="" notnull ="false" description="Fachsemester" />
<column name="hssem" type ="DECIMAL" size ="(38,0)" default ="" notnull ="false" description="Hochschulsemester" />
<column name="primaerflag" type ="SMALLINT" size ="2" default ="" notnull ="false" description="Primärfach" /> <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="studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (Nr.)" />
<column name="summe" type ="INTEGER" size ="2" default ="" notnull ="false" description="Summe" /> <column name="fach_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Fach (Nr.)" />
</columns> </columns>
<indexes></indexes> <indexes></indexes>
@ -360,7 +417,6 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</rs></foreignKeys> </rs></foreignKeys>
</table> </table>
<views> <views>
</views> </views>
@ -469,26 +525,31 @@ parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_land_regionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_land_regionen.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_land_regionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_land_regionen.unl"/></loadtable>
<!--<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_personen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_personen.unl"/></loadtable>--> <!--<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_personen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_personen.unl"/></loadtable>-->
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_semester"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_semester.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_semester_neu"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_semester.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienarten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienarten.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienarten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienarten.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienfaecher"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienfaecher.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienfaecher"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienfaecher.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge_mtsg"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge_mtsg.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge_mtsg"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge_mtsg.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge_neu"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienkennzahlen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienkennzahlen.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienkennzahlen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienkennzahlen.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienstatus"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienstatus.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienstatus"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienstatus.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien_spoversionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien_spoversionen.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien_spoversionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien_spoversionen.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studierendenstammdaten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studierendenstammdaten.unl"/></loadtable> <loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studierendenstammdaten_neu"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studierendenstammdaten.unl"/></loadtable>
</action> </action>
</etl-step> </etl-step>
<etl-step name="Transformation" type="trans"> <etl-step name="Transformation" type="trans">
<action> <action>
<nativeaction sql="" scriptfile="$ETL_PFAD/schluesseltabellen/trans_costage_st_semester.sql" database=""/>
<nativeaction sql="" scriptfile="$ETL_PFAD/schluesseltabellen/trans_costage_st_studiengaenge.sql" database=""/>
<nativeaction sql="" scriptfile="$ETL_PFAD/datentabellen/trans_costage_st_studierendenstammdaten.sql" database=""/>
</action> </action>
</etl-step> </etl-step>
<etl-step name="Aggregation" type="aggr"> <etl-step name="Aggregation" type="aggr">
<action> <action>
<nativeaction sql="" scriptfile="$ETL_PFAD/hilfstabellen/costage_st_studien_aggr_fuellen.sql" database=""/> <nativeaction sql="" scriptfile="$ETL_PFAD/hilfstabellen/costage_st_studien_aggr_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$ETL_PFAD/schluesseltabellen/semester_bereinigen.sql" database="POSTGRES"/>
<nativeaction sql="" scriptfile="$ETL_PFAD/hilfstabellen/vacuum_pg.sql" database="POSTGRES"/>
</action> </action>
</etl-step> </etl-step>

51
src-modules/module/costage/datentabellen/trans_costage_st_studierendenstammdaten.sql

@ -0,0 +1,51 @@
delete from costage_st_studierendenstammdaten;
insert into costage_st_studierendenstammdaten(
st_studstamm_nr,
matrikelnummer,
vorname,
familienname,
geburtsdatum,
st_land1_nr,
st_land2_nr,
geburt_st_land_nr,
personentyp_name,
personentyp_kb,
aufnahmedatum,
abmeldungsdatum,
geschlecht,
ca12_staat,
second_nationality,
d_geburt,
d_exmatr)
select
S.st_studstamm_nr,
val(S.matrikelnummer),
vorname,
familienname,
geburtsdatum,
st_land1_nr,
st_land2_nr,
geburt_st_land_nr,
personentyp_name,
personentyp_kb,
aufnahmedatum,
abmeldungsdatum,
(case when S.geschlecht='M' then 1
when S.geschlecht='W' then 2
when S.geschlecht='X' then 3
else 4 end)::smallint as geschlecht,
val(L.statistik_code) as ca12_staat,
S.st_land2_nr,
date(S.geburtsdatum) as d_geburt,
date(S.abmeldungsdatum) as d_exmatr
FROM costage_st_studierendenstammdaten_neu S, costage_st_laender L
where L.st_land_nr=S.st_land1_nr
and S.matrikelnummer is not null
;
update costage_st_studierendenstammdaten set second_nationality=val(L.statistik_code)
from costage_st_laender L
where L.st_land_nr=costage_st_studierendenstammdaten.st_land2_nr;

146
src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql

@ -0,0 +1,146 @@
--Abfrage Maske Studierende (Zeitreihe) CO Basisdaten (43000) durchführen 14:54:12
--Abfrage
SELECT
SM.semester_tid as semester,
SG.st_absz_nr,
SG.st_skz_nr,
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.st_studienstatus_nr,
SA.beginn_datum,
SA.gueltig_ab,
S.matrikelnummer,
S.geschlecht,
S.ca12_staat,
S.second_nationality,
SG.fachkennzeichen,
null::integer as st_studiengang_nr_msg,
null::integer as st_studiengang_nr_tsg,
null::integer as studienfach_sortierung,
null::char(10) as hrst,
null::integer as fachsemester,
null::integer as hssem,
null::integer as status,
0::smallint as primaerflag,
null::integer as studiengang_nr,
null::integer as fach_nr,
rank () over (partition by SM.st_sem_nr, S.st_studstamm_nr, SG.studiengangs_identifikator order by gueltig_ab desc) as status_historie
into temp tmp_studien
FROM costage_st_studierendenstammdaten S,
costage_st_studien ST,
costage_st_semester SM,
costage_st_studiengaenge SG ,
costage_st_studienstatus SA
where
S.st_studstamm_nr = ST.st_studstamm_nr
and ST.st_studiengang_nr=SG.st_studiengang_nr
and S.matrikelnummer is not null
--and SM.semester_tid >= 20171
-- and SM.semester_tid <= 20171
and S.matrikelnummer =7322871
and SG.studiengangs_typ_kb in ('ESG','TSG')
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')
--group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14
;
-- select * from tmp_studien
-- update tmp_studien
-- set abschluss_str=A.name
-- from costage_st_abschlussziele_lokal A
-- where A.st_absz_nr=tmp_studien.abschluss
-- ;
update tmp_studien
set hrst=H.hoererstatus_kb
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 hssem=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='HS'
;
update tmp_studien
set primaerflag=1
where exists (select st_studstamm_nr
from costage_st_hauptstudien H
where H.st_studstamm_nr=tmp_studien.st_studstamm_nr
and H.st_studium_nr=tmp_studien.st_studium_nr
and H.st_sem_nr=tmp_studien.st_sem_nr);
update tmp_studien set fach_nr=M.studienfach_sortierung
from costage_st_studiengaenge_mtsg M
where M.st_studiengang_nr_tsg=tmp_studien.st_studiengang_nr
;
update tmp_studien set fach_nr=1
where fach_nr is null;
update tmp_studien
set status=1
where studienstatustyp='I' --TODO: andere Ausprägungen gem. Doku
;
delete from costage_st_studien_aggr;
insert into costage_st_studien_aggr(
st_studium_nr,
st_studstamm_nr,
matrikelnummer,
st_studiengang_nr,
st_studienstatus_nr,
status,
hrst,
semester,
fachsemester,
hssem,
primaerflag,
studiengang_nr,
fach_nr
)
select st_studium_nr,
st_studstamm_nr,
matrikelnummer,
st_studiengang_nr,
st_studienstatus_nr,
status,
hrst,
semester,
fachsemester,
hssem,
primaerflag,
rank () over (partition by semester, st_studstamm_nr order by primaerflag desc,st_studium_nr asc)
as studiengang_nr,
fach_nr
from tmp_studien
where status_historie=1;
drop table tmp_studien;

8
src-modules/module/costage/hilfstabellen/vacuum_pg.sql

@ -0,0 +1,8 @@
select * from xdummy;
--bei Postgres in HIS1 laufen alle Scripte in Transaktionen, daher muss man
--für vacuum erst committen
commit;
vacuum costage_st_semester;
vacuum costage_st_studierendenstammdaten;
vacuum costage_st_studiengaenge;
vacuum costage_st_studien_aggr;

24
src-modules/module/costage/masken/43020_felderinfo.unl

@ -0,0 +1,24 @@
43020^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';^
43021^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;^
43022^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^^
43023^bis Fachsemester^23^330^-1^130^100^1^integer^30^0^0^^hidden^^
43024^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';^
43025^Matrikelnr.^100^330^-1^130^100^1^char^30^0^0^ ^ ^ ^
43026^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.';^
43027^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\
where today() between semester_anfang and semester_ende;^
43028^Abschluss^8^0^0^130^150^5^char^30^0^1^<<SQL>> select apnr, trim(druck) || ' (' || trim(apnr) || ')' from cifx where key = 35 order by 2;^hidden^^
43029^Fachkennz.^9^330^-1^130^150^1^char^30^0^1^<<SQL>> select apnr,druck from sos_k_kzfa order by 2^hidden^^
43030^Vertiefung^4^330^-1^130^100^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=39 order by 2;^hidden^^
43031^ab Fachsemester^22^0^0^130^100^1^integer^30^0^0^^hidden^^
43032^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^
43033^Trennen nach^121^330^-1^130^100^1^char^20^0^1^<<SQL>> \
select 'Fach' from xdummy \
union \
select 'Abschluss' from xdummy^hidden^^
43034^Studiengang^6^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^hidden^^

1
src-modules/module/costage/masken/43020_maske_system_bez.unl

@ -0,0 +1 @@
43020^310^

15
src-modules/module/costage/masken/43020_masken_felder_bez.unl

@ -0,0 +1,15 @@
43020^43020^
43020^43021^
43020^43022^
43020^43023^
43020^43024^
43020^43025^
43020^43026^
43020^43027^
43020^43028^
43020^43029^
43020^43030^
43020^43031^
43020^43032^
43020^43033^
43020^43034^

233
src-modules/module/costage/masken/43020_maskeninfo.unl

@ -0,0 +1,233 @@
43020^Studierende Detailansicht CO Basisdaten^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
\
<#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>\
\
\
--'ETSG','Einfach- und Teilstudiengänge' \
--zun. temp. Tabelle\
\
SELECT\
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,\
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::varchar(255) as studienstatustyp,\
null::integer as fachsemester,\
count(*) as summe\
into temp tmp_studien\
FROM costage_st_studierendenstammdaten S,\
costage_st_studien ST,\
-- costage_st_hoererstatus H,\
costage_st_semester SM,\
costage_st_studiengaenge SG \
\
\
\
where \
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}\
group by 1,2,3,4,5,6,7,8,9,10,11\
--,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\
;\
\
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'\
;\
\
update tmp_studien\
set studienstatustyp=SA.studienstatustyp\
from costage_st_studienstatus SA\
where SA.st_studium_nr=tmp_studien.st_studium_nr\
and SA.st_sem_nr=tmp_studien.st_sem_nr\
;\
\
/*\
--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\
from tmp_studien\
group by semester,1,2,3,4,5,6,7,8,9,10,11,12\
order by semester,1,2,3,4,5,6,7,8,9,10,11,12;^XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
min_heading_height=55\
Column CID=0 heading_text="@@sos_semester@@" explanation="@@@sos_semester@@@" center_heading\
row_selectable heading_platform readonly\
width=10\
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=0 heading_text="Studiengangtyp" explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=0 heading_text="Studiengang Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=0 heading_text="MSG Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=0 heading_text="TSG Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
Column CID=0 heading_text="Fachnr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=8\
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_studien;^-leer-^2^700^360^0^1^ ^

1
src-modules/module/costage/masken/43020_sachgeb_maske_bez.unl

@ -0,0 +1 @@
310^43020^

4
src-modules/module/costage/schluesseltabellen/semester_bereinigen.sql

@ -0,0 +1,4 @@
--unnötige Zeilen in Semestertabelle entfernen:
delete from costage_st_semester where semester_tid not in (
select distinct semester from costage_st_studien_aggr);

30
src-modules/module/costage/schluesseltabellen/trans_costage_st_semester.sql

@ -0,0 +1,30 @@
delete from costage_st_semester;
insert into costage_st_semester(
st_sem_nr,
semester_id,
semester_anfang,
semester_ende,
semester_bezeichnung,
studienjahr)
select
st_sem_nr,
semester_id,
semester_anfang,
semester_ende,
semester_bezeichnung,
studienjahr
from costage_st_semester_neu
;
--transformiere Semestercode nach SuperX Notation, d.h. JJJJ+1 (bei SoSe) oder 2 (bei Wise)
update costage_st_semester set semester_tid=val('20' || replace(replace(semester_id,'S','1'),'W','2'))
where year(date(semester_anfang)) >=2000;
;
update costage_st_semester set semester_tid=val('19' || replace(replace(semester_id,'S','1'),'W','2'))
where year(date(semester_anfang)) <2000;
;

43
src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql

@ -0,0 +1,43 @@
delete from costage_st_studiengaenge;
insert into costage_st_studiengaenge(
st_studiengang_nr,
studiengangs_identifikator,
studiengangs_bezeichnung,
st_absz_nr,
st_skz_nr,
fachkennzeichen,
st_std_art_nr,
studiengangs_typ_name,
studiengangs_typ_kb,
studientyp_name,
studientyp_kb,
stp_stp_nr)
select
st_studiengang_nr,
studiengangs_identifikator,
studiengangs_bezeichnung,
st_absz_nr,
st_skz_nr,
fachkennzeichen,
st_std_art_nr,
studiengangs_typ_name,
studiengangs_typ_kb,
studientyp_name,
studientyp_kb,
stp_stp_nr
from costage_st_studiengaenge_neu
;
--transformiere Fach/Abschluss etc. nach SuperX Notation
--Fach:
update costage_st_studiengaenge set stg=SKZ.skz_key
from costage_st_studienkennzahlen SKZ
where SKZ.st_skz_nr=costage_st_studiengaenge.st_skz_nr;
--Abschluss:
update costage_st_studiengaenge set abschluss=A.code
from costage_st_abschlussziele_lokal A
where A.st_absz_nr=costage_st_studiengaenge.st_absz_nr;
--
Loading…
Cancel
Save