mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
implement new export service for accompanyingcourse exports
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -29,10 +30,14 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
protected EntityRepository $repository;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->repository = $em->getRepository(AccompanyingPeriod::class);
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
@@ -111,6 +116,8 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
|
||||
->setParameter('count_acp_step', AccompanyingPeriod::STEP_DRAFT)
|
||||
->setParameter('authorized_centers', $centers);
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb->select('COUNT(DISTINCT acp.id) AS export_result');
|
||||
|
||||
return $qb;
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -28,10 +29,14 @@ class CountAccompanyingPeriodWork implements ExportInterface, GroupedExportInter
|
||||
{
|
||||
protected EntityManagerInterface $em;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
@@ -112,6 +117,8 @@ class CountAccompanyingPeriodWork implements ExportInterface, GroupedExportInter
|
||||
|
||||
$qb->select('COUNT(DISTINCT acpw.id) as export_result');
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -27,10 +28,14 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->entityManager = $em;
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -110,6 +115,8 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
|
||||
)
|
||||
->setParameter('authorized_centers', $centers);
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb->select('COUNT(DISTINCT workeval.id) AS export_result');
|
||||
|
||||
return $qb;
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -29,10 +30,14 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->repository = $em->getRepository(AccompanyingPeriod::class);
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -111,6 +116,8 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
|
||||
)
|
||||
)->setParameter('authorized_centers', $centers);
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb->select('COUNT(DISTINCT person.id) AS export_result');
|
||||
|
||||
return $qb;
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Entity\Address;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\MainBundle\Export\Helper\DateTimeHelper;
|
||||
@@ -52,6 +53,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
private EntityManagerInterface $entityManager,
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper,
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -132,6 +134,8 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
|
||||
$this->listAccompanyingPeriodHelper->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb
|
||||
->addOrderBy('acp.openingDate')
|
||||
->addOrderBy('acp.closingDate')
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\MainBundle\Export\Helper\AggregateStringHelper;
|
||||
@@ -100,6 +101,8 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
|
||||
|
||||
private UserHelper $userHelper;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $entityManager,
|
||||
DateTimeHelper $dateTimeHelper,
|
||||
@@ -112,7 +115,8 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
|
||||
SocialActionRender $socialActionRender,
|
||||
RollingDateConverterInterface $rollingDateConverter,
|
||||
AggregateStringHelper $aggregateStringHelper,
|
||||
SocialActionRepository $socialActionRepository
|
||||
SocialActionRepository $socialActionRepository,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->entityManager = $entityManager;
|
||||
$this->dateTimeHelper = $dateTimeHelper;
|
||||
@@ -126,6 +130,7 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
|
||||
$this->rollingDateConverter = $rollingDateConverter;
|
||||
$this->aggregateStringHelper = $aggregateStringHelper;
|
||||
$this->socialActionRepository = $socialActionRepository;
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -291,6 +296,8 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac
|
||||
->setParameter('authorized_centers', $centers)
|
||||
->setParameter('calc_date', $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
return $qb;
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
use Chill\MainBundle\Export\Helper\AggregateStringHelper;
|
||||
@@ -90,6 +91,8 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
|
||||
|
||||
private UserHelper $userHelper;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $entityManager,
|
||||
SocialIssueRender $socialIssueRender,
|
||||
@@ -101,7 +104,8 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
|
||||
DateTimeHelper $dateTimeHelper,
|
||||
TranslatableStringExportLabelHelper $translatableStringExportLabelHelper,
|
||||
AggregateStringHelper $aggregateStringHelper,
|
||||
RollingDateConverterInterface $rollingDateConverter
|
||||
RollingDateConverterInterface $rollingDateConverter,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->entityManager = $entityManager;
|
||||
$this->socialIssueRender = $socialIssueRender;
|
||||
@@ -114,6 +118,7 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
|
||||
$this->translatableStringExportLabelHelper = $translatableStringExportLabelHelper;
|
||||
$this->aggregateStringHelper = $aggregateStringHelper;
|
||||
$this->rollingDateConverter = $rollingDateConverter;
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -270,6 +275,8 @@ class ListEvaluation implements ListInterface, GroupedExportInterface
|
||||
->setParameter('authorized_centers', $centers)
|
||||
->setParameter('calc_date', $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date']));
|
||||
|
||||
return $qb;
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -48,14 +49,18 @@ class ListPersonHavingAccompanyingPeriod implements ExportElementValidatedInterf
|
||||
|
||||
private ListPersonHelper $listPersonHelper;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
ExportAddressHelper $addressHelper,
|
||||
ListPersonHelper $listPersonHelper,
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->addressHelper = $addressHelper;
|
||||
$this->listPersonHelper = $listPersonHelper;
|
||||
$this->entityManager = $em;
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -190,6 +195,8 @@ class ListPersonHavingAccompanyingPeriod implements ExportElementValidatedInterf
|
||||
|
||||
$this->listPersonHelper->addSelect($qb, $fields, $data['address_date']);
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb
|
||||
->addOrderBy('person.lastName')
|
||||
->addOrderBy('person.firstName')
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportElementValidatedInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -50,6 +51,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
|
||||
private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -133,6 +135,8 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
|
||||
$this->listPersonHelper->addSelect($qb, ListPersonHelper::FIELDS, $this->rollingDateConverter->convert($data['address_date']));
|
||||
$this->listAccompanyingPeriodHelper->addSelectClauses($qb, $this->rollingDateConverter->convert($data['address_date']));
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
$qb
|
||||
->addOrderBy('person.lastName')
|
||||
->addOrderBy('person.firstName')
|
||||
|
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Export\Export;
|
||||
|
||||
use Chill\MainBundle\Export\AccompanyingCourseExportHelper;
|
||||
use Chill\MainBundle\Export\ExportInterface;
|
||||
use Chill\MainBundle\Export\FormatterInterface;
|
||||
use Chill\MainBundle\Export\GroupedExportInterface;
|
||||
@@ -31,10 +32,14 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
|
||||
private AccompanyingCourseExportHelper $accompanyingCourseExportHelper;
|
||||
|
||||
public function __construct(
|
||||
EntityManagerInterface $em
|
||||
EntityManagerInterface $em,
|
||||
AccompanyingCourseExportHelper $accompanyingCourseExportHelper
|
||||
) {
|
||||
$this->repository = $em->getRepository(AccompanyingPeriod::class);
|
||||
$this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
@@ -142,6 +147,8 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn
|
||||
->setParameter('count_acp_step', AccompanyingPeriod::STEP_DRAFT)
|
||||
->setParameter('authorized_centers', $centers);
|
||||
|
||||
$this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user