|
@@ -737,7 +737,7 @@ from order where dt>='{start}' {channel_op} group by formatDateTime(reg_time,'
|
|
|
|
|
|
return data,total
|
|
|
|
|
|
-def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state):
|
|
|
+def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state,location):
|
|
|
ck = CkUtils()
|
|
|
channel_op=f" and channel='{channel}'" if channel!='' else ''
|
|
|
|
|
@@ -747,7 +747,7 @@ def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state):
|
|
|
else:
|
|
|
pitcher_op=f" and channel in {get_channels_from_user(pitcher)}"
|
|
|
|
|
|
-
|
|
|
+ location_op=f" having location='{location}' " if location!='' else ''
|
|
|
|
|
|
sql = f"""select a.channel channel,state,type location,toString(a.start_d) start,toString(a.end_d) end,
|
|
|
toDecimal32(total_cost,2),toDecimal32(total_amount,2),
|
|
@@ -780,7 +780,7 @@ def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state):
|
|
|
left outer join (
|
|
|
select pitcher,channel from dw_daily_channel_cost where dt=today() group by pitcher,channel
|
|
|
) e on a.channel=e.channel
|
|
|
-
|
|
|
+ {location_op}
|
|
|
"""
|
|
|
print(sql)
|
|
|
if channel!='':
|