diff --git a/src-modules/module/costage/conf/costage.xml b/src-modules/module/costage/conf/costage.xml index 10bdf1c..74d40d6 100644 --- a/src-modules/module/costage/conf/costage.xml +++ b/src-modules/module/costage/conf/costage.xml @@ -1,5 +1,5 @@ - @@ -290,6 +290,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> + + diff --git a/src-modules/module/costage/masken/43040_felderinfo.unl b/src-modules/module/costage/masken/43040_felderinfo.unl index f77626d..0c765d1 100644 --- a/src-modules/module/costage/masken/43040_felderinfo.unl +++ b/src-modules/module/costage/masken/43040_felderinfo.unl @@ -52,8 +52,22 @@ order by 2\ 43054^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^1^1^<> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^^<> select 1,'Ja' from xdummy^ 43055^tablestylesheet^121^0^0^100^200^1^char^200^1^1^<> 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^^<> 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^<> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^^<> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML'^ -43059^Hochschule^5^350^-1^140^80^1^char^255^0^1^<>select distinct K.unikey,K.unikey\ +43059^Hochschule / Standort^5^350^-1^140^80^1^char^255^0^1^<> --freemarker template \ +<#if COSTAGE_STORT?exists && COSTAGE_STORT !="">\ +<#assign inlineTemplate=COSTAGE_STORT?interpret />\ +<@inlineTemplate/>\ +\ +<#if stort?exists>\ +<#foreach st in stort>\ +select '${st.nr}','${st.name}' from xdummy\ +<#if st?has_next>\ +union\ +\ +\ +<#else>\ +select distinct K.unikey,K.unikey\ from costage_st_studienkennzahlen K\ +\ order by 2;^ ^<> select distinct K.unikey,K.unikey\ from costage_st_studienkennzahlen K, hochschulinfo H\ where K.unikey=H.hs_nr::char(10)^ diff --git a/src-modules/module/costage/masken/43040_maskeninfo.unl b/src-modules/module/costage/masken/43040_maskeninfo.unl index 9eb8d24..0423496 100644 --- a/src-modules/module/costage/masken/43040_maskeninfo.unl +++ b/src-modules/module/costage/masken/43040_maskeninfo.unl @@ -75,7 +75,7 @@ SELECT name,\ /* and 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 (<>) ) */\ /* and costage_st_studien_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <> ) */\ -/* and costage_st_studien_aggr.unikey=<> */\ +/* and costage_st_studien_aggr.unikey=<> */\ " />\ \ \ diff --git a/src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml b/src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml index a0ae8b1..b37fc35 100644 --- a/src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml +++ b/src-modules/module/costage/rohdaten_sos/sos_costage_unload.xml @@ -196,7 +196,7 @@ F.hssem, '' ,--stuart, '' ,--stutyp, G.stufrm, -'' ,--stort, +G.stort_nr ,--stort, F.ruebeudat, null::char(1) ,--semgewicht, null::char(1) ,--stggewicht, @@ -224,6 +224,7 @@ and F.kz_rueck_beur_ein is not null AND F.semester >= $start_stud_sem and ($EXTERNAL_SUBJECTS ='true' or F.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) ) ; @@ -478,7 +479,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, --uniquename ' ', ' ', --sprache null::date as gueltig_von, @@ -493,6 +494,7 @@ null as sortorder on ( F.st_stdfach_nr=K.st_stdfach_nr) where ($EXTERNAL_SUBJECTS ='true' or 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) ) union @@ -795,7 +797,28 @@ null as lid, null as parent_lid, null as sortorder FROM xdummy - +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, +' ', +' ', +null::date as gueltig_von, +null::date as gueltig_bis, +'5', --sourcesystem_id +' ' , --hiskey_id +' ' , --struktur_c +null as lid, +null as parent_lid, +null as sortorder + FROM costage_st_studiengaenge ; ]]> @@ -865,7 +888,7 @@ SELECT substring(G.studiengangs_identifikator from 1 for 10) ,--abstgv, string_not_null(G.fachkennzeichen) as kzfa, null::integer,--immsemkz, null::integer,--kzfaarray, - null::integer,--stort, + G.stort_nr,--stort, '', -- lehreinh, null::integer,--stkkurs1, null::integer,--stkkurs2, diff --git a/src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml b/src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml index b860fae..5ea616f 100644 --- a/src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml +++ b/src-modules/module/costage/rohdaten_zul/zul_costage_unload.xml @@ -186,7 +186,7 @@ A.fachsemester as stgsem, null,--stgspz, null,--dowunsch1, null,--dowunsch2, - null, --antr_stort, + G.stort_nr, --antr_stort, null,--haerteantr, null,--haerte, null,--haertegrd, @@ -279,6 +279,7 @@ 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) ) ; @@ -549,7 +550,29 @@ 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 +; ]]> diff --git a/src-modules/module/costage/schluesseltabellen/sx_repository.unl b/src-modules/module/costage/schluesseltabellen/sx_repository.unl index b3f6de5..78888bc 100644 --- a/src-modules/module/costage/schluesseltabellen/sx_repository.unl +++ b/src-modules/module/costage/schluesseltabellen/sx_repository.unl @@ -1 +1,2 @@ 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^ diff --git a/src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql b/src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql index a3db151..71ccd16 100644 --- a/src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql +++ b/src-modules/module/costage/schluesseltabellen/trans_costage_st_studiengaenge.sql @@ -1,3 +1,10 @@ +--freemarker template +<#if COSTAGE_STORT?exists && COSTAGE_STORT !=""> +<#assign inlineTemplate=COSTAGE_STORT?interpret /> +<@inlineTemplate/> + + + delete from costage_st_studiengaenge; @@ -33,6 +40,9 @@ 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 + from costage_st_studienkennzahlen SKZ where SKZ.st_skz_nr=costage_st_studiengaenge.st_skz_nr; --Abschluss: @@ -48,3 +58,12 @@ where S.st_studium_nr = P.st_studium_nr and S.st_studiengang_nr=costage_st_studiengaenge.st_studiengang_nr and 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}'; + + + diff --git a/src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql b/src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql index d305918..22bcf29 100644 --- a/src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql +++ b/src-modules/module/costage/schluesseltabellen/trans_costage_st_studienkennzahlen.sql @@ -1,3 +1,8 @@ +--freemarker template +<#if COSTAGE_STORT?exists && COSTAGE_STORT !=""> +<#assign inlineTemplate=COSTAGE_STORT?interpret /> +<@inlineTemplate/> + delete from costage_st_studienkennzahlen; @@ -20,7 +25,16 @@ 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}' + + ; + +<#if stort?exists == false> + --wg. Eindeutigkeit kombinierter Schlüssel SKZ+UNIKEY: insert into costage_st_studienkennzahlen( st_skz_nr, @@ -42,5 +56,5 @@ S.gesetzliche_grundlage_kb FROM costage_st_studienkennzahlen_neu S, hochschulinfo H where H.hs_nr::char(10)!=S.unikey ; - + --TODO: Duplikatssuche bei Fächern ("skz_key").