Commit 34557118 authored by xianyang's avatar xianyang

优化

parent a05e25b9
......@@ -627,7 +627,7 @@ class HomePageDisplay(object):
acc_uuid = [i['uuid'] for i in acc_data if i['unique_tag'] == self.unique_tag]
if not acc_uuid:
print('没找到系统账户')
return []
return [], 0, 0
assets_cond.append(f" uuid='{acc_uuid[0]}'")
assets_sql = f"select reference_type,type,sum(amount) as amount from {self.date} where {' and '.join(assets_cond)} GROUP BY reference_type,type"
total_data = LinkMysql(env.DB_HISTORY).query_mysql(assets_sql)
......
......@@ -45,5 +45,5 @@ xmltodict==0.13.0
openpyxl==3.1.2
redis==4.3.4
xpinyin==0.7.6
xlsxwriter-3.1.0
xlsxwriter==3.1.0
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