Commit 2ca9aa3b authored by 赵杰's avatar 赵杰

类型转换

parent fe703490
...@@ -23,6 +23,7 @@ def recalculation_fund_comment(args): ...@@ -23,6 +23,7 @@ def recalculation_fund_comment(args):
for key, value_list in suggest_result.items(): for key, value_list in suggest_result.items():
for value in value_list: for value in value_list:
all_sug_amount_dict[value["fund_id"]] = value["after_optimization"] all_sug_amount_dict[value["fund_id"]] = value["after_optimization"]
value["after_optimization"] = round(float(value["after_optimization"]), 2)
if value["after_optimization"] <= 0: if value["after_optimization"] <= 0:
continue continue
suggest_fund_dict[value["fund_id"]] = value["fund_type"] suggest_fund_dict[value["fund_id"]] = value["fund_type"]
...@@ -72,5 +73,5 @@ def recalculation_fund_comment(args): ...@@ -72,5 +73,5 @@ def recalculation_fund_comment(args):
except Exception as e: except Exception as e:
print(traceback.print_exc()) print(traceback.print_exc())
return False return False
# print(json.dumps(dict_result, cls=npEncoder, ensure_ascii=False)) print(json.dumps(dict_result, cls=npEncoder, ensure_ascii=False))
return json.dumps(dict_result, cls=npEncoder, ensure_ascii=False) return json.dumps(dict_result, cls=npEncoder, ensure_ascii=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