Browse Source

Inkrementelles Laden erlauben, Bugfix TSG Status bei Generierung #1

basisressourcen
Daniel Quathamer 1 year ago
parent
commit
1a32527998
  1. 12
      src-modules/module/costage/conf/costage.xml
  2. 10
      src-modules/module/costage/hilfstabellen/costage_bw_antr_aggr_fuellen.sql
  3. 13
      src-modules/module/costage/hilfstabellen/costage_st_lv_aggr_fuellen.sql
  4. 14
      src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql
  5. 22
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  6. 2
      src-modules/module/costage/rohdaten/costage_unload.xml
  7. 25
      src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module name="costage" version="0.3" sachgebiet_id="310"
<module name="costage" version="0.4b" sachgebiet_id="310"
sachgebiet="CO Basisdaten" systeminfo_id="310"
system="CO Basisdaten" thema="CO Basisdaten" thema_parent="Studierende, Prüfungen">
<database name="superx" system="superx">
@ -692,17 +692,17 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> @@ -692,17 +692,17 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
<column name="matrikelnummer" type ="INTEGER" size ="8" default ="" notnull ="false" description="Matrikelnummer" />
<column name="semester" type ="INTEGER" size ="8" default ="" notnull ="false" description="Semester" ><comment></comment></column>
<column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (ID)" />
<column name="st_studiengang_nr_msg" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (ID) des MSG" ><comment>nur bei TSG</comment></column>
<column name="st_studiengang_nr_msg" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (ID) des MSG" currentlyUsed="false"><comment>nur bei TSG</comment></column>
<column name="unikey" type ="CHAR" size ="10" default ="" notnull ="false" description="Hochschulnummer" />
<!--<column name="studienidentifikator" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Studienidentifikator"/>-->
<column name="studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Studiengang (Nr.)" currentlyUsed="false" />
<column name="fach_nr" type ="INTEGER" size ="8" default ="" notnull ="false" description="Fach (Nr.)" />
<column name="fachsemester" type ="INTEGER" size ="4" default ="" notnull ="false" description="Fachsemester" />
<column name="stufrm" type ="CHAR" size ="10" default ="" notnull ="false" description="Studienform"/>
<column name="bw_bewerbng_nr_msg" type ="INTEGER" size ="8" default ="" notnull ="false" description="Bewerbung MSG" />
<column name="bw_sb_svor_nr" type ="INTEGER" size ="4" default ="" notnull ="true" />
<column name="bw_zul_art_nr" type ="INTEGER" size ="4" default ="" notnull ="false" />
<column name="bw_typ_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="bw_bewerbng_nr_msg" type ="INTEGER" size ="8" default ="" notnull ="false" description="Bewerbung MSG" currentlyUsed="false"/>
<column name="bw_sb_svor_nr" type ="INTEGER" size ="4" default ="" notnull ="true" description="Status-Zuordnung"/>
<column name="bw_zul_art_nr" type ="INTEGER" size ="4" default ="" notnull ="false" description="Zulassungsart"/>
<column name="bw_typ_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" description="Bewerbungstyp"/>
<column name="status_vss" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Status formale Zulassungsvoraussetzungen" />
<column name="status_dok" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Status Bewerbungsunterlagen" />
<column name="status_zul" type ="VARCHAR" size ="10" default ="" notnull ="false" description="Status Zulassung" />

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

@ -8,6 +8,11 @@ SELECT nr, @@ -8,6 +8,11 @@ SELECT nr,
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>
@ -68,6 +73,7 @@ on (B.st_studstamm_nr=S.st_studstamm_nr) @@ -68,6 +73,7 @@ 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
@ -173,7 +179,9 @@ from costage_st_laender L @@ -173,7 +179,9 @@ from costage_st_laender L
where L.st_land_nr=tmp_bew.hzb_st_land_nr
;
truncate table costage_bw_antr_aggr;
delete from costage_bw_antr_aggr
where semester >= ${beginn_semester}
;
insert into costage_bw_antr_aggr( nr,
st_studstamm_nr,
matrikelnummer,

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

@ -1,3 +1,11 @@ @@ -1,3 +1,11 @@
--freemarker template
<sqlvars>
<sqlvar name="beginn_semester"><![CDATA[
select param_val from unload_params
where param_id='COSTAGE_start_lv_sem';
]]>
</sqlvar>
</sqlvars>
@ -27,13 +35,16 @@ costage_lv_teilnehmende T, costage_st_studien U @@ -27,13 +35,16 @@ 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
;
truncate table costage_st_lv_aggr;
delete from costage_st_lv_aggr
where semester >= ${beginn_semester};
insert into costage_st_lv_aggr(st_studium_nr,
st_studstamm_nr,
matrikelnummer,

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

@ -1,3 +1,11 @@ @@ -1,3 +1,11 @@
--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:
@ -64,6 +72,7 @@ and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung @@ -64,6 +72,7 @@ and L.leistungsstatus_nr in (4,2) --Letztgültig/Final/gültige Leistung
--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:
@ -125,6 +134,7 @@ and S.matrikelnummer::varchar(255)=L.matrikelnummer @@ -125,6 +134,7 @@ and S.matrikelnummer::varchar(255)=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
@ -212,7 +222,9 @@ and K.st_skz_nr=G.st_skz_nr @@ -212,7 +222,9 @@ and K.st_skz_nr=G.st_skz_nr
and tmp_pruef.unikey is null
;
truncate table costage_st_pruef_aggr;
delete from costage_st_pruef_aggr
where semester >= ${beginn_semester};
insert into costage_st_pruef_aggr(st_studium_nr,
st_studstamm_nr,
matrikelnummer,

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

@ -1,5 +1,11 @@ @@ -1,5 +1,11 @@
--freemarker template
<sqlvars>
<sqlvar name="beginn_semester"><![CDATA[
select param_val from unload_params
where param_id='COSTAGE_start_st_sem';
]]>
</sqlvar>
</sqlvars>
drop table if exists tmp_studien;
drop table if exists tmp_studien2;
@ -67,6 +73,7 @@ and SA.gueltig_ab <=SM.semester_ende --nur letzter Status im jew. Semester inter @@ -67,6 +73,7 @@ and SA.gueltig_ab <=SM.semester_ende --nur letzter Status im jew. Semester inter
and (SA.studienstatustyp not in ('Z','X') or (SA.studienstatustyp in ('Z','X') and SA.gueltig_ab <= today())) --Studis außer erst/neueinschr/rückmeld/beurlaubt werden in der Semestermitte exmatr. zum Endedatum Semesterende, wenn dieses Datum in der Zukunft liegt soll der Studi mit dem vorherigen Status erscheinen
--and SA.studienstatustyp not in ('a','o')
and ${COSTAGE_STUDENT_FILTER}
and SM.semester_tid >= ${beginn_semester}
--group by 1,2,3,4,5,6,7,8,9,10,11,12,13
;
@ -345,7 +352,7 @@ and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr @@ -345,7 +352,7 @@ and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr
and S.studiengangs_typ_kb ='TSG'
and tmp_studien2.tsg_generated=1
and tmp_studien2.fachsemester=S.fachsemester
and S.status_historie=1
;
drop table tmp_studien_msg_tsg_fehlend;
@ -440,7 +447,8 @@ drop table tmp_studien2; @@ -440,7 +447,8 @@ drop table tmp_studien2;
delete from costage_st_studien_aggr
--provisorisch in Testphase:
where ${COSTAGE_STUDENT_FILTER};
where ${COSTAGE_STUDENT_FILTER}
and semester >= ${beginn_semester};
create index ix_tmp_studien2 on tmp_studien3(kz_rueck_beur_ein)
;
@ -596,6 +604,7 @@ hzb_staat=H.land_nr @@ -596,6 +604,7 @@ hzb_staat=H.land_nr
from costage_bw_bewerb_hzb H, costage_bw_bewerbungen BW
where BW.nr=H.bw_bewrbng_nr
and costage_st_studien_aggr.st_studstamm_nr=BW.st_studstamm_nr
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--Abmeldungsart:
@ -607,6 +616,7 @@ and S.semester_tid=costage_st_studien_aggr.semester @@ -607,6 +616,7 @@ and S.semester_tid=costage_st_studien_aggr.semester
and P.st_studium_nr=costage_st_studien_aggr.st_studium_nr
and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung
and A.bezug='P'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--dann studienbezogen:
update costage_st_studien_aggr set abm_art_s=P.st_abm_art_kurzbezeichnung
@ -616,6 +626,7 @@ and S.semester_tid=costage_st_studien_aggr.semester @@ -616,6 +626,7 @@ and S.semester_tid=costage_st_studien_aggr.semester
and P.st_studium_nr=costage_st_studien_aggr.st_studium_nr
and A.st_abm_art_kurzbezeichnung=P.st_abm_art_kurzbezeichnung
and A.bezug='S'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--Beurlaubungs-Art:
@ -625,6 +636,7 @@ from costage_st_urlaube U, costage_st_semester S @@ -625,6 +636,7 @@ from costage_st_urlaube U, costage_st_semester S
where S.st_sem_nr=U.st_sem_nr
and S.semester_tid=costage_st_studien_aggr.semester
and U.st_studium_nr=costage_st_studien_aggr.st_studium_nr
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--Wohnorte:
@ -633,24 +645,28 @@ update costage_st_studien_aggr set adresse_ort_s=A.land_kfz_kennzeichen_subregio @@ -633,24 +645,28 @@ update costage_st_studien_aggr set adresse_ort_s=A.land_kfz_kennzeichen_subregio
from costage_st_adressen A
where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A.st_adresse_typ='S'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--dann Semesterwohnsitz Staat:
update costage_st_studien_aggr set adresse_staat_s=A.st_land_nr
from costage_st_adressen A
where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A.st_adresse_typ='H'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--dann Heimatwohnsitz Ort:
update costage_st_studien_aggr set adresse_ort_h=A.land_kfz_kennzeichen_subregion
from costage_st_adressen A
where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A.st_adresse_typ='H'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
--dann Heimatwohnsitz Staat:
update costage_st_studien_aggr set adresse_staat_h=A.st_land_nr
from costage_st_adressen A
where A.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and A.st_adresse_typ='H'
and costage_st_studien_aggr.semester >= ${beginn_semester}
;
drop table tmp_studien3;

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

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<superx-unload version="4.0">
<module id="costage" version="0.3b" systeminfo_id="310">COSTAGE-Modul</module>
<module id="costage" version="0.4b" systeminfo_id="310">COSTAGE-Modul</module>
<parameters>
<param name="VERSION" defaultValue="2" description="Datenbank-Version"><comment>CO-Version, wird derzeit ignoriert</comment></param>

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

@ -474,7 +474,7 @@ K.skz_name as dtxt, @@ -474,7 +474,7 @@ K.skz_name as dtxt,
K.skz_name as ltxt ,
F.statistik_code::char(10) as astat,
null::char(10) as parent,
'', --sortc1
K.skz_key, --sortc1
' ',
' ', --sprache
null::date as gueltig_von,
@ -516,29 +516,6 @@ null as sortorder @@ -516,29 +516,6 @@ null as sortorder
on (F.st_absz_amtstat_nr=L.st_absz_amtstat_nr)
WHERE L.code is not null
union
SELECT
30,
-1,
apnr,
kurz,
druck,
lang_1,
astat,
null as parent,
apnr, --sortc1 wird später uniquename
null as bund_apnr,
null as sprache,
null::date gueltig_von,
null::date gueltig_bis,
apnr , --sourcesystem_id
' ', --hiskey_id
struktur_c as fb,
null as lid,
null as parent_lid,
null as sortorder
FROM cifx where key=30
union
SELECT distinct
612,

Loading…
Cancel
Save