|
@@ -386,7 +386,7 @@ def pitcher_overview(user_id,start, end, pitcher, page, page_size, order_by, ord
|
|
|
|
|
|
|
|
|
|
|
|
-def boss_panel_summary(user_id,start,end,pitcher, type, stage, page, page_size, order_by, order):
|
|
|
+def boss_panel_summary(user_id,start,end,channel,pitcher, type, stage, page, page_size, order_by, order):
|
|
|
|
|
|
if user_id in super_auth():
|
|
|
op = ''
|
|
@@ -401,13 +401,14 @@ def boss_panel_summary(user_id,start,end,pitcher, type, stage, page, page_size,
|
|
|
op3 = f" and dt<='{end}' " if end else ''
|
|
|
op4 = f" and type='{type}' " if type else ''
|
|
|
op5= f" and stage='{stage}' " if stage else ''
|
|
|
- op6 = f" order by {order_by} {order}" if order_by and order else 'order by dt desc'
|
|
|
+ op6 = f" and channel='{channel}' " if stage else ''
|
|
|
+ op7 = f" order by {order_by} {order}" if order_by and order else 'order by dt desc'
|
|
|
|
|
|
dm = MysqlUtils().dm
|
|
|
|
|
|
sql=f"""select sum(order_amount) order_amount,sum(cost) cost,dt from dw_channel
|
|
|
- where 1=1 {op} {op1} {op2} {op3} {op4} {op5}
|
|
|
- GROUP BY dt HAVING order_amount+cost>0 {op6} """
|
|
|
+ where 1=1 {op} {op1} {op2} {op3} {op4} {op5} {op6}
|
|
|
+ GROUP BY dt HAVING order_amount+cost>0 {op7} """
|
|
|
# print(sql)
|
|
|
|
|
|
return getLimitData(dm, sql, page, page_size)
|