作者 刘锟

update

@@ -528,14 +528,15 @@ class InquiryForwardLogic extends BaseLogic @@ -528,14 +528,15 @@ class InquiryForwardLogic extends BaseLogic
528 { 528 {
529 $data = Cache::get('inquiry_manage_count'); 529 $data = Cache::get('inquiry_manage_count');
530 if (!$data) { 530 if (!$data) {
531 - $manage_ids = ForwardCount::select('manage_id')->orderBy('manage_id', 'asc')->distinct()->pluck('manage_id')->toArray();  
532 $manageModel = new Manage(); 531 $manageModel = new Manage();
533 532
534 //月统计 533 //月统计
  534 + $last_year_month = date('Y-m', strtotime('-11 months'));
  535 + $manage_ids = ForwardCount::select('manage_id')->where('created_at', '>', $last_year_month . '-02')->where('count', '>', 0)->orderBy('manage_id', 'asc')->distinct()->pluck('manage_id')->toArray();
  536 +
535 $data_month = []; 537 $data_month = [];
536 $data_month_total = []; 538 $data_month_total = [];
537 $now_month = date('Y-m'); 539 $now_month = date('Y-m');
538 - $last_year_month = date('Y-m', strtotime('-11 months'));  
539 while ($last_year_month <= $now_month) { 540 while ($last_year_month <= $now_month) {
540 $month_arr = explode('-', $last_year_month); 541 $month_arr = explode('-', $last_year_month);
541 $year = $month_arr[0]; 542 $year = $month_arr[0];
@@ -554,10 +555,12 @@ class InquiryForwardLogic extends BaseLogic @@ -554,10 +555,12 @@ class InquiryForwardLogic extends BaseLogic
554 555
555 556
556 //周统计 557 //周统计
  558 + $last_week_day = date('Y-m-d', strtotime('-1 week'));
  559 + $manage_ids = ForwardCount::select('manage_id')->where('created_at', '>', $last_week_day . ' +1 day')->where('count', '>', 0)->orderBy('manage_id', 'asc')->distinct()->pluck('manage_id')->toArray();
  560 +
557 $data_week = []; 561 $data_week = [];
558 $data_week_total = []; 562 $data_week_total = [];
559 $now_day = date('Y-m-d'); 563 $now_day = date('Y-m-d');
560 - $last_week_day = date('Y-m-d', strtotime('-1 week'));  
561 while ($last_week_day < $now_day) { 564 while ($last_week_day < $now_day) {
562 $day_arr = explode('-', $last_week_day); 565 $day_arr = explode('-', $last_week_day);
563 $year = $day_arr[0]; 566 $year = $day_arr[0];