Accept Merge Request #1428: (feature/workorder_exceptions -> develop)
Merge Request: 修改接口参数 Created By: @胡尧 Accepted By: @胡尧 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1428?initial=true
This commit is contained in:
@@ -22,7 +22,7 @@ class WorkorderExceptionConroller(http.Controller):
|
|||||||
res = {'Succeed': True, 'ErrorCode': 0, 'Error': ''}
|
res = {'Succeed': True, 'ErrorCode': 0, 'Error': ''}
|
||||||
datas = request.httprequest.data
|
datas = request.httprequest.data
|
||||||
ret = json.loads(datas)
|
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': '参数错误'}
|
res = {'Succeed': False, 'ErrorCode': 400, 'Error': '参数错误'}
|
||||||
return json.JSONEncoder().encode(res)
|
return json.JSONEncoder().encode(res)
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class WorkorderExceptionConroller(http.Controller):
|
|||||||
# 创建工单异常记录,关联工单
|
# 创建工单异常记录,关联工单
|
||||||
request.env['jikimo.workorder.exception'].sudo().create({
|
request.env['jikimo.workorder.exception'].sudo().create({
|
||||||
'workorder_id': workorder.id,
|
'workorder_id': workorder.id,
|
||||||
'exception_code': ret.get('ErrorType'),
|
'exception_code': ret.get('coding'),
|
||||||
'exception_content': ret.get('Error', '')
|
'exception_content': ret.get('Error', '')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user