接口优化

This commit is contained in:
jinling.yang
2024-01-16 11:00:01 +08:00
parent 1b490951b1
commit 22176eda69

View File

@@ -31,10 +31,12 @@ class Manufacturing_Connect(http.Controller):
'ProductionLine': item.production_line, 'ProductionLine': item.production_line,
'CraftName': item.name, 'CraftName': item.name,
'Quantity': 1, '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: except Exception as e:
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e} res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
logging.info('get_Work_Info error:%s' % e) logging.info('get_Work_Info error:%s' % e)
return json.JSONEncoder().encode(res) return json.JSONEncoder().encode(res)