diff --git a/api/controllers/plan/Licheb.php b/api/controllers/plan/Licheb.php index 41c3f04f..a6afe42e 100644 --- a/api/controllers/plan/Licheb.php +++ b/api/controllers/plan/Licheb.php @@ -546,7 +546,9 @@ class Licheb extends HD_Controller if (!$re_sal) {//判断当天是否已加入 $t_follows = $this->mdCustomerVisitData->count(array_merge($where_sal, ['status' => 1])); $h_follows = $this->mdCustomerVisitData->count(array_merge($where_sal, ['status' => 2])); - $w_follows = $this->mdCustomerVisitData->count(array_merge($where_sal, ['status' => 3])); + #$w_follows = $this->mdCustomerVisitData->count(array_merge($where_sal, ['status' => 3])); + #这里的逾期未跟进数 需要把 已改派 的过滤掉 + $w_follows = $this->mdCustomerVisitData->count(array_merge($where_sal, ['status' => 3], ['c_id in (select id from lc_receiver_customers where cs_biz_id >= 0)' => null])); $add_item = ['t_day' => $t_day, 'sales_id' => $sales_id, 'biz_id' => $biz_id, 't_follows' => $t_follows , 'h_follows' => $h_follows, 'w_follows' => $w_follows, 'c_time' => time()]; $add_id = $this->mdCustomerVisitSales->add($add_item);