fehler begin
This commit is contained in:
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
import json
|
||||
|
||||
import cherrypy
|
||||
from .database import KatfehlerDatabase_cl, KatursacheDatabase_cl, FehlerDatabase_cl
|
||||
from .database import KatfehlerDatabase_cl, KatursacheDatabase_cl, FehlerDatabase_cl, KomponenteDatabase_cl, QsMitarbeiterDatabase_cl, SwEntwicklerDatabase_cl
|
||||
# Method-Dispatching!
|
||||
|
||||
# Übersicht Anforderungen / Methoden
|
||||
@ -252,6 +252,11 @@ class Fehler_cl(object):
|
||||
def __init__(self):
|
||||
#-------------------------------------------------------
|
||||
self.db_o = FehlerDatabase_cl()
|
||||
self.dbKomponente_o = KomponenteDatabase_cl()
|
||||
self.dbQsMitarbeiter_o = QsMitarbeiterDatabase_cl()
|
||||
self.dbSwEntwickler_o = SwEntwicklerDatabase_cl()
|
||||
self.dbKatFehler_o = KatfehlerDatabase_cl()
|
||||
self.dbKatUrsache_o = KatursacheDatabase_cl()
|
||||
|
||||
#-------------------------------------------------------
|
||||
def GET(self, id = None):
|
||||
@ -268,6 +273,12 @@ class Fehler_cl(object):
|
||||
if data_o != None:
|
||||
retVal_o['data'] = adjustId_p(id, data_o)
|
||||
|
||||
retVal_o['komponente'] = self.dbKomponente_o.read_px()
|
||||
retVal_o['qsmitarbeiter'] = self.dbQsMitarbeiter_o.read_px()
|
||||
retVal_o['swentwickler'] = self.dbSwEntwickler_o.read_px()
|
||||
retVal_o['katfehler'] = self.dbKatFehler_o.read_px()
|
||||
retVal_o['katursache'] = self.dbKatUrsache_o.read_px()
|
||||
|
||||
return retVal_o
|
||||
|
||||
#-------------------------------------------------------
|
||||
@ -287,7 +298,13 @@ class Fehler_cl(object):
|
||||
id_s = data_opl["id_s"]
|
||||
data_o = {
|
||||
'name': data_opl["name_s"],
|
||||
'id': data_opl["id_s"]
|
||||
'id': data_opl["id_s"],
|
||||
'komponente-id': data_opl["komponente-id_s"],
|
||||
'katfehler-id': data_opl["katfehler-id_s"],
|
||||
'katursache-id': data_opl["katursache-id_s"],
|
||||
'qsmitarbeiter-id': data_opl["qsmitarbeiter-id_s"],
|
||||
'swentwickler-id': data_opl["swentwickler-id_s"],
|
||||
'status': data_opl["status_s"]
|
||||
}
|
||||
# Update-Operation
|
||||
retVal_o['id'] = id_s
|
||||
@ -310,7 +327,14 @@ class Fehler_cl(object):
|
||||
# hier müsste man prüfen, ob die Daten korrekt vorliegen!
|
||||
|
||||
data_o = {
|
||||
'name': data_opl["name_s"]
|
||||
'name': data_opl["name_s"],
|
||||
'id': data_opl["id_s"],
|
||||
'komponente-id': data_opl["komponente-id_s"],
|
||||
'katfehler-id': data_opl["katfehler-id_s"],
|
||||
'katursache-id': data_opl["katursache-id_s"],
|
||||
'qsmitarbeiter-id': data_opl["qsmitarbeiter-id_s"],
|
||||
'swentwickler-id': data_opl["swentwickler-id_s"],
|
||||
'status': data_opl["status_s"]
|
||||
}
|
||||
# Create-Operation
|
||||
id_s = self.db_o.create_px(data_o)
|
||||
|
Reference in New Issue
Block a user