修改接口参数

This commit is contained in:
胡尧
2024-10-21 11:46:14 +08:00
parent 2af21bc4ee
commit 81cfbfb540

View File

@@ -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', '')
})