Commit 2185fa9e authored by 赵杰's avatar 赵杰

份额核减

parent 88b93ea4
......@@ -142,9 +142,8 @@ class UserCustomerDataAdaptor:
need_less_share -= ori_share
user_customer_order_df.loc[index_ori, "confirm_share"] = 0
else:
user_customer_order_df.loc[index_ori, "confirm_share"] = row_ori["confirm_share"] - need_less_share
need_less_share = 0
user_customer_order_df.loc[index_ori, "confirm_share"] = row_ori[
"confirm_share"] - need_less_share
if need_less_share <= 0:
break
user_customer_order_df = user_customer_order_df[(user_customer_order_df["order_type"] == 1)&(user_customer_order_df["confirm_share"] > 0)]
......
......@@ -455,7 +455,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
fund_hoding_info["market_values"] = round((float(row["confirm_share"]) * (fund_basic_info["cur_cnav"] - confirm_cnav) + float(row["confirm_amount"]))/10000, 2)
temp_market_values = float(row["confirm_share"]) * (fund_basic_info["cur_cnav"] - confirm_cnav) + float(row["confirm_amount"])
fund_hoding_info["weight"] = "%.2f" % round(float(fund_hoding_info["market_values"]) / total_market_values * 10000.0 * 100, 2) # 月末占比
fund_hoding_info["cost"] = "%.2f" % round(float(row["confirm_amount"])/10000, 2) # 投资本金
fund_hoding_info["cost"] = "%.2f" % round(float(row["confirm_share"]*row["nav"])/10000, 2) # 投资本金
# 当月收益
if row['confirm_share_date'] > self.month_start_date:
cal_month_start_date = row['confirm_share_date']
......
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