diff --git a/api/controllers/plan/Report.php b/api/controllers/plan/Report.php index fa0ef1ea..37410d48 100644 --- a/api/controllers/plan/Report.php +++ b/api/controllers/plan/Report.php @@ -66,13 +66,13 @@ class Report extends HD_Controller $cust_visit = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 1, 'sub_type' => 2, 'target_id >' => 0)); //本月跟进客户数 - $cust_visit_month = $this->receiver_score_log_model->count(array('MONTH(day)' => $month, 'biz_id' => $v['id'], 'type' => 1, 'sub_type' => 2, 'target_id >' => 0), 'target_id'); + $cust_visit_month = $this->receiver_score_log_model->count(array("DATE_FORMAT(`day`, '%Y-%m') = '{$month}'" => null, 'biz_id' => $v['id'], 'type' => 1, 'sub_type' => 2, 'target_id >' => 0), 'target_id'); //今日订单新增数 $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('MONTH(order_time)' => $month, 'biz_id' => $v['id'], 'status >=' => 0), '', 0, 0, 'id'); + $order_month = $this->receiver_orders_model->select(array("DATE_FORMAT(`day`, '%Y-%m') = '{$month}'" => null, 'biz_id' => $v['id'], 'status >=' => 0), '', 0, 0, 'id'); //本月订单信息完整数