mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Merge branch 'feature-33003/BIS_Meldung_Personal' into feature-25562/PV21_Datenbankstruktur_fuer_Vertraege_und_Gehaelter
This commit is contained in:
@@ -677,4 +677,35 @@ class MigrateContract extends CLI_Controller
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Habilitation wird aus der Tabelle bis.tbl_bisverwendung in die Tabelle public.tbl_mitarbeiter uebernommen
|
||||
* Sofern die Person einmal in den Verwendungen eine habiliation eingetragen hat wird diese in den MA-Datensatz übernommen
|
||||
* Da es in der regel öfter vorkommt dass das hakerl vergessen wurde beim Vertragswechsel als dass die person die habiliation verliert.
|
||||
*/
|
||||
public function migrateHabilitation()
|
||||
{
|
||||
$this->load->model('ressource/Mitarbeiter_model','MitarbeiterModel');
|
||||
$db = new DB_Model();
|
||||
|
||||
$qry = "
|
||||
SELECT
|
||||
distinct mitarbeiter_uid
|
||||
FROM
|
||||
bis.tbl_bisverwendung
|
||||
WHERE
|
||||
habilitation=true";
|
||||
|
||||
$resultHabilitation = $db->execReadOnlyQuery($qry);
|
||||
|
||||
if (isSuccess($resultHabilitation) && hasData($resultHabilitation))
|
||||
{
|
||||
$habilitationen = getData($resultHabilitation);
|
||||
|
||||
foreach ($habilitationen as $row_habilitationen)
|
||||
{
|
||||
$this->MitarbeiterModel->update($row_habilitationen->mitarbeiter_uid, array('habilitation'=>true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ require_once('dbupdate_3.4/30181_tabelle_anrechnung_neue_attribute_fuer_begruend
|
||||
require_once('dbupdate_3.4/29529_infocenter_anpassungen.php');
|
||||
require_once('dbupdate_3.4/29835_uhstat1_erfassung_der_uhstat1_daten_ueber_das_bewerbungstool.php');
|
||||
require_once('dbupdate_3.4/33714_erhoehter_studienbeitrag_fuer_drittsaatenangehoerig.php');
|
||||
require_once('dbupdate_3.4/33003_bis_meldung_personal.php');
|
||||
require_once('dbupdate_3.4/36275_zeitaufzeichnung_karenz.php');
|
||||
require_once('dbupdate_3.4/21620_neues_feld_zum_erfassen_des_ESI.php');
|
||||
require_once('dbupdate_3.4/36530_bis_internationsalisierung_codextabelle_neuerungen.php');
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
//Add column habilitation to public.tbl_mitarbeiter
|
||||
if(!@$db->db_query("SELECT habilitation FROM public.tbl_mitarbeiter LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_mitarbeiter ADD COLUMN habilitation boolean NOT NULL DEFAULT false;
|
||||
COMMENT ON COLUMN public.tbl_mitarbeiter.habilitation IS 'Zeigt an, ob Mitarbeiter habilitiert ist (BIS relevant).';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_mitarbeiter '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte habilitation zu Tabelle public.tbl_mitarbeiter hinzugefügt';
|
||||
}
|
||||
Reference in New Issue
Block a user