Browse Source

Letzte SPO-Version pro Sem. ermitteln #11

COStage_0.3_Release
Daniel Quathamer 2 years ago
parent
commit
d5c211f163
  1. 7
      src-modules/module/costage/conf/costage.xml
  2. 41
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  3. 0
      src-modules/module/costage/schluesseltabellen/costage_captions.unl
  4. 4
      src-modules/module/costage/upgrade/costage_upgrade_man.sql

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

@ -288,7 +288,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<column name="abschluss" type ="CHAR" size ="10" default ="" notnull ="false" description="Abschluss"/> <column name="abschluss" type ="CHAR" size ="10" default ="" notnull ="false" description="Abschluss"/>
<column name="stuart" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienart"/> <column name="stuart" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienart"/>
<column name="stufrm" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienform"/> <column name="stufrm" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienform"/>
<column name="pversion" type ="VARCHAR" size ="255" default ="" notnull ="false" description="SPO-Version"/> <column name="pversion" type ="VARCHAR" size ="255" default ="" notnull ="false" description="SPO-Version" currentlyUsed="false"/>
<column name="rsz" type ="INTEGER" size ="255" default ="" notnull ="false" description="Regelstudienzeit"/> <column name="rsz" type ="INTEGER" size ="255" default ="" notnull ="false" description="Regelstudienzeit"/>
</columns> </columns>
@ -559,6 +559,11 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<sourcefield table="costage_st_adressen" name="st_land_nr" sourcesystem="co" /> <sourcefield table="costage_st_adressen" name="st_land_nr" sourcesystem="co" />
<comment>Lookup via: st_studstamm_nr - costage_st_adressen.st_studstamm_nr -costage_st_adressen.st_adresse_typ='H' </comment> <comment>Lookup via: st_studstamm_nr - costage_st_adressen.st_studstamm_nr -costage_st_adressen.st_adresse_typ='H' </comment>
</column> </column>
<column name="po_stp_stp_version_kb" type ="CHAR" size ="10" default ="" notnull ="false" description="SPO-Version" >
<sourcefield table="costage_st_studien_spoversionen" name="po_stp_stp_version_kb" sourcesystem="co" />
<comment>Lookup via: st_studium_nr - costage_st_adressen.st_studium_nr, hierbei die jeweils letzte (max(gueltig_ab) </comment>
</column>
<column name="summe" type ="INTEGER" size ="2" default ="" notnull ="false" description="Summe" /> <column name="summe" type ="INTEGER" size ="2" default ="" notnull ="false" description="Summe" />
</columns> </columns>

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

@ -6,6 +6,8 @@ drop table if exists tmp_studien2;
SELECT SELECT
SM.semester_tid as semester, SM.semester_tid as semester,
SM.semester_anfang,
SM.semester_ende,
SG.st_absz_nr, SG.st_absz_nr,
SG.st_skz_nr, SG.st_skz_nr,
SG.studiengangs_identifikator, SG.studiengangs_identifikator,
@ -218,6 +220,8 @@ M.st_studiengang_nr_msg,
T.st_studiengang_nr as st_studiengang_nr_tsg, T.st_studiengang_nr as st_studiengang_nr_tsg,
M.st_studstamm_nr, M.st_studstamm_nr,
E.semester_tid as semester, E.semester_tid as semester,
E.semester_anfang,
E.semester_ende,
E.st_sem_nr, E.st_sem_nr,
M.startsemester, M.startsemester,
M.endsemester M.endsemester
@ -245,6 +249,8 @@ where T2.st_studstamm_nr is null
--fehlende Semester nachtragen: --fehlende Semester nachtragen:
insert into tmp_studien2(semester, insert into tmp_studien2(semester,
semester_anfang,
semester_ende,
st_absz_nr, st_absz_nr,
st_skz_nr, st_skz_nr,
studiengangs_identifikator, studiengangs_identifikator,
@ -275,6 +281,8 @@ hzb_art,
fachsemester) fachsemester)
select M.semester, select M.semester,
M.semester_anfang,
M.semester_ende,
st_absz_nr, st_absz_nr,
S.st_skz_nr, S.st_skz_nr,
S.studiengangs_identifikator, S.studiengangs_identifikator,
@ -313,7 +321,7 @@ and M.semester != S.semester
--and S.st_studiengang_nr_msg=34454 --and S.st_studiengang_nr_msg=34454
--and S.studiengangs_bezeichnung='Bildungswissenschaften' --and S.studiengangs_bezeichnung='Bildungswissenschaften'
--and M.semester=20211 --and M.semester=20211
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,23,24 --, 25,26,27,28 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,23,24,25,26
; ;
--statustyp und hrst nachladen: --statustyp und hrst nachladen:
@ -411,11 +419,30 @@ and T.st_studiengang_nr_msg=tmp_studien2.st_studiengang_nr_msg
) )
; ;
--SPO-Version (letzte im jew. Semester) ermitteln:
select T.*,null::char(10) as po_stp_stp_version_kb,
max(SPO.gueltig_ab) as spo_max_gueltig_ab
into temp tmp_studien3
from tmp_studien2 T left outer join costage_st_studien_spoversionen SPO
on (SPO.st_studium_nr=T.st_studium_nr
and SPO.gueltig_ab < T.semester_ende)
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,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41
;
update tmp_studien3 set po_stp_stp_version_kb= SPO.po_stp_stp_version_kb
from costage_st_studien_spoversionen SPO
where SPO.st_studium_nr=tmp_studien3.st_studium_nr
and tmp_studien3.spo_max_gueltig_ab =SPO.gueltig_ab;
drop table tmp_studien2;
delete from costage_st_studien_aggr delete from costage_st_studien_aggr
--provisorisch in Testphase: --provisorisch in Testphase:
where ${COSTAGE_STUDENT_FILTER}; where ${COSTAGE_STUDENT_FILTER};
create index ix_tmp_studien2 on tmp_studien2(kz_rueck_beur_ein) create index ix_tmp_studien2 on tmp_studien3(kz_rueck_beur_ein)
; ;
insert into costage_st_studien_aggr( insert into costage_st_studien_aggr(
st_studium_nr, st_studium_nr,
@ -441,6 +468,7 @@ st_studium_nr,
stufrm, stufrm,
kz_rueck_beur_ein, kz_rueck_beur_ein,
hzb_art, hzb_art,
po_stp_stp_version_kb,
summe summe
) )
@ -479,8 +507,9 @@ select st_studium_nr,
studienform_statistik_code as stufrm, studienform_statistik_code as stufrm,
kz_rueck_beur_ein, kz_rueck_beur_ein,
hzb_art, hzb_art,
po_stp_stp_version_kb,
1 as summe 1 as summe
from tmp_studien2 from tmp_studien3
where kz_rueck_beur_ein is not null where kz_rueck_beur_ein is not null
; ;
@ -510,6 +539,7 @@ st_studium_nr,
stufrm, stufrm,
kz_rueck_beur_ein, kz_rueck_beur_ein,
hzb_art, hzb_art,
po_stp_stp_version_kb,
summe summe
) )
@ -549,8 +579,9 @@ cast (NULL as int) as studiengang_nr2,
studienform_statistik_code as stufrm, studienform_statistik_code as stufrm,
kz_rueck_beur_ein, kz_rueck_beur_ein,
hzb_art, hzb_art,
po_stp_stp_version_kb,
1 as summe 1 as summe
from tmp_studien2 from tmp_studien3
--where semester = 20202 --where semester = 20202
-- and matrikelnummer = '5847370' -- and matrikelnummer = '5847370'
where kz_rueck_beur_ein is null where kz_rueck_beur_ein is null
@ -622,7 +653,7 @@ where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A.st_adresse_typ='H' and A.st_adresse_typ='H'
; ;
drop table tmp_studien2; drop table tmp_studien3;
drop table tmp_primaer_msg; drop table tmp_primaer_msg;

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

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

@ -8,7 +8,9 @@ alter table costage_st_studierendenstammdaten_neu alter column aufnahmedatum typ
--alter table costage_st_studierendenstammdaten alter column geschlecht type integer using val(geschlecht); --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 type float;
alter table costage_bw_bewerb_hzb alter column hzb_punkte_max 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;
</#if> </#if>

Loading…
Cancel
Save