From 81cfbfb540a7809d66331c843036ac9ad139b430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 21 Oct 2024 11:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_workorder_exception/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', '') })