diff --git a/jikimo_workorder_exception/controllers/main.py b/jikimo_workorder_exception/controllers/main.py index 0bd3d762..03744ff9 100644 --- a/jikimo_workorder_exception/controllers/main.py +++ b/jikimo_workorder_exception/controllers/main.py @@ -22,7 +22,7 @@ class WorkorderExceptionConroller(http.Controller): res = {'Succeed': True, 'ErrorCode': 0, 'Error': ''} datas = request.httprequest.data ret = json.loads(datas) - if not ret.get('RfidCode') or not ret.get('ErrorType'): + if not ret.get('RfidCode') or not ret.get('coding'): res = {'Succeed': False, 'ErrorCode': 400, 'Error': '参数错误'} return json.JSONEncoder().encode(res) @@ -38,7 +38,7 @@ class WorkorderExceptionConroller(http.Controller): # 创建工单异常记录,关联工单 request.env['jikimo.workorder.exception'].sudo().create({ 'workorder_id': workorder.id, - 'exception_code': ret.get('ErrorType'), + 'exception_code': ret.get('coding'), 'exception_content': ret.get('Error', '') })