mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
Testvarianten zur Anzeige von EW-Team in Personalmeldung
This commit is contained in:
@@ -171,7 +171,7 @@ class entwicklungsteam extends basis_db
|
||||
* andernfalls wird der Datensatz mit der ID in $akte_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
public function save($new = null)
|
||||
{
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
@@ -192,7 +192,6 @@ class entwicklungsteam extends basis_db
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).');';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -226,7 +225,7 @@ class entwicklungsteam extends basis_db
|
||||
* @param $uid UID des Mitarbeiters
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getEntwicklungsteam($mitarbeiter_uid, $studiengang_kz=null)
|
||||
public function getEntwicklungsteam($mitarbeiter_uid, $studiengang_kz = null)
|
||||
{
|
||||
//laden des Datensatzes
|
||||
$qry = "SELECT * FROM bis.tbl_entwicklungsteam JOIN bis.tbl_besqual USING(besqualcode)
|
||||
@@ -352,5 +351,59 @@ class entwicklungsteam extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Laedt alle Entwicklungsteameintraege eines Mitarbeiters für eine bestimmte Bisperiode
|
||||
* @param $uid UID des Mitarbeiters
|
||||
* @param $stichtag Stichtag im Format 'Y-m-d'
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getEntwicklungsteamBis($mitarbeiter_uid, $stichtag, $studiengang_kz = null)
|
||||
{
|
||||
$datetime = new DateTime($stichtag);
|
||||
$bismeldung_jahr = $datetime->format('Y');
|
||||
|
||||
//laden des Datensatzes
|
||||
$qry = "SELECT *
|
||||
FROM bis.tbl_entwicklungsteam
|
||||
JOIN bis.tbl_besqual USING(besqualcode)
|
||||
WHERE mitarbeiter_uid=".$this->db_add_param($mitarbeiter_uid)."
|
||||
AND (beginn <= make_date(". $this->db_add_param($bismeldung_jahr). "::INTEGER, 12, 31))
|
||||
AND (ende is NULL OR ende >= make_date(". $this->db_add_param($bismeldung_jahr). "::INTEGER, 1, 1))";
|
||||
|
||||
if($studiengang_kz!=null)
|
||||
$qry.=" AND studiengang_kz=".$this->db_add_param($studiengang_kz);
|
||||
|
||||
$qry.=";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new entwicklungsteam();
|
||||
|
||||
$obj->entwicklungsteam_id = $row->entwicklungsteam_id;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->besqualcode = $row->besqualcode;
|
||||
$obj->beginn = $row->beginn;
|
||||
$obj->ende = $row->ende;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->besqual = $row->besqualbez;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler bei der Datenbankabfrage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -139,7 +139,9 @@ foreach($verwendungcodex->result as $row)
|
||||
// Prüfe Zeitraum zur Erstellung einer BIS-Meldung
|
||||
$studiensemester = new studiensemester();
|
||||
|
||||
$stsem = (isset($_GET['stsem'])) ? $_GET['stsem'] : $studiensemester->getaktorNext(); // aktuelles Studiensemester
|
||||
//Test
|
||||
//$stsem = (isset($_GET['stsem'])) ? $_GET['stsem'] : $studiensemester->getaktorNext(); // aktuelles Studiensemester
|
||||
$stsem = 'SS2022';
|
||||
|
||||
|
||||
|
||||
@@ -149,6 +151,8 @@ if(mb_strstr($stsem, 'SS'))
|
||||
$studiensemester->load($stsem);
|
||||
$jahr = $datum_obj->formatDatum($studiensemester->start, 'Y');
|
||||
$stichtag = date("Y-m-d", mktime(0, 0, 0, 12, 31, $jahr - 1)); // 31.12. des vorangehenden Kalenderjahres zur BIS Meldung TODO: oder Abfragetag mitgeben?
|
||||
//Test Stichtag
|
||||
echo $stichtag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -170,6 +174,8 @@ $ws = new studiensemester($ws_kurzbz);
|
||||
|
||||
// Alle gemeldeten Mitarbeiter holen
|
||||
$mitarbeiter = new mitarbeiter();
|
||||
//Test Stichtag1
|
||||
echo "stichtag" . $beginn_imJahr->format('Y-m-d');
|
||||
$mitarbeiter->getMitarbeiterBISMeldung($beginn_imJahr->format('Y-m-d'));
|
||||
$mitarbeiter_arr = $mitarbeiter->result;
|
||||
|
||||
@@ -335,7 +341,9 @@ foreach ($mitarbeiter_arr as $mitarbeiter)
|
||||
* Exkludiert Funktionen, die einem Lehrgang bzw. STG, die nicht BIS-gemeldet werden, zugeordnet sind.
|
||||
*/
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
$funktion_arr = _addFunktionscontainer_Funktionscode7($person_obj->uid, $funktion_arr);
|
||||
//Test
|
||||
//$funktion_arr = _addFunktionscontainer_Funktionscode7($person_obj->uid, $funktion_arr); //VARIANTE1
|
||||
$funktion_arr = _addFunktionscontainer_Funktionscode7($person_obj->uid, $funktion_arr, $stichtag); //VARIANTE2
|
||||
|
||||
// Container Funktion dem Container Person anhaengen
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -813,10 +821,13 @@ function _getFunktionscontainer_Funktionscode123456($bisfunktion_arr)
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function _addFunktionscontainer_Funktionscode7($uid, $funktion_arr)
|
||||
//Test
|
||||
//function _addFunktionscontainer_Funktionscode7($uid, $funktion_arr) //Variante1
|
||||
function _addFunktionscontainer_Funktionscode7($uid, $funktion_arr, $stichtag) //Variante2
|
||||
{
|
||||
$entwicklungsteam = new Entwicklungsteam();
|
||||
$entwicklungsteam->getEntwicklungsteam($uid);
|
||||
//$entwicklungsteam->getEntwicklungsteam($uid, null); //Variante1
|
||||
$entwicklungsteam->getEntwicklungsteamBis($uid, $stichtag); //Variante2
|
||||
$entwicklungsteam_arr = $entwicklungsteam->result;
|
||||
|
||||
if (!empty($entwicklungsteam_arr))
|
||||
@@ -1018,26 +1029,6 @@ function _generateXML($person_arr)
|
||||
$xml .= '</Studiengang>';
|
||||
}
|
||||
}
|
||||
|
||||
// if ($funktion->funktionscode == 7 || $funktion->funktionscode == 5)
|
||||
// {
|
||||
// if (is_array($funktion->studiengang))
|
||||
// {
|
||||
// foreach ($funktion->studiengang as $studiengang)
|
||||
// {
|
||||
// $xml .= '<Studiengang>';
|
||||
// $xml .= '<StgKz><![CDATA['. $studiengang["studieng_kz"]. ']]></StgKz>';
|
||||
// $xml .= '</Studiengang>';
|
||||
// }
|
||||
// }
|
||||
// else if (!is_null($funktion->studiengang))
|
||||
// {
|
||||
// $xml .= '<Studiengang>';
|
||||
// $xml .= '<StgKz><![CDATA['. $funktion->studiengang. ']]></StgKz>';
|
||||
// $xml .= '</Studiengang>';
|
||||
// }
|
||||
// }
|
||||
|
||||
$xml .= '</Funktion>';
|
||||
}
|
||||
|
||||
@@ -1208,6 +1199,8 @@ function _outputHTML($person_arr)
|
||||
echo $funktion->studiengang.' ';
|
||||
}
|
||||
}
|
||||
//Test
|
||||
//Variante: EW-Teams mit Zeitraum anzeigen
|
||||
if ($funktion->funktionscode == 7)
|
||||
{
|
||||
if (is_array($funktion->studiengang))
|
||||
|
||||
Reference in New Issue
Block a user