diff --git a/api/controllers/plan/Report.php b/api/controllers/plan/Report.php index 37410d48..6c290ca8 100644 --- a/api/controllers/plan/Report.php +++ b/api/controllers/plan/Report.php @@ -60,7 +60,8 @@ class Report extends HD_Controller $cust_new = $this->receiver_customers_model->count(array('biz_id' => $v['id'], 'DATE(p_time)' => $day)); //本月线索总数 - $cust_month = $this->receiver_customers_model->count(array('biz_id' => $v['id'], 'MONTH(p_time)' => $month)); + $cust_month = $this->receiver_customers_model->count(array('biz_id' => $v['id'], "DATE_FORMAT(`p_time`, '%Y-%m') = '{$month}'" => nul)); + //今日新增跟进数 $cust_visit = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 1, 'sub_type' => 2, 'target_id >' => 0)); @@ -72,7 +73,7 @@ class Report extends HD_Controller $order_new = $this->receiver_orders_model->count(array('DATE(order_time)' => $day, 'biz_id' => $v['id'], 'status >=' => 0)); //本月订单总数 - $order_month = $this->receiver_orders_model->select(array("DATE_FORMAT(`day`, '%Y-%m') = '{$month}'" => null, 'biz_id' => $v['id'], 'status >=' => 0), '', 0, 0, 'id'); + $order_month = $this->receiver_orders_model->select(array("DATE_FORMAT(`order_time`, '%Y-%m') = '{$month}'" => null, 'biz_id' => $v['id'], 'status >=' => 0), '', 0, 0, 'id'); //本月订单信息完整数