mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 22:04:59 +00:00
minor changes
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators;
|
||||
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\PersonBundle\Export\Declarations;
|
||||
use Chill\PersonBundle\Repository\SocialWork\ResultRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
@@ -21,9 +22,12 @@ final class ResultAggregator implements AggregatorInterface
|
||||
{
|
||||
private ResultRepository $resultRepository;
|
||||
|
||||
public function __construct(ResultRepository $resultRepository)
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
public function __construct(ResultRepository $resultRepository, TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
$this->resultRepository = $resultRepository;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function addRole()
|
||||
@@ -34,7 +38,9 @@ final class ResultAggregator implements AggregatorInterface
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('acpw.results', 'res');
|
||||
$qb->addSelect('res.id as result_aggregator');
|
||||
$qb->join('acpw.goals', 'g');
|
||||
$qb->join('g.results', 'gres');
|
||||
$qb->addSelect('res.id, IDENTITY(g.results) as result_aggregator');
|
||||
|
||||
$groupBy = $qb->getDQLPart('groupBy');
|
||||
|
||||
|
Reference in New Issue
Block a user