userlog visit_sales filter cs_biz_id >= 0

This commit is contained in:
qianhy
2023-03-07 09:38:14 +08:00
committed by lccsw
parent 8425211c44
commit c8ab9ab992
+3 -1
View File
@@ -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);