Commit 2babca59 by mushishixian

统计问题

parent 99849ce7
......@@ -89,6 +89,13 @@ class SupplierStatisticsService
//显示默认的数据(有权限逻辑)
$filter = new SupplierFilter();
$model = $model->where('supplier_code', '!=', '');
if ($type=='contact_no_complete') {
// dd($filter->defaultFilter($model, $type)->count(DB::raw("distinct(lie_supplier_channel.supplier_id)")));
$subQuery = $filter->defaultFilter($model, $type);
// dd($subQuery->toSql());
// return DB::connection('web')->table(DB::raw("({$subQuery->toSql()}) as sub"))->count();
return $subQuery->get()->count();
}
return $filter->defaultFilter($model, $type)->count();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment