Commit 9ea795a7 by Aeolus

代理商历史收入修改

parent 4f3b6907
......@@ -21,7 +21,7 @@ class IndexService():
'''
income_info = db.session.query(Production.agent_total).filter(Production.spot_id == spot_id,
Production.total > 0,
Production.agent_total > 0,
Production.created_at >= start_time,
Production.created_at <= end_time).all()
total = 0
......@@ -162,7 +162,7 @@ class IndexService():
Production.refund_time >= start_time, Production.refund_time <= end_time).all()
total_income = 0
for i in info:
total_income += i.Production.total
total_income += i.Production.agent_total
return round(total_income / 100, 2), len(info)
@staticmethod
......@@ -171,7 +171,7 @@ class IndexService():
Production.spot_id == spot_id, Production.is_refund == 1, Production.return_hatch_no == 127).all()
total_income = 0
for i in info:
total_income += i.Production.total
total_income += i.Production.agent_total
return round(total_income / 100, 2), len(info)
@staticmethod
......@@ -186,10 +186,10 @@ class IndexService():
# return round(total / 100, 2)
total = 0
income_info = db.session.query(Production.total).filter(Production.spot_id == spot_id,
Production.total > 0).all()
income_info = db.session.query(Production.agent_total).filter(Production.spot_id == spot_id,
Production.agent_total > 0).all()
for info in income_info:
total += info.total
total += info.agent_total
return round(total / 100, 2)
@staticmethod
......
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