statistics fixbug bill aggs

This commit is contained in:
qianhy
2023-04-14 14:04:56 +08:00
parent 8bc57b8300
commit 97908cee90
2 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -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,
+10 -10
View File
@@ -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,