文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 6e065660 by Wang Yuhang

Merge branch 'develop' of ssh://gitlab.redhtc.com:1422/Berlincen/DA-Platform into dev

parents 6bf9601a fa7c7d33
...@@ -52,7 +52,7 @@ def delete_all(): ...@@ -52,7 +52,7 @@ def delete_all():
# 将数据单生成任务后更改状态 # 将数据单生成任务后更改状态
def set_complete(_id): def set_complete(_id):
try: try:
condition = {'_id': _id} condition = {'_id': ObjectId(_id)}
ds = collection.find_one(condition) ds = collection.find_one(condition)
ds['complete'] = 1 ds['complete'] = 1
result = collection.update_one(condition, ds) result = collection.update_one(condition, ds)
...@@ -65,11 +65,8 @@ def set_complete(_id): ...@@ -65,11 +65,8 @@ def set_complete(_id):
# 根据数据单id创建任务 # 根据数据单id创建任务
def createtask(id): def createtask(id):
try: try:
results = collection.find() result = collection.find_one({'_id': ObjectId(id)})
for i in results: print(result['data_list'])
if str(i.pop("_id")) == id:
print(111)
print(i.pop("user_id"))
except Exception as e: except Exception as e:
print(e) print(e)
return False return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment