funktion hinzugefuegt um mehrere bewerber abzuweisen und status wird nur angezeigt wenn aktiv

This commit is contained in:
ma0048
2021-05-12 12:48:29 +02:00
parent 0681049122
commit 2c6d8937f6
6 changed files with 197 additions and 6 deletions
@@ -581,4 +581,17 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($person_id));
}
public function getPrestudentByStudiengangAndPerson($studiengang, $person)
{
$query = "SELECT ps.prestudent_id
FROM public.tbl_prestudentstatus pss
JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_studiengang sg USING(studiengang_kz)
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
WHERE ps.person_id = ?
AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?";
return $this->execQuery($query, array($person, $studiengang));
}
}
@@ -11,4 +11,17 @@ class Statusgrund_model extends DB_Model
$this->dbTable = "public.tbl_status_grund";
$this->pk = "statusgrund_id";
}
public function getStatus($status_kurzbz = null, $aktiv = null)
{
$where = array();
if (!is_null($status_kurzbz))
$where['status_kurzbz'] = $status_kurzbz;
if (!is_null($aktiv))
$where['aktiv'] = $aktiv;
$status = $this->loadWhere($where);
return success($status->retval);
}
}
@@ -481,4 +481,17 @@ class Studiengang_model extends DB_Model
return $this->loadWhere($condition);
}
public function getStudiengaengeWithOrgForm($typ)
{
$query = "SELECT DISTINCT (UPPER(sg.typ || sg.kurzbz || ':' || sp.orgform_kurzbz)) AS Studiengang
FROM public.tbl_prestudentstatus pss
JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_studiengang sg USING(studiengang_kz)
JOIN lehre.tbl_studienplan sp USING(studienplan_id)
WHERE sg.typ IN ?
ORDER BY Studiengang;";
return $this->execQuery($query, array($typ));
}
}