From 1e0abb3aec47b24036bbb2da69c2ed8c538ea00a Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Thu, 15 Sep 2022 16:16:46 +0200 Subject: [PATCH] =?UTF-8?q?Abschlusspr=C3=BCfungen=20Konnektor=20und=20Dat?= =?UTF-8?q?enblatt=20#7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-modules/module/costage/conf/costage.xml | 78 +++++++++- .../costage_st_pruef_aggr_fuellen.sql | 129 +++++++++++++++++ .../costage/hilfstabellen/vacuum_pg.sql | 1 + .../costage/masken/43080_felderinfo.unl | 67 +++++++++ .../costage/masken/43080_maske_system_bez.unl | 1 + .../masken/43080_masken_felder_bez.unl | 20 +++ .../costage/masken/43080_maskeninfo.unl | 133 ++++++++++++++++++ .../masken/43080_sachgeb_maske_bez.unl | 1 + .../costage/rohdaten/sos_costage_unload.xml | 99 ++++++++----- .../sx_stylesheets_einfuegen.sql | 3 +- 10 files changed, 491 insertions(+), 41 deletions(-) create mode 100644 src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql create mode 100644 src-modules/module/costage/masken/43080_felderinfo.unl create mode 100644 src-modules/module/costage/masken/43080_maske_system_bez.unl create mode 100644 src-modules/module/costage/masken/43080_masken_felder_bez.unl create mode 100644 src-modules/module/costage/masken/43080_maskeninfo.unl create mode 100644 src-modules/module/costage/masken/43080_sachgeb_maske_bez.unl diff --git a/src-modules/module/costage/conf/costage.xml b/src-modules/module/costage/conf/costage.xml index c22ad2e..b118315 100644 --- a/src-modules/module/costage/conf/costage.xml +++ b/src-modules/module/costage/conf/costage.xml @@ -491,13 +491,54 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" /> - + + + + + + + + + + + + + + + + +Hauptprüfung/TSAB +Prüfungsordnung Nr. + + + +J/N +gültig/In Bearbeitung + + + + + + + + + + + + + + + + + +
+ @@ -1032,7 +1073,8 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
- + + @@ -1102,7 +1144,12 @@ parent="CO Basisdaten">Abfragen zu Prüfungen und Leistungen $COSTAGE_PFAD/masken - + + Absolv. Zeitreihe + + $COSTAGE_PFAD/masken + + @@ -1222,6 +1269,30 @@ parent="CO Basisdaten">Abfragen zu Prüfungen und Leistungen displayType="select" visibleFields="name" format="%s"> + + + + + + + + + + + + + + + + + + + @@ -1299,6 +1370,7 @@ parent="CO Basisdaten">Abfragen zu Prüfungen und Leistungen + diff --git a/src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql b/src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql new file mode 100644 index 0000000..65667b5 --- /dev/null +++ b/src-modules/module/costage/hilfstabellen/costage_st_pruef_aggr_fuellen.sql @@ -0,0 +1,129 @@ + +SELECT +S.st_studium_nr, +S.st_studstamm_nr, +S.matrikelnummer, +S.st_studiengang_nr, +S.st_studienstatus_nr, +S.semester, +S.fachsemester, +S.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 +into temp tmp_pruef +FROM costage_st_studien_aggr S, costage_leistungen L, costage_st_semester E, costage_leistungen_typen T +where L.st_studium_nr=S.st_studium_nr +and L.matrikelnummer=S.matrikelnummer::varchar(255) +and E.semester_id=L.veranstaltung_semester +and E.semester_tid=S.semester +and T.leistungstyp_nr=L.leistungstyp_nr +-- TSAB/AB: +and T.kurzbezeichnung='AP' --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^ + ; +--TSAB: +update tmp_pruef set pnr=9068 +where leistungsdetailtyp_kb in ('TSAB'); + +--Abschluss Bachelorstudium: +update tmp_pruef set pnr=9024 +where leistungsdetailtyp_kb in ('BAKN') +; +--Abschluss Masterstudium +update tmp_pruef set pnr=9025 +where leistungsdetailtyp_kb in ('BAKN'); + +--Staatsexamen +update tmp_pruef set pnr=9054 +where leistungsdetailtyp_kb in ('STEX'); + +--Abschluss eines Ergänzungsstudiums +update tmp_pruef set pnr=9060 +where leistungsdetailtyp_kb in ('ERGAB'); + + + +truncate table costage_st_pruef_aggr; +insert into costage_st_pruef_aggr(st_studium_nr, + st_studstamm_nr, + matrikelnummer, + semester, + st_studiengang_nr, + unikey, + studienidentifikator, + fachsemester, + leistung_nr, + leistungstyp_nr, + leistungsdetailtyp_kb, + pnr, + abschnitt, + stp_sp_nr, + note, + credits, + leistungsdatum, + anerkannt_flag, + leistungsstatus_map_kb, + summe) +select + st_studium_nr, + st_studstamm_nr, + matrikelnummer, + semester, + st_studiengang_nr, + unikey, + substring(studienidentifikator from 1 for 255), + fachsemester, + leistung_nr, + leistungstyp_nr, + leistungsdetailtyp_kb, + pnr, + abschnitt, + stp_sp_nr, + 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_map_kb, + 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; + +drop table tmp_pruef; + diff --git a/src-modules/module/costage/hilfstabellen/vacuum_pg.sql b/src-modules/module/costage/hilfstabellen/vacuum_pg.sql index abea9cf..262255b 100644 --- a/src-modules/module/costage/hilfstabellen/vacuum_pg.sql +++ b/src-modules/module/costage/hilfstabellen/vacuum_pg.sql @@ -6,3 +6,4 @@ vacuum costage_st_semester; vacuum costage_st_studierendenstammdaten; vacuum costage_st_studiengaenge; vacuum costage_st_studien_aggr; +vacuum costage_st_pruef_aggr; diff --git a/src-modules/module/costage/masken/43080_felderinfo.unl b/src-modules/module/costage/masken/43080_felderinfo.unl new file mode 100644 index 0000000..96679d2 --- /dev/null +++ b/src-modules/module/costage/masken/43080_felderinfo.unl @@ -0,0 +1,67 @@ +43080^Studiengang-Nr.^110^0^0^140^150^1^integer^70^0^13^<> --Freemarker template\ +<#list 1..6 as i>\ + select ${i},'${i}. Studiengang' from xdummy\ + <#if i_has_next> union \ +\ +order by 1^ ^^ +43081^Seit Semester^3^0^0^140^80^1^integer^30^0^1^<> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<> select semester_tid, semester_bezeichnung from costage_st_semester where today()-365 between date(semester_anfang) and date(semester_ende);^ +43083^Staatsangehörigkeit^36^0^0^130^150^10^sql^30^0^1^<> 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^<> select apnr,druck from cifx where key=622 order by 2^^ ^ +43085^Studienabschnitt^10^330^-1^130^150^1^integer^4^0^13^<> select tid, eintrag from studienabschnitt where tid <= 2;^^<> select tid, eintrag from studienabschnitt where tid = 2;^ +43086^Weitere Tabellen^123^0^0^140^140^10^char^30^0^1^<> \ +--freemarker template\ +select name,string_not_null(caption) || ' - ' || name from sx_tables where name in ('costage_st_studierendenstammdaten','costage_st_studiengaenge')\ +<#if <>!='tabelle_html_datenblatt.xsl'>\ + and name in (select distinct tablename from stylesheet_field where stylesheet_id in (select tid from sx_stylesheets where filename=<>)) \ +\ +order by 2^^^ +43087^Leistungsdetailtyp^35^350^-1^140^100^10^integer^30^0^1^<> 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^<> select semester_tid, semester_bezeichnung from costage_st_semester order by 1 DESC;^ ^<> 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^<> --Freemarker template\ +<#list 1..10 as i>\ + select ${i},'${i}. Fach' from xdummy\ + <#if i_has_next> union \ +\ +order by 1^ ^^ +43091^Geschlecht^37^0^0^140^80^1^integer^30^0^1^<> SELECT apnr,druck FROM cif WHERE cif.key = 9003 order by 2;^^^ +43092^Felder^125^0^0^150^190^10^char^30^0^1^<>\ +--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 <>='tabelle_html_datenblatt.xsl'>\ + and (F.table_name ='costage_st_studien_aggr'\ + /* or F.table_name in (<>) */) \ +<#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=<>))\ +\ + order by 2;^^^ +43093^Fach^6^0^0^140^150^50^char^30^0^1^<>\ +SELECT \ + skz_key,\ + skz_name\ +FROM costage_st_studienkennzahlen\ +/* where unikey=<> */\ +order by 2\ +;^^^ +43094^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^ +43095^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=43080 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=43080 and S.ord=1^ +43096^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'^ +43099^Hochschule^5^350^-1^140^80^1^char^255^0^1^<>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)^ +43100^##line##^10^0^0^100^100^1^char^5000^0^8^^^1^ +43101^Abschluss^7^0^0^140^170^5^char^30^0^1^<> SELECT \ + code,\ + name\ +FROM costage_st_abschlussziele_lokal\ +order by 2;^^^ +43102^Matrikel-Nr.^20^350^-1^150^180^1^char^200^0^0^^^^ +43103^##line##^40^0^0^100^100^1^char^5000^0^8^^^1^ diff --git a/src-modules/module/costage/masken/43080_maske_system_bez.unl b/src-modules/module/costage/masken/43080_maske_system_bez.unl new file mode 100644 index 0000000..18b40af --- /dev/null +++ b/src-modules/module/costage/masken/43080_maske_system_bez.unl @@ -0,0 +1 @@ +43080^310^ diff --git a/src-modules/module/costage/masken/43080_masken_felder_bez.unl b/src-modules/module/costage/masken/43080_masken_felder_bez.unl new file mode 100644 index 0000000..d047bda --- /dev/null +++ b/src-modules/module/costage/masken/43080_masken_felder_bez.unl @@ -0,0 +1,20 @@ +43080^43080^ +43080^43081^ +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^ diff --git a/src-modules/module/costage/masken/43080_maskeninfo.unl b/src-modules/module/costage/masken/43080_maskeninfo.unl new file mode 100644 index 0000000..127dffd --- /dev/null +++ b/src-modules/module/costage/masken/43080_maskeninfo.unl @@ -0,0 +1,133 @@ +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"/>\ +\ +\ +>,"<>",.vars["Weitere TabellenObject"].allKeys)}\ + \ + )\ + order by 2;]]>\ +\ +>,"<>",.vars["Weitere TabellenObject"].allKeys)} )\ +and foreignkey_tab in ('costage_st_pruef_aggr'\ + ${DatenblattTables(<>,"<>",.vars["Weitere TabellenObject"].allKeys)})\ +;]]>\ +\ +>,"<>",.vars["Weitere TabellenObject"].allKeys)}\ + )\ + and currentlyused=1\ + ${DatenblattFields(<>,"<>",FelderObject.allKeys)}\ + order by 2,3;]]>\ +\ +>,"<>",.vars["Weitere TabellenObject"].allKeys)}\ + )\ + and currentlyused=1\ + ${DatenblattFields(<>,"<>",FelderObject.allKeys)}\ + order by 2,3;]]>\ +\ +\ +\ +<@generate_multitable_list />\ +<@generate_field_list_multitable aggregationsfeld="summe" aggregatfunktion="sum(" />\ +<@generate_foreign_fields_multitable />\ +\ +\ +<#assign filter="\ +/* and hrst in (<>) */\ +/* and semester >= <> */\ +/* and semester <= <> */\ +/* AND leistungsdetailtyp_kb in (<>) */\ +/* and leistungsstatus_map_kb in(<>) */\ +/* and costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.abschluss in (<>)) */\ +/* and costage_st_pruef_aggr.st_studiengang_nr in (select G.st_studiengang_nr from costage_st_studiengaenge G where G.stg in (<>)) */\ +/* and studiengang_nr =<> */\ +/* and 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 (<>) ) */\ +/* and costage_st_pruef_aggr.st_studstamm_nr in (select S2.st_studstamm_nr from costage_st_studierendenstammdaten S2 where S2.geschlecht = <> ) */\ +" />\ +\ +\ +<#if "<>"!="">\ +<#assign filter=filter+" and costage_st_pruef_aggr.matrikelnummer in (<>)"?replace("'","")/>\ +\ +\ +\ + \ + <@generate_resultset_multitable tabellen=table_list\ +p_show_keys=<>\ +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 \ +\ +select 'costage_st_pruef_aggr' from xdummy\ +>,"<>",.vars["Weitere TabellenObject"].allKeys)/>;\ +select '${restrict?replace("\\x0027","\\x0027\\x0027")}' from xdummy;]]>\ +\ +>,"<>",FelderObject.allKeys)}\ +order by 1;]]>\ +\ +\ +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 != '' && <>==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\ + \ +\ +\ +@@@^Altersgruppe^Anzahl^Flexible Ausgabe der Studierendenstatistik, Studiengänge und Lehreinheiten^drop table tmp_tabelle;^ ^2^700^360^0^1^ ^ diff --git a/src-modules/module/costage/masken/43080_sachgeb_maske_bez.unl b/src-modules/module/costage/masken/43080_sachgeb_maske_bez.unl new file mode 100644 index 0000000..ea95b20 --- /dev/null +++ b/src-modules/module/costage/masken/43080_sachgeb_maske_bez.unl @@ -0,0 +1 @@ +310^43080^ diff --git a/src-modules/module/costage/rohdaten/sos_costage_unload.xml b/src-modules/module/costage/rohdaten/sos_costage_unload.xml index 365c64f..9984641 100644 --- a/src-modules/module/costage/rohdaten/sos_costage_unload.xml +++ b/src-modules/module/costage/rohdaten/sos_costage_unload.xml @@ -2504,7 +2504,54 @@ on (C.id=L.course_of_study_id) = $start_pruef_sem +; + ]]> @@ -5358,50 +5405,28 @@ null as sortorder FROM costage_st_studiengaenge WHERE fachkennzeichen is not null and trim(fachkennzeichen)!='' --- union - -- SELECT - -- 622, - -- -1, - -- pstatus, - -- pstatus as ktxt, - -- dtxt, - -- ltxt, + union + SELECT distinct + 622, + -1, + leistungsstatus_map_kb as pstatus, + leistungsstatus_map_kb as ktxt, + leistungsstatus_map_kb as dtxt, + leistungsstatus_map_kb as ltxt, -- '', -- '', - -- pstatus , + leistungsstatus_map_kb , -- '', -- '', --- '', --gültig von --- '', --gültig bis --- pstatus , --sourcesystem_id --- '' , --hiskey_id --- '' , --struktur_c ---null as lid, ---null as parent_lid, ---null as sortorder - -- FROM k_pstatus - union - SELECT - 11, - -1, - ikfz, - ktxt, - dtxt, - ltxt, - astat, - '', - ikfz, - bland, - '' , -null as gueltig_von, -null as gueltig_bis, - ikfz , --sourcesystem_id + '', --gültig von + '', --gültig bis +leistungsstatus_map_kb , --sourcesystem_id '' , --hiskey_id - aikz , --struktur_c + '' , --struktur_c null as lid, null as parent_lid, null as sortorder - FROM k_ikfz + FROM costage_st_pruef_aggr union SELECT 12, diff --git a/src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql b/src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql index 6eb4328..6357090 100644 --- a/src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql +++ b/src-modules/module/costage/schluesseltabellen/sx_stylesheets_einfuegen.sql @@ -4,7 +4,8 @@ --Bitte nur Freemarker Variablen füllen <#assign masken = [ -{"mask":"43040", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"} +{"mask":"43040", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"}, +{"mask":"43080", "filename":"tabelle_html_datenblatt.xsl", "ord":"1"} ] /> <#assign stylesheet = [