|
@@ -58,7 +58,7 @@ def get_pitcher_panel_daily(pitcher, start, end, page, page_size, order_by, orde
|
|
|
sql=f"""
|
|
|
select formatDateTime(dt,'%Y-%m-%d') date,'{pitcher}' pitcher,cost,first_order_amount,first_roi,
|
|
|
order_amount,today_roi,total_amount,total_cost,total_amount-total_cost total_profit,
|
|
|
-total_amount/total_cost total_roi from
|
|
|
+if(total_cost=0,0,total_amount/total_cost) total_roi from
|
|
|
(select dt,
|
|
|
round(sum(cost),2) cost,
|
|
|
round(sum(first_order_amount),2) first_order_amount,
|
|
@@ -80,6 +80,7 @@ total_amount/total_cost total_roi from
|
|
|
|
|
|
|
|
|
key=['date','pitcher','cost','first_order_amount','first_roi','order_amount','today_roi','total_amount','total_cost','total_profit','total_roi']
|
|
|
+ print(get_dict_list(key,get_round(data)))
|
|
|
return get_dict_list(key,get_round(data)),total
|
|
|
|
|
|
|