接口优化
This commit is contained in:
@@ -31,10 +31,12 @@ class Manufacturing_Connect(http.Controller):
|
||||
'ProductionLine': item.production_line,
|
||||
'CraftName': item.name,
|
||||
'Quantity': 1,
|
||||
# 'MaterialId':item.P
|
||||
'MaterialId': item.product_id.default_code,
|
||||
'MaterialName': item.product_id.name,
|
||||
# 'Spec':item.mat,
|
||||
'Material': item.materials_type_id.name
|
||||
})
|
||||
return json.JSONEncoder().encode(res)
|
||||
except Exception as e:
|
||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||
logging.info('get_Work_Info error:%s' % e)
|
||||
return json.JSONEncoder().encode(res)
|
||||
return json.JSONEncoder().encode(res)
|
||||
|
||||
Reference in New Issue
Block a user