update 修改更新流程接口
This commit is contained in:
parent
aed102ee3c
commit
e50f60da28
|
@ -77,7 +77,7 @@ def update_data(param1, param2, param3, param4):
|
||||||
Returns:
|
Returns:
|
||||||
-
|
-
|
||||||
"""
|
"""
|
||||||
collection = client_admin[param1][param2]
|
collection = client_tfse[param1][param2]
|
||||||
res = collection.update_one(param3, {"$set": param4})
|
res = collection.update_one(param3, {"$set": param4})
|
||||||
info = res.raw_result['updatedExisting']
|
info = res.raw_result['updatedExisting']
|
||||||
return info
|
return info
|
||||||
|
|
|
@ -86,8 +86,9 @@ def update_process():
|
||||||
"""
|
"""
|
||||||
rid = request.json['rid']
|
rid = request.json['rid']
|
||||||
renew_data = request.json['renew_data']
|
renew_data = request.json['renew_data']
|
||||||
|
types = request.json['types']
|
||||||
|
|
||||||
info = update_process_scripts(rid, renew_data)
|
info = update_process_scripts(types, rid, renew_data)
|
||||||
status = 200 if info else 210
|
status = 200 if info else 210
|
||||||
result = '更新成功' if info else '更新失败'
|
result = '更新成功' if info else '更新失败'
|
||||||
return {"info": result}, status
|
return {"info": result}, status
|
||||||
|
|
|
@ -814,14 +814,15 @@ def calculate_weight(param):
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
|
|
||||||
def update_process_scripts(param1, param2):
|
def update_process_scripts(param1, param2, param3):
|
||||||
"""
|
"""
|
||||||
更新流程数据
|
更新流程数据
|
||||||
Parameters:
|
Parameters:
|
||||||
param1 str 评价ID
|
param1 dict 数据集名称
|
||||||
param2 dict 需要更新的数据
|
param2 str 评价ID
|
||||||
|
param3 dict 需要更新的数据
|
||||||
Returns:
|
Returns:
|
||||||
result bool 更新结果
|
result bool 更新结果
|
||||||
"""
|
"""
|
||||||
info = update_data('看板', '评价流程', {"评价ID": param1}, param2)
|
info = update_data('评价', param1, {"评价ID": param2}, param3)
|
||||||
return info
|
return info
|
||||||
|
|
Loading…
Reference in New Issue