在这种情况下,我是新手。我创建一个路由和控制器。这是我的代码:
<?php
// /src/Acme/DemoBundle/Controller/MediaCRUDController.php
namespace AppBundle\Controller;
use Sonata\AdminBundle\Controller\CRUDController;
class RatingController extends CRUDController
{
public function indexAction()
{
eturn $this->render('CCApplicationBundle:Default:rating.html.twig');
}
}
和我的路线:
admin_dashboard_rating:
path: /rating
defaults: { _controller: AppBundle:Rating:index }
有没有办法嵌入指向奏鸣曲管理员的链接?
请帮助。
谢谢
答案 0 :(得分:0)
在您的set @mydate = '2020-03-18';
select
circle_name,
max(case when date = @mydate then subscriber end) current_capacity,
100 * sum(case when date = @mydate - interval 2 day then subscriber end)
/ sum(case when date = @mydate - interval 2 day then subs_capacity end) d_2,
100 * sum(case when date = @mydate - interval 1 day then subscriber end)
/ sum(case when date = @mydate - interval 1 day then subs_capacity end) d_1,
100 * sum(case when date = @mydate then subscriber end)
/ sum(case when date = @mydate then subs_capacity end) d_0
from circle
group by circle_name;
配置文件中:
| circle_name | current_capacity | d_2 | d_1 | d_0 |
| ----------- | ---------------- | ------- | ------- | ------- |
| AP | 758415 | 90.8422 | 91.1373 | 91.3753 |
| AS | 764976 | 83.461 | 83.2508 | 82.7001 |
| BH | 807447 | 84.5168 | 86.2083 | 85.8986 |
| CH | 785384 | 87.4384 | 87.2934 | 87.2649 |
| DL | 859161 | 85.9683 | 85.5766 | 85.9161 |
| GJ | 882817 | 85.6419 | 85.7533 | 86.1285 |
| HP | 203300 | 80.9292 | 80.9608 | 81.32 |
| HR | 255511 | 84.9163 | 85.1213 | 85.1703 |
| JK | 592271 | 84.244 | 84.2937 | 84.6101 |
| KK | 729628 | 88.0607 | 88.1499 | 87.907 |
| KL | 793872 | 80.0359 | 79.5544 | 79.3872 |
| KO | 847638 | 84.6341 | 84.6501 | 84.7638 |
| MB | 687501 | 87.8208 | 85.9449 | 85.9376 |
| MH | 886554 | 95.8487 | 95.6997 | 88.6554 |
| MP | 821474 | 83.1335 | 83.3047 | 83.8239 |
| NE | 824807 | 87.5708 | 87.5969 | 86.8218 |
| OR | 710822 | 84.5128 | 85.2319 | 83.6261 |
| PB | 194300 | 88.798 | 96.5235 | 97.15 |
| RJ | 840310 | 82.438 | 83.7309 | 84.031 |
| TN | 725307 | 90.8855 | 90.7334 | 90.6634 |
| UE | 903366 | 89.8577 | 90.0483 | 90.3366 |
| UW | 729154 | 98.9529 | 87.1339 | 87.8499 |
| WB | 0 | 0 | 0 | 0 |