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

Commit 1dbd991d by 李景熙

修改标注者获取逻辑

parent 01ca63a6
......@@ -168,7 +168,7 @@ def get_state(user_id, data_id):
# 获取某文件的标注者信息
def get_executors(data_id):
try:
find = Relation.select(Relation.user_id, Relation.relation_id).where(Relation.data_id == data_id)
find = Relation.select(Relation.user_id, Relation.relation_id).where(Relation.data_id == data_id, Relation.flag is True, Relation.flag2 is False)
index = 0
list = []
while index < len(find):
......
# 审核时候打分的接口,前端传送打分的具体信息(文件id,分片id,标注者id,打分详情),后端在标注关系表中查找对应的标注,并将分数存储下来,之后修改审核状态即flag2 = True,代表已审核
@task.route("/gradePiece", methods=["GET"])
def grade():
print("grade")
data_id = request.args['fileId']
userId = request.args['userId']
score = request.args['scoreForm']
ret = Relation.set_grade(userId, data_id, score)
res = {
'code': ret.code,
'message': ret.message,
'data': ret.data
}
return json.dumps(res)
\ No newline at end of file
# 审核时候打分的接口,前端传送打分的具体信息(文件id,分片id,标注者id,打分详情),后端在标注关系表中查找对应的标注,并将分数存储下来,之后修改审核状态即flag2 = True,代表已审核
@task.route("/gradePiece", methods=["GET"])
def grade():
print("grade")
data_id = request.args['fileId']
userId = request.args['userId']
score = request.args['scoreForm']
ret = Relation.set_grade(userId, data_id, score)
res = {
'code': ret.code,
'message': ret.message,
'data': ret.data
}
return json.dumps(res)
\ No newline at end of file
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