Browse Source

Status TSG anpassen bei längerem MSG #16

basisressourcen
Daniel Quathamer 1 year ago
parent
commit
933b2e4d6f
  1. 40
      src-modules/module/costage/hilfstabellen/costage_st_studien_aggr_fuellen.sql
  2. 1
      src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml

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

@ -384,8 +384,20 @@ and tmp_studien2.st_studstamm_nr=S.st_studstamm_nr
and S.studiengangs_typ_kb ='MSG' and S.studiengangs_typ_kb ='MSG'
and tmp_studien2.tsg_generated=1 and tmp_studien2.tsg_generated=1
and tmp_studien2.st_sem_nr=S.st_sem_nr and tmp_studien2.st_sem_nr=S.st_sem_nr
and S.status_historie=1 --Defaultmäßig den letzten Status im Semester nehmen (status_historie=1)
--Ausnahme: wenn der MSG bis zum Semesterende läuft und Status X hat,
--wird er auf den vorherigen Status gesetzt, weil der Studi
--bis Semesterende studiert hat
and (
(S.status_historie=1 and
(
S.gueltig_ab < S.semester_ende or (S.gueltig_ab >= S.semester_ende and S.studienstatustyp !='X')
)
)
or
(S.status_historie=2 and S.gueltig_ab < S.semester_ende)
)
; ;
--statustyp_tsg nachladen: --statustyp_tsg nachladen:
@ -491,6 +503,8 @@ from cifx where key=400
and apnr=tmp_studien3.statustyp_tsg and apnr=tmp_studien3.statustyp_tsg
); );
drop table tmp_studien2; drop table tmp_studien2;
@ -667,6 +681,28 @@ cast (NULL as int) as studiengang_nr2,
-- and matrikelnummer = '5847370' -- and matrikelnummer = '5847370'
where kz_rueck_beur_ein is null where kz_rueck_beur_ein is null
; ;
--Wenn pro Semester und Matrikelnr. keine studiengang_nr=1 existiert, werden diese um 1 reduziert:
select st_studstamm_nr,semester,min(studiengang_nr) as studiengang_nr_min
into temp tmp_studien_ohne_studiengangnr_1
from costage_st_studien_aggr
where kz_rueck_beur_ein is not null
group by 1,2
;
update costage_st_studien_aggr set studiengang_nr=studiengang_nr -1
where studiengang_nr > 1
and tsg_generated=1
and not exists (select S.st_studstamm_nr from tmp_studien_ohne_studiengangnr_1 S
where S.st_studstamm_nr=costage_st_studien_aggr.st_studstamm_nr
and S.semester=costage_st_studien_aggr.semester
and S.studiengang_nr_min=1
)
;
drop table tmp_studien_ohne_studiengangnr_1;
--HZB Data: --HZB Data:

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

@ -231,6 +231,7 @@ primaerflag as primaerfach,
unikey , unikey ,
null::numeric(9,6) ,-- individual_number_of_semesters null::numeric(9,6) ,-- individual_number_of_semesters
F.st_studium_nr as degree_program_id , F.st_studium_nr as degree_program_id ,
null::char(10) as hssem_valid,
F.kz_rueck_beur_ein_tsg F.kz_rueck_beur_ein_tsg
FROM costage_st_studiengaenge G, costage_st_studien_aggr F FROM costage_st_studiengaenge G, costage_st_studien_aggr F
WHERE G.st_studiengang_nr=F.st_studiengang_nr WHERE G.st_studiengang_nr=F.st_studiengang_nr

Loading…
Cancel
Save