Commit f59689e0 by dong

fix20230427

parent 11cf0c4f
...@@ -308,14 +308,14 @@ def prolink(): ...@@ -308,14 +308,14 @@ def prolink():
res = { res = {
"deletion": deletion, "deletion": deletion,
"goodness": goodness, "goodness": goodness,
"bedness": bedness "bedness": 12 if bedness > 12 else bedness
} }
if link_type == 1: # "缺失环节": if link_type == 1: # "缺失环节":
result_bylink = [item.product for item in edata if item.score == 0] result_bylink = [item.product for item in edata if item.score == 0][12:]
elif link_type == 2: # "薄弱环节": elif link_type == 2: # "薄弱环节":
result_bylink = [item.product for item in edata if item.score > 0 and item.score <= cent] result_bylink = [item.product for item in edata if item.score > 0 and item.score <= cent][12:]
elif link_type == 3: # "优势环节": elif link_type == 3: # "优势环节":
result_bylink = [item.product for item in edata if item.score > cent] result_bylink = [item.product for item in edata if item.score > cent][12:]
else: else:
return jsonify(code=RET.DATAERR, msg="参数错误") return jsonify(code=RET.DATAERR, msg="参数错误")
# if not result_bylink: # if not result_bylink:
......
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