statistics fixbug bill aggs
This commit is contained in:
@@ -674,8 +674,8 @@ class Statistics extends Wxapp{
|
||||
$orders = $this->mdOrders->count($where);
|
||||
$where = [
|
||||
'a.status>=' => 0,
|
||||
'a.order_time>=' => $o_time['s_time'],
|
||||
'a.order_time<=' => $o_time['e_time'],
|
||||
'a.bill_time>=' => $o_time['s_time'],
|
||||
'a.bill_time<=' => $o_time['e_time'],
|
||||
'a.status<>' => 2,
|
||||
'b.pid_status' => 3,
|
||||
'b.status in (1,2)' => null,
|
||||
|
||||
@@ -184,8 +184,8 @@ class Stats_entity{
|
||||
if($type){
|
||||
$where = [
|
||||
'a.status>=' => 0,
|
||||
'a.order_time>=' => $o_time['s_time'],
|
||||
'a.order_time<=' => $o_time['e_time'],
|
||||
'a.bill_time>=' => $o_time['s_time'],
|
||||
'a.bill_time<=' => $o_time['e_time'],
|
||||
'a.status<>' => 2,
|
||||
'b.pid_status' => 3,
|
||||
'b.status in (1,2)' => null,
|
||||
@@ -221,8 +221,8 @@ class Stats_entity{
|
||||
if($type){
|
||||
$where = [
|
||||
'a.status>=' => 0,
|
||||
'a.order_time>=' => $o_time['s_time'],
|
||||
'a.order_time<=' => $o_time['e_time'],
|
||||
'a.bill_time>=' => $o_time['s_time'],
|
||||
'a.bill_time<=' => $o_time['e_time'],
|
||||
'a.status<>' => 2,
|
||||
'b.pid_status' => 3,
|
||||
'b.status in (1,2)' => null,
|
||||
@@ -255,8 +255,8 @@ class Stats_entity{
|
||||
if($type){
|
||||
$where = [
|
||||
'a.status>=' => 0,
|
||||
'a.order_time>=' => $o_time['s_time'],
|
||||
'a.order_time<=' => $o_time['e_time'],
|
||||
'a.bill_time>=' => $o_time['s_time'],
|
||||
'a.bill_time<=' => $o_time['e_time'],
|
||||
'a.status<>' => 2,
|
||||
'b.pid_status' => 3,
|
||||
'b.status in (1,2)' => null,
|
||||
@@ -293,8 +293,8 @@ class Stats_entity{
|
||||
WHERE a.status >= 0
|
||||
AND a.status <> 2
|
||||
AND a.brand_id > 0
|
||||
AND a.order_time>= '{$o_time['s_time']}'
|
||||
AND a.order_time<= '{$o_time['e_time']}'
|
||||
AND a.bill_time>= '{$o_time['s_time']}'
|
||||
AND a.bill_time<= '{$o_time['e_time']}'
|
||||
AND a.customer_id in (select id from lc_receiver_customers where status>=0 and biz_id in (select id from lc_biz where city_id={$city_id} and status=1))
|
||||
AND b.pid_status = 3
|
||||
AND b.status in (1,2)
|
||||
@@ -333,8 +333,8 @@ class Stats_entity{
|
||||
if($type){
|
||||
$where = [
|
||||
'a.status>=' => 0,
|
||||
'a.order_time>=' => $o_time['s_time'],
|
||||
'a.order_time<=' => $o_time['e_time'],
|
||||
'a.bill_time>=' => $o_time['s_time'],
|
||||
'a.bill_time<=' => $o_time['e_time'],
|
||||
'a.status<>' => 2,
|
||||
'b.pid_status' => 3,
|
||||
'b.status in (1,2)' => null,
|
||||
|
||||
Reference in New Issue
Block a user