Commit 332f3a11 by 魏强

新增代理商无效订单信息;

parent 3c0c1e00
......@@ -141,6 +141,9 @@ def index():
agent_history['month_rent'] = month_rent
agent_history['lastmonth_income'] = lastmonth_income
agent_history['lastmonth_rent'] = lastmonth_rent
if cur_user.level == 2:
agent_history['history_invalid_rent'] = invalid_rent_history
agent_history['history_invalid_money'] = invalid_money_history
agent_history['spot_info'] = AgentService.get_spot_info(cur_user)
return jsonify(BASE_RESPONSE(data=agent_history).to_dict())
else:
......@@ -155,6 +158,8 @@ def index():
rent_finish = IndexService.get_total_power(spot_id, start_time_today, end_time_today)
rent_not_return = IndexService.get_not_return_production(spot_id, start_time_today, end_time_today)
today_discount = IndexService.get_discount_money(spot_id, start_time_today, end_time_today)
rent_invalid_money, rent_invalid_rent = IndexService.get_invalid_production_info(spot_id, start_time_today,
end_time_today)
if cur_user.level == 1:
# 超级管理员
......@@ -165,8 +170,6 @@ def index():
admin_today['yesterday_rent'] = yesterday_rent
admin_today['rent_finish'] = rent_finish
admin_today['rent_not_return'] = rent_not_return
rent_invalid_money, rent_invalid_rent = IndexService.get_invalid_production_info(spot_id, start_time_today,
end_time_today)
admin_today['today_invalid_rent'] = rent_invalid_rent
admin_today['today_invalid_money'] = rent_invalid_money
admin_today['discount'] = today_discount
......@@ -196,6 +199,9 @@ def index():
agent_today['rent_finish'] = rent_finish
agent_today['rent_not_return'] = rent_not_return
agent_today['discount'] = today_discount
if cur_user.level == 2:
agent_today['today_invalid_rent'] = 0
agent_today['today_invalid_money'] = 0
agent_today['spot_info'] = AgentService.get_spot_info(cur_user)
return jsonify(BASE_RESPONSE(data=agent_today).to_dict())
else:
......
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