mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
DX: fixed complicated comparison to add a group by
This commit is contained in:
parent
1b1aaaa862
commit
07d15f0a68
@ -46,14 +46,7 @@ final class AgentAggregator implements AggregatorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qb->addSelect('caluser.id AS agent_aggregator');
|
$qb->addSelect('caluser.id AS agent_aggregator');
|
||||||
|
|
||||||
$groupBy = $qb->getDQLPart('groupBy');
|
|
||||||
|
|
||||||
if (!empty($groupBy)) {
|
|
||||||
$qb->addGroupBy('agent_aggregator');
|
$qb->addGroupBy('agent_aggregator');
|
||||||
} else {
|
|
||||||
$qb->groupBy('agent_aggregator');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn(): string
|
public function applyOn(): string
|
||||||
|
@ -47,14 +47,7 @@ class CancelReasonAggregator implements AggregatorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator');
|
$qb->addSelect('IDENTITY(cal.cancelReason) as cancel_reason_aggregator');
|
||||||
|
|
||||||
$groupBy = $qb->getDQLPart('groupBy');
|
|
||||||
|
|
||||||
if (!empty($groupBy)) {
|
|
||||||
$qb->addGroupBy('cancel_reason_aggregator');
|
$qb->addGroupBy('cancel_reason_aggregator');
|
||||||
} else {
|
|
||||||
$qb->groupBy('cancel_reason_aggregator');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn(): string
|
public function applyOn(): string
|
||||||
|
@ -46,14 +46,7 @@ final class JobAggregator implements AggregatorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qb->addSelect('IDENTITY(caluser.userJob) as job_aggregator');
|
$qb->addSelect('IDENTITY(caluser.userJob) as job_aggregator');
|
||||||
|
|
||||||
$groupBy = $qb->getDQLPart('groupBy');
|
|
||||||
|
|
||||||
if (!empty($groupBy)) {
|
|
||||||
$qb->addGroupBy('job_aggregator');
|
$qb->addGroupBy('job_aggregator');
|
||||||
} else {
|
|
||||||
$qb->groupBy('job_aggregator');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn(): string
|
public function applyOn(): string
|
||||||
|
@ -46,14 +46,7 @@ final class LocationTypeAggregator implements AggregatorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$qb->addSelect('IDENTITY(calloc.locationType) as location_type_aggregator');
|
$qb->addSelect('IDENTITY(calloc.locationType) as location_type_aggregator');
|
||||||
|
|
||||||
$groupBy = $qb->getDQLPart('groupBy');
|
|
||||||
|
|
||||||
if (!empty($groupBy)) {
|
|
||||||
$qb->addGroupBy('location_type_aggregator');
|
$qb->addGroupBy('location_type_aggregator');
|
||||||
} else {
|
|
||||||
$qb->groupBy('location_type_aggregator');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn(): string
|
public function applyOn(): string
|
||||||
|
@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators;
|
|||||||
use Chill\MainBundle\Export\AggregatorInterface;
|
use Chill\MainBundle\Export\AggregatorInterface;
|
||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
use LogicException;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user