[export][person] Feature: add filter and aggregator by geographical unit on person

This commit is contained in:
2022-10-04 22:17:16 +02:00
parent fc567868c1
commit 432acc0ace
7 changed files with 327 additions and 1 deletions

View File

@@ -53,6 +53,13 @@ class GeographicalUnit
return $this->id;
}
protected function setId(int $id): self
{
$this->id = $id;
return $this;
}
public function getUnitName(): ?string
{
return $this->unitName;

View File

@@ -3,6 +3,8 @@
namespace Chill\MainBundle\Repository;
use Chill\MainBundle\Entity\GeographicalUnit;
use Chill\MainBundle\Entity\GeographicalUnitDTO;
use Chill\MainBundle\Entity\GeographicalUnitLayer;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
@@ -33,7 +35,7 @@ class GeographicalUnitRepository implements GeographicalUnitRepositoryInterface
{
return $this->repository
->createQueryBuilder('gu')
->addSelect('PARTIAL gu.{id,unitName,unitRefId,layer}')
->select('PARTIAL gu.{id,unitName,unitRefId,layer}')
->addOrderBy('IDENTITY(gu.layer)')
->addOrderBy(('gu.unitName'))
->getQuery()