Merge branch 'master' into feature-40128/Mehrere_Suchergebnisse_für_selbe_Person

This commit is contained in:
cgfhtw
2024-11-05 15:41:48 +01:00
55 changed files with 2688 additions and 270 deletions
+2 -1
View File
@@ -58,6 +58,7 @@ require_once('dbupdate_3.4/17513_Entwicklungsteam.php');
require_once('dbupdate_3.4/28575_softwarebereitstellung.php');
require_once('dbupdate_3.4/41150_oe-pfad_db_view.php');
require_once('dbupdate_3.4/44031_stv_favorites.php');
require_once('dbupdate_3.4/40896_kennzeichnung_unruly_person.php');
require_once('dbupdate_3.4/40128_search.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
@@ -302,7 +303,7 @@ $tabellen=array(
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre","standort","warn_semesterstunden_frei","warn_semesterstunden_fix","standort_id"),
"public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"),
"public.tbl_person" => array("person_id","staatsbuergerschaft","geburtsnation","sprache","anrede","titelpost","titelpre","nachname","vorname","vornamen","gebdatum","gebort","gebzeit","foto","anmerkung","homepage","svnr","ersatzkennzeichen","familienstand","geschlecht","anzahlkinder","aktiv","insertamum","insertvon","updateamum","updatevon","ext_id","bundesland_code","kompetenzen","kurzbeschreibung","zugangscode", "foto_sperre","matr_nr","zugangscode_timestamp","udf_values","bpk","matr_aktiv","wahlname"),
"public.tbl_person" => array("person_id","staatsbuergerschaft","geburtsnation","sprache","anrede","titelpost","titelpre","nachname","vorname","vornamen","gebdatum","gebort","gebzeit","foto","anmerkung","homepage","svnr","ersatzkennzeichen","familienstand","geschlecht","anzahlkinder","aktiv","insertamum","insertvon","updateamum","updatevon","ext_id","bundesland_code","kompetenzen","kurzbeschreibung","zugangscode", "foto_sperre","matr_nr","zugangscode_timestamp","udf_values","bpk","matr_aktiv","wahlname","unruly"),
"public.tbl_person_fotostatus" => array("person_fotostatus_id","person_id","fotostatus_kurzbz","datum","insertamum","insertvon","updateamum","updatevon"),
"public.tbl_personfunktionstandort" => array("personfunktionstandort_id","funktion_kurzbz","person_id","standort_id","position","anrede"),
"public.tbl_preincoming" => array("preincoming_id","person_id","mobilitaetsprogramm_code","zweck_code","firma_id","universitaet","aktiv","bachelorthesis","masterthesis","von","bis","uebernommen","insertamum","insertvon","updateamum","updatevon","anmerkung","zgv","zgv_ort","zgv_datum","zgv_name","zgvmaster","zgvmaster_datum","zgvmaster_ort","zgvmaster_name","program_name","bachelor","master","jahre","person_id_emergency","person_id_coordinator_dep","person_id_coordinator_int","code","deutschkurs1","deutschkurs2","research_area","deutschkurs3","ext_id"),
+36
View File
@@ -85,6 +85,8 @@ if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table
betrag bytea,
gehaltsbestandteil_id integer,
mitarbeiter_uid character varying(32),
gehaltsbestandteil_von date,
gehaltsbestandteil_bis date,
CONSTRAINT tbl_gehaltshistorie_pk PRIMARY KEY (gehaltshistorie_id)
);
@@ -570,3 +572,37 @@ if ($result = $db->db_query("SELECT * FROM hr.tbl_vertragsart WHERE vertragsart_
echo 'Vertragsart "Dienstverhältnis zu einer anderen Bildungseinrichtung oder einem anderen Träger" erstellt.<br />';
}
}
if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='gehaltsbestandteil_von' AND table_name='tbl_gehaltshistorie' AND table_schema='hr'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "
ALTER TABLE
hr.tbl_gehaltshistorie
ADD COLUMN
gehaltsbestandteil_von date
";
if (! $db->db_query($qry))
echo '<strong>Vertraege: ' . $db->db_last_error() . '</strong><br>';
else
echo 'Spalte gehaltsbestandteil_von wurde in hr.tbl_gehaltshistorie neu erstellt<br>';
}
}
if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='gehaltsbestandteil_bis' AND table_name='tbl_gehaltshistorie' AND table_schema='hr'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "
ALTER TABLE
hr.tbl_gehaltshistorie
ADD COLUMN
gehaltsbestandteil_bis date
";
if (! $db->db_query($qry))
echo '<strong>Vertraege: ' . $db->db_last_error() . '</strong><br>';
else
echo 'Spalte gehaltsbestandteil_bis wurde in hr.tbl_gehaltshistorie neu erstellt<br>';
}
}
@@ -0,0 +1,17 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
// add unruly column public.tbl_person
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'public'
AND table_name = 'tbl_person' AND column_name = 'unruly'"))
{
if($db->db_num_rows($result) === 0)
{
$qry = "ALTER TABLE tbl_person ADD COLUMN unruly BOOLEAN NOT NULL DEFAULT FALSE";
if(!$db->db_query($qry))
echo '<strong>Public Tabelle person: '.$db->db_last_error().'</strong><br>';
else
echo '<br>spalte unruly hinzugefuegt';
}
}
+22 -10
View File
@@ -1,15 +1,11 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if ($result = $db->db_query("SELECT * FROM information_schema.views WHERE table_catalog = '" . DB_NAME . "' AND table_schema = 'public' AND table_name = 'vw_oe_path'"))
{
if($db->db_num_rows($result) == 0)
{
$qry = "
$qry = "
CREATE OR REPLACE VIEW public.vw_oe_path AS
WITH RECURSIVE vw_oe_path(oe_kurzbz, bezeichnung, oe_parent_kurzbz, organisationseinheittyp_kurzbz, oetyp_bezeichnung, depth, path) AS (
WITH RECURSIVE vw_oe_path(oe_kurzbz, bezeichnung, oe_parent_kurzbz, organisationseinheittyp_kurzbz, oetyp_bezeichnung, depth, path, path_kurzbz) AS (
SELECT
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, 0, '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung AS path
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, 0, '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung AS path, '/' || oe.oe_kurzbz AS path_kurzbz
FROM
public.tbl_organisationseinheit oe
JOIN
@@ -18,7 +14,7 @@ if ($result = $db->db_query("SELECT * FROM information_schema.views WHERE table_
oe.oe_parent_kurzbz IS NULL
UNION ALL
SELECT
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, depth + 1, oet.path || '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung
oe.oe_kurzbz, oe.bezeichnung, oe.oe_parent_kurzbz, oe.organisationseinheittyp_kurzbz, oetyp.bezeichnung AS oetyp_bezeichnung, depth + 1, oet.path || '/' || oetyp.bezeichnung || ' ' || oe.bezeichnung, oet.path_kurzbz || '/' || oe.oe_kurzbz AS path_kurzbz
FROM
public.tbl_organisationseinheit oe, vw_oe_path oet
JOIN
@@ -29,11 +25,27 @@ if ($result = $db->db_query("SELECT * FROM information_schema.views WHERE table_
SELECT * FROM vw_oe_path ORDER BY path, depth;
GRANT SELECT ON public.vw_oe_path TO vilesci;
";
";
if ($result = $db->db_query("SELECT * FROM information_schema.views WHERE table_catalog = '" . DB_NAME . "' AND table_schema = 'public' AND table_name = 'vw_oe_path'"))
{
if($db->db_num_rows($result) == 0)
{
if (!$db->db_query($qry))
echo '<strong>public.vw_oe_path: ' . $db->db_last_error() . '</strong><br />';
else
echo 'public.vw_oe_path: erstellt<br />';
}
}
if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE table_catalog = '" . DB_NAME . "' AND table_schema = 'public' AND table_name = 'vw_oe_path' AND column_name = 'path_kurzbz'"))
{
if($db->db_num_rows($result) == 0)
{
if (!$db->db_query($qry))
echo '<strong>public.vw_oe_path: ' . $db->db_last_error() . '</strong><br />';
else
echo 'public.vw_oe_path: neu erstellt mit zusätzlicher spalte path_kurzbz<br />';
}
}
+1
View File
@@ -1298,6 +1298,7 @@ $filters = array(
{"name": "os"},
{"name": "lizenzserver_kurzbz"},
{"name": "lizenzserver_port"},
{"name": "anzahl_lizenzen"},
{"name": "softwarestatus_kurzbz"}
],
"filters": []
File diff suppressed because it is too large Load Diff