ck 4 anos atrás
pai
commit
d96ac10c43
1 arquivos alterados com 3 adições e 6 exclusões
  1. 3 6
      data_manage/pitcher_panel.py

+ 3 - 6
data_manage/pitcher_panel.py

@@ -713,12 +713,9 @@ r150-r120 a150,if(r1=0,0,r150/r1) b150
 from order where 1=1 {op1} {channel_op}  group by formatDateTime(reg_time,'%Y-%m-%d'),channel
 from order where 1=1 {op1} {channel_op}  group by formatDateTime(reg_time,'%Y-%m-%d'),channel
     ) b on a.dt=b.dt and a.channel=b.channel
     ) b on a.dt=b.dt and a.channel=b.channel
 """
 """
-    print(sql)
-    if start==end:
-        total=1
-    else:
-        total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
-        sql += f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
+
+    total = ck.execute(f"select count(1) from ({sql}) a")[0][0]
+    sql += f" order by {order_by} {order} limit {(page-1)*page_size},{page_size} "
 
 
     data=get_round(ck.execute(sql))
     data=get_round(ck.execute(sql))
     # print(data)
     # print(data)