Commit f038c72d authored by xianyang's avatar xianyang

优化业务类型出入账分组详情

parent 51dbf322
......@@ -249,7 +249,7 @@ class ReferenceTypeClassification():
def classification_summary(self):
data_sql = f"select uuid,type,sum(amount)/1000 as amount,create_time from {self.date} where reference_type='{self.reference_type}' GROUP BY uuid,type"
data_sql = f"select uuid,type,sum(amount) as amount,create_time from {self.date} where reference_type='{self.reference_type}' GROUP BY uuid,type"
guild_sql = f"select uuid from guild"
account_sql = f"select uuid,name from fi_account"
anchor_sql = f"select uuid from v2_user where is_achor in(1,2)"
......@@ -291,12 +291,12 @@ class ReferenceTypeClassification():
outcome = pd.DataFrame(self.outcome)
ogs = outcome.groupby("nickname").sum()
for k, v in ogs.to_dict().get('money').items():
res_list.append({"type": "出账", "name": k, "money": round(float(v), 3)})
res_list.append({"type": "出账", "name": k, "money": round(float(v/1000), 3)})
if self.income:
income = pd.DataFrame(self.income)
igs = income.groupby("nickname").sum()
for k, v in igs.to_dict().get('money').items():
res_list.append({"type": "入账", "name": k, "money": round(float(v), 3)})
res_list.append({"type": "入账", "name": k, "money": round(float(v/1000), 3)})
return res_list
......
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