Compare commits

..

No commits in common. 'master' and 'COStage_0.2_Release' have entirely different histories.

  1. 23
      README.md
  2. 6
      build.xml
  3. 1706
      src-modules/module/costage/conf/costage.xml
  4. 67
      src-modules/module/costage/costage_update.x
  5. 20
      src-modules/module/costage/costage_update_cron.x.sam
  6. 8
      src-modules/module/costage/datentabellen/check_studierende.sql
  7. 37
      src-modules/module/costage/datentabellen/trans_costage_lehrveranstaltungen.sql
  8. 12
      src-modules/module/costage/datentabellen/trans_costage_leistungen.sql
  9. 24
      src-modules/module/costage/datentabellen/trans_costage_lv_teilnehmende.sql
  10. 14
      src-modules/module/costage/datentabellen/trans_costage_st_hochschulsemester.sql
  11. 20
      src-modules/module/costage/datentabellen/trans_costage_st_studienstatus.sql
  12. 105
      src-modules/module/costage/datentabellen/trans_costage_st_studierendenstammdaten.sql
  13. 246
      src-modules/module/costage/hilfstabellen/costage_bw_antr_aggr_fuellen.sql
  14. 280
      src-modules/module/costage/hilfstabellen/costage_st_einzpruef_aggr_fuellen.sql
  15. 77
      src-modules/module/costage/hilfstabellen/costage_st_lv_aggr_fuellen.sql
  16. 321
      src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql
  17. 1049
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  18. 6
      src-modules/module/costage/hilfstabellen/vacuum_pg.sql
  19. 19
      src-modules/module/costage/masken/43040_felderinfo.unl
  20. 1
      src-modules/module/costage/masken/43040_masken_felder_bez.unl
  21. 7
      src-modules/module/costage/masken/43040_maskeninfo.unl
  22. 71
      src-modules/module/costage/masken/43080_felderinfo.unl
  23. 1
      src-modules/module/costage/masken/43080_maske_system_bez.unl
  24. 21
      src-modules/module/costage/masken/43080_masken_felder_bez.unl
  25. 168
      src-modules/module/costage/masken/43080_maskeninfo.unl
  26. 1
      src-modules/module/costage/masken/43080_sachgeb_maske_bez.unl
  27. 59
      src-modules/module/costage/masken/43110_felderinfo.unl
  28. 1
      src-modules/module/costage/masken/43110_maske_system_bez.unl
  29. 21
      src-modules/module/costage/masken/43110_masken_felder_bez.unl
  30. 135
      src-modules/module/costage/masken/43110_maskeninfo.unl
  31. 1
      src-modules/module/costage/masken/43110_sachgeb_maske_bez.unl
  32. 45
      src-modules/module/costage/masken/43140_felderinfo.unl
  33. 1
      src-modules/module/costage/masken/43140_maske_system_bez.unl
  34. 17
      src-modules/module/costage/masken/43140_masken_felder_bez.unl
  35. 133
      src-modules/module/costage/masken/43140_maskeninfo.unl
  36. 1
      src-modules/module/costage/masken/43140_sachgeb_maske_bez.unl
  37. 56
      src-modules/module/costage/masken/43180_felderinfo.unl
  38. 1
      src-modules/module/costage/masken/43180_maske_system_bez.unl
  39. 21
      src-modules/module/costage/masken/43180_masken_felder_bez.unl
  40. 152
      src-modules/module/costage/masken/43180_maskeninfo.unl
  41. 1
      src-modules/module/costage/masken/43180_sachgeb_maske_bez.unl
  42. 14
      src-modules/module/costage/rohdaten/COSTAGE_ENV.sam
  43. 1300
      src-modules/module/costage/rohdaten/costage_prepare_unlfiles.x
  44. 75
      src-modules/module/costage/rohdaten/costage_prepare_unlfiles.xsl
  45. 5
      src-modules/module/costage/rohdaten/costage_prepare_unlfiles_generator.x
  46. 719
      src-modules/module/costage/rohdaten/costage_unload.xml
  47. 39
      src-modules/module/costage/rohdaten/csv_unloads2unl.sql
  48. 2
      src-modules/module/costage/rohdaten/db-co.properties.sam
  49. 19
      src-modules/module/costage/rohdaten/iso.txt
  50. 18
      src-modules/module/costage/rohdaten/sos_costage_unload.x
  51. 7182
      src-modules/module/costage/rohdaten/sos_costage_unload.xml
  52. 1216
      src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml
  53. 132
      src-modules/module/costage/rohdaten_sos/sos_v1_unload.x
  54. 190
      src-modules/module/costage/rohdaten_sos/sos_v1_unload.xml
  55. 1
      src-modules/module/costage/rohdaten_sos/superx.datum
  56. 1
      src-modules/module/costage/rohdaten_zul/unl/hierhin_die_rohdaten.txt
  57. 115
      src-modules/module/costage/rohdaten_zul/zul_costage_unload.x
  58. 635
      src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml
  59. 59
      src-modules/module/costage/schluesseltabellen/cifx_fuellen.sql
  60. 0
      src-modules/module/costage/schluesseltabellen/costage_captions.unl
  61. 68
      src-modules/module/costage/schluesseltabellen/costage_dim_studiengang_fuellen.sql
  62. 179
      src-modules/module/costage/schluesseltabellen/konstanten_fuellen.sql
  63. 122
      src-modules/module/costage/schluesseltabellen/sichten_fuellen.sql
  64. 8
      src-modules/module/costage/schluesseltabellen/sichten_loeschen.sql
  65. 69
      src-modules/module/costage/schluesseltabellen/sos_unload_params_fuellen.sql
  66. 20
      src-modules/module/costage/schluesseltabellen/sx_repository.unl
  67. 6
      src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql
  68. 26
      src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql
  69. 60
      src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql
  70. 39
      src-modules/module/costage/upgrade/costage_upgrade_man.sql

23
README.md

@ -1,22 +1,5 @@ @@ -1,22 +1,5 @@
Nach dem Auschecken des Repository z.B. in /home/superx/git können Sie es wie folgt installieren:
# Hochschul-Repository_Skeleton
#Installieren Sie ant, z.B. in /home/superx/tools
Verzeichnisstruktur einer SuperX/BI Webanwendung
wget https://dlcdn.apache.org/ant/binaries/apache-ant-1.10.12-bin.tar.gz
#Ergänzen Sie die SQL_ENV um die Zeilen
ANT_HOME=/home/superx/tools/apache-ant-1.10.12
export ANT_HOME
PATH=$PATH:$ANT_HOME/bin
export PATH
COSTAGE_PFAD=$SUPERX_MODULE/costage; export COSTAGE_PFAD
#Dann gehen Sie ins Verzeichnis
cd git/COSTAGE
#und führen aus:
ant -DMODULE_PATH=$COSTAGE_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=costage all
Basis Verzeichnisstruktur einer SuperX/-Edustore Webanwendung

6
build.xml

@ -46,12 +46,6 @@ ant -DMODULE_PATH=$COSTAGE_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=costage dist @@ -46,12 +46,6 @@ ant -DMODULE_PATH=$COSTAGE_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=costage dist
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" />
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" />
</subant>
<xslt in="${BASE_DIR}/src-modules/module/${MODULE}/rohdaten/${MODULE}_unload.xml" style="${BASE_DIR}/src-modules/module/${MODULE}/rohdaten/${MODULE}_prepare_unlfiles.xsl" out="${MODULE_PATH}/rohdaten/${MODULE}_prepare_unlfiles.x" force="true">
<outputproperty name="method" value="text" />
<param name="modulname" expression="${MODULE}" />
</xslt>
<chmod dir="${MODULE_PATH}/rohdaten" perm="ugo+x" includes="**/*.x" />
</target>
<target name="dist" description="Create Download package">
<subant target="erzeuge_paket">

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

File diff suppressed because it is too large Load Diff

67
src-modules/module/costage/costage_update.x

@ -1,67 +0,0 @@ @@ -1,67 +0,0 @@
#!/bin/bash
#Arbeitsverzeichnis fuer crontab
PFAD=$2
if [ "$PFAD" != "" ]
then
cd $PFAD
fi
#Umgebung einlesen:
if [ "$COSTAGE_PFAD" = "" ]
then
echo "ACHTUNG: Die Umgebungsvariable COSTAGE_PFAD ist nicht gesetzt. Bitte prüfen Sie $SUPERX_DIR/db/bin/SQL_ENV"
exit 1
fi
if [ "$COSTAGE_ERRORMAIL" != "" ]
then
ERRORMAIL=$COSTAGE_ERRORMAIL
export ERRORMAIL
fi
if [ "$COSTAGE_LOGMAIL" != "" ]
then
LOGMAIL=$COSTAGE_LOGMAIL
export LOGMAIL
fi
if [ "$COSTAGE_BACKUP" != "" ]
then
MODULE_BACKUP=$COSTAGE_BACKUP
export MODULE_BACKUP
fi
#hier geht es los
#runAndCheck.x path command (EXIT_ON_ERROR|CONT_ON_ERROR) (SEND_ERRORMAIL|NO_ERRORMAIL) (SEND_LOGMAIL|NO_LOGMAIL) [description] "
echo "costage-Update startet" >$COSTAGE_ERRORDAT
runAndCheck.x $COSTAGE_PFAD "module_etl.x costage $COSTAGE_PFAD $COSTAGE_LOAD_PFAD" EXIT_ON_ERROR SEND_ERRORMAIL SEND_LOGMAIL "COSTAGE update$MANDANTID"
echo "---------------------------Beginn Prüfroutine-----------------------------------" >>$COSTAGE_ERRORDAT
cat $COSTAGE_PFAD/L_COSTAGE_update$MANDANTID.log >>$COSTAGE_ERRORDAT
pruefmail.x $COSTAGE_PFAD/L_costage_Test$MANDANTID.log $ERRORMAIL
#Bei Fehlern Datum zurücksetzen:
fgrep -s "not found" $COSTAGE_ERRORDAT
FLAG1=$?
fgrep -i -s "error" $COSTAGE_ERRORDAT
FLAG2=$?
fgrep -i -s "nicht gefunden" $COSTAGE_ERRORDAT
FLAG3=$?
fgrep -i -s "fehler" $COSTAGE_ERRORDAT
FLAG4=$?
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 ]
then
echo "Fehler beim COSTAGE-Update "
echo "---------------------------------------"
echo "Fehlerprotokoll in $COSTAGE_ERRORDAT"
echo "Das Datum wird zurückgesetzt. Kopieren Sie die Datei superx.datum ggf. auf den COSTAGE-Rechner"
echo "---------------------------------------"
cp $COSTAGE_LOAD_PFAD/superx.datum.alt $COSTAGE_LOAD_PFAD/superx.datum
else
echo "COSTAGE-Update erfolgreich"
fi

20
src-modules/module/costage/costage_update_cron.x.sam

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
#!/bin/bash
#Beispielscript für cronjobs
#Im cronjob ist keine Umgebung vorhanden, deshalb vorher laden.
#Selbstredend als normaler user, nicht als root z.B.
. /home/superx/db/bin/SQL_ENV
cd $COSTAGE_LOAD_PFAD
./costage_unload.x
cd $COSTAGE_PFAD
costage_update.x
DOQUERY "reindex database $DBNAME"
echo "Ende $COSTAGE_PFAD/costage_update_cron.x"

8
src-modules/module/costage/datentabellen/check_studierende.sql

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
select 'Warnung: keine Studierendenstammdaten geliefert!'::varchar(255)
from xdummy
where 0=(select count(*) from costage_st_studierendenstammdaten_neu)
;
select 'Warnung: keine Studienverläufe mit Status geliefert!'::varchar(255)
from xdummy
where 0=(select count(*) from costage_st_studienstatus_neu)
;

37
src-modules/module/costage/datentabellen/trans_costage_lehrveranstaltungen.sql

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
--costage_lehrveranstaltungen semesterweise füllen:
delete from costage_lehrveranstaltungen
where st_sem_nr in (
select distinct st_sem_nr
from costage_lehrveranstaltungen_neu);
insert into costage_lehrveranstaltungen(stp_sp_nr,
ghk_nr,
titel_de,
titel_en,
nummer,
art_name_de,
art_name_en,
st_sem_nr,
org_nr,
sws,
ects_credits,
anerkennungsobjekt_flag,
semester
)
select N.stp_sp_nr,
N.ghk_nr,
N.titel_de,
N.titel_en,
N.nummer,
N.art_name_de,
N.art_name_en,
N.st_sem_nr,
N.org_nr,
N.sws,
N.ects_credits,
N.anerkennungsobjekt_flag,
S.semester_tid
FROM costage_lehrveranstaltungen_neu N, costage_st_semester S
where S.st_sem_nr=N.st_sem_nr
;

12
src-modules/module/costage/datentabellen/trans_costage_leistungen.sql

@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
--freemarker template
--(c) 2025 D.Quathamer
<#if COSTAGE_LEISTUNGSSTATUS_MAP?exists>
update costage_leistungen set leistungsstatus_map_kb=${COSTAGE_LEISTUNGSSTATUS_MAP}
;
</#if>

24
src-modules/module/costage/datentabellen/trans_costage_lv_teilnehmende.sql

@ -1,24 +0,0 @@ @@ -1,24 +0,0 @@
--costage_lv_teilnehmende semesterweise füllen:
delete from costage_lv_teilnehmende
where semester in (
select distinct S.semester_tid
from costage_lv_teilnehmende_neu N, costage_lehrveranstaltungen_neu L,costage_st_semester S
where N.stp_sp_nr=L.stp_sp_nr
and S.st_sem_nr=L.st_sem_nr);
insert into costage_lv_teilnehmende(lv_grp_pers_nr,
st_studium_nr,
stp_sp_nr,
lv_grp_name,
semester
)
select N.lv_grp_pers_nr,
N.st_studium_nr,
N.stp_sp_nr,
N.lv_grp_name,
S.semester_tid
FROM costage_lv_teilnehmende_neu N, costage_lehrveranstaltungen_neu L,costage_st_semester S
where N.stp_sp_nr=L.stp_sp_nr
and S.st_sem_nr=L.st_sem_nr
;

14
src-modules/module/costage/datentabellen/trans_costage_st_hochschulsemester.sql

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
delete from costage_st_hochschulsemester
where st_sem_nr in (select distinct st_sem_nr
from costage_st_hochschulsemester_neu);
insert into costage_st_hochschulsemester(st_studstamm_nr,
st_sem_nr,
anzahl_hochschulsemester)
select st_studstamm_nr,
st_sem_nr,
anzahl_hochschulsemester
from costage_st_hochschulsemester_neu;

20
src-modules/module/costage/datentabellen/trans_costage_st_studienstatus.sql

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
delete from costage_st_studienstatus
where st_sem_nr in (select distinct st_sem_nr
from costage_st_studienstatus_neu);
insert into costage_st_studienstatus(st_studienstatus_nr,
st_studium_nr,
studienstatustyp,
beginn_datum,
gueltig_ab,
st_sem_nr)
select st_studienstatus_nr,
st_studium_nr,
studienstatustyp,
beginn_datum,
gueltig_ab,
st_sem_nr
from costage_st_studienstatus_neu;

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

@ -1,27 +1,5 @@ @@ -1,27 +1,5 @@
create temp table tmp_st_studierendenstammdaten(
st_studstamm_nr INTEGER not null,
matrikelnummer INTEGER ,
vorname VARCHAR(255) ,
familienname VARCHAR(255) ,
geburtsdatum timestamptz ,
st_land1_nr INTEGER ,
st_land2_nr INTEGER ,
geburt_st_land_nr INTEGER ,
personentyp_name VARCHAR(100) ,
personentyp_kb VARCHAR(10) ,
aufnahmedatum timestamptz ,
abmeldungsdatum timestamptz ,
geschlecht INTEGER ,
d_geburt DATE ,
ca12_staat INTEGER ,
second_nationality INTEGER ,
d_exmatr DATE ,
abm_art_p char(10),
semester_max INTEGER
)
;
delete from costage_st_studierendenstammdaten;
--zuerst Ermittlung max. Semester
select S.st_studstamm_nr,max(SM.semester_tid)::integer as semester_max
@ -39,9 +17,7 @@ group by 1 @@ -39,9 +17,7 @@ group by 1
;
insert into tmp_st_studierendenstammdaten(
insert into costage_st_studierendenstammdaten(
st_studstamm_nr,
matrikelnummer,
vorname,
@ -55,10 +31,10 @@ insert into tmp_st_studierendenstammdaten( @@ -55,10 +31,10 @@ insert into tmp_st_studierendenstammdaten(
aufnahmedatum,
abmeldungsdatum,
geschlecht,
-- ca12_staat,
-- second_nationality,
ca12_staat,
second_nationality,
d_geburt,
-- d_exmatr,
d_exmatr,
semester_max)
select
S.st_studstamm_nr,
@ -71,86 +47,27 @@ S.st_studstamm_nr, @@ -71,86 +47,27 @@ S.st_studstamm_nr,
geburt_st_land_nr,
personentyp_name,
personentyp_kb,
date_val(aufnahmedatum),
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,
M.semester_max
FROM costage_st_laender L, costage_st_studierendenstammdaten_neu S left outer join tmp_max M
on (M.st_studstamm_nr=S.st_studstamm_nr)
where L.st_land_nr=S.st_land1_nr
and S.matrikelnummer is not null
;
--TODO: statt semesterende das tatsächliche Abmeldungsdatum
update tmp_st_studierendenstammdaten set d_exmatr=date(S.semester_ende),
abm_art_p=A.st_abm_art_kurzbezeichnung
from costage_st_personen_abmeldungen A,costage_st_semester S
where A.st_sem_nr=S.st_sem_nr
and A.st_studstamm_nr=tmp_st_studierendenstammdaten.st_studstamm_nr
and S.semester_tid=tmp_st_studierendenstammdaten.semester_max
and A.person_flag='J';
update tmp_st_studierendenstammdaten set ca12_staat=val(L.statistik_code)
update costage_st_studierendenstammdaten set second_nationality=val(L.statistik_code)
from costage_st_laender L
where L.st_land_nr=tmp_st_studierendenstammdaten.st_land1_nr;
where L.st_land_nr=costage_st_studierendenstammdaten.st_land2_nr;
update tmp_st_studierendenstammdaten set second_nationality=val(L.statistik_code)
from costage_st_laender L
where L.st_land_nr=tmp_st_studierendenstammdaten.st_land2_nr;
delete from costage_st_studierendenstammdaten
where 0 < (select count(*) from tmp_st_studierendenstammdaten) --bei CSV Upload kann die Tab. leer sein, daher abfangen
;
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,
abm_art_p,
semester_max)
select
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,
abm_art_p,
semester_max
FROM tmp_st_studierendenstammdaten
;
drop table tmp_max;
drop table tmp_st_studierendenstammdaten;

246
src-modules/module/costage/hilfstabellen/costage_bw_antr_aggr_fuellen.sql

@ -1,246 +0,0 @@ @@ -1,246 +0,0 @@
--Freemarker Template
<sqlvars>
<sqlvar name="status_werte" type="hashsequence">
SELECT nr,
bw_sb_stat_nr,
wert,
name
FROM costage_bw_sb_status_werte
;
</sqlvar>
<sqlvar name="beginn_semester"><![CDATA[
select param_val from unload_params
where param_id='COSTAGE_start_bw_sem';
]]>
</sqlvar>
</sqlvars>
<#assign bw_stati = [
{"kb":"vss", "nr":20,"name":"Formale Zulassungsvoraussetzungen"},
{"kb":"dok", "nr":30,"name":"Bewerbungsunterlagen"},
{"kb":"zul", "nr":40,"name":"Zulassung"},
{"kb":"stpl", "nr":50,"name":"Studienplatzangebot"},
{"kb":"qvss", "nr":60,"name":"Fachliche Zulassungsvoraussetzungen"},
{"kb":"abgabe", "nr":80,"name":"Bewerbungsabgabe"},
{"kb":"evs", "nr":90,"name":"Einschreibungsvoraussetzungen"}
] />
SELECT B.nr,
B.st_studstamm_nr,
B.st_sem_nr,
B.st_studiengang_nr,
B.st_studfrm_nr,
B.bw_sb_svor_nr,
B.bw_zul_art_nr,
B.bw_typ_kb,
B.zurueckgezogen_am,
B.fristbeginn,
B.fristende,
B.einstiegs_fachsemester,
B.fachsemester_gewaehlt,
B.abgeschickt_datum,
E.semester_tid as semester,
S.matrikelnummer,
<#foreach bw_status in bw_stati>
null::char(1) as status_${bw_status.kb} ,
null::char(1) as status_msg_${bw_status.kb} ,
</#foreach>
null::char(10) as stufrm,
null::char(10) as unikey,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::integer as st_studiengang_nr_msg,
null::integer as bw_bewerbng_nr_msg,
null::char(10) as bew_kz,
null::char(10) as zul_kz,
null::char(10) as annahme_kz,
null::char(10) as einschreib_kz,
null::CHAR(10) as hzb_art ,
null::DATE as hzb_datum ,
null::FLOAT as hzb_note ,
null::INTEGER as hzb_ort ,
null::INTEGER as hzb_staat ,
null::INTEGER as hzb_st_land_nr
into temp tmp_bew
FROM costage_st_semester E, costage_bw_bewerbungen B
left outer join costage_st_studierendenstammdaten S
on (B.st_studstamm_nr=S.st_studstamm_nr)
where E.st_sem_nr=B.st_sem_nr
--and B.bw_typ_kb not in ('MBW') --keine Mehrfachbewerbung
--and B.st_studstamm_nr=1186303
and E.semester_tid >= ${beginn_semester}
;
--klappt nicht weil nicht eindeutig:
-- update tmp_bew set bw_bewerbng_nr_msg=K.bw_bewrbng_nr
-- from costage_bw_bewerbung_kombination K
-- where K.bw_bewrbng_nr_teil=tmp_bew.nr
-- and tmp_bew.bw_typ_kb='TBW'
-- ;
-- update tmp_bew set st_studiengang_nr_msg=B.st_studiengang_nr
-- from costage_bw_bewerbungen B
-- where B.nr=tmp_bew.bw_bewerbng_nr_msg
-- and tmp_bew.bw_typ_kb='TBW'
-- ;
update tmp_bew set unikey=K.unikey
from costage_st_studiengaenge G, costage_st_studienkennzahlen K
where G.st_studiengang_nr=tmp_bew.st_studiengang_nr
and K.st_skz_nr=G.st_skz_nr
;
update tmp_bew set stufrm=F.statistik_code
from costage_st_studienformen F
where F.nr=tmp_bew.st_studfrm_nr
;
<#foreach bw_status in bw_stati>
<#foreach wert in status_werte>
<#if bw_status.nr == wert.bw_sb_stat_nr>
-- update tmp_bew set status_${bw_status.kb}=S.wert
-- from costage_bw_bewerb_sb_status S
-- where tmp_bew.nr=S.bw_bewerbng_nr
-- and S.bw_sb_stat_nr =${bw_status.nr}
-- ;
update tmp_bew set status_${bw_status.kb}='${wert.wert}'
where exists (select S.bw_bewerbng_nr
from costage_bw_bewerb_sb_status S
where tmp_bew.nr=S.bw_bewerbng_nr
and S.bw_sb_stat_nr =${bw_status.nr}
and S.wert='${wert.wert}')
;
-- update tmp_bew set status_msg_${bw_status.kb}=S.wert
-- from costage_bw_bewerb_sb_status S
-- where tmp_bew.bw_bewerbng_nr_msg=S.bw_bewerbng_nr
-- and S.bw_sb_stat_nr =${bw_status.nr}
-- ;
--Zum Zeitpunkt der Einschreibung/Annahme muss der Status aus dem MSG kommen.
--Die Zuordnung zum MSG ist aber nicht eindeutig. Beispiel Testfall hat in dem TSG Philosophie
--zwei mögliche MBW-Kombinationen. Daher mit exists abfragen, ob mind. ein MBW den jew. Status=J hat:
update tmp_bew set status_msg_${bw_status.kb}='${wert.wert}'
where exists (select S.bw_bewerbng_nr
from costage_bw_bewerb_sb_status S, costage_bw_bewerbung_kombination K
where bw_bewrbng_nr_teil=tmp_bew.nr
and K.bw_bewrbng_nr=S.bw_bewerbng_nr
and S.bw_sb_stat_nr =${bw_status.nr}
and S.wert='${wert.wert}')
and bw_typ_kb='TBW'
;
-- update tmp_bew set status_msg_${bw_status.kb}='J'
-- where exists (select S.bw_bewerbng_nr
-- from costage_bw_bewerb_sb_status S
-- where tmp_bew.bw_bewerbng_nr_msg=S.bw_bewerbng_nr
-- and S.bw_sb_stat_nr =${bw_status.nr}
-- and S.wert='J')
-- ;
</#if>
</#foreach>
</#foreach>
update tmp_bew set bew_kz='J' where status_vss='J';
;
update tmp_bew set zul_kz='J' where status_zul='J';
;
--beim MSG annahme_kz/einschreib_kz noch runterschreiben auf TSG
update tmp_bew set status_stpl='J' where status_msg_stpl='J';
update tmp_bew set status_evs='J' where status_msg_evs='J';
update tmp_bew set annahme_kz='J' where status_stpl='J'
;
update tmp_bew set einschreib_kz='J' where status_evs='J'
;
--TODO:
update tmp_bew
set hzb_art=H.hzb_art_stla_code,
hzb_datum=H.zeugnisdatum,
hzb_note=H.hzb_note,
hzb_ort=H.land_sub_r_nr,
hzb_st_land_nr=H.land_nr
from costage_bw_bewerb_hzb H, costage_bw_bewerbungen BW
where tmp_bew.st_studstamm_nr = BW.st_studstamm_nr
and BW.nr=H.bw_bewrbng_nr
;
update tmp_bew set hzb_staat=val(L.statistik_code)
from costage_st_laender L
where L.st_land_nr=tmp_bew.hzb_st_land_nr
;
delete from costage_bw_antr_aggr
where semester >= ${beginn_semester}
;
insert into costage_bw_antr_aggr( nr,
st_studstamm_nr,
matrikelnummer,
semester,
st_studiengang_nr,
st_studiengang_nr_msg,
bw_bewerbng_nr_msg,
unikey,
studiengang_nr,
fach_nr,
fachsemester,
stufrm,
bw_sb_svor_nr,
bw_zul_art_nr,
bw_typ_kb,
<#foreach bw_status in bw_stati>
status_${bw_status.kb},
</#foreach>
bew_kz,
zul_kz,
annahme_kz,
einschreib_kz,
hzb_art,
hzb_datum,
hzb_note,
hzb_ort,
hzb_staat,
summe
)
SELECT nr,
st_studstamm_nr,
val(matrikelnummer),
semester,
st_studiengang_nr,
st_studiengang_nr_msg,
bw_bewerbng_nr_msg,
unikey,
studiengang_nr,
fach_nr,
einstiegs_fachsemester as fachsemester,
stufrm,
bw_sb_svor_nr,
bw_zul_art_nr,
bw_typ_kb,
<#foreach bw_status in bw_stati>
status_${bw_status.kb},
</#foreach>
bew_kz,
zul_kz,
annahme_kz,
einschreib_kz,
hzb_art,
hzb_datum,
hzb_note,
hzb_ort,
hzb_staat,
count(*)
from tmp_bew
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31;
drop table tmp_bew;

280
src-modules/module/costage/hilfstabellen/costage_st_einzpruef_aggr_fuellen.sql

@ -1,280 +0,0 @@ @@ -1,280 +0,0 @@
--freemarker template
<sqlvars>
<sqlvar name="beginn_semester"><![CDATA[
<#assign anz_sem=5 />
<#if COSTAGE_einzpruef_anz_sem?exists && COSTAGE_einzpruef_anz_sem?string!="">
<#assign anz_sem=COSTAGE_einzpruef_anz_sem />
</#if>
select min(S.tid) from semester S where S.sem_beginn >= today()-(182*${anz_sem})
;
]]>
</sqlvar>
</sqlvars>
--Leistungen mit Veranstaltung -> Semester:
SELECT
L.st_studium_nr,
S.st_studstamm_nr,
L.matrikelnummer::integer as matrikelnummer,
null::integer as st_studiengang_nr,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::integer as st_studienstatus_nr,
null::integer as semester,
E.semester_tid as semester_veranst,
E.st_sem_nr,
null::integer as fachsemester,
null::varchar(255) as unikey,
L.leistung_nr,
L.leistungstyp_nr,
L.leistungsdetailtyp_kb,
L.studienidentifikator,
L.spov_abschluss,
L.stp_sp_nr,
L.veranstaltung_nummer,
L.veranstaltung_semester,
L.veranstaltung_titel,
L.veranstaltung_art,
L.semesterstunden,
L.unterrichtseinheiten,
L.thema_individuell,
L.pv_notenskala_nr,
L.note,
L.note_name,
L.note_zahl,
L.pv_pruef_zusatz_typen_nr,
L.note_zusatz,
L.note_zusatz_name,
L.note_positiv_flag,
L.note_negativ_flag,
L.pv_notenskala_typ_nr,
L.pv_notenskala_typ_kb,
L.pv_notenskala_typ_name,
L.credits,
date(L.leistungsdatum) as leistungsdatum,
L.anerkannt_flag,
L.zusatzleistung_flag,
L.leistungsstatus_nr,
L.leistungsstatus_map_kb,
null::integer as abschnitt,
null::integer as pnr,
null::integer as leistung_nr_msg,
null::integer as st_studiengang_nr_msg,
null::date as leistungsdatum_msg,
null::integer as semester_msg
into temp tmp_pruef
FROM costage_st_semester E, costage_leistungen_typen T, costage_leistungen L, costage_st_studierendenstammdaten S
where E.semester_id=L.veranstaltung_semester
and T.leistungstyp_nr=L.leistungstyp_nr
and S.matrikelnummer=L.matrikelnummer
-- TSAB/AB:
--and T.kurzbezeichnung in ('AP','AAP') --Abschlussprüfung/Anerkannte Abschlussprüfung
and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung
--px_leistungen_status_typen_v:
--4^F^Letztgültig^Final^
--1^P^in Bearbeitung^in process^
--2^V^gültige Leistung^valid^
--3^I^ungültige Leistung^invalid^
--5^D^gelöscht^deleted^
and E.semester_tid >= ${beginn_semester}
;
--Leistungen ohne Veranstaltungssemester gehen über Prüfungsdatum:
insert into tmp_pruef
SELECT
L.st_studium_nr,
S.st_studstamm_nr,
L.matrikelnummer::integer as matrikelnummer,
null::integer as st_studiengang_nr,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::integer as st_studienstatus_nr,
E.semester_tid as semester,
null::integer as semester_veranst,
null::integer as st_sem_nr,
null::integer as fachsemester,
null::varchar(255) as unikey,
L.leistung_nr,
L.leistungstyp_nr,
L.leistungsdetailtyp_kb,
L.studienidentifikator,
L.spov_abschluss,
L.stp_sp_nr,
L.veranstaltung_nummer,
L.veranstaltung_semester,
L.veranstaltung_titel,
L.veranstaltung_art,
L.semesterstunden,
L.unterrichtseinheiten,
L.thema_individuell,
L.pv_notenskala_nr,
L.note,
L.note_name,
L.note_zahl,
L.pv_pruef_zusatz_typen_nr,
L.note_zusatz,
L.note_zusatz_name,
L.note_positiv_flag,
L.note_negativ_flag,
L.pv_notenskala_typ_nr,
L.pv_notenskala_typ_kb,
L.pv_notenskala_typ_name,
L.credits,
date(L.leistungsdatum) as leistungsdatum,
L.anerkannt_flag,
L.zusatzleistung_flag,
L.leistungsstatus_nr,
L.leistungsstatus_map_kb,
2::integer as abschnitt, --provisorisch erstmal nur Hauptprüfungen
null::integer as pnr,
null::integer as leistung_nr_msg,
null::integer as st_studiengang_nr_msg,
null::date as leistungsdatum_msg,
null::integer as semester_msg
FROM costage_st_semester E, costage_leistungen_typen T, costage_leistungen L, costage_st_studierendenstammdaten S
where L.leistungsdatum between E.semester_anfang and E.semester_ende
and L.veranstaltung_semester is null
and T.leistungstyp_nr=L.leistungstyp_nr
and S.matrikelnummer=L.matrikelnummer
-- TSAB/AB:
--and T.kurzbezeichnung in ('AP','AAP') --Abschlussprüfung/Anerkannte Abschlussprüfung
and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung
and E.semester_tid >= ${beginn_semester}
;
update tmp_pruef set semester=E.semester_tid
FROM costage_st_semester E
where tmp_pruef.leistungsdatum between E.semester_anfang and E.semester_ende
and tmp_pruef.semester is null;
update tmp_pruef set st_sem_nr=E.st_sem_nr
FROM costage_st_semester E
where tmp_pruef.leistungsdatum between E.semester_anfang and E.semester_ende
and tmp_pruef.st_sem_nr is null;
update tmp_pruef set semester_veranst=semester
where semester_veranst is null;
--Fachsem. nachladen:
update tmp_pruef
set fachsemester=F.fachsemester
from costage_st_fachsemester F
where F.st_studium_nr=tmp_pruef.st_studium_nr
and F.st_sem_nr=tmp_pruef.st_sem_nr
and F.fachsemestertyp='FS'
;
--Studiengang nachladen
update tmp_pruef set st_studiengang_nr=S.st_studiengang_nr
from costage_st_studien S
where S.st_studium_nr=tmp_pruef.st_studium_nr
and S.st_studstamm_nr=tmp_pruef.st_studstamm_nr
;
--unikey nachladen:
update tmp_pruef set unikey=K.unikey
from costage_st_studiengaenge G, costage_st_studienkennzahlen K
where G.st_studiengang_nr=tmp_pruef.st_studiengang_nr
and K.st_skz_nr=G.st_skz_nr
;
--verknüpfen mit SPO Kontext:
select P.*,
G.context_type,
G.stp_knoten_nr_sichtbar,
G.ghk_nr,
G.st_studium_nr as spo_st_studium_nr,
null::varchar(255) as ghk_typ_kurzbezeichnung
into temp tmp_pruef2
from tmp_pruef P left outer join costage_studienplankontexte G
on (P.leistung_nr=G.leistungs_nr)
;
update tmp_pruef2 set ghk_typ_kurzbezeichnung=G.typ_kurzbezeichnung
from costage_gleichheitsknoten G
where G.ghk_nr=tmp_pruef2.ghk_nr
;
truncate table costage_st_einzpruef_aggr;
insert into costage_st_einzpruef_aggr(st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
semester_veranst,
st_studiengang_nr,
st_studiengang_nr_msg,
studiengang_nr,
fach_nr,
unikey,
studienidentifikator,
fachsemester,
leistung_nr,
leistungstyp_nr,
leistungsdetailtyp_kb,
pnr,
abschnitt,
stp_sp_nr,
veranstaltung_nummer,
veranstaltung_titel,
veranstaltung_art,
semesterstunden,
unterrichtseinheiten,
thema_individuell,
note,
credits,
leistungsdatum,
anerkannt_flag,
zusatzleistung_flag,
leistungsstatus_nr,
leistungsstatus_map_kb,
leistung_nr_msg,
leistungsdatum_msg,
semester_msg,
context_type,
stp_knoten_nr_sichtbar,
ghk_nr,
spo_st_studium_nr,
ghk_typ_kurzbezeichnung,
summe)
select
st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
semester_veranst,
st_studiengang_nr,
st_studiengang_nr_msg,
studiengang_nr,
fach_nr,
unikey,
substring(studienidentifikator from 1 for 255),
fachsemester,
leistung_nr,
leistungstyp_nr,
leistungsdetailtyp_kb,
pnr,
abschnitt,
stp_sp_nr,
veranstaltung_nummer,
substring(veranstaltung_titel from 1 for 255),
veranstaltung_art,
semesterstunden,
unterrichtseinheiten,
substring(thema_individuell from 1 for 255),
case when pv_notenskala_typ_kb in ('DE1','DE2','DE3','DE4','DE5','DE6','DE7') or pv_notenskala_typ_kb is null then note_zahl else null::float end as note,
credits,
leistungsdatum,
anerkannt_flag,
zusatzleistung_flag,
leistungsstatus_nr,
leistungsstatus_map_kb,
leistung_nr_msg,
leistungsdatum_msg,
semester_msg,
context_type,
stp_knoten_nr_sichtbar,
ghk_nr,
spo_st_studium_nr,
ghk_typ_kurzbezeichnung,
count(*)
from tmp_pruef2
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39;
drop table tmp_pruef;
drop table tmp_pruef2;

77
src-modules/module/costage/hilfstabellen/costage_st_lv_aggr_fuellen.sql

@ -1,77 +0,0 @@ @@ -1,77 +0,0 @@
--freemarker template
<sqlvars>
<sqlvar name="beginn_semester"><![CDATA[
select param_val from unload_params
where param_id='COSTAGE_start_lv_sem';
]]>
</sqlvar>
</sqlvars>
SELECT
L.stp_sp_nr,
L.ghk_nr,
L.titel_de,
L.titel_en,
L.nummer,
L.art_name_de,
L.art_name_en,
L.st_sem_nr,
L.org_nr,
L.sws,
L.ects_credits,
L.anerkennungsobjekt_flag,
U.st_studium_nr,
U.st_studstamm_nr,
U.st_studiengang_nr,
null::integer as st_studiengang_nr_msg,
null::varchar(255) as studienidentifikator,
val(S.matrikelnummer) as matrikelnummer,
L.semester
into temp tmp_lv
FROM costage_lehrveranstaltungen L, costage_st_studierendenstammdaten S,
costage_lv_teilnehmende T, costage_st_studien U
where T.stp_sp_nr=L.stp_sp_nr
and U.st_studium_nr=T.st_studium_nr
and U.st_studstamm_nr=S.st_studstamm_nr
and L.semester >= ${beginn_semester}
;
update tmp_lv set studienidentifikator=S.studiengangs_identifikator
from costage_st_studiengaenge S
where S.st_studiengang_nr=tmp_lv.st_studiengang_nr
;
delete from costage_st_lv_aggr
where semester >= ${beginn_semester};
insert into costage_st_lv_aggr(st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
st_studiengang_nr,
st_studiengang_nr_msg,
studienidentifikator,
stp_sp_nr,
titel_de,
nummer,
art_name_de,
summe)
select
st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
st_studiengang_nr,
st_studiengang_nr_msg,
studienidentifikator,
stp_sp_nr,
titel_de,
nummer,
art_name_de,
count(*)
from tmp_lv
group by 1,2,3,4,5,6,7,8,9,10,11;
drop table tmp_lv;

321
src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql

@ -1,321 +0,0 @@ @@ -1,321 +0,0 @@
--freemarker template
<sqlvars>
<sqlvar name="beginn_semester"><![CDATA[
select param_val from unload_params
where param_id='COSTAGE_start_leistungen_sem';
]]>
</sqlvar>
</sqlvars>
--Leistungen mit Veranstaltung -> Semester:
SELECT
L.st_studium_nr,
S.st_studstamm_nr,
L.matrikelnummer::integer as matrikelnummer,
null::integer as st_studiengang_nr,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::integer as st_studienstatus_nr,
null::integer as semester,
E.semester_tid as semester_veranst,
null::integer as fachsemester,
null::varchar(255) as unikey,
L.leistung_nr,
L.leistungstyp_nr,
L.leistungsdetailtyp_kb,
L.studienidentifikator,
L.stp_sp_nr,
L.veranstaltung_nummer,
L.veranstaltung_semester,
L.veranstaltung_titel,
L.veranstaltung_art,
L.semesterstunden,
L.unterrichtseinheiten,
L.thema_individuell,
L.pv_notenskala_nr,
L.note,
L.note_name,
L.note_zahl,
L.pv_pruef_zusatz_typen_nr,
L.note_zusatz,
L.note_zusatz_name,
L.note_positiv_flag,
L.note_negativ_flag,
L.pv_notenskala_typ_nr,
L.pv_notenskala_typ_kb,
L.pv_notenskala_typ_name,
L.credits,
date(L.leistungsdatum) as leistungsdatum,
L.anerkannt_flag,
L.zusatzleistung_flag,
L.leistungsstatus_nr,
L.leistungsstatus_map_kb,
2::integer as abschnitt, --provisorisch erstmal nur Hauptprüfungen
null::integer as pnr,
null::integer as leistung_nr_msg,
null::integer as st_studiengang_nr_msg,
null::date as leistungsdatum_msg,
null::integer as semester_msg,
L.spov_abschluss as po_stp_stp_version_kb
into temp tmp_pruef
FROM costage_st_semester E, costage_leistungen_typen T, costage_leistungen L, costage_st_studierendenstammdaten S
where E.semester_id=L.veranstaltung_semester
and T.leistungstyp_nr=L.leistungstyp_nr
and S.matrikelnummer=L.matrikelnummer
-- TSAB/AB:
and T.kurzbezeichnung in ('AP','AAP') --Abschlussprüfung/Anerkannte Abschlussprüfung
and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung
--px_leistungen_status_typen_v:
--4^F^Letztgültig^Final^
--1^P^in Bearbeitung^in process^
--2^V^gültige Leistung^valid^
--3^I^ungültige Leistung^invalid^
--5^D^gelöscht^deleted^
and E.semester_tid >= ${beginn_semester}
;
--Leistungen ohne Veranstaltungssemester gehen über Prüfungsdatum:
insert into tmp_pruef
SELECT
L.st_studium_nr,
S.st_studstamm_nr,
L.matrikelnummer::integer as matrikelnummer,
null::integer as st_studiengang_nr,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::integer as st_studienstatus_nr,
E.semester_tid as semester,
null::integer as semester_veranst,
null::integer as fachsemester,
null::varchar(255) as unikey,
L.leistung_nr,
L.leistungstyp_nr,
L.leistungsdetailtyp_kb,
L.studienidentifikator,
L.stp_sp_nr,
L.veranstaltung_nummer,
L.veranstaltung_semester,
L.veranstaltung_titel,
L.veranstaltung_art,
L.semesterstunden,
L.unterrichtseinheiten,
L.thema_individuell,
L.pv_notenskala_nr,
L.note,
L.note_name,
L.note_zahl,
L.pv_pruef_zusatz_typen_nr,
L.note_zusatz,
L.note_zusatz_name,
L.note_positiv_flag,
L.note_negativ_flag,
L.pv_notenskala_typ_nr,
L.pv_notenskala_typ_kb,
L.pv_notenskala_typ_name,
L.credits,
date(L.leistungsdatum) as leistungsdatum,
L.anerkannt_flag,
L.zusatzleistung_flag,
L.leistungsstatus_nr,
L.leistungsstatus_map_kb,
2::integer as abschnitt, --provisorisch erstmal nur Hauptprüfungen
null::integer as pnr,
null::integer as leistung_nr_msg,
null::integer as st_studiengang_nr_msg,
null::date as leistungsdatum_msg,
null::integer as semester_msg,
L.spov_abschluss
FROM costage_st_semester E, costage_leistungen_typen T, costage_leistungen L, costage_st_studierendenstammdaten S
where L.leistungsdatum between E.semester_anfang and E.semester_ende
and L.veranstaltung_semester is null
and T.leistungstyp_nr=L.leistungstyp_nr
and S.matrikelnummer=L.matrikelnummer
-- TSAB/AB:
and T.kurzbezeichnung in ('AP','AAP') --Abschlussprüfung/Anerkannte Abschlussprüfung
and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung
and E.semester_tid >= ${beginn_semester}
;
update tmp_pruef set semester=E.semester_tid
FROM costage_st_semester E
where tmp_pruef.leistungsdatum between E.semester_anfang and E.semester_ende
and tmp_pruef.semester is null;
update tmp_pruef set semester_veranst=semester
where semester_veranst is null;
update tmp_pruef set st_studiengang_nr=S.st_studiengang_nr
from costage_st_studien S
where S.st_studium_nr=tmp_pruef.st_studium_nr
and S.st_studstamm_nr=tmp_pruef.st_studstamm_nr
;
--Fachsemester aus Sem. des Prüfungsdatums holen:
update tmp_pruef set
fachsemester = S.fachsemester
from costage_st_studien_aggr S
where S.semester=tmp_pruef.semester
and S.st_studium_nr=tmp_pruef.st_studium_nr
and S.matrikelnummer=tmp_pruef.matrikelnummer
;
--Prüfung kann nach letztem eingeschr. Semester sein, daher zuerst letztes Sem. ermitteln:
select S.st_studium_nr,
S.matrikelnummer,
null::integer as st_studienstatus_nr,
null::integer as studiengang_nr,
null::integer as fach_nr,
null::char(10) as unikey,
null::integer as st_studiengang_nr_msg,
max(S.semester) as semester
into temp tmp_max_sem
from costage_st_studien_aggr S, tmp_pruef P
where S.st_studium_nr=P.st_studium_nr
and S.matrikelnummer=P.matrikelnummer
group by 1,2
;
--Dann Studium vom letzten Semester in den Prüfungs-Datensatz schreiben:
--TODO langsam:
update tmp_pruef set
st_studienstatus_nr=S.st_studienstatus_nr,
--fachsemester = S.fachsemester, --wird oben ermittelt, ab 0.6 nicht mehr aus letztem Studiums-Semester
studiengang_nr=S.studiengang_nr,
fach_nr=S.fach_nr,
unikey=S.unikey,
st_studiengang_nr_msg=S.st_studiengang_nr_msg
from tmp_max_sem M, costage_st_studien_aggr S
where S.matrikelnummer=M.matrikelnummer
and S.st_studium_nr=M.st_studium_nr
and S.semester=M.semester
and S.st_studium_nr=tmp_pruef.st_studium_nr
and S.matrikelnummer=tmp_pruef.matrikelnummer
;
drop table tmp_max_sem;
--MSG-Daten nachladen:
--zuerst Kopie nur mit MSG:
select * into temp tmp_pruef2
from tmp_pruef
where leistungsdetailtyp_kb !='TSAB'
;
--Dann Nr., Datum und Semster des MSG nachladen (TODO: ggf. noch Fachsemester?)
update tmp_pruef set leistung_nr_msg=T.leistung_nr,
leistungsdatum_msg=T.leistungsdatum,
semester_msg=T.semester
from tmp_pruef2 T
where tmp_pruef.st_studiengang_nr_msg=T.st_studiengang_nr
and tmp_pruef.leistungsdetailtyp_kb ='TSAB'
and T.matrikelnummer=tmp_pruef.matrikelnummer
;
--Leistungsdatum determiniert Semester auch bei MSG:
-- update tmp_pruef set semester=E.semester_tid
-- FROM costage_st_semester E
-- where tmp_pruef.leistungsdatum_msg between E.semester_anfang and E.semester_ende
-- and tmp_pruef.leistungsdetailtyp_kb !='TSAB'
-- and tmp_pruef.leistungsdatum_msg is not null;
update tmp_pruef set leistung_nr_msg=leistung_nr,
leistungsdatum_msg=leistungsdatum,
semester_msg=semester
where tmp_pruef.leistungsdetailtyp_kb !='TSAB'
;
--Fachsemester bei MSG gibt es in CO nicht. Daher die Regel:
--die Fachsemesterzahl sollte die höchste FS-Zahl aus allen TSG enthalten:
select matrikelnummer,st_studiengang_nr_msg,max(semester) as semester_max,max(fachsemester) as fachsem_max
into temp tmp_fachsem_msg
from tmp_pruef
where leistungsdetailtyp_kb='TSAB'
and st_studiengang_nr_msg is not null
group by 1,2;
update tmp_pruef set fachsemester=T.fachsem_max
from tmp_fachsem_msg T
where T.matrikelnummer=tmp_pruef.matrikelnummer
and T.st_studiengang_nr_msg=tmp_pruef.st_studiengang_nr
and T.semester_max <=tmp_pruef.semester
and tmp_pruef.leistungsdetailtyp_kb='BAKN'
;
drop table tmp_fachsem_msg;
--unikey setzen, wenn noch nicht vorhanden (z.B. bei MSG):
update tmp_pruef set unikey=K.unikey
from costage_st_studiengaenge G, costage_st_studienkennzahlen K
where G.st_studiengang_nr=tmp_pruef.st_studiengang_nr
and K.st_skz_nr=G.st_skz_nr
and tmp_pruef.unikey is null
;
delete from costage_st_pruef_aggr
where semester >= ${beginn_semester};
insert into costage_st_pruef_aggr(st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
semester_veranst,
st_studiengang_nr,
st_studiengang_nr_msg,
studiengang_nr,
fach_nr,
unikey,
studienidentifikator,
fachsemester,
leistung_nr,
leistungstyp_nr,
leistungsdetailtyp_kb,
pnr,
abschnitt,
stp_sp_nr,
po_stp_stp_version_kb,
note,
credits,
leistungsdatum,
anerkannt_flag,
leistungsstatus_nr,
leistungsstatus_map_kb,
leistung_nr_msg,
leistungsdatum_msg,
semester_msg,
summe)
select
st_studium_nr,
st_studstamm_nr,
matrikelnummer,
semester,
semester_veranst,
st_studiengang_nr,
st_studiengang_nr_msg,
studiengang_nr,
fach_nr,
unikey,
substring(studienidentifikator from 1 for 255),
fachsemester,
leistung_nr,
leistungstyp_nr,
leistungsdetailtyp_kb,
pnr,
abschnitt,
stp_sp_nr,
po_stp_stp_version_kb,
case when pv_notenskala_typ_kb in ('DE1','DE2','DE3','DE4','DE5','DE6','DE7') or pv_notenskala_typ_kb is null then note_zahl else null::float end as note,
credits,
leistungsdatum,
anerkannt_flag,
leistungsstatus_nr,
leistungsstatus_map_kb,
leistung_nr_msg,
leistungsdatum_msg,
semester_msg,
count(*)
from tmp_pruef
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28;
drop table tmp_pruef;
drop table tmp_pruef2;

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

File diff suppressed because it is too large Load Diff

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

@ -6,9 +6,3 @@ vacuum costage_st_semester; @@ -6,9 +6,3 @@ vacuum costage_st_semester;
vacuum costage_st_studierendenstammdaten;
vacuum costage_st_studiengaenge;
vacuum costage_st_studien_aggr;
vacuum costage_st_pruef_aggr;
vacuum costage_bw_antr_aggr;
vacuum costage_lehrveranstaltungen;
vacuum costage_lv_teilnehmende;
vacuum costage_st_lv_aggr;
vacuum costage_st_einzpruef_aggr;

19
src-modules/module/costage/masken/43040_felderinfo.unl

@ -5,13 +5,12 @@ @@ -5,13 +5,12 @@
</#list>\
order by 1^ ^^
43041^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-(4*365) between date(semester_anfang) and date(semester_ende);^
43042^Studiengang^9^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('COSTAGE-Studiengang-Sicht') order by 3,2;^^^
43043^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^^^
43044^Status^14^350^-1^140^180^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=400 order by 2^^ ^
43045^Hörerstatus^33^0^0^140^170^1^char^30^0^1^<<SQL>> select apnr, druck from cifx where key=401 order by 2^ ^ ^
43046^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \
--freemarker template\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_dim_studiengang')\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_st_studiengaenge')\
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \
</#if>\
@ -52,22 +51,8 @@ order by 2\ @@ -52,22 +51,8 @@ order by 2\
43054^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
43055^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43040 order by ord^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43040 and S.ord=1^
43056^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
43059^Hochschule / Standort^5^350^-1^140^80^1^char^255^0^1^<<SQL>> --freemarker template \
<#if COSTAGE_STORT?exists && COSTAGE_STORT !="">\
<#assign inlineTemplate=COSTAGE_STORT?interpret />\
<@inlineTemplate/>\
</#if>\
<#if stort?exists>\
<#foreach st in stort>\
select '${st.nr}','${st.name}' from xdummy\
<#if st?has_next>\
union\
</#if>\
</#foreach>\
<#else>\
select distinct K.unikey,K.unikey\
43059^Hochschule^5^350^-1^140^80^1^char^255^0^1^<<SQL>>select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K\
</#if>\
order by 2;^ ^<<SQL>> select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K, hochschulinfo H\
where K.unikey=H.hs_nr::char(10)^

1
src-modules/module/costage/masken/43040_masken_felder_bez.unl

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
43040^43040^
43040^43041^
43040^43042^
43040^43043^
43040^43044^
43040^43045^

7
src-modules/module/costage/masken/43040_maskeninfo.unl

@ -70,12 +70,11 @@ SELECT name,\ @@ -70,12 +70,11 @@ SELECT name,\
/* AND fachsemester <= <<bis Fachsemester>> */\
/* and statustyp in(<<Status>>) */\
/* and costage_st_studien_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\
/* and costage_st_studien_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) */\
/* and costage_st_studien_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.stg in (<<Fach>>)) */\
/* and studiengang_nr =<<Studiengang-Nr.>> */\
/* and fach_nr =<<Fach-Nr.>> */\
/* and costage_st_studien_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\
/* and costage_st_studien_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\
/* and costage_st_studien_aggr.unikey=<<Hochschule / Standort>> */\
" />\
\
\
@ -83,8 +82,6 @@ SELECT name,\ @@ -83,8 +82,6 @@ SELECT name,\
<#assign filter=filter+" and costage_st_studien_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\
</#if>\
\
\
/* <#assign filter = filter + " and 's_' || costage_st_studien_aggr.st_studiengang_nr in "+Studiengang.allNeededKeysList /> --<<Studiengang>> */ \
\
\
<@generate_resultset_multitable tabellen=table_list\
@ -167,4 +164,4 @@ Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlü @@ -167,4 +164,4 @@ Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlü
</#if>\
</#foreach>\
</#if>\
@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Studierendenstatistik, Studiengänge und Studierendenstammdaten^drop table tmp_tabelle;^^2^700^360^0^1^^
@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Studierendenstatistik, Studiengänge und Lehreinheiten^drop table tmp_tabelle;^^2^700^360^0^1^^

71
src-modules/module/costage/masken/43080_felderinfo.unl

@ -1,71 +0,0 @@ @@ -1,71 +0,0 @@
43080^Studiengang-Nr.^110^0^0^140^150^1^integer^70^0^13^<<SQL>> --Freemarker template\
<#list 1..6 as i>\
select ${i},'${i}. Studiengang' from xdummy\
<#if i_has_next> union </#if>\
</#list>\
order by 1^ ^^
43081^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^
43082^Studiengang^9^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('COSTAGE-Studiengang-Sicht') order by 3,2;^^^
43083^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^^^
43084^Prüfungsstatus^14^350^-1^140^180^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=622 order by 2^^ ^
43085^Auswertungsebene Prüfungen^25^330^-1^130^150^1^char^4^1^1^<<SQL>> select 'G','Gesamtabschluss' from xdummy\
union select 'F','Absolvent*innenfachfälle' from xdummy\
union select 'T','Teilstudienabschluss' from xdummy\
order by 1;^^<<SQL>> select 'T','Teilstudienabschluss' from xdummy;^
43086^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \
--freemarker template\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_dim_studiengang')\
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \
</#if>\
order by 2^^^
43087^Leistungsdetailtyp^20^350^-1^140^100^10^char^30^0^1^<<SQL>> select leistungsdetailtyp_kb,name_de from costage_leistungen_detail_typen\
where leistungsdetailtyp_kb in (select distinct leistungsdetailtyp_kb from costage_st_pruef_aggr);^ ^ ^
43089^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today() between date(semester_anfang) and date(semester_ende);^
43090^Fach-Nr.^119^0^0^140^150^1^integer^20^0^13^<<SQL>> --Freemarker template\
<#list 1..10 as i>\
select ${i},'${i}. Fach' from xdummy\
<#if i_has_next> union </#if>\
</#list>\
order by 1^ ^^
43091^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^^^
43092^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>>\
--freemarker template\
select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F,\
sx_tables T where F.table_name=T.name and F.currentlyused=1\
--Pseudonyme eingeschaltet:\
and (F.name != 'matrikel_nr' or 0=(select \
count(*) from konstanten where beschreibung='SOS_MTKNR_EXT'\
and apnr=1)) \
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\
and (F.table_name ='costage_st_pruef_aggr'\
/* or F.table_name in (<<Weitere Tabellen>>) */) \
<#else>\
and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fieldname) from stylesheet_field where stylesheet_id in \
(select tid from sx_stylesheets where filename=<<tablestylesheet>>))\
</#if>\
order by 2;^^^
43093^Fach^6^0^0^140^150^50^char^30^0^1^<<SQL>>\
SELECT \
skz_key,\
skz_name\
FROM costage_st_studienkennzahlen\
/* where unikey=<<Hochschule>> */\
order by 2\
;^^^
43094^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
43095^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 order by ord^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 and S.ord=1^
43096^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
43099^Hochschule^5^350^-1^140^80^1^char^255^0^1^<<SQL>>select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K\
order by 2;^ ^<<SQL>> select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K, hochschulinfo H\
where K.unikey=H.hs_nr::char(10)^
43100^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^
43101^Abschluss^7^0^0^140^170^20^char^30^0^1^<<SQL>> SELECT \
code,\
name\
FROM costage_st_abschlussziele_lokal\
order by 2;^^^
43102^Matrikel-Nr.^30^350^-1^150^180^1^char^200^0^0^^^^
43103^##line##^40^0^0^100^100^1^char^5000^0^8^^^1^

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

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

21
src-modules/module/costage/masken/43080_masken_felder_bez.unl

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
43080^43080^
43080^43081^
43080^43082^
43080^43083^
43080^43084^
43080^43085^
43080^43086^
43080^43087^
43080^43089^
43080^43090^
43080^43091^
43080^43092^
43080^43093^
43080^43094^
43080^43095^
43080^43096^
43080^43099^
43080^43100^
43080^43101^
43080^43102^
43080^43103^

168
src-modules/module/costage/masken/43080_maskeninfo.unl

@ -1,168 +0,0 @@ @@ -1,168 +0,0 @@
43080^Abschlussprüfungen Datenblatt (CO)^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/>\
\
--ram excelexport \
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/>\
\
<sqlvars>\
<sqlvar name="get_tables"><![CDATA[\
SELECT distinct name,name\
from sx_tables\
where name in ('costage_st_pruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 2;]]>\
</sqlvar>\
<sqlvar name="get_table_joins"><![CDATA[\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \
from sx_fields where table_name in ('costage_st_pruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('costage_st_pruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT name,\
caption,\
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\
|| '#' || trim(string_not_null(foreignkey_cap))\
|| '#' || trim(string_not_null(foreignkey_cond))\
|| '#' || trim(string_not_null(foreignkey_func))\
|| '#' || trim(string_not_null(table_name))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_pruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="get_felder_fk"><![CDATA[\
SELECT name,\
caption,\
(trim(table_name)\
|| '#' || trim(string_not_null(foreignkey_tab))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_pruef_aggr' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
</sqlvars>\
\
<@generate_multitable_list />\
<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\
<@generate_foreign_fields_multitable />\
\
\
<#assign filter="\
/* and hrst in (<<Hörerstatus>>) */\
/* AND leistungsdetailtyp_kb in (<<Leistungsdetailtyp>>) */\
/* and leistungsstatus_map_kb in(<<Prüfungsstatus>>) */\
/* and costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\
/* and studiengang_nr =<<Studiengang-Nr.>> */\
/* and fach_nr =<<Fach-Nr.>> */\
/* and costage_st_pruef_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\
/* and costage_st_pruef_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\
/* and costage_st_pruef_aggr.unikey=<<Hochschule>> */\
" />\
\
\
<#if "<<Matrikel-Nr.>>"!="">\
<#assign filter=filter+" and costage_st_pruef_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\
</#if>\
/* <#assign filter = filter + " and 's_' || costage_st_pruef_aggr.st_studiengang_nr in "+Studiengang.allNeededKeysList /> --<<Studiengang>> */ \
\
--Feld Auswertungsebene Prüfungen\
--Was wird ausgewertet? Welche Leistungsdetailtypen sin betroffen? Welches Prüfungsdatum/Semester soll ausgewertet werden?\
--G=Gesamtabschluss=BAKN, MAGN, STEX, ERGAB Prüfungsdatum/Semester\
--F=Absolvent*innenfachfälle=TSAB Prüfungsdatum/Semester des MSG\
--T=Teilstudienabschluss=TSAB Prüfungsdatum/Semester\
\
<#assign semester_filter="1=1" />\
<#assign semester_feld="semester" />\
\
<#assign fach_filter="1=1" />\
--Default: \
/* <#assign fach_filter="costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) "/> \
*/\
\
\
\
<#assign ldt_filter="1=1" />\
<#if <<Auswertungsebene Prüfungen>>=="G">\
<#assign ldt_filter="leistungsdetailtyp_kb in ('BAKN', 'MAGN', 'STEX', 'ERGAB')" />\
<#assign semester_feld="semester_msg" />\
\
\
</#if> \
<#if <<Auswertungsebene Prüfungen>>=="F">\
<#assign ldt_filter="leistungsdetailtyp_kb in ('TSAB')" />\
<#assign semester_feld="semester_msg" />\
</#if> \
<#if <<Auswertungsebene Prüfungen>>=="T">\
<#assign ldt_filter="leistungsdetailtyp_kb in ('TSAB')" />\
</#if> \
\
\
/* <#assign semester_filter=semester_filter + " and "+semester_feld + " >= <<Seit Semester>>" /> */\
/* <#assign semester_filter=semester_filter + " and "+semester_feld + " <= <<Bis Semester>>" /> */\
\
\
<#assign filter=filter+" and "+ldt_filter + " and " + semester_filter +" and " + fach_filter />\
\
<@generate_resultset_multitable tabellen=table_list\
p_show_keys=<<Schlüssel anzeigen>>\
p_field_list_select=field_list_select\
p_foreign_fields=foreign_fields\
p_filter=filter\
p_field_list_groupby=field_list_groupby\
p_join_clause=join_clause\
/>^--Freemarker Template \
<sqlvars>\
<sqlvar name="basetable">select 'costage_st_pruef_aggr' from xdummy</sqlvar>\
<sqlvar name="restriction"><![CDATA[\
<#assign restrict=DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)/>;\
select '${restrict?replace("\\x0027","\\x0027\\x0027")}' from xdummy;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT caption,\
foreignkey_tab,\
description as strukturStr\
from sx_fields\
where table_name in ('${basetable}'\
${restriction}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 1;]]>\
</sqlvar>\
</sqlvars>\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if get_felder?has_content >\
<#foreach myfield in get_felder>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.name != '' && <<Schlüssel anzeigen>>==1>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
</#if>\
@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Abschlussprüfungen, Studiengänge und Studierenden-Stammdaten^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^

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

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

59
src-modules/module/costage/masken/43110_felderinfo.unl

@ -1,59 +0,0 @@ @@ -1,59 +0,0 @@
43110^Antragsnummer^32^0^0^140^180^1^char^30^0^0^ ^ ^ ^
43111^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^
43112^Studiengang^9^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('COSTAGE-Studiengang-Sicht') order by 3,2;^ ^ ^
43113^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^ ^ ^
43114^Zulassungsart^14^350^-1^140^180^1^integer^30^0^1^<<SQL>> select nr, name\
FROM costage_bw_zulassungsarten order by 2^ ^ ^
43115^Bewerbernummer^25^350^-1^150^180^1^char^200^0^0^^ ^ ^
43116^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \
--freemarker template\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_dim_studiengang')\
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \
</#if>\
order by 2^ ^ ^
43117^bis Fachsemester^20^350^-1^140^10^1^integer^30^0^0^^ ^ ^
43119^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today() between date(semester_anfang) and date(semester_ende);^
43120^Fach-Nr.^119^0^0^140^150^1^integer^20^0^13^<<SQL>> --Freemarker template\
<#list 1..10 as i>\
select ${i},'${i}. Fach' from xdummy\
<#if i_has_next> union </#if>\
</#list>\
order by 1^ ^ ^
43121^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^ ^ ^
43122^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>>\
--freemarker template\
select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F,\
sx_tables T where F.table_name=T.name and F.currentlyused=1\
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\
and (F.table_name ='costage_bw_antr_aggr'\
/* or F.table_name in (<<Weitere Tabellen>>) */) \
<#else>\
and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fieldname) from stylesheet_field where stylesheet_id in \
(select tid from sx_stylesheets where filename=<<tablestylesheet>>))\
</#if>\
order by 2;^ ^ ^
43123^Fach^6^0^0^140^150^50^char^30^0^1^<<SQL>>\
SELECT \
skz_key,\
skz_name\
FROM costage_st_studienkennzahlen\
/* where unikey=<<Hochschule>> */\
order by 2\
;^ ^ ^
43124^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^ ^<<SQL>> select 1,'Ja' from xdummy^
43125^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 order by ord^ ^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 and S.ord=1^
43126^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^ ^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
43129^Hochschule^5^350^-1^140^80^1^char^255^0^1^<<SQL>>select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K\
order by 2;^ ^<<SQL>> select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K, hochschulinfo H\
where K.unikey=H.hs_nr::char(10)^
43130^##line##^10^0^0^100^100^1^char^5000^0^8^^ ^1^
43131^Abschluss^7^0^0^140^170^5^char^30^0^1^<<SQL>> SELECT \
code,\
name\
FROM costage_st_abschlussziele_lokal\
order by 2;^ ^ ^
43132^Matrikel-Nr.^30^350^-1^150^180^1^char^200^0^0^^ ^ ^
43133^##line##^40^0^0^100^100^1^char^5000^0^8^^ ^1^

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

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

21
src-modules/module/costage/masken/43110_masken_felder_bez.unl

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
43110^43110^
43110^43111^
43110^43112^
43110^43113^
43110^43114^
43110^43115^
43110^43116^
43110^43117^
43110^43119^
43110^43120^
43110^43121^
43110^43122^
43110^43123^
43110^43124^
43110^43125^
43110^43126^
43110^43129^
43110^43130^
43110^43131^
43110^43132^
43110^43133^

135
src-modules/module/costage/masken/43110_maskeninfo.unl

@ -1,135 +0,0 @@ @@ -1,135 +0,0 @@
43110^Bewerbungen Datenblatt (CO)^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#include "DatenblattSQLGenerator"/>\
\
--ram excelexport \
\
<sqlvars>\
<sqlvar name="basetable" ><![CDATA[\
SELECT distinct name\
from sx_tables\
where name in ('costage_bw_antr_aggr');]]>\
</sqlvar>\
<sqlvar name="getJoinTables" type="hashsequence"><![CDATA[\
SELECT distinct name\
from sx_tables\
where name in (''\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 1;]]>\
</sqlvar>\
<sqlvar name="getJoinWhereClauses" type="hashsequence"><![CDATA[\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col as condition,\
table_name ,\
foreignkey_tab\
from sx_fields where table_name in ('${basetable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('-xy'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="getSelectClause" type="hashsequence"><![CDATA[\
SELECT name,\
caption,\
field_type,\
is_primarykey,\
foreignkey_tab,\
foreignkey_col,\
foreignkey_cap,\
foreignkey_cond,\
foreignkey_func,\
table_name,\
foreignkey_uniquename\
from sx_fields\
where table_name in ('${basetable}'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
</sqlvars>\
\
<#assign person_nr_filter="1=1" />\
<#assign person_nr_feldwert="" />\
/* <#assign person_nr_feldwert=<<Bewerbernummer>> />*/\
<#if person_nr_feldwert?starts_with("2-")>\
<#assign person_nr_feldwert=person_nr_feldwert?replace("2-","") />\
</#if>\
/* <#assign person_nr_filter="st_studstamm_nr = "+ person_nr_feldwert /> --<<Bewerbernummer>> */\
\
<#assign antrags_nr_filter="1=1" />\
<#assign antrags_nr_feldwert="" />\
/* <#assign antrags_nr_feldwert=<<Antragsnummer>> />*/\
<#if antrags_nr_feldwert?starts_with("1-")>\
<#assign antrags_nr_feldwert=antrags_nr_feldwert?replace("1-","") />\
</#if>\
/* <#assign antrags_nr_filter="costage_bw_antr_aggr.nr= " + antrags_nr_feldwert /> --<<Antragsnummer>> */\
\
\
\
<#assign filter="and bw_typ_kb not in ('MBW')\
/* AND bw_zul_art_nr in (<<Zulassungsart>>) */\
/* and costage_bw_antr_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\
/* and costage_bw_antr_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\
/* and costage_bw_antr_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\
/* and costage_bw_antr_aggr.unikey=<<Hochschule>> */\
/* and semester >= <<Seit Semester>> */\
/* and semester <= <<Bis Semester>> */\
/* and fachsemester <= <<bis Fachsemester>> */\
" />\
\
<#assign filter = filter + " and " + person_nr_filter />\
<#assign filter = filter + " and " + antrags_nr_filter />\
\
\
/* <#assign filter = filter + " and 's_' || costage_bw_antr_aggr.st_studiengang_nr in "+Studiengang.allNeededKeysList /> --<<Studiengang>> */ \
\
<#if "<<Matrikel-Nr.>>"!="">\
<#assign filter=filter+" and costage_bw_antr_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\
</#if>\
\
\
<#assign fach_filter="1=1" />\
--Default: TSG\
/* <#assign fach_filter="costage_bw_antr_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) "/> \
*/\
\
\
<#assign filter=filter +" and " + fach_filter />\
\
--\
\
<@generateDatenblatt \
p_basetable = basetable\
p_joinTables = getJoinTables\
p_joinWhereClauses = getJoinWhereClauses\
p_selectClause = getSelectClause\
p_aggregationsfeld ="summe"\
p_aggregatfunktion = "sum("\
p_filter = filter\
p_show_keys= <<Schlüssel anzeigen>>\
p_postProcessing= ""\
/>^--Freemarker Template \
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if getSelectClause?has_content >\
<#foreach myfield in getSelectClause>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.caption}" explanation="" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.foreignkey_tab != '' && <<Schlüssel anzeigen>>==1>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.caption}\\n(Schlüssel)" explanation="" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
</#if>\
@@@^Altersgruppe^Anzahl^Bewerbungen Datenblatt aus CO^drop table tmp_tabelle;^^2^700^360^^1^^

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

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

45
src-modules/module/costage/masken/43140_felderinfo.unl

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
43141^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^
43142^Studiengang^9^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('COSTAGE-Studiengang-Sicht') order by 3,2;^^^
43143^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^hidden^^
43146^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \
--freemarker template\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_dim_studiengang')\
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \
</#if>\
order by 2^ ^^
43147^bis Fachsemester^20^350^-1^140^10^1^integer^30^0^0^ ^hidden^ ^
43149^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today() between date(semester_anfang) and date(semester_ende);^
43150^Titelstichwort^119^0^0^140^150^1^char^20^0^13^ ^ ^^
43151^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^hidden^^
43152^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>>\
--freemarker template\
select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F,\
sx_tables T where F.table_name=T.name and F.currentlyused=1\
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\
and (F.table_name ='costage_st_lv_aggr'\
/* or F.table_name in (<<Weitere Tabellen>>) */) \
<#else>\
and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fieldname) from stylesheet_field where stylesheet_id in \
(select tid from sx_stylesheets where filename=<<tablestylesheet>>))\
</#if>\
order by 2;^^^
43153^Fach^6^0^0^140^150^50^char^30^0^1^<<SQL>>\
SELECT \
skz_key,\
skz_name\
FROM costage_st_studienkennzahlen\
/* where unikey=<<Hochschule>> */\
order by 2\
;^^^
43154^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
43155^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43140 order by ord^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43080 and S.ord=1^
43156^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
43160^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^
43161^Abschluss^7^0^0^140^170^5^char^30^0^1^<<SQL>> SELECT \
code,\
name\
FROM costage_st_abschlussziele_lokal\
order by 2;^^^
43162^Matrikel-Nr.^30^350^-1^150^180^1^char^200^0^0^^hidden^^
43163^##line##^40^0^0^100^100^1^char^5000^0^8^^^1^

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

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

17
src-modules/module/costage/masken/43140_masken_felder_bez.unl

@ -1,17 +0,0 @@ @@ -1,17 +0,0 @@
43140^43141^
43140^43142^
43140^43143^
43140^43146^
43140^43147^
43140^43149^
43140^43150^
43140^43151^
43140^43152^
43140^43153^
43140^43154^
43140^43155^
43140^43156^
43140^43160^
43140^43161^
43140^43162^
43140^43163^

133
src-modules/module/costage/masken/43140_maskeninfo.unl

@ -1,133 +0,0 @@ @@ -1,133 +0,0 @@
43140^Lehrveranstaltungsteilnahme Datenblatt (CO)^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/>\
\
--ram excelexport \
\
<sqlvars>\
<sqlvar name="get_tables"><![CDATA[\
SELECT distinct name,name\
from sx_tables\
where name in ('costage_st_lv_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 2;]]>\
</sqlvar>\
<sqlvar name="get_table_joins"><![CDATA[\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \
from sx_fields where table_name in ('costage_st_lv_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('costage_st_lv_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT name,\
caption,\
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\
|| '#' || trim(string_not_null(foreignkey_cap))\
|| '#' || trim(string_not_null(foreignkey_cond))\
|| '#' || trim(string_not_null(foreignkey_func))\
|| '#' || trim(string_not_null(table_name))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_lv_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="get_felder_fk"><![CDATA[\
SELECT name,\
caption,\
(trim(table_name)\
|| '#' || trim(string_not_null(foreignkey_tab))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_lv_aggr' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
</sqlvars>\
\
<@generate_multitable_list />\
<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\
<@generate_foreign_fields_multitable />\
\
\
<#assign filter="\
/* and costage_st_lv_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\
/* and studiengang_nr =<<Studiengang-Nr.>> */\
/* and costage_st_lv_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\
/* and costage_st_lv_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\
/* and semester >= <<Seit Semester>> */\
/* and semester <= <<Bis Semester>> */\
" />\
\
/* <#assign filter = filter + " and 's_' || costage_st_lv_aggr.st_studiengang_nr in "+Studiengang.allNeededKeysList /> --<<Studiengang>> */ \
\
<#if "<<Matrikel-Nr.>>"!="">\
<#assign filter=filter+" and costage_st_lv_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\
</#if>\
\
\
<#assign fach_filter="1=1" />\
--Default: TSG\
/* <#assign fach_filter="costage_st_lv_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) "/> \
*/\
\
\
<#assign filter=filter +" and " + fach_filter />\
\
<@generate_resultset_multitable tabellen=table_list\
p_show_keys=<<Schlüssel anzeigen>>\
p_field_list_select=field_list_select\
p_foreign_fields=foreign_fields\
p_filter=filter\
p_field_list_groupby=field_list_groupby\
p_join_clause=join_clause\
/>^--Freemarker Template \
<sqlvars>\
<sqlvar name="basetable">select 'costage_st_lv_aggr' from xdummy</sqlvar>\
<sqlvar name="restriction"><![CDATA[\
<#assign restrict=DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)/>;\
select '${restrict?replace("\\x0027","\\x0027\\x0027")}' from xdummy;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT caption,\
foreignkey_tab,\
description as strukturStr\
from sx_fields\
where table_name in ('${basetable}'\
${restriction}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 1;]]>\
</sqlvar>\
</sqlvars>\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if get_felder?has_content >\
<#foreach myfield in get_felder>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.name != '' && <<Schlüssel anzeigen>>==1>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
</#if>\
@@@^Altersgruppe^Anzahl^Lehrveranstaltungen Datenblatt aus CO^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^

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

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

56
src-modules/module/costage/masken/43180_felderinfo.unl

@ -1,56 +0,0 @@ @@ -1,56 +0,0 @@
43180^Prüfungstyp^18^0^0^140^150^1^char^70^0^1^<<SQL>>select 'LV','reale Lehrveranstaltung' from xdummy\
union select 'FACH','Fach-/Modulprüfung' from xdummy\
order by 1^ ^^
43181^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^
43182^Studiengang^9^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('COSTAGE-Studiengang-Sicht') order by 3,2;^^^
43183^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<<SQL>> SELECT st_land_nr, name from costage_st_laender order by 2;^^^
43184^Prüfungsstatus^14^350^-1^140^180^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=622 order by 2^^ ^
43185^Auswertungsebene Prüfungen^25^330^-1^130^150^1^char^4^1^1^<<SQL>> select 'G','Gesamtabschluss' from xdummy\
union select 'F','Absolvent*innenfachfälle' from xdummy\
union select 'T','Teilstudienabschluss' from xdummy\
order by 1;^hidden^<<SQL>> select 'T','Teilstudienabschluss' from xdummy;^
43186^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<<SQL>> \
--freemarker template\
select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_dim_studiengang')\
<#if <<tablestylesheet>>!='tabelle_html_datenblatt.xsl'>\
and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<<tablestylesheet>>)) \
</#if>\
order by 2^^^
43187^Leistungsdetailtyp^20^350^-1^140^100^10^char^30^0^1^<<SQL>> select leistungsdetailtyp_kb,name_de from costage_leistungen_detail_typen\
where leistungsdetailtyp_kb in (select distinct leistungsdetailtyp_kb from costage_st_pruef_aggr);^ ^ ^
43189^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<<SQL>> select semester_tid, semester_bezeichnung from costage_st_semester where today() between date(semester_anfang) and date(semester_ende);^
43190^Matrikel-Nr.^50^350^-1^150^180^1^char^200^0^0^^^^
43191^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^^^
43192^Felder^125^0^0^150^190^10^char^30^0^1^<<SQL>>\
--freemarker template\
select trim(F.table_name) || '.' || F.name,trim(T.caption) || ':' || trim(F.caption) || ' - ' || trim(F.name) from sx_fields F,\
sx_tables T where F.table_name=T.name and F.currentlyused=1\
--Pseudonyme eingeschaltet:\
and (F.name != 'matrikel_nr' or 0=(select \
count(*) from konstanten where beschreibung='SOS_MTKNR_EXT'\
and apnr=1)) \
<#if <<tablestylesheet>>='tabelle_html_datenblatt.xsl'>\
and (F.table_name ='costage_st_einzpruef_aggr'\
/* or F.table_name in (<<Weitere Tabellen>>) */) \
<#else>\
and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fieldname) from stylesheet_field where stylesheet_id in \
(select tid from sx_stylesheets where filename=<<tablestylesheet>>))\
</#if>\
order by 2;^^^
43193^Fach^6^0^0^140^150^50^char^30^0^1^<<SQL>>\
SELECT \
skz_key,\
skz_name\
FROM costage_st_studienkennzahlen\
/* where unikey=<<Hochschule>> */\
order by 2\
;^^^
43194^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<<SQL>> select 1,'Ja' from xdummy^
43195^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43180 order by ord^^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=43180 and S.ord=1^
43196^Ausgabeformat^2001^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^
43199^Hochschule^5^350^-1^140^80^1^char^255^0^1^<<SQL>>select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K\
order by 2;^ ^<<SQL>> select distinct K.unikey,K.unikey\
from costage_st_studienkennzahlen K, hochschulinfo H\
where K.unikey=H.hs_nr::char(10)^
43200^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^

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

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

21
src-modules/module/costage/masken/43180_masken_felder_bez.unl

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
43180^43180^
43180^43181^
43180^43182^
43180^43183^
43180^43184^
43180^43185^
43180^43186^
43180^43187^
43180^43188^
43180^43189^
43180^43190^
43180^43191^
43180^43192^
43180^43193^
43180^43194^
43180^43195^
43180^43196^
43180^43197^
43180^43198^
43180^43199^
43180^43200^

152
src-modules/module/costage/masken/43180_maskeninfo.unl

@ -1,152 +0,0 @@ @@ -1,152 +0,0 @@
43180^Einzelprüfungen Datenblatt (CO)^--Freemarker Template\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/>\
\
--ram excelexport \
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#include "SQL_multitable_output"/>\
\
<sqlvars>\
<sqlvar name="get_tables"><![CDATA[\
SELECT distinct name,name\
from sx_tables\
where name in ('costage_st_einzpruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
\
)\
order by 2;]]>\
</sqlvar>\
<sqlvar name="get_table_joins"><![CDATA[\
select table_name || '.' || name || '=' || foreignkey_tab || '.' || foreignkey_col,table_name \
from sx_fields where table_name in ('costage_st_einzpruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)} )\
and foreignkey_tab in ('costage_st_einzpruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)})\
;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT name,\
caption,\
(trim(field_type) || '#' || is_primarykey || '#' || trim(string_not_null(foreignkey_tab)) || '#' || trim(string_not_null(foreignkey_col))\
|| '#' || trim(string_not_null(foreignkey_cap))\
|| '#' || trim(string_not_null(foreignkey_cond))\
|| '#' || trim(string_not_null(foreignkey_func))\
|| '#' || trim(string_not_null(table_name))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_einzpruef_aggr'\
${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
<sqlvar name="get_felder_fk"><![CDATA[\
SELECT name,\
caption,\
(trim(table_name)\
|| '#' || trim(string_not_null(foreignkey_tab))\
|| '#' || trim(string_not_null(foreignkey_uniquename)))::char(255) as strukturStr\
from sx_fields\
where table_name in ('costage_st_einzpruef_aggr' ${DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 2,3;]]>\
</sqlvar>\
</sqlvars>\
\
<@generate_multitable_list />\
<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\
<@generate_foreign_fields_multitable />\
\
\
<#assign filter="\
/* and hrst in (<<Hörerstatus>>) */\
/* AND leistungsdetailtyp_kb in (<<Leistungsdetailtyp>>) */\
/* and leistungsstatus_map_kb in(<<Prüfungsstatus>>) */\
/* and costage_st_einzpruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<<Abschluss>>)) */\
/* and studiengang_nr =<<Studiengang-Nr.>> */\
/* and fach_nr =<<Fach-Nr.>> */\
/* and costage_st_einzpruef_aggr.st_studstamm_nr in (select S.st_studstamm_nr from costage_st_studierendenstammdaten S where S.st_land1_nr in (<<Staatsangehörigkeit>>) ) */\
/* and costage_st_einzpruef_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <<Geschlecht>> ) */\
/* and costage_st_einzpruef_aggr.unikey=<<Hochschule>> */\
/* and costage_st_einzpruef_aggr.ghk_typ_kurzbezeichnung=<<Prüfungstyp>> */\
\
" />\
\
\
<#if "<<Matrikel-Nr.>>"!="">\
<#assign filter=filter+" and costage_st_einzpruef_aggr.matrikelnummer in (<<Matrikel-Nr.>>)"?replace("'","")/>\
</#if>\
/* <#assign filter = filter + " and 's_' || costage_st_einzpruef_aggr.st_studiengang_nr in "+Studiengang.allNeededKeysList /> --<<Studiengang>> */ \
\
--Feld Auswertungsebene Prüfungen\
--Was wird ausgewertet? Welche Leistungsdetailtypen sin betroffen? Welches Prüfungsdatum/Semester soll ausgewertet werden?\
--G=Gesamtabschluss=BAKN, MAGN, STEX, ERGAB Prüfungsdatum/Semester\
--F=Absolvent*innenfachfälle=TSAB Prüfungsdatum/Semester des MSG\
--T=Teilstudienabschluss=TSAB Prüfungsdatum/Semester\
\
<#assign semester_filter="1=1" />\
<#assign semester_feld="semester_veranst" />\
\
<#assign fach_filter="1=1" />\
--Default: \
/* <#assign fach_filter="costage_st_einzpruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.skz_key in (<<Fach>>)) "/> \
*/\
\
\
/* <#assign semester_filter=semester_filter + " and "+semester_feld + " >= <<Seit Semester>>" /> */\
/* <#assign semester_filter=semester_filter + " and "+semester_feld + " <= <<Bis Semester>>" /> */\
\
\
<#assign filter=filter + " and " + semester_filter +" and " + fach_filter />\
\
<@generate_resultset_multitable tabellen=table_list\
p_show_keys=<<Schlüssel anzeigen>>\
p_field_list_select=field_list_select\
p_foreign_fields=foreign_fields\
p_filter=filter\
p_field_list_groupby=field_list_groupby\
p_join_clause=join_clause\
/>^--Freemarker Template \
<sqlvars>\
<sqlvar name="basetable">select 'costage_st_einzpruef_aggr' from xdummy</sqlvar>\
<sqlvar name="restriction"><![CDATA[\
<#assign restrict=DatenblattTables(<<tablestylesheet>>,"<<Weitere Tabellen>>",.vars["Weitere TabellenObject"].allKeys)/>;\
select '${restrict?replace("\\x0027","\\x0027\\x0027")}' from xdummy;]]>\
</sqlvar>\
<sqlvar name="get_felder"><![CDATA[\
SELECT caption,\
foreignkey_tab,\
description as strukturStr\
from sx_fields\
where table_name in ('${basetable}'\
${restriction}\
)\
and currentlyused=1\
${DatenblattFields(<<tablestylesheet>>,"<<Felder>>",FelderObject.allKeys)}\
order by 1;]]>\
</sqlvar>\
</sqlvars>\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
min_heading_height=35\
<#assign i=1 />\
<#if get_felder?has_content >\
<#foreach myfield in get_felder>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}" explanation="${myfield.strukturStr}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
<#if myfield.name != '' && <<Schlüssel anzeigen>>==1>\
<#assign i=i+1 />\
Column CID=${i} heading_text="${myfield.key}\\n(Schlüssel)" explanation="Schlüssel des Feldes ${myfield.key}" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=20\
</#if>\
</#foreach>\
</#if>\
@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Einzelprüfungen im SPO-Kontext, Studiengänge und Lehreinheiten^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^

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

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

14
src-modules/module/costage/rohdaten/COSTAGE_ENV.sam

@ -1,9 +1,7 @@ @@ -1,9 +1,7 @@
#!/bin/bash
#Entladeumgebung für SuperX
#Die folgenden Parameter müssen angepasst werden
VERSION=232
export VERSION
#Die folgenden Parameter m<EFBFBD>ssen angepasst werden
# SX_CLIENT ist die Client-Anwendung zum Zugriff auf die DB
SX_CLIENT=jdbc; export SX_CLIENT
@ -17,16 +15,6 @@ export LOGGER_PROPERTIES @@ -17,16 +15,6 @@ export LOGGER_PROPERTIES
#export JAVA_OPTS
SOURCESYSTEM=co
export SOURCESYSTEM
COSTAGE_start_st_sem=20001
export COSTAGE_start_st_sem
COSTAGE_start_bw_sem=20001
export COSTAGE_start_bw_sem
COSTAGE_start_leistungen_sem=20001
export COSTAGE_start_leistungen_sem
COSTAGE_start_lv_sem=20001
export COSTAGE_start_lv_sem
COSTAGE_start_hssem=20001
export COSTAGE_start_hssem
##Pfad für Entladedaten:
#COSTAGE_LOAD_PFAD=.

1300
src-modules/module/costage/rohdaten/costage_prepare_unlfiles.x

File diff suppressed because it is too large Load Diff

75
src-modules/module/costage/rohdaten/costage_prepare_unlfiles.xsl

@ -1,75 +0,0 @@ @@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xml:output method="text" indent="yes"/>
<xsl:template match="/">
<xsl:text><![CDATA[#!/bin/bash
# XML-generiertes SQL-Script
# von costage_prepare_unlfiles.xsl
if [ "$1" == "" ]
then
echo "Usage: costage_prepare_unlfiles.x <Delimiter> HEADER<optional>"
echo "Beispiel: costage_prepare_unlfiles.x , HEADER"
echo "Folgende Dateien können geladen werden:"
]]>
</xsl:text>
<xsl:for-each select="/superx-unload/unload-job [ @transfer-unload-file != '' ] ">
<xsl:text><![CDATA[
echo "$COSTAGE_LOAD_PFAD/unl/]]></xsl:text><xsl:value-of select="concat(@id,'.csv')" /><xsl:text><![CDATA["
]]>
</xsl:text>
</xsl:for-each>
<xsl:text><![CDATA[
fi
if [ ! -f $COSTAGE_LOAD_PFAD/superx.datum ]
then
echo "superx.datum wird nicht übergeben"
date +'%d.%m.%Y' > $COSTAGE_LOAD_PFAD/superx.datum
fi
if [ ! -f $COSTAGE_LOAD_PFAD/costage_unload.err ]
then
echo "costage_unload.err wird nicht übergeben"
cat /dev/null > $COSTAGE_LOAD_PFAD/costage_unload.err
fi
#zuerst alle Dateien nach UTF-8 konvertieren, wenn nötig:
sx_list_isofiles.x $COSTAGE_LOAD_PFAD/unl >iso.txt
sx_recode_isofiles.x iso.txt
]]>
</xsl:text>
<xsl:for-each select="/superx-unload/unload-job [ @transfer-unload-file != '' ] ">
<xsl:text><![CDATA[
if [ -f "$COSTAGE_LOAD_PFAD/unl/]]></xsl:text><xsl:value-of select="concat(@id,'.csv')" /><xsl:text>" ]
then
echo "$COSTAGE_LOAD_PFAD/unl/</xsl:text><xsl:value-of select="concat(@id,'.csv')" /><xsl:text><![CDATA[ wird übergeben:"
DOQUERY "truncate table ]]></xsl:text><xsl:value-of select="@target-table" /><xsl:text><![CDATA[;"
DOQUERY "vacuum full ]]></xsl:text><xsl:value-of select="@target-table" /><xsl:text><![CDATA[;"
psql --dbname=$DBNAME -c "\copy ]]></xsl:text><xsl:value-of select="@target-table" /><xsl:text><![CDATA[ from unl/]]></xsl:text><xsl:value-of select="concat(@id,'.csv')" /><xsl:text><![CDATA[ using delimiters '"$1"' with null as '' CSV $2"
sx_unload_table.x ]]></xsl:text><xsl:value-of select="@target-table" /><xsl:text> </xsl:text><xsl:value-of select="@transfer-unload-file" /><xsl:text><![CDATA[
fi
if [ ! -f "$COSTAGE_LOAD_PFAD/]]></xsl:text><xsl:value-of select="@transfer-unload-file" /><xsl:text>" ]
then
echo "$COSTAGE_LOAD_PFAD/</xsl:text><xsl:value-of select="@transfer-unload-file" /><xsl:text><![CDATA[ wird nicht übergeben"
cat /dev/null > "$COSTAGE_LOAD_PFAD/]]></xsl:text><xsl:value-of select="@transfer-unload-file" /><xsl:text>"
fi
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

5
src-modules/module/costage/rohdaten/costage_prepare_unlfiles_generator.x

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
#!/bin/bash
#Extraction Script for SuperX.
sx_transform.x -IN:costage_unload.xml -XSL:./costage_prepare_unlfiles.xsl -OUT:./costage_prepare_unlfiles.x -method:text
chmod +x ./costage_prepare_unlfiles.x

719
src-modules/module/costage/rohdaten/costage_unload.xml

@ -1,21 +1,16 @@ @@ -1,21 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<superx-unload version="4.0">
<module id="costage" version="0.7b" systeminfo_id="310">COSTAGE-Modul</module>
<module id="costage" version="0.1b" systeminfo_id="310">COSTAGE-Modul</module>
<parameters>
<param name="VERSION" defaultValue="2" description="Datenbank-Version"><comment>CO-Version, wird derzeit ignoriert</comment></param>
<param name="COSTAGE_start_st_sem" defaultValue="19911" description="Startsemester Studierende"><comment>Ab welchem Semester sollen Studierende entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="COSTAGE_start_bw_sem" defaultValue="19911" description="Startsemester Bewerbungen"><comment>Ab welchem Semester sollen Bewerbungen entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="COSTAGE_start_leistungen_sem" defaultValue="19911" description="Startsemester Prüfungen"><comment>Ab welchem Semester sollen Leistungen entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="COSTAGE_start_lv_sem" defaultValue="19911" description="Startsemester Lehrveranstaltungen"><comment>Ab welchem Semester sollen Lehrveranstaltungen entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="COSTAGE_start_hssem" defaultValue="19911" description="Startsemester Hochschulsemester"><comment>Ab welchem Semester sollen Hochschulsemester entladen werden? z.B. 20011 für SS 2001</comment></param>
</parameters>
<sourcesystems>
<sourcesystem name="co" description="CampusOnline-Datenbank" default="true"/>
</sourcesystems>
<unload-job id="px_st_abschlussziele_amtstat_v" target-table="costage_st_abschlussziele_amtstat" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_amtstat.unl" >
<unload-job id="px_st_abschlussziele_amtstat_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_amtstat.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -31,7 +26,7 @@ FROM px_st_abschlussziele_amtstat_v @@ -31,7 +26,7 @@ FROM px_st_abschlussziele_amtstat_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_abschlussziele_lokal_v" target-table="costage_st_abschlussziele_lokal" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_lokal.unl" >
<unload-job id="px_st_abschlussziele_lokal_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_lokal.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -46,26 +41,22 @@ FROM px_st_abschlussziele_lokal_v @@ -46,26 +41,22 @@ FROM px_st_abschlussziele_lokal_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_fachsemester_v" target-table="costage_st_fachsemester" extraction-script="" transfer-unload-file="unl/costage_st_fachsemester.unl" >
<unload-job id="px_st_fachsemester_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fachsemester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT F.st_studium_nr,
F.st_sem_nr,
F.fachsemester,
F.fachsemestertyp
FROM px_st_fachsemester_v F,px_st_semester_v S
where S.st_sem_nr=F.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
SELECT st_studium_nr,
st_sem_nr,
fachsemester,
fachsemestertyp
FROM px_st_fachsemester_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_fakultaeten_v" target-table="costage_st_fakultaeten" extraction-script="" transfer-unload-file="unl/costage_st_fakultaeten.unl" >
<unload-job id="px_st_fakultaeten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fakultaeten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -84,46 +75,36 @@ FROM px_st_fakultaeten_v @@ -84,46 +75,36 @@ FROM px_st_fakultaeten_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_hauptstudien_v" target-table="costage_st_hauptstudien" extraction-script="" transfer-unload-file="unl/costage_st_hauptstudien.unl" >
<unload-job id="px_st_hauptstudien_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hauptstudien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT H.st_studstamm_nr,
H.st_studium_nr,
H.st_sem_nr
FROM px_st_hauptstudien_v H,px_st_semester_v S
where S.st_sem_nr=H.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
;
SELECT st_studstamm_nr,
st_studium_nr,
st_sem_nr
FROM px_st_hauptstudien_v
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_hoererstatus_v" target-table="costage_st_hoererstatus" extraction-script="" transfer-unload-file="unl/costage_st_hoererstatus.unl" >
<unload-job id="px_st_hoererstatus_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hoererstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT H.st_studstamm_nr,
H.st_sem_nr,
H.hoererstatus_name,
H.hoererstatus_kb
FROM px_st_hoererstatus_v H,px_st_semester_v S
where S.st_sem_nr=H.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
and H.hoererstatus_kb !='E' --status "nicht immatrikuliert" interessiert nicht
SELECT st_studstamm_nr,
st_sem_nr,
hoererstatus_name,
hoererstatus_kb
FROM px_st_hoererstatus_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_laender_v" target-table="costage_st_laender" extraction-script="" transfer-unload-file="unl/costage_st_laender.unl" >
<unload-job id="px_st_laender_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_laender.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -135,10 +116,7 @@ SELECT st_land_nr, @@ -135,10 +116,7 @@ SELECT st_land_nr,
statistik_code,
adresse,
hzb,
null as staatsbuergerschaft,
kfz_kennzeichen,
eu,
nat_key
null as staatsbuergerschaft
FROM px_st_laender_v
;
@ -146,15 +124,14 @@ FROM px_st_laender_v @@ -146,15 +124,14 @@ FROM px_st_laender_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_land_regionen_v" target-table="costage_st_land_regionen" extraction-script="" transfer-unload-file="unl/costage_st_land_regionen.unl" >
<unload-job id="px_st_land_regionen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_land_regionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_land_reg_nr,
name,
statistik_code,
st_land_nr,
kfz_kennzeichen_region
st_land_nr
FROM px_st_land_regionen_v
;
@ -162,7 +139,7 @@ FROM px_st_land_regionen_v @@ -162,7 +139,7 @@ FROM px_st_land_regionen_v
</extraction-sql>
</unload-job>
<!--
<unload-job id="costage_st_personen" target-table="" extraction-script="" transfer-unload-file="unl/costage_st_personen.unl" >
<unload-job id="costage_st_personen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_personen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -180,26 +157,23 @@ FROM px_st_personen_v @@ -180,26 +157,23 @@ FROM px_st_personen_v
</extraction-sql>
</unload-job>-->
<unload-job id="px_st_semester_v" target-table="costage_st_semester_neu" extraction-script="" transfer-unload-file="unl/costage_st_semester.unl" >
<unload-job id="px_st_semester_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_semester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT S.st_sem_nr,
S.semester_id,
S.semester_anfang,
S.semester_ende,
S.semester_bezeichnung,
S.studienjahr
FROM px_st_semester_v S
where to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
SELECT st_sem_nr,
semester_id,
semester_anfang,
semester_ende,
semester_bezeichnung,
studienjahr
FROM px_st_semester_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_studien_v" target-table="costage_st_studien" extraction-script="" transfer-unload-file="unl/costage_st_studien.unl" >
<unload-job id="px_st_studien_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -207,8 +181,7 @@ SELECT st_studium_nr, @@ -207,8 +181,7 @@ SELECT st_studium_nr,
st_studstamm_nr,
st_studiengang_nr,
studienform_name,
studienform_statistik_code,
hauptstudium_flag
studienform_statistik_code
FROM px_st_studien_v
@ -216,7 +189,7 @@ FROM px_st_studien_v @@ -216,7 +189,7 @@ FROM px_st_studien_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studien_spoversionen_v" target-table="costage_st_studien_spoversionen" extraction-script="" transfer-unload-file="unl/costage_st_studien_spoversionen.unl" >
<unload-job id="px_st_studien_spoversionen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien_spoversionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -235,7 +208,7 @@ FROM px_st_studien_spoversionen_v @@ -235,7 +208,7 @@ FROM px_st_studien_spoversionen_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studienarten_v" target-table="costage_st_studienarten" extraction-script="" transfer-unload-file="unl/costage_st_studienarten.unl" >
<unload-job id="px_st_studienarten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienarten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -249,7 +222,7 @@ FROM px_st_studienarten_v @@ -249,7 +222,7 @@ FROM px_st_studienarten_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studienfaecher_v" target-table="costage_st_studienfaecher" extraction-script="" transfer-unload-file="unl/costage_st_studienfaecher.unl" >
<unload-job id="px_st_studienfaecher_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienfaecher.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -264,7 +237,7 @@ FROM px_st_studienfaecher_v @@ -264,7 +237,7 @@ FROM px_st_studienfaecher_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studiengaenge_v" target-table="costage_st_studiengaenge_neu" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge.unl" >
<unload-job id="px_st_studiengaenge_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -287,7 +260,7 @@ FROM px_st_studiengaenge_v @@ -287,7 +260,7 @@ FROM px_st_studiengaenge_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studiengaenge_mtsg_v" target-table="costage_st_studiengaenge_mtsg" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge_mtsg.unl" >
<unload-job id="px_st_studiengaenge_mtsg_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge_mtsg.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -301,7 +274,7 @@ FROM px_st_studiengaenge_mtsg_v @@ -301,7 +274,7 @@ FROM px_st_studiengaenge_mtsg_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studienkennzahlen_v" target-table="costage_st_studienkennzahlen_neu" extraction-script="" transfer-unload-file="unl/costage_st_studienkennzahlen.unl" >
<unload-job id="px_st_studienkennzahlen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienkennzahlen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -319,28 +292,24 @@ FROM px_st_studienkennzahlen_v @@ -319,28 +292,24 @@ FROM px_st_studienkennzahlen_v
</extraction-sql>
</unload-job>
<unload-job id="px_st_studienstatus_v" target-table="costage_st_studienstatus" extraction-script="" transfer-unload-file="unl/costage_st_studienstatus.unl" >
<unload-job id="px_st_studienstatus_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT V.st_studienstatus_nr,
V.st_studium_nr,
V.studienstatustyp,
V.beginn_datum,
V.gueltig_ab,
V.st_sem_nr
FROM px_st_studienstatus_v V, px_st_semester_v S
where S.st_sem_nr=V.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
SELECT st_studienstatus_nr,
st_studium_nr,
studienstatustyp,
beginn_datum,
gueltig_ab,
st_sem_nr
FROM px_st_studienstatus_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_studierendenstammdaten_v" target-table="costage_st_studierendenstammdaten_neu" extraction-script="" transfer-unload-file="unl/costage_st_studierendenstammdaten.unl" >
<unload-job id="px_st_studierendenstammdaten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studierendenstammdaten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -360,595 +329,9 @@ SELECT st_studstamm_nr, @@ -360,595 +329,9 @@ SELECT st_studstamm_nr,
FROM px_st_studierendenstammdaten_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_hzb_v" target-table="costage_st_hzb" extraction-script="" transfer-unload-file="unl/costage_st_hzb.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="232">
<![CDATA[ select
nr,
hzb_land_nr,
hzb_land_sub_r_nr,
hzb_art_nr,
hzb_jahr,
hzb_datum,
hzb_note,
st_person_nr,
hzb_note
FROM px_st_hzb_v
;
]]>
</extraction-sql>
<extraction-sql sourcesystem="co" database="" version="233">
<![CDATA[ select
nr,
hzb_land_nr,
hzb_land_sub_r_nr,
hzb_art_nr,
hzb_jahr,
hzb_datum,
hzb_note_numerisch,
st_person_nr,
hzb_note
FROM px_st_hzb_v
;
]]>
</extraction-sql>
<extraction-sql sourcesystem="co" database="" version="234">
<![CDATA[ select
nr,
hzb_land_nr,
hzb_land_sub_r_nr,
hzb_art_nr,
hzb_jahr,
hzb_datum,
hzb_note,
st_person_nr,
hzb_note_original
FROM px_st_hzb_v
;
]]>
</extraction-sql>
</unload-job>
<!-- neu in 0.3 -->
<unload-job id="px_bw_bewerbungen_v" target-table="costage_bw_bewerbungen" extraction-script="" transfer-unload-file="unl/costage_bw_bewerbungen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[ select
B.nr,
B.st_studstamm_nr,
B.st_sem_nr,
B.st_studiengang_nr,
B.st_studfrm_nr,
B.bw_sb_svor_nr,
B.bw_zul_art_nr,
B.bw_typ_kb,
B.zurueckgezogen_am,
B.fristbeginn,
B.fristende,
B.einstiegs_fachsemester,
B.fachsemester_gewaehlt,
B.abgeschickt_datum
FROM px_bw_bewerbungen_v B,px_st_semester_v S
where S.st_sem_nr=B.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_bw_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
and B.abgeschickt_datum is not null --TUG: abgeschickt_datum = Null sind zu filtern. Diese wurden dann nie an die Hochschule übermittelt.
and B.zurueckgezogen_am is null
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_bewerbung_kombination_v" target-table="costage_bw_bewerbung_kombination" extraction-script="" transfer-unload-file="unl/costage_bw_bewerbung_kombination.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT bw_bewrbng_nr,
bw_bewrbng_nr_teil,
zulassungs_optional_flag
FROM px_bw_bewerbung_kombination_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_bewerb_hzb_v" target-table="costage_bw_bewerb_hzb" extraction-script="" transfer-unload-file="unl/costage_bw_bewerb_hzb.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT bw_bewrbng_nr,
hzb_art_stla_code,
zeugnisdatum,
hzb_note,
hzb_note_original,
hzb_punkte,
hzb_punkte_max,
land_nr,
land_regio_nr,
land_sub_r_nr
FROM px_bw_bewerb_hzb_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_bewerb_sb_status_v" target-table="costage_bw_bewerb_sb_status" extraction-script="" transfer-unload-file="unl/costage_bw_bewerb_sb_status.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT bw_bewerbng_nr,
bw_sb_stat_nr,
wert,
last_modified
from px_bw_bewerb_sb_status_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_sb_status_v" target-table="costage_bw_sb_status" extraction-script="" transfer-unload-file="unl/costage_bw_sb_status.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT nr,
kurzbezeichnung,
name
FROM px_bw_sb_status_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_sb_status_werte_v" target-table="costage_bw_sb_status_werte" extraction-script="" transfer-unload-file="unl/costage_bw_sb_status_werte.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select nr,
bw_sb_stat_nr,
wert,
name
FROM px_bw_sb_status_werte_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_sb_stat_vorl_zuordnung_v" target-table="costage_bw_sb_stat_vorl_zuordnung" extraction-script="" transfer-unload-file="unl/costage_bw_sb_stat_vorl_zuordnung.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT nr,
bw_sb_stat_nr
FROM px_bw_sb_stat_vorl_zuordnung_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_zulassungsarten_v" target-table="costage_bw_zulassungsarten" extraction-script="" transfer-unload-file="unl/costage_bw_zulassungsarten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT nr,
kurzbezeichnung,
name
FROM px_bw_zulassungsarten_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_land_subregionen_v" target-table="costage_land_subregionen" extraction-script="" transfer-unload-file="unl/costage_land_subregionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT land_sub_reg_nr,
name,
statistik_code,
land_kfz_kennzeichen_subregion,
st_land_reg_nr
FROM px_land_subregionen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_studienformen_v" target-table="costage_st_studienformen" extraction-script="" transfer-unload-file="unl/costage_st_studienformen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT nr,
kurzbezeichnung,
name,
statistik_code
FROM px_st_studienformen_v
;
]]>
</extraction-sql>
</unload-job>
<!--neu ab 25.3.2022-->
<unload-job id="px_st_adressen_v" target-table="costage_st_adressen" extraction-script="" transfer-unload-file="unl/costage_st_adressen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_adresse_nr,
st_adresse_typ,
st_studstamm_nr,
zustellhinweis,
strasse,
plz,
ort,
st_land_nr,
land_kfz_kennzeichen,
land_kfz_kennzeichen_subregion
FROM px_st_adressen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_urlaube_v" target-table="costage_st_urlaube" extraction-script="" transfer-unload-file="unl/costage_st_urlaube.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT U.st_urlaub_nr,
U.st_urlaub_typ_nr,
U.st_studstamm_nr,
U.st_sem_nr,
U.st_studium_nr
FROM px_st_urlaube_v U,px_st_semester_v S
where S.st_sem_nr=U.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_urlaubs_typen_v" target-table="costage_st_urlaubs_typen" extraction-script="" transfer-unload-file="unl/costage_st_urlaubs_typen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_urlaub_typ_nr,
name,
kurzbezeichnung,
statistik_code
FROM px_st_urlaubs_typen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_abmeldungsarten_v" target-table="costage_st_abmeldungsarten" extraction-script="" transfer-unload-file="unl/costage_st_abmeldungsarten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_abm_art_kurzbezeichnung,
name,
name_lang,
bezug,
statistik_code
FROM px_st_abmeldungsarten_v
where st_abm_art_kurzbezeichnung is not null
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_personen_abmeldungen_v" target-table="costage_st_personen_abmeldungen" extraction-script="" transfer-unload-file="unl/costage_st_personen_abmeldungen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT A.st_person_abmeldung_nr,
A.st_studstamm_nr,
A.st_studium_nr,
A.st_sem_nr,
A.st_abm_art_kurzbezeichnung,
A.person_flag,
A.st_studienstatus_nr
FROM px_st_personen_abmeldungen_v A,px_st_semester_v S
where S.st_sem_nr=A.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_st_sem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_ersthochschulen_v" target-table="costage_st_ersthochschulen" extraction-script="" transfer-unload-file="unl/costage_st_ersthochschulen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studstamm_nr,
unikey_ersthochschule
FROM px_st_ersthochschulen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_st_hochschulsemester_v" target-table="costage_st_hochschulsemester" extraction-script="" transfer-unload-file="unl/costage_st_hochschulsemester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT H.st_studstamm_nr,
H.st_sem_nr,
H.anzahl_hochschulsemester
FROM px_st_hochschulsemester_v H,px_st_semester_v S
where S.st_sem_nr=H.st_sem_nr
and H.anzahl_hochschulsemester >0
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_hssem
and current_date+365 > S.semester_anfang
and extract(year from S.semester_anfang) > 2000
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_leistungen_v" target-table="costage_leistungen" extraction-script="" transfer-unload-file="unl/costage_leistungen.unl" >
<comment>Leistungen</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT leistung_nr,
leistungstyp_nr,
leistungsdetailtyp_kb,
matrikelnummer,
vorname,
nachname,
st_studium_nr,
studienidentifikator,
spov_abschluss,
stp_sp_nr,
veranstaltung_nummer,
substr(veranstaltung_semester,0, 254),
substr(veranstaltung_titel,0, 254),
veranstaltung_art,
semesterstunden,
unterrichtseinheiten,
substr(thema_individuell,0, 254),
pv_notenskala_nr,
note,
note_name,
note_zahl,
pv_pruef_zusatz_typen_nr,
note_zusatz,
note_zusatz_name,
note_positiv_flag,
note_negativ_flag,
pv_notenskala_typ_nr,
pv_notenskala_typ_kb,
pv_notenskala_typ_name,
credits,
leistungsdatum,
anerkannt_flag,
zusatzleistung_flag,
leistungsstatus_nr,
null ,--leistungsstatus_map_kb,
null --abs_fach_st_studium_nr
FROM px_leistungen_v
--da das Semester bei Leistungen nicht immer gefuellt ist bzw. der Datum der Leistung nach dem Studium sein kann, hier keine Where Bedingung aufs Startsemester
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_leistungen_detail_typen_v" target-table="costage_leistungen_detail_typen" extraction-script="" transfer-unload-file="unl/costage_leistungen_detail_typen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT leistungsdetailtyp_kb,
substr(name_de,1, 255),
substr(name_en,1, 255),
name_zusatz_de,
name_zusatz_en,
sortierung
FROM px_leistungen_detail_typen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_leistungen_typen_v" target-table="costage_leistungen_typen" extraction-script="" transfer-unload-file="unl/costage_leistungen_typen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT leistungstyp_nr,
kurzbezeichnung,
substr(name_de,1, 255),
substr(name_en,1, 255)
FROM px_leistungen_typen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_antritte_v" target-table="costage_antritte" extraction-script="" transfer-unload-file="unl/costage_antritte.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT leistung_nr,
pruefungsantritt_spo,
pruefungsantritt_lv_prv,
pruefungsantritt_index_lv_prv
FROM px_antritte_v
where 1=0
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_leistungen_status_typen_v" target-table="costage_leistungen_status_typen" extraction-script="" transfer-unload-file="unl/costage_leistungen_status_typen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT leistungsstatus_nr,
kurzbezeichnung,
substr(name_de,1, 255),
substr(name_en,1, 255)
FROM px_leistungen_status_typen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bw_hzb_arten_v" target-table="costage_bw_hzb_arten" extraction-script="" transfer-unload-file="unl/costage_bw_hzb_arten.unl" >
<comment>HZB-Arten (intern und amtlich), mit Mit R224 SP10 verfügbar </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT hzb_nr,
substr(name,1,255),
substr(name_kurz,1,255),
hzb_art_stla_code,
kurzbezeichnung
FROM px_bw_hzb_arten_v
;
]]>
</extraction-sql>
</unload-job>
<!--Lehre-->
<unload-job id="px_abgeltungen_v" target-table="costage_abgeltungen" extraction-script="" transfer-unload-file="unl/costage_abgeltungen.unl" >
<comment>Abgeltungen mit Lehraufträgen </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT la_abg_nr,
stp_sp_nr,
person_nr,
sws_beauftragt_gewichtet,
sws_beauftragt_ungewichtet,
sws_zustandegek_gewichtet,
sws_zustandegek_ungewichtet,
sws_abgehalten_gewichtet,
sws_abgehalten_ungewichtet,
la_typ_code,
la_nr,
la_la_nr,
la_fktn_kurzbezeichnung
FROM px_abgeltungen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_gleichheitsknoten_v" target-table="costage_gleichheitsknoten" extraction-script="" transfer-unload-file="unl/costage_gleichheitsknoten.unl" >
<comment>Gleichheitsknoten</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT ghk_nr,
substr(typ_kurzbezeichnung,0,254) ,
substr(typ_name_de,0,254) ,
substr(typ_name_en,0,254)
FROM px_gleichheitsknoten_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_lehrveranstaltungen_v" target-table="costage_lehrveranstaltungen" extraction-script="" transfer-unload-file="unl/costage_lehrveranstaltungen.unl" >
<comment>Lehrveranstaltungen und Fach-/Modulprüfungen</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT L.stp_sp_nr,
L.ghk_nr,
L.titel_de,
L.titel_en,
substr(L.nummer,0,254) ,
L.art_name_de,
L.art_name_en,
L.st_sem_nr,
L.org_nr,
L.sws,
L.ects_credits,
L.anerkennungsobjekt_flag
FROM px_lehrveranstaltungen_v L,px_st_semester_v S
where S.st_sem_nr=L.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_lv_sem
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_lv_teilnehmende_v" target-table="costage_lv_teilnehmende" extraction-script="" transfer-unload-file="unl/costage_lv_teilnehmende.unl" >
<comment>Fixplatzanmeldungen</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT T.lv_grp_pers_nr,
T.st_studium_nr,
T.stp_sp_nr,
T.lv_grp_name
FROM px_lv_teilnehmende_v T, px_lehrveranstaltungen_v L,px_st_semester_v S
where T.stp_sp_nr=L.stp_sp_nr
and S.st_sem_nr=L.st_sem_nr
and to_number('20' || replace(replace(S.semester_id,'S','1'),'W','2')) >= $COSTAGE_start_lv_sem
;
]]>
</extraction-sql>
</unload-job>
<!--SPO-->
<unload-job id="px_ergebnisse_v" target-table="costage_ergebnisse" extraction-script="" transfer-unload-file="unl/costage_ergebnisse.unl" >
<comment>Ergebnisse</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studien_nr,
stp_knoten_nr,
vorart_kb,
flag,
zahl,
text,
datum
FROM px_ergebnisse_v
where 1=0
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_studienplankontexte_v" target-table="costage_studienplankontexte" extraction-script="" transfer-unload-file="unl/costage_studienplankontexte.unl" >
<comment>Studienplankontexte</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studium_nr,
stp_stp_nr,
leistungs_nr,
substr(context_type,0,254) ,
stp_knoten_nr_sichtbar,
ghk_nr
FROM px_studienplankontexte_v
where 1=0
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="px_bewerb_mzb_v" target-table="costage_bewerb_mzb" extraction-script="" transfer-unload-file="unl/costage_bewerb_mzb.unl" >
<comment>Bewerbungen zugeordnete MZB</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT
bw_bewerbng_nr,
mzb_typ_kb,
abschluss_status_flag,
abschluss_note
FROM
px_bewerb_mzb_v
;
]]>
</extraction-sql>
</unload-job>
</superx-unload>

39
src-modules/module/costage/rohdaten/csv_unloads2unl.sql

@ -14,52 +14,21 @@ @@ -14,52 +14,21 @@
{"srcfile":"px_st_studienfaecher_v.csv", "targettable":"costage_st_studienfaecher", "targetfile":"costage_st_studienfaecher.unl"},
{"srcfile":"px_st_studiengaenge_mtsg_v.csv", "targettable":"costage_st_studiengaenge_mtsg", "targetfile":"costage_st_studiengaenge_mtsg.unl"},
{"srcfile":"px_st_studiengaenge_v.csv", "targettable":"costage_st_studiengaenge_neu", "targetfile":"costage_st_studiengaenge.unl"},
{"srcfile":"px_st_studienkennzahlen_v.csv", "targettable":"costage_st_studienkennzahlen_neu", "targetfile":"costage_st_studienkennzahlen.unl", "specialrule":""},
{"srcfile":"px_st_studienkennzahlen_v.csv", "targettable":"costage_st_studienkennzahlen", "targetfile":"costage_st_studienkennzahlen.unl", "specialrule":"delete from costage_st_studienkennzahlen where unikey != '8140'"},
{"srcfile":"px_st_studienstatus_v.csv", "targettable":"costage_st_studienstatus", "targetfile":"costage_st_studienstatus.unl"},
{"srcfile":"px_st_studien_spoversionen_v.csv", "targettable":"costage_st_studien_spoversionen", "targetfile":"costage_st_studien_spoversionen.unl"},
{"srcfile":"px_st_studien_v.csv", "targettable":"costage_st_studien", "targetfile":"costage_st_studien.unl"},
{"srcfile":"px_st_studierendenstammdaten_v.csv", "targettable":"costage_st_studierendenstammdaten_neu", "targetfile":"costage_st_studierendenstammdaten.unl", "specialrule":"update costage_st_studierendenstammdaten_neu set aufnahmedatum=now() where st_studstamm_nr=419856"},
{"srcfile":"px_st_hzb_v.csv", "targettable":"costage_st_hzb", "targetfile":"costage_st_hzb.unl", "specialrule":""},
{"srcfile":"px_bw_bewerbungen_v.csv", "targettable":"costage_bw_bewerbungen", "targetfile":"costage_bw_bewerbungen.unl"},
{"srcfile":"px_bw_bewerbung_kombination_v.csv", "targettable":"costage_bw_bewerbung_kombination", "targetfile":"costage_bw_bewerbung_kombination.unl"},
{"srcfile":"px_bw_bewerb_hzb_v.csv", "targettable":"costage_bw_bewerb_hzb", "targetfile":"costage_bw_bewerb_hzb.unl"},
{"srcfile":"px_bw_bewerb_sb_status_v.csv", "targettable":"costage_bw_bewerb_sb_status", "targetfile":"costage_bw_bewerb_sb_status.unl"},
{"srcfile":"px_bw_sb_status_v.csv", "targettable":"costage_bw_sb_status", "targetfile":"costage_bw_sb_status.unl"},
{"srcfile":"px_bw_sb_status_werte_v.csv", "targettable":"costage_bw_sb_status_werte", "targetfile":"costage_bw_sb_status_werte.unl"},
{"srcfile":"px_bw_sb_stat_vorl_zuordnung_v.csv", "targettable":"costage_bw_sb_stat_vorl_zuordnung", "targetfile":"costage_bw_sb_stat_vorl_zuordnung.unl"},
{"srcfile":"px_bw_zulassungsarten_v.csv", "targettable":"costage_bw_zulassungsarten", "targetfile":"costage_bw_zulassungsarten.unl"},
{"srcfile":"px_land_subregionen_v.csv", "targettable":"costage_land_subregionen", "targetfile":"costage_land_subregionen.unl"},
{"srcfile":"px_st_studienformen_v.csv", "targettable":"costage_st_studienformen", "targetfile":"costage_st_studienformen.unl"},
{"srcfile":"px_st_adressen_v.csv", "targettable":"costage_st_adressen", "targetfile":"costage_st_adressen.unl"},
{"srcfile":"px_st_urlaube_v.csv", "targettable":"costage_st_urlaube", "targetfile":"costage_st_urlaube.unl"},
{"srcfile":"px_st_urlaubs_typen_v.csv", "targettable":"costage_st_urlaubs_typen", "targetfile":"costage_st_urlaubs_typen.unl"},
{"srcfile":"px_st_abmeldungsarten_v.csv", "targettable":"costage_st_abmeldungsarten", "targetfile":"costage_st_abmeldungsarten.unl"},
{"srcfile":"px_st_personen_abmeldungen_v.csv", "targettable":"costage_st_personen_abmeldungen", "targetfile":"costage_st_personen_abmeldungen.unl"},
{"srcfile":"px_st_ersthochschulen_v.csv", "targettable":"costage_st_ersthochschulen", "targetfile":"costage_st_ersthochschulen.unl"},
{"srcfile":"sx_st_hochschulsemester_v.csv", "targettable":"costage_st_hochschulsemester", "targetfile":"costage_st_hochschulsemester.unl"},
{"srcfile":"sx_leistungen_v.csv", "targettable":"costage_leistungen", "targetfile":"costage_leistungen.unl"},
{"srcfile":"px_leistungen_detail_typen_v.csv", "targettable":"costage_leistungen_detail_typen", "targetfile":"costage_leistungen_detail_typen.unl"},
{"srcfile":"px_leistungen_typen_v.csv", "targettable":"costage_leistungen_typen", "targetfile":"costage_leistungen_typen.unl"},
{"srcfile":"px_antritte_v.csv", "targettable":"costage_antritte", "targetfile":"costage_antritte.unl"},
{"srcfile":"px_leistungen_status_typen_v.csv", "targettable":"costage_leistungen_status_typen", "targetfile":"costage_leistungen_status_typen.unl"},
{"srcfile":"px_bw_hzb_arten_v.csv", "targettable":"costage_bw_hzb_arten", "targetfile":"costage_bw_hzb_arten.unl"}
{"srcfile":"px_st_studierendenstammdaten_v.csv", "targettable":"costage_st_studierendenstammdaten_neu", "targetfile":"costage_st_studierendenstammdaten.unl", "specialrule":"update costage_st_studierendenstammdaten_neu set aufnahmedatum=now() where st_studstamm_nr=419856"}
] />
\! echo "Folgende Dateien lassen sich laden:"
<#foreach file in files>
\! echo "${file.srcfile}"
</#foreach>
<#foreach file in files>
truncate table ${file.targettable};
vacuum full ${file.targettable};
--falls sie nicht existieren werden sie mit 0 bytes angelegt:
\! touch 'unl/${file.srcfile}'
\! sx_recode_iso2utf.x unl/${file.srcfile}
\copy ${file.targettable} from 'unl/${file.srcfile}' with delimiter ',' quote '"' null as '' csv header encoding 'UTF-8'
\copy ${file.targettable} from 'unl/${file.srcfile}' with delimiter ',' quote '"' null as '' csv header encoding 'LATIN-1'
<#if file.specialrule?exists>

2
src-modules/module/costage/rohdaten/db-co.properties.sam

@ -3,7 +3,7 @@ driverName=oracle.jdbc.OracleDriver @@ -3,7 +3,7 @@ driverName=oracle.jdbc.OracleDriver
maxIdle=
logLevelXML=FINEST
maxActive=
connectionName=CO_INTERFACE_PUBLIC_EXTERNAL
connectionName=CO_INTERFACE_PX_SUPERX
minIdle=5
logLevelSQL=FINEST
connectionURL=jdbc\:oracle\:thin\:@192.168.0.11\:1521\:coprod

19
src-modules/module/costage/rohdaten/iso.txt

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_studiengaenge_mtsg_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_bw_bewerbungen.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_bw_bewerbungen_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_fachsemester.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_studienstatus_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_hauptstudien_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_studienstatus.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_semester.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/iso.txt
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_semester_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_hochschulsemester_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_studien_spoversionen.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_hauptstudien.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_studiengaenge_mtsg.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_studien_spoversionen_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_st_hochschulsemester.unl
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_st_fachsemester_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/px_bw_bewerb_hzb_v.csv
/home/superx/Projekte/graz_tu/tug_mirror/db/module/costage/rohdaten/unl/costage_bw_bewerb_hzb.unl

18
src-modules/module/costage/rohdaten_sos/sos_costage_unload.x → src-modules/module/costage/rohdaten/sos_costage_unload.x

@ -31,14 +31,14 @@ date +'%d.%m.%Y' > $SRC_PFAD/superx.datum ##neues Entladedatum @@ -31,14 +31,14 @@ date +'%d.%m.%Y' > $SRC_PFAD/superx.datum ##neues Entladedatum
HEUTE=`date +'%d.%m.%Y'`
cd $SRC_PFAD >>$ERR 2>&1
echo "Letztes Update-Datum: " $DATUM >$ERR
echo "DATABASE: $DATABASE" >>$ERR
echo "VERSION: $VERSION" >>$ERR
echo "SX_CLIENT: $SX_CLIENT" >>$ERR
echo "1.2b^"$HEUTE"^" >$SRC_PFAD/unl/superx_unload_version.unl
cd $SRC_PFAD >>$ERR 2>&1
CP=".:$JDBC_CLASSPATH:$XML_CLASSPATH"
@ -90,13 +90,13 @@ echo "Parameter SOS_UNL_ANON: $SOS_UNL_ANON" >>$ERR @@ -90,13 +90,13 @@ echo "Parameter SOS_UNL_ANON: $SOS_UNL_ANON" >>$ERR
echo "\$SOS_UNL_ANON=$SOS_UNL_ANON" >>unload_params.txt
if [ "$EXTERNAL_SUBJECTS" = "" ]
if [ "$POS_PNR" = "" ]
then
EXTERNAL_SUBJECTS="false"
export EXTERNAL_SUBJECTS
POS_PNR="0"
export POS_PNR
fi
echo "Parameter POS_PNR: $EXTERNAL_SUBJECTS" >>$ERR
echo "\$EXTERNAL_SUBJECTS=$EXTERNAL_SUBJECTS" >>unload_params.txt
echo "Parameter POS_PNR: $POS_PNR" >>$ERR
echo "\$POS_PNR=$POS_PNR" >>unload_params.txt
if [ "$LAB_FILTER" = "" ]
@ -364,10 +364,8 @@ fgrep -i -s "error" $ERR >/dev/null @@ -364,10 +364,8 @@ fgrep -i -s "error" $ERR >/dev/null
FLAG3=$? >/dev/null
fgrep -i -s "exception" $ERR >/dev/null
FLAG4=$? >/dev/null
fgrep -i -s "fehler" $ERR >/dev/null
FLAG5=$? >/dev/null
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 -o $FLAG5 -eq 0]
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 ]
then
echo "Fehler beim Entladen. Das Datum wird zurückgesetzt."
echo "---------------------------------------"

7182
src-modules/module/costage/rohdaten/sos_costage_unload.xml

File diff suppressed because it is too large Load Diff

1216
src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml

File diff suppressed because it is too large Load Diff

132
src-modules/module/costage/rohdaten_sos/sos_v1_unload.x

@ -1,132 +0,0 @@ @@ -1,132 +0,0 @@
#!/bin/bash
#Extraction Script for SuperX.
#Bitte nicht ändern, diese Datei ist automatisch generiert.
SRC_PFAD=$SOS_LOAD_PFAD
if [ "$SRC_PFAD" = "" ]
then
SRC_PFAD=.
fi
. ./$SRC_PFAD/SOS_ENV
if [ "$outFormat" = "" ]
then
outFormat=txt
fi
DATUM=`cat $SRC_PFAD/superx.datum`
ERR=sos_v1_unload.err
HEUTE=`date +'%d.%m.%Y'`
echo "Letztes Update-Datum: " $DATUM >$ERR
echo "DATABASE: $DATABASE" >>$ERR
echo "VERSION: $VERSION" >>$ERR
echo "SX_CLIENT: $SX_CLIENT" >>$ERR
echo "1.2b^"$HEUTE"^" >$SRC_PFAD/unl/superx_unload_version.unl
cd $SRC_PFAD >>$ERR 2>&1
CP=".:$JDBC_CLASSPATH:$XML_CLASSPATH"
cat /dev/null >unload_params.txt
if [ "$SOS_UNL_COMPLETE" = "" ]
then
SOS_UNL_COMPLETE="true"
export SOS_UNL_COMPLETE
fi
echo "Parameter SOS_UNL_COMPLETE: $SOS_UNL_COMPLETE" >>$ERR
echo "\$SOS_UNL_COMPLETE=$SOS_UNL_COMPLETE" >>unload_params.txt
if [ "$VERSION" = "" ]
then
VERSION="13"
export VERSION
fi
echo "Parameter VERSION: $VERSION" >>$ERR
echo "\$VERSION=$VERSION" >>unload_params.txt
if [ "$start_stud_sem" = "" ]
then
start_stud_sem="19911"
export start_stud_sem
fi
echo "Parameter start_stud_sem: $start_stud_sem" >>$ERR
echo "\$start_stud_sem=$start_stud_sem" >>unload_params.txt
if [ "$start_pruef_sem" = "" ]
then
start_pruef_sem="19911"
export start_pruef_sem
fi
echo "Parameter start_pruef_sem: $start_pruef_sem" >>$ERR
echo "\$start_pruef_sem=$start_pruef_sem" >>unload_params.txt
if [ "$SOS_UNL_ANON" = "" ]
then
SOS_UNL_ANON="false"
export SOS_UNL_ANON
fi
echo "Parameter SOS_UNL_ANON: $SOS_UNL_ANON" >>$ERR
echo "\$SOS_UNL_ANON=$SOS_UNL_ANON" >>unload_params.txt
if [ "$POS_PNR" = "" ]
then
POS_PNR="0"
export POS_PNR
fi
echo "Parameter POS_PNR: $POS_PNR" >>$ERR
echo "\$POS_PNR=$POS_PNR" >>unload_params.txt
if [ "$LAB_FILTER" = "" ]
then
LAB_FILTER=" AND (lab.panerk is null or lab.panerk != 'J') "
export LAB_FILTER
fi
echo "Parameter LAB_FILTER: $LAB_FILTER" >>$ERR
echo "\$LAB_FILTER=$LAB_FILTER" >>unload_params.txt
if [ "$STUDENT_FILTER" = "" ]
then
STUDENT_FILTER=" AND 1=1 "
export STUDENT_FILTER
fi
echo "Parameter STUDENT_FILTER: $STUDENT_FILTER" >>$ERR
echo "\$STUDENT_FILTER=$STUDENT_FILTER" >>unload_params.txt
if [ "$STUDENT_SOSPOS_FILTER" = "" ]
then
STUDENT_SOSPOS_FILTER=" AND 1=1 "
export STUDENT_SOSPOS_FILTER
fi
echo "Parameter STUDENT_SOSPOS_FILTER: $STUDENT_SOSPOS_FILTER" >>$ERR
echo "\$STUDENT_SOSPOS_FILTER=$STUDENT_SOSPOS_FILTER" >>unload_params.txt
echo "Parameter SOURCESYSTEM: $SOURCESYSTEM" >>$ERR
echo "\$SOURCESYSTEM=$SOURCESYSTEM" >>unload_params.txt
#jdbc zum Entladen
if [ "$SX_CLIENT" = "jdbc" ]
then
java $JAVA_OPTS -cp $CP de.superx.bin.SxExtractor -logger:$LOGGER_PROPERTIES -dbproperties:$DB_PROPERTIES -xml:sos_v1_unload.xml -outFormat:$outFormat -delim:$DBDELIMITER -header:$header -database:$DATABASE -version:$VERSION -unload_params:unload_params.txt >>$ERR 2>&1
echo "Unload v1 beendet"
exit 0
fi

190
src-modules/module/costage/rohdaten_sos/sos_v1_unload.xml

@ -1,190 +0,0 @@ @@ -1,190 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<superx-unload version="4.0">
<module id="sos" version="1.2b" systeminfo_id="7">SOS-Modul</module>
<parameters>
<param name="SOS_UNL_COMPLETE" defaultValue="true" description="Komplett entladen"><comment>Sollen alle Datensätze entladen werden, oder nur die geänderten?(true,false).</comment></param>
<param name="VERSION" defaultValue="13" description="Datenbank-Version"><comment>SOSPOS-Version, möglich sind 6,7,8,9,10,11,12,13. Bei HISinOne wird sie automatisch gesetzt.</comment></param>
<param name="start_stud_sem" defaultValue="19911" description="Startsemester Studierende"><comment>Ab welchem Semester sollen Studierende entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="start_pruef_sem" defaultValue="19911" description="Startsemester Prüfungen"><comment>Ab welchem Semester sollen Prüfungen entladen werden? z.B. 20021 für SS 2002</comment></param>
<param name="SOS_UNL_ANON" defaultValue="false" description="Pseudonymisierung"><comment>Matrikelnummern pseudonymisieren (true, false). Muss bei Datenquelle HISinOne auf "false" gesetzt sein.</comment></param>
<param name="POS_PNR" defaultValue="0" ><comment>Welche Prüfungsnummern (Vor- Hauptprüfungen) sollen entladen werden? Wird bei Datenquelle HISinOne nicht ausgewertet.</comment></param>
<param name="LAB_FILTER" defaultValue=" AND (lab.panerk is null or lab.panerk != 'J') " ><comment>Weiterer Filter für Einzelprüfungen. Standardmäßig werden anerkannte Prüfungen nicht entladen. Wird bei Datenquelle HISinOne nicht ausgewertet.</comment></param>
<param name="STUDENT_FILTER" defaultValue=" AND 1=1 " ><comment>Filter für Studierende, um z.B. Teststudenten nicht zu entladen (nur HISinOne).</comment></param>
<param name="STUDENT_SOSPOS_FILTER" defaultValue=" AND 1=1 " ><comment>Filter für Studierende, um z.B. Teststudenten nicht zu entladen (nur sospos/co).</comment></param>
</parameters>
<sourcesystems>
<sourcesystem name="co" description="CampusOnline-Datenbank" />
</sourcesystems>
<unload-job id="preparation2" extraction-table="" extraction-script="" database="" transfer-unload-file="" >
<comment> wichtige Konstanten aus SOS entladen, z.B. HISSOS-Version.</comment>
<!-- Ab der INFORMIX IDS 117 entfällt die database-Spezifika: -->
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
create table superx_sos (mtknr integer, mtknr_ldsg integer);
]]>
</extraction-sql>
</unload-job>
<unload-job id="preparation5" extraction-table="" extraction-script="" database="" transfer-unload-file="" >
<comment> wichtige Konstanten aus SOS entladen, z.B. HISSOS-Version.</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
insert into superx_sos(mtknr, mtknr_ldsg)
SELECT DISTINCT S.mtknr,S.mtknr
from sos S
where S.semester >= $start_stud_sem
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="sos_studenten" extraction-table="" extraction-script="" transfer-unload-file="unl/sos_studenten_v1.unl" >
<comment><comment>Studi-Sätze aus SOS. Die KFZ-Kennzeichen werden erst in SuperX umgeschlüsselt.</comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select superx_sos.mtknr_ldsg,
gebdat,
'',--gebort,
(CASE WHEN geschl='M' THEN '1'
when geschl='W' then '2'
else ''
end) as geschl,
exmdat,
status,
semester,
'' ,--poplz,
'' ,--poort,
immdat,
'' ,--beugrund as gdbu,
exmgrund as gdex,
staat,
'' as bland,
'' ,--hssem,
'' ,--urlsem,
hmkfzkz,
hmkfz,
semkfzkz,
semkfz,
hzbart,
hzbjahr,
hzbkfzkz,
hzbkfz,
hzbdatum,
hzbnote ,
'' ,--hssemgewicht,
'' as urlsemgewicht,
erhskfz,
'' ,--erhsart,
erhssembrd,
erstsemhs,
'' ,--sperrart1,
'' ,--sperrart2,
'' ,--staatkez,
'' ,--ersthzbkfz,
'' ,--ersthzbkfzkz ,
'',--ersthzbart
'',-- second_nationality,
'',-- practicalsemester,
'',-- kollegsemester,
'',-- discontinuation_sem_zahl,
'',-- studyrelatedjob,
'',-- studyrelatedinternship,
'',-- interruptiontype,
erhskfz,-- study_before_place_of_study,
'', -- study_before_country_of_study
'', --date AS org_role_valid_from,
'', -- date AS org_role_valid_to
'' AS sema,
'' AS gebasoll,
'' AS geba,
'' AS geba_sws,
'' AS ersthzbjahr,
'' AS ersthzbnote
FROM superx_sos,sos
where
sos.mtknr = superx_sos.mtknr
and sos.semester >= $start_stud_sem
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="sos_faecher" extraction-table="" extraction-script="" transfer-unload-file="unl/sos_faecher_v1.unl" >
<comment>stg-Sätze aus sos</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT
S.mtknr_ldsg,
abschl,
stg,
'' ,--vert,
'' ,--schwp,
kzfa,
'' ,--fb,
pversion,
F.semester,
substr(F.stgnr,1,1),
substr(F.stgnr,length(F.stgnr),1),
F.status,
F.beugrund as gdbu,
F.endegrd as gdex,
F.stgsem,
F.hrst,
F.klinsem,
F.hssem,
'' ,--stuart,
'' ,--stutyp,
stufrm,
'' ,--stort,
F.ruebeudat,
'' ,--semgewicht,
'' ,--stggewicht,
'' ,--stgsemgewicht,
'' as hssemgewicht,
'' as urlsemgewicht,
'' ,--kohsem,
'' ,--lfdnr,
F.endedat,
F.anfdat,
'', --lepsem
'',-- -- district.astat nur h1
'',-- -- country.astat nur h1
'' , --Art der Promotion
'' as field_of_study,
primaerfach,
unikey,
null as individual_number_of_semesters, --individual RSZ
null as degree_program_id --Studiengang-ID
FROM stg F, superx_sos S
WHERE F.mtknr = S.mtknr
and F.status is not null
AND F.semester >= $start_stud_sem
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="finalize1" extraction-table="" extraction-script="" transfer-unload-file="" database="" version="">
<comment>Beendigung</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
drop table superx_sos;
]]>
</extraction-sql>
</unload-job>
</superx-unload>

1
src-modules/module/costage/rohdaten_sos/superx.datum

@ -1 +0,0 @@ @@ -1 +0,0 @@
23.09.2022

1
src-modules/module/costage/rohdaten_zul/unl/hierhin_die_rohdaten.txt

@ -1 +0,0 @@ @@ -1 +0,0 @@

115
src-modules/module/costage/rohdaten_zul/zul_costage_unload.x

@ -1,115 +0,0 @@ @@ -1,115 +0,0 @@
#!/bin/bash
#Extraction Script for SuperX.
#Bitte nicht ändern, diese Datei ist automatisch generiert.
SRC_PFAD=$ZUL_LOAD_PFAD
. $SUPERX_DIR/db/bin/SQL_ENV
if [ "$SRC_PFAD" = "" ]
then
SRC_PFAD=.
fi
SX_CLIENT=jdbc
export SX_CLIENT
SOURCESYSTEM=co
export SOURCESYSTEM
if [ "$outFormat" = "" ]
then
outFormat=txt
fi
DATUM=`cat $SRC_PFAD/superx.datum`
ERR=zul_unload.err
cp $SRC_PFAD/superx.datum $SRC_PFAD/superx.datum.alt
##Löschen der alten Dateien
rm $SRC_PFAD/unl/*unl >/dev/null 2>&1
date +'%d.%m.%Y' > $SRC_PFAD/superx.datum ##neues Entladedatum
HEUTE=`date +'%d.%m.%Y'`
cd $SRC_PFAD >>$ERR 2>&1
echo "Letztes Update-Datum: " $DATUM >$ERR
echo "DATABASE: $DATABASE" >>$ERR
echo "VERSION: $VERSION" >>$ERR
echo "SX_CLIENT: $SX_CLIENT" >>$ERR
echo "1.2b^"$HEUTE"^" >$SRC_PFAD/unl/superx_unload_version.unl
CP=".:$JDBC_CLASSPATH:$XML_CLASSPATH"
cat /dev/null >unload_params.txt
if [ "$VERSION" = "" ]
then
VERSION="13"
export VERSION
fi
echo "Parameter VERSION: $VERSION" >>$ERR
echo "\$VERSION=$VERSION" >>unload_params.txt
if [ "$EXTERNAL_SUBJECTS" = "" ]
then
EXTERNAL_SUBJECTS="false"
export EXTERNAL_SUBJECTS
fi
echo "Parameter POS_PNR: $EXTERNAL_SUBJECTS" >>$ERR
echo "\$EXTERNAL_SUBJECTS=$EXTERNAL_SUBJECTS" >>unload_params.txt
if [ "$SOURCESYSTEM" = "" ]
then
SOURCESYSTEM="co"
export SOURCESYSTEM
fi
echo "Parameter SOURCESYSTEM: $SOURCESYSTEM" >>$ERR
echo "\$SOURCESYSTEM=$SOURCESYSTEM" >>unload_params.txt
#jdbc zum Entladen
if [ "$SX_CLIENT" = "jdbc" ]
then
java $JAVA_OPTS -cp $CP de.superx.bin.SxExtractor -logger:$LOGGER_PROPERTIES -dbproperties:$DB_PROPERTIES -xml:zul_costage_unload.xml -outFormat:$outFormat -delim:$DBDELIMITER -header:$header -database:$DATABASE -version:$VERSION -unload_params:unload_params.txt >>$ERR 2>&1
exit 0
fi
chmod go+r $ERR
chmod go+r $SRC_PFAD/superx.datum
chmod go+r $SRC_PFAD/superx.datum.alt
chmod go+w $SRC_PFAD/superx.datum
chmod go+w $SRC_PFAD/superx.datum.alt
chmod go+r $SRC_PFAD/unl/*
##Herstellen altes Entladedatum bei Fehler
fgrep -s "not found" $ERR >/dev/null
FLAG1=$?
fgrep -i -s "nicht gefunden" $ERR >/dev/null
FLAG2=$?
fgrep -i -s "error" $ERR >/dev/null
FLAG3=$? >/dev/null
fgrep -i -s "exception" $ERR >/dev/null
FLAG4=$? >/dev/null
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 ]
then
echo "Fehler beim Entladen. Das Datum wird zurückgesetzt."
echo "---------------------------------------"
echo "Prüfen Sie Fehlerprotokoll: $ERR"
echo "---------------------------------------"
cp $SRC_PFAD/superx.datum.alt $SRC_PFAD/superx.datum
fi

635
src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml

@ -1,635 +0,0 @@ @@ -1,635 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<superx-unload version="2.1">
<module id="zul" version="0.6" systeminfo_id="130">ZUL-Modul</module>
<parameters>
<!-- Gruppe Systemparameter -->
<param name="VERSION" defaultValue="10" description="Version des Vorsystems." priority="1" sourcesystem="0"
wertebereich="10" ab_version=">6.0" gruppe="Systemparameter" >
<comment>Wird nicht mehr gepflegt, ab ZUL-Version 10 immer auf 10 setzen. Bei HISinOne wird sie automatisch gesetzt.</comment></param>
<!-- Gruppe Datenschutz HISinOne APP -->
<param name="EXTERNAL_SUBJECTS" defaultValue="false" description="Sollen externe Fächer entladen werden? "><comment> Wenn ja, dann ist der Wert "true", wenn nein, dann ist er "false"</comment></param>
</parameters>
<sourcesystems>
<sourcesystem name="co" description="CampusOnline-Datenbank" default="true"/>
</sourcesystems>
<unload-job id="konstanten" extraction-table="" extraction-script="" transfer-unload-file="unl/konstanten.unl" >
<comment> wichtige Konstanten aus SOS entladen, z.B. HISSOS-Version.</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select distinct 1,'' || '$VERSION','ZUL-Version' from costage_st_studiengaenge
union
select distinct 3,'1','zul_unload_complete' from costage_st_studiengaenge
union
select distinct 2,'15','ZUL_Quellsystem' from costage_st_studiengaenge
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_bew" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_bew.unl" >
<comment><comment>Bewerber-Stammdaten</comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT distinct
B.st_studstamm_nr,-- personid,
B.st_studstamm_nr,
B.st_studstamm_nr as bewnr_ext,
null,--bew_efh,
null,--eingangdat,
null::char(1) as fehlerkz,
B.matrikelnummer,
null,--bew_prfzif,
B.semester as bewsem,
null,--anti,
null,--bew_nachname,
null,--bew_sortname,
null,--bew_vorname,
null,--bew_gebname,
null,--bew_gebort,
date(S.geburtsdatum) as bew_gebdat,
S.geschlecht as geschl,
val(L.statistik_code) as staat,
null,--pozusatz,
null,--postrasse,
null,--poplz,
null,--poort,
null,--pozustbez,
null,--pokfz,
null,--potel,
null,--bew_bishsem,
null,--zweitst,
null,--bew_hmkfzkz,
null,--bew_hmkfz,
B.st_studstamm_nr as bewnr,
null,--gebn,
null,--fehlunt,
null,--bew_f1,
null,--bew_f2,
null,--bew_f3,
null,--bew_f4,
null,--bew_f5,
null,--bew_f6,
null,--bew_f7,
null,--bew_f8,
null,--bem,
null,--bew_verwkz1,
null,--bew_verwkz2,
null,--bew_verwkz3,
null,--bew_verwkz4,
null,--bew_verarbkz,
null,--bemlang,
null, --staatkez,
null,--bew_anschrkz,
null,--kravers,
null,--kravnr,
null,-- krabnr,
null,--berufab,
null,--berufmon,
null,--berufjahr,
null,--prakt1,
null,--prakt2,
null,--sonsttaet,
null,--gesadauer,
null,--prakdauer,
null,--bew_erhskfz,
null,--bew_erhsart,
null,--bew_erhssembrd,
null,--bew_erstsemhs,
null, --hssem,
null,--bew_urlsem,
null,--bew_praxsem,
null,--prax1,
null,--prax2,
null,--bew_kolsem,
null,--bew_klinsem,
null,--ddrsem,
null,--ddrart,
null,--stuntsem,
null,--staukfz1,
null,--staumon1,
null,--stauart1,
null,--staukfz2,
null,--staumon2,
null,--stauart2,
null,--staukfz3,
null,--staumon3,
null,--stauart3,
null,--wahlkz,
null,--wahlfb,
null,--antizudtxt,
null,--zusastrasse,
null,--zusaort,
null,--ord_kuenstname,
val(L.statistik_code) as gebland,
null,--dokvorname,
null,--bew_zvs_zusatz,
null,--bew_bewnrhist,
null,--tnaustausch,
null,--titel_nachgestellt,
null,--basem,
null,--baabdatum,
null,--akdsem,
null,--akdabdatum,
null,--bew_erfassungsart,
null,--zustimmung_alumni,
null, --zvs_ekritpaket_01,
null, --zvs_ekritpaket_02,
null, --zvs_ekritpaket_03,
null, --zvs_ekritpaket_04,
null, --zvs_ekritpaket_05,
null, --zvs_ekritpaket_06,
null, --zvs_ekritpaket_07,
null, --zvs_ekritpaket_08,
null, --zvs_ekritpaket_09,
null, --zvs_ekritpaket_10,
null, --zvs_ekritpaket_11,
null, --zvs_ekritpaket_12,
null, --zvs_ekritpaket_13,
null, --zvs_ekritpaket_14,
null, --zvs_ekritpaket15,
null, --zvs_ekritpaket_16,
null, --zvs_ekritpaket_17,
null, --zvs_ekritpaket_18,
null --zvs_spezkrit
FROM
costage_bw_antr_aggr B left outer join costage_st_studierendenstammdaten_neu S
on (S.st_studstamm_nr=B.st_studstamm_nr)
left outer join
costage_st_laender L
on( L.st_land_nr=S.st_land1_nr)
where B.bw_typ_kb !='MBW'
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_antr" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_antr.unl" >
<comment>antr-Saetze aus zul</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT A.st_studstamm_nr as bewnr,
null,--efh,
1 as antrnr,
A.fach_nr as fachnr,
G.fachkennzeichen as kzfa,
G.skz_key as stg,
G.abschluss,
null, --schwerpunkt
null,--antr_vert,
null,--antr_stuart,
null,--antr_stutyp,
A.stufrm as antr_stufrm,
A.fachsemester as stgsem,
null,--stgspz,
null,--dowunsch1,
null,--dowunsch2,
(case when exists(select id from sx_repository R where R.id='COSTAGE_STORT' and aktiv=1) then G.stort_nr else null::char(10) end ) as antr_stort,
null,--haerteantr,
null,--haerte,
null,--haertegrd,
null,--haertepunkte,
null,--vorzul,
null,--dienst,
null,--dienstende,
null,--bevzul,
null,--wartevor,
null,--hindvor,
null,--wartenach,
null,--hindnach,
null,--wartemind,
null,--zuskr1,
null,--zusbew1,
null,--zuskr2,
null,--zusbew2,
null,--zuskr3,
null,--zusbew3,
null,--zuskr4,
null,--zusbew4,
null,--zuskr5,
null,--zusbew5,
null,--zuskr6,
null,--zusbew6,
null,--noteantr,
null,--verbnote,
null,--notegrd,
null,--noteneu,
null,--zeitantr,
null,--verbzeit,
null,--zeitgrd,
null,--wartezeit,
null, --antr_verfnote,
null,--wartesem,
null,--mischnote,
null,--punkte,
null,--besausl,
null,--messausl,
null,--messzweit,
A.zul_kz as zulassung,
null::date as zuldat,
status_zul as antr_zulart,
null,--antr_zulfh,
null,--antr_ablart,
null,-- quotenr,
null,--annfrist,
A.annahme_kz,
null, --antrags_status
null,--antrf1,
null,--antrf2,
null,--antrf3,
null,--antrf4,
null,--antrfu,
null,--berdatum,
null,--bertaet,
null,--spvo,
null,--immend,
null,--beweign,
null,--antr_eignnote,
null,--bonussem,
A.einschreib_kz,
null,--antr_lepsem,
null,--frisem,
null,--angsemg,
null,--angsems,
null,--angsemb,
null,--angsema,
null,--klinsem,
null,--kohsem,
null,--eignteilnahme,
null,--eignteilnote,
null,--beranfdatum,
null,--klinsembean,
null,--stgsembean,
null,--vklinsembean,
A.semester as bewsem,
null,--antr_kmpldatum,
A.nr as satzid,
null,--ortspraef,
null,--raliausw,
null,--bewsaldo,
null, --fachbind
null, --B.eingangdat
null, -- pversion
null, --zvs_ekritpaket_01,
null --zvs_ekritpaket_02
FROM costage_bw_antr_aggr A, costage_st_studiengaenge G
where A.st_studiengang_nr=G.st_studiengang_nr
and A.bw_typ_kb !='MBW'
and ($EXTERNAL_SUBJECTS ='true'
or A.unikey=(select H.hs_nr::char(10) from hochschulinfo H)
or exists(select id from sx_repository R where R.id='COSTAGE_STORT' and aktiv=1)
)
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_hzb" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_hzb.unl" >
<comment>hzb-Saetze aus zul</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT A.st_studstamm_nr as bewnr,
1 as antrnr,
A.nr as satzid,
A.fach_nr,
null, --A.hzbwiedeu,
A.hzb_art,
A.hzb_note,
A.hzb_datum,
(case when A.hzb_staat=0 then 'I' else 'A' end) as hzbkfzkz,
(case when A.hzb_staat=0 then A.hzb_ort else A.hzb_staat end) as hzb_ort,
null, --A.hzbregion,
null --A.hzbbes
FROM costage_bw_antr_aggr A
where A.bw_typ_kb !='MBW';
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_hzb_erste" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_hzb_erste.unl" >
<comment>hzb-Saetze von Bewerbern mit Antraegen ohne HZB-Zuordnung. Explizite Ermittlung</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_k_nc" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_k_nc.unl" >
<comment>Studienplätze</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_k_ncbuch" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_k_ncbuch.unl" >
<comment> k_ncbuch</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_k_ncplaz" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_k_ncplaz.unl" >
<comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_eignstg" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_eignstg.unl" >
<comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_eigntxt" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_eigntxt.unl" >
<comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_eignbew" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_eignbew.unl" >
<comment> Anschriften aus SOS</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_nc_rang" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_nc_rang.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_quote" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_quote.unl" >
<comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_k_topf" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_k_topf.unl" >
<comment></comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="cifx" extraction-table="" extraction-script="" transfer-unload-file="unl/cifx.unl" >
<comment>Schluesseltabelle cifx</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT
30,
0,
K.skz_key,--apnr,
substring(K.skz_name from 1 for 10) as ktxt,
K.skz_name as dtxt,
K.skz_name as ltxt ,
F.statistik_code::char(10) as astat,
null::char(10) as parent,
K.skz_key as uniquename,
null::integer as sortorder,
' ' as bund_apnr,
' ', --sprache
null::date as gueltig_von,
null::date as gueltig_bis,
K.st_skz_nr::varchar(255), --sourcesystem_id
null::char(10) , --hiskey_id
fakultaet_key::char(10), --struktur_c
null as lid,
null as parent_lid
FROM costage_st_studienkennzahlen K left outer join costage_st_studienfaecher F
on ( F.st_stdfach_nr=K.st_stdfach_nr)
where ($EXTERNAL_SUBJECTS ='true'
or unikey=(select H.hs_nr::char(10) from hochschulinfo H)
)
union
SELECT
35,
-1,
L.code as abint,
substring(L.name from 1 for 10),--ktxt,
L.name as dtxt,
L.name as ltxt,
F.statistik_code::char(10) as astat,
null as parent,
L.code,--sortc1 wird später uniquename
null::integer as sortorder,
' ' as bund_apnr,
null as sprache,
null::date as gueltig_von,
null::date as gueltig_bis,
L.st_absz_nr::varchar(255), --sourcesystem_id
' ', --hiskey_id
'A', --struktur_c
null as lid,
null as parent_lid
FROM costage_st_abschlussziele_lokal L left outer join costage_st_abschlussziele_amtstat F
on (F.st_absz_amtstat_nr=L.st_absz_amtstat_nr)
WHERE L.code is not null
union
SELECT distinct
612,
-1,
studienform_statistik_code,
studienform_statistik_code as ktxt,
studienform_name,
studienform_name,
studienform_statistik_code as astat,
'',
studienform_statistik_code ,
null::integer as sortorder,
'',
'',
null::date as gueltig_von,
null::date as gueltig_bis,
studienform_statistik_code , --sourcesystem_id
'', --hiskey_id
'' , --struktur_c
null as lid,
null as parent_lid
FROM costage_st_studien
union
SELECT distinct
614,
-1,
fachkennzeichen,
fachkennzeichen,--ktxt,
fachkennzeichen,
fachkennzeichen,
null::char(10),
null as parent,
fachkennzeichen,--sortc1 wird später uniquename
null::integer as sortorder,
' ',
null as sprache,
null::date as gueltig_von,
null::date as gueltig_bis,
fachkennzeichen, --sourcesystem_id
' ', --hiskey_id
'A', --struktur_c
null as lid,
null as parent_lid
FROM costage_st_studiengaenge
WHERE fachkennzeichen is not null
and trim(fachkennzeichen)!=''
union
SELECT
12,
0,
kurzbezeichnung,
kurzbezeichnung as ktxt,
name,
name,
statistik_code as astat,
'',
kurzbezeichnung as akfz,--uniqename
null::integer as sortorder,
'' as erdteil,
'' ,
null::date as gueltig_von,
null::date as gueltig_bis,
kurzbezeichnung, --sourcesystem_id
'' , --hiskey_id
'' ,--egmitgl struktur_c
null as lid,
null as parent_lid
FROM costage_st_laender
WHERE statistik_code is not null
union
SELECT
8,
0,
R.statistik_code as bland,
R.statistik_code as ktxt,
R.name as dtxt,
R.name as ltxt,
R.statistik_code as astat,
'',
R.statistik_code as bland,
null::integer as sortorder,
'',
'',
null::date as gueltig_von,
null::date as gueltig_bis,
R.statistik_code , --sourcesystem_id
'' , --hiskey_id
'', --struktur_c
null as lid,
null as parent_lid
from costage_st_land_regionen R, costage_st_laender L
where L.st_land_nr=R.st_land_nr
and L.statistik_code='000'
and R.statistik_code is not null
union
SELECT distinct
9012,
0,
stort_nr,
stort_nr as ktxt,
stort_name as dtxt,
stort_name as ltxt ,
stort_nr as astat,
' ',
stort_nr as uniquename,
null::integer as sortorder,
' ' as bund_apnr,
' ', --sprache
null::date as gueltig_von,
null::date as gueltig_bis,
stort_nr::varchar(255), --sourcesystem_id
null::char(10) , --hiskey_id
null as struktur_c,
null as lid,
null as parent_lid
FROM costage_st_studiengaenge
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_cifx" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_cifx.unl" >
<comment>Schluesseltabelle cifx</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * FROM costage_st_semester where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_semester" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_semester.unl" >
<comment>SuperX-semester</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT distinct semester_tid,
semester_bezeichnung,
date(semester_anfang) as sem_beginn,
date(semester_ende) as semende,
date(semester_anfang)+60 as stistat
FROM costage_st_semester
--where semester_tid >= $start_stud_sem
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_update_prot" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_update_prot.unl" >
<comment>Letzter entladener Protokollsatz (APP)</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_app_content_value" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_app_content_value.unl" >
<comment>Wert Bewerbungsbestandteile</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
<unload-job id="zul_app_content" extraction-table="" extraction-script="" transfer-unload-file="unl/zul_app_content.unl" >
<comment>Wert Bewerbungsbestandteile</comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
select * from costage_st_studiengaenge where 1=0;
]]>
</extraction-sql>
</unload-job>
</superx-unload>

59
src-modules/module/costage/schluesseltabellen/cifx_fuellen.sql

@ -1,14 +1,11 @@ @@ -1,14 +1,11 @@
--Freemarker Template
<sqlvars>
<sqlvar name="kenn_dim_fgr_exists">
select sp_table_exists('kenn_dim_fgr') from xdummy
</sqlvar>
</sqlvars>
<#assign dimensions = [
{"key":"400", "name":"Statustyp (CO)"},
{"key":"401", "name":"Hörerstatus (CO)"},
{"key":"30", "name":"Studienfächer"},
{"key":"35", "name":"Abschlüsse"},
{"key":"90", "name":"Fakultät/Fachbereich"}
] />
@ -28,7 +25,15 @@ select sp_table_exists('kenn_dim_fgr') from xdummy @@ -28,7 +25,15 @@ select sp_table_exists('kenn_dim_fgr') from xdummy
<#assign dimension_levels_dynamic = [
{"key":"401","apnr":"hoererstatus_kb", "druck":"hoererstatus_name", "astat":"", "srctable":"costage_st_hoererstatus", "astat":"", "hs":"", "struktur_c":""},
{"key":"90","apnr":"fakultaet_key", "druck":"fakultaet_bezeichnung", "srctable":"costage_st_fakultaeten",
{"key":"30","apnr":"skz_key", "druck":"skz_name", "srctable":"costage_st_studienkennzahlen",
"astat":"(select distinct F.statistik_code from costage_st_studienfaecher F where F.st_stdfach_nr=costage_st_studienkennzahlen.st_stdfach_nr)",
"struktur_c":"fakultaet_key",
"hs":"unikey"},
{"key":"35","apnr":"code", "druck":"name", "srctable":"costage_st_abschlussziele_lokal",
"astat":"(select distinct F.statistik_code from costage_st_abschlussziele_amtstat F where F.st_absz_amtstat_nr=costage_st_abschlussziele_lokal.st_absz_amtstat_nr)",
"struktur_c":"(select A.kurzbezeichnung from costage_st_abschlussziele_amtstat F, costage_st_studienarten A where F.st_absz_amtstat_nr=costage_st_abschlussziele_lokal.st_absz_amtstat_nr and A.st_std_art_nr=F.st_std_art_nr)",
"hs":""},
{"key":"90","apnr":"fakultaet_key", "druck":"fakultaet_bezeichnung", "srctable":"costage_st_fakultaeten",
"astat":"",
"struktur_c":"",
"hs":"unikey"}
@ -170,48 +175,6 @@ NULL::char(10) as hiskey_id , @@ -170,48 +175,6 @@ NULL::char(10) as hiskey_id ,
</#foreach>
<#if kenn_dim_fgr_exists==1>
insert into tmp_cifx
(
key ,
hs,
apnr ,
kurz ,
druck,
lang_1 ,
astat,
uniquename ,
d_akt_von ,
d_akt_bis ,
sourcesystem_id ,
sourcesystem,
lid ,
--parent_lid,
hiskey_id ,
struktur_c
)
select
621 as key ,
0 as hs,
'0' || trim(apnr) || '0' as apnr,
substring(drucktext from 1 for 10) as kurz ,
drucktext as druck,
drucktext as lang_1 ,
apnr as astat,
'0' || trim(apnr) || '0' as uniquename ,
date_val('01.01.1900') as d_akt_von ,
date_val('01.01.3000')d_akt_bis ,
apnr as sourcesystem_id ,
15 as sourcesystem,
'0' || trim(apnr) || '0' as lid ,
--parent_lid,
NULL::char(10) as hiskey_id,
'' as struktur_c
from kenn_dim_fgr
where string_not_null(fg_studierende)!='';
</#if>
--Duplikate raus:
select T.key,T.apnr
from tmp_cifx T

0
src-modules/module/costage/schluesseltabellen/costage_captions.unl

68
src-modules/module/costage/schluesseltabellen/costage_dim_studiengang_fuellen.sql

@ -1,68 +0,0 @@ @@ -1,68 +0,0 @@
truncate table costage_dim_studiengang;
insert into costage_dim_studiengang(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,
stuart,
stufrm,
pversion,
rsz,
skz_key,
skz_name,
unikey,
fakultaet_key,
abschluss_code,
abschluss_name,
fakultaet_kurztext,
fakultaet_drucktext,
stort_nr,
stort_name)
SELECT G.st_studiengang_nr,
substring(G.studiengangs_identifikator from 1 for 255) as studiengangs_identifikator,
substring(G.studiengangs_bezeichnung from 1 for 255) as studiengangs_bezeichnung,
G.st_absz_nr,
G.st_skz_nr,
G.fachkennzeichen,
G.st_std_art_nr,
G.studiengangs_typ_name,
G.studiengangs_typ_kb,
G.studientyp_name,
G.studientyp_kb,
G.stp_stp_nr,
--G.abschluss,
G.stuart,
G.stufrm,
G.pversion,
G.rsz,
SKZ.skz_key,
SKZ.skz_name,
SKZ.unikey,
SKZ.fakultaet_key,
A.code as abschluss_code,
A.name as abschluss_name,
null::varchar(255) as fakultaet_kurztext,
null::varchar(255) as fakultaet_drucktext,
G.stort_nr,
G.stort_name
FROM costage_st_studiengaenge G left outer join costage_st_studienkennzahlen SKZ
on ( SKZ.st_skz_nr=G.st_skz_nr)
left outer join costage_st_abschlussziele_lokal A on (A.st_absz_nr=G.st_absz_nr);
update costage_dim_studiengang set fakultaet_kurztext=F.fakultaet_bezeichnung,
fakultaet_drucktext=F.fakultaet_name
from costage_st_fakultaeten F
where F.fakultaet_key=costage_dim_studiengang.fakultaet_key
and F.unikey=costage_dim_studiengang.unikey;

179
src-modules/module/costage/schluesseltabellen/konstanten_fuellen.sql

@ -1,179 +0,0 @@ @@ -1,179 +0,0 @@
--freemarker template
<#if SQLdialect='Postgres'>
<#assign texttype="text" />
<#else>
EXECUTE PROCEDURE IFX_ALLOW_NEWLINE('T');
<#assign texttype="lvarchar" />
</#if>
<#assign newline="'
'" />
create table tmp_konstanten
(
tid serial,
apnr integer,
beschreibung char(255),
defaultvalue integer,
description ${texttype},
systeminfo_id integer,
doku_link varchar(255),
read_only integer,
wertebereich varchar(250),
ab_version varchar(10),
gruppe varchar(255),
sachgebiete_id integer
);
insert into tmp_konstanten(apnr,
beschreibung,
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
values (1,
'COSTAGE_TSG_GENERATE',
1,
'Teilstudiengänge Status aus MSG ausdehnen',
310,
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',--doku link
0,
'1,Ja'|| ${newline} || '0,Nein',
'>0.3',
'Datenquelle, Entladestartzeitpunkt, -umfang',
310);
insert into tmp_konstanten(apnr,
beschreibung,
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
values (5,
'COSTAGE_einzpruef_anz_sem',
5,
'Anzahl der Semester, für die rückwirkend Einzelprüfungen berechnet werden',
310,
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',
0 ,
null::Char(1),
'0.3',
'Datenquelle, Entladestartzeitpunkt, -umfang',
310);
insert into tmp_konstanten(apnr,
beschreibung,
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
values (0,
'SOS_CO_allow_external',
0,
'Erlaube externe Hochschuldaten',
310,
'https://www.superx-projekt.de/doku/costage_modul/admin/f_Konstanten.htm',
0 ,
'1,Ja'|| ${newline} || '0,Nein',
'0.5',
'Datenquelle, Entladestartzeitpunkt, -umfang',
310);
--vorhandene Schlüssel Metadaten updaten:
<#if SQLdialect='Postgres'>
--Postgres Dialekt:
update konstanten set defaultvalue=T.defaultvalue,
description=T.description,
systeminfo_id=T.systeminfo_id ,
doku_link=T.doku_link,
read_only=T.read_only ,
wertebereich=T.wertebereich,
ab_version=T.ab_version,
gruppe=T.gruppe ,
sachgebiete_id=T.sachgebiete_id
from tmp_konstanten T
where T.beschreibung=konstanten.beschreibung;
<#else>
--Informix Dialekt:
update konstanten set (defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id)
= ((select
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id
from tmp_konstanten T
where T.beschreibung=konstanten.beschreibung));
</#if>
delete from tmp_konstanten where beschreibung in (select beschreibung from konstanten);
create temp table tmp_hilf (tid integer);
insert into tmp_hilf select max(tid) from konstanten;
update tmp_hilf set tid=0 where tid is null;
insert into konstanten(tid ,
apnr ,beschreibung,
defaultvalue,
description,
systeminfo_id,
doku_link,
read_only,
wertebereich,
ab_version,
gruppe,
sachgebiete_id )
select H.tid+K.tid ,
K.apnr ,
K.beschreibung,
K.defaultvalue,
K.description,
K.systeminfo_id,
K.doku_link,
K.read_only,
K.wertebereich,
K.ab_version,
K.gruppe,
K.sachgebiete_id
from tmp_konstanten K, tmp_hilf H;
drop table tmp_hilf;
drop table tmp_konstanten;

122
src-modules/module/costage/schluesseltabellen/sichten_fuellen.sql

@ -1,122 +0,0 @@ @@ -1,122 +0,0 @@
--freemarker template
<#if SQLdialect='Postgres'>
select setval('sichten_tid_seq',(select max(tid) from sichten));
</#if>
CREATE temp TABLE tmp_sichten (
parent character(255),
systeminfoid integer DEFAULT 0 NOT NULL,
art character(40),
type integer ,
name_intern character(200),
name character(200),
beschreibung character(255),
sortnr integer DEFAULT 0 NOT NULL,
quelle character(255),
alt_hier_id character(150),
treecfgtable character(255),
treecfgid character(150),
label smallint DEFAULT 0 NOT NULL,
user_rechte smallint DEFAULT 1 NOT NULL,
rechtequelle character(255),
sesamkey character(100),
standbutton smallint DEFAULT 0 NOT NULL,
attribut1 character(255),
attribut2 character(255),
attribut3 integer,
attribut4 integer,
xmlmaxentries integer,
gueltig_seit date ,
gueltig_bis date,
aktiv smallint DEFAULT 1
);
-- Studiengänge nach Abschluss/Fach
INSERT INTO tmp_sichten(
systeminfoid ,
art ,
type ,
name_intern ,
name ,
sortnr ,
quelle ,
label ,
user_rechte ,
standbutton ,
gueltig_seit ,
gueltig_bis , aktiv
) select
310 ,
'COSTAGE-Studiengang-Sicht' ,
10 ,
'costage_studieng_abschluss_fach' ,
'Studiengang nach Abschluss/Fach' ,
1 ,
'select druck,apnr,parent,struktur_str from costage_abschluss_fach_stg order by 1',
0 ,
0 ,
0 ,
date_val('01.01.1900') , date_val('01.01.3000') , 1 from xdummy;
-- Studiengänge nach Abschluss, darunter Abschluss/Fach
INSERT INTO tmp_sichten(
systeminfoid ,
art ,
type ,
name_intern ,
name ,
sortnr ,
quelle ,
label ,
user_rechte ,
standbutton ,
gueltig_seit ,
gueltig_bis , aktiv
) select
310 ,
'COSTAGE-Studiengang-Sicht' ,
10 ,
'costage_studieng_abschluss' ,
'Studiengang nach Abschluss' ,
0 ,
'select druck,apnr,parent,struktur_str from costage_abschluss_stg order by 1',
0 ,
0 ,
0 ,
date_val('01.01.1900') , date_val('01.01.3000') , 1 from xdummy;
delete from tmp_sichten where name_intern in (select name_intern from sichten);
INSERT INTO sichten(
systeminfoid , art , type , name_intern , name ,
sortnr , quelle , label ,
user_rechte , standbutton ,
xmlmaxentries ,
gueltig_seit , gueltig_bis , aktiv)
select systeminfoid , art , type , name_intern , name ,
sortnr , quelle , label ,
user_rechte , standbutton ,
xmlmaxentries ,
gueltig_seit , gueltig_bis , aktiv
from tmp_sichten S;
--Rechte für Sichten geben
select 'Rechte für Sichten geben' from xdummy;
delete from sachgeb_sichtarten where sichtart in
(select distinct art from tmp_sichten);
insert into sachgeb_sichtarten
(
sachgebiete_id ,
sichtart
)
select distinct 310,art from tmp_sichten;
drop table tmp_sichten;

8
src-modules/module/costage/schluesseltabellen/sichten_loeschen.sql

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
delete from sichten where systeminfoid =121; --GANG
delete from sachgeb_sichtarten where sachgebiete_id in (121);

69
src-modules/module/costage/schluesseltabellen/sos_unload_params_fuellen.sql

@ -1,69 +0,0 @@ @@ -1,69 +0,0 @@
--Unload Parameter und deren Defaults setzen
--freemarker template
<sqlvars>
<sqlvar name="unload_params_exists">
select sp_table_exists('unload_params') from xdummy;
</sqlvar>
</sqlvars>
<#if unload_params_exists=1>
create temp table tmp_unload_params(
tid SERIAL not null,
param_id VARCHAR(255) not null,
param_val VARCHAR(255) ,
default_val VARCHAR(255) ,
description VARCHAR(255) ,
systeminfo_id INTEGER
);
insert into tmp_unload_params(param_id,
param_val,
default_val,
description,
systeminfo_id)
values ('EXTERNAL_SUBJECTS',
'false',
'false',
'Übergabe externe Fächer von COSTAGE ans Studierenden-Modul',
7);
--description wird immer geändert:
update unload_params set description=(select T.description
from tmp_unload_params T
where T.param_id=unload_params.param_id
and T.systeminfo_id=unload_params.systeminfo_id)
where systeminfo_id=7
and param_id in (select param_id from tmp_unload_params);
--default_val wird immer geändert:
update unload_params set default_val=(select T.default_val
from tmp_unload_params T
where T.param_id=unload_params.param_id
and T.systeminfo_id=unload_params.systeminfo_id)
where systeminfo_id=7
and param_id in (select param_id from tmp_unload_params);
delete from tmp_unload_params where systeminfo_id || param_id in
(select systeminfo_id || param_id from unload_params);
insert into unload_params(param_id,
param_val,
default_val,
description,
systeminfo_id)
select param_id,
param_val,
default_val,
description,
systeminfo_id
from tmp_unload_params
where param_id is not null;
drop table tmp_unload_params;
</#if>

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

@ -1,21 +1 @@ @@ -1,21 +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^
2^COSTAGE_STORT^^Standorte^Hier werden Standorte konfiguriert^^COSTAGE_STORT^^^310^1^0^0^^0^01.01.1900^31.12.3000^
3^COSTAGE_LEISTUNGSSTATUS_MAP^case when leistungstyp_nr=1 --reale Prüfung\
and leistungsstatus_nr=1 --in Bearbeitung\
then 'AN' --angemeldet\
when leistungstyp_nr=1 --reale Prüfung\
and leistungsstatus_nr=5 --gelöscht\
then 'AB' --abgemeldet\
when note_negativ_flag='J' \
and leistungstyp_nr in (4,9) -- AP Abschlussprüfung, AAP anerkannte Abschlussprüfung\
then 'EN' --endgültig nicht bestanden\
when note_negativ_flag='J' \
then 'NB' --nicht bestanden\
when note='Q' --keine Beurteilung\
and note_zusatz='Q' --Rücktritt mit anerkanntem Grund\
then 'R' --Rücktritt von der Prüfungsanmeldung\
when note='Q' --keine Beurteilung\
then 'NE' --nicht erschienen\
else 'BE' --bestanden\
end^Leistungsstatus-Gruppen (CO)^Hier werden Leistungsstatus-Gruppen (CO) konfiguriert. Beispiel der UZK für sx_leistungen_v^^COSTAGE_LEISTUNGSSTATUS^^^310^1^0^0^^1^01.01.1900^31.12.3000^
4^COSTAGE_STUDIENSTATUS_FILTER^studienstatustyp not in ('a','o','z')^Filter Studienstatus für CO^Hier werden Studienstatus-Typen für Auswertungen aus CO gefiltert^^COSTAGE_STUD_STATUS_FILTER^^^310^1^0^0^^1^01.01.1900^31.12.3000^

6
src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -4,11 +4,7 @@ @@ -4,11 +4,7 @@
--Bitte nur Freemarker Variablen füllen
<#assign masken = [
{"mask":"43040", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"},
{"mask":"43080", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"},
{"mask":"43110", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"},
{"mask":"43140", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"},
{"mask":"43180", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"}
{"mask":"43040", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"}
] />
<#assign stylesheet = [

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

@ -1,10 +1,3 @@ @@ -1,10 +1,3 @@
--freemarker template
<#if COSTAGE_STORT?exists && COSTAGE_STORT !="">
<#assign inlineTemplate=COSTAGE_STORT?interpret />
<@inlineTemplate/>
</#if>
delete from costage_st_studiengaenge;
@ -39,10 +32,7 @@ st_studiengang_nr, @@ -39,10 +32,7 @@ st_studiengang_nr,
--transformiere Fach/Abschluss etc. nach SuperX Notation
--Fach:
update costage_st_studiengaenge set skz_key=SKZ.skz_key
<#if stort?exists>
,stort_nr=SKZ.unikey
</#if>
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:
@ -53,18 +43,8 @@ where A.st_absz_nr=costage_st_studiengaenge.st_absz_nr; @@ -53,18 +43,8 @@ where A.st_absz_nr=costage_st_studiengaenge.st_absz_nr;
--pversion/rsz
update costage_st_studiengaenge set pversion=P.po_stp_stp_version_kb,
rsz=P.po_regelstudienzeit
from costage_st_studien_spoversionen P, costage_st_studien S
where S.st_studium_nr = P.st_studium_nr
and S.st_studiengang_nr=costage_st_studiengaenge.st_studiengang_nr
--paßt nicht zusammen: and P.stp_stp_nr=costage_st_studiengaenge.stp_stp_nr
;
from costage_st_studien_spoversionen P
where P.stp_stp_nr=costage_st_studiengaenge.stp_stp_nr;
--Standorte name:
<#if stort?exists>
<#foreach st in stort>
update costage_st_studiengaenge set stort_name='${st.name}'
where stort_nr='${st.nr}';
</#foreach>
</#if>

60
src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql

@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
--freemarker template
<#if COSTAGE_STORT?exists && COSTAGE_STORT !="">
<#assign inlineTemplate=COSTAGE_STORT?interpret />
<@inlineTemplate/>
</#if>
delete from costage_st_studienkennzahlen;
insert into costage_st_studienkennzahlen(
st_skz_nr,
skz_key,
unikey,
fakultaet_key,
skz_name,
st_stdfach_nr,
gesetzliche_grundlage_kb
)
select
S.st_skz_nr,
S.skz_key,
S.unikey,
S.fakultaet_key,
S.skz_name,
S.st_stdfach_nr,
S.gesetzliche_grundlage_kb
FROM costage_st_studienkennzahlen_neu S, hochschulinfo H
where H.hs_nr::char(10)=S.unikey or S.unikey is null
or 1=0
<#if stort?exists>
<#foreach st in stort>
or S.unikey ='${st.nr}'
</#foreach>
</#if>
;
<#if stort?exists == false>
--wg. Eindeutigkeit kombinierter Schlüssel SKZ+UNIKEY:
insert into costage_st_studienkennzahlen(
st_skz_nr,
skz_key,
unikey,
fakultaet_key,
skz_name,
st_stdfach_nr,
gesetzliche_grundlage_kb
)
select
S.st_skz_nr,
trim(S.skz_key) ||'_' || trim(S.unikey),
S.unikey,
S.fakultaet_key,
S.skz_name,
S.st_stdfach_nr,
S.gesetzliche_grundlage_kb
FROM costage_st_studienkennzahlen_neu S, hochschulinfo H
where H.hs_nr::char(10)!=S.unikey
;
</#if>
--TODO: Duplikatssuche bei Fächern ("skz_key").

39
src-modules/module/costage/upgrade/costage_upgrade_man.sql

@ -1,39 +0,0 @@ @@ -1,39 +0,0 @@
--Freemarker Template
<#if '${SQLdialect}'='Postgres' >
alter table costage_st_studienkennzahlen alter column skz_key type char(10);
alter table costage_st_studierendenstammdaten_neu alter column aufnahmedatum type varchar(255);
--alter table costage_st_studierendenstammdaten alter column geschlecht type integer using val(geschlecht);
alter table costage_bw_bewerb_hzb alter column hzb_punkte type float;
alter table costage_bw_bewerb_hzb alter column hzb_punkte_max type float;
alter table costage_leistungen alter column note_zahl type float;
alter table costage_leistungen alter column credits type float;
alter table costage_leistungen alter column semesterstunden type float;
alter table costage_leistungen alter column matrikelnummer type integer using val(matrikelnummer)::integer;
ALTER TABLE costage_st_studierendenstammdaten
ALTER COLUMN matrikelnummer drop not null;
</#if>
--Länder Schlüssel ggf. doppelt aus sospos, daher löschen:
delete from cifx C
where key=12
and astat is not null
AND (today()>=d_akt_von AND today()<=d_akt_bis)
and 0=(select count(*) from costage_st_laender L
where L.kfz_kennzeichen=C.apnr)
and (select count(*) from costage_st_laender L2)>0 --wenn die Tab. überhaupt gefüllt ist
;
--Länder Schlüssel ggf. doppelt aus sospos, daher löschen:
delete from cifx C
where key=11
and astat is not null
AND (today()>=d_akt_von AND today()<=d_akt_bis)
and 0=(select count(*) from costage_land_subregionen L
where L.land_kfz_kennzeichen_subregion=C.apnr)
and (select count(*) from costage_land_subregionen L2)>0 --wenn die Tab. überhaupt gefüllt ist
;
Loading…
Cancel
Save