Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=7.4",
"commongateway/corebundle": "^1.1.110 | <2.0",
"commongateway/corebundle": "^1.4.13 | <2.0",
"common-gateway/zgw-bundle": "1.0.50 | ^1.2"
},
"require-dev": {
Expand Down
12 changes: 6 additions & 6 deletions publiccode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ localisation:
dependsOn:
open:
- name: CommonGateway
versionMin: 1.2
versionMax: 1.3
version: 1.2.47
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
- name: CoreBundle
versionMin: 1.2
versionMax: 1.3
version: 1.2.47
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
- name: ZGWBundle
versionMin: 1.0
Expand Down
18 changes: 9 additions & 9 deletions src/Service/ZdsToZgwService.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function zaakIdentificatieActionHandler(array $data, array $config): arra
}

$zaakArray = $this->mappingService->mapping($mapping, $this->data['body']);
$zaken = $this->cacheService->searchObjects(null, ['identificatie' => $zaakArray['identificatie']], [$schema->getId()->toString()])['results'];
$zaken = $this->cacheService->searchObjects(['identificatie' => $zaakArray['identificatie']], [$schema->getId()->toString()])['results'];
if (empty($zaken) === true) {
$this->logger->debug('Creating new case with identifier'.$zaakArray['identificatie']);
$zaak = new ObjectEntity($schema);
Expand Down Expand Up @@ -178,7 +178,7 @@ public function documentIdentificatieActionHandler(array $data, array $config):
}

$documentArray = $this->mappingService->mapping($mapping, $this->data['body']);
$documents = $this->cacheService->searchObjects(null, ['identificatie' => $documentArray['identificatie']], [$schema->getId()->toString()])['results'];
$documents = $this->cacheService->searchObjects(['identificatie' => $documentArray['identificatie']], [$schema->getId()->toString()])['results'];
if (empty($documents) === true) {
$this->logger->debug('Creating new document for identification'.$documentArray['identificatie']);
$document = new ObjectEntity($schema);
Expand Down Expand Up @@ -220,7 +220,7 @@ public function connectEigenschappen(array $zaakArray, ObjectEntity $zaakType):

$eigenschapObjects = $zaakType->getValue('eigenschappen');
foreach ($zaakArray['eigenschappen'] as $key => $eigenschap) {
$eigenschappen = $this->cacheService->searchObjects(null, ['naam' => $eigenschap['eigenschap']['naam'], 'zaaktype' => $zaakType->getSelf()], [$schema->getId()->toString()])['results'];
$eigenschappen = $this->cacheService->searchObjects(['naam' => $eigenschap['eigenschap']['naam'], 'zaaktype' => $zaakType->getSelf()], [$schema->getId()->toString()])['results'];

if (empty($eigenschappen) === false) {
$this->logger->debug('Property has been found, connecting to property');
Expand Down Expand Up @@ -269,7 +269,7 @@ public function connectRolTypes(array $zaakArray, ObjectEntity $zaakType): array

$rolTypeObjects = $zaakType->getValue('roltypen');
foreach ($zaakArray['rollen'] as $key => $role) {
$rollen = $this->cacheService->searchObjects(null, ['omschrijvingGeneriek' => $role['roltype']['omschrijvingGeneriek'], 'zaaktype' => $zaakType->getSelf()], [$schema->getId()->toString()])['results'];
$rollen = $this->cacheService->searchObjects(['omschrijvingGeneriek' => $role['roltype']['omschrijvingGeneriek'], 'zaaktype' => $zaakType->getSelf()], [$schema->getId()->toString()])['results'];

if (empty($rollen) === false) {
$this->logger->debug('Role type has been found, connecting to existing role type');
Expand Down Expand Up @@ -316,7 +316,7 @@ public function convertZaakType(array $zaakArray): ?array
return null;
}

$zaaktypes = $this->cacheService->searchObjects(null, ['identificatie' => $zaakArray['zaaktype']['identificatie']], [$schema->getId()->toString()])['results'];
$zaaktypes = $this->cacheService->searchObjects(['identificatie' => $zaakArray['zaaktype']['identificatie']], [$schema->getId()->toString()])['results'];

if (empty($zaaktypes) === false && count($zaaktypes) > 0) {
$this->logger->debug('Case type found, connecting case to case type');
Expand Down Expand Up @@ -385,7 +385,7 @@ public function zaakActionHandler(array $data, array $config): array
return $this->data;
}

$zaken = $this->cacheService->searchObjects(null, ['identificatie' => $zaakArray['identificatie']], [$schema->getId()->toString()])['results'];
$zaken = $this->cacheService->searchObjects(['identificatie' => $zaakArray['identificatie']], [$schema->getId()->toString()])['results'];

// Create response with created zaaktype if the zaak is not empty and if there is one result.
if (empty($zaken) === false && count($zaken) === 1) {
Expand Down Expand Up @@ -521,7 +521,7 @@ public function convertInformatieobjecttype(array $zaakDocumentArray, ObjectEnti
return null;
}

$nformatieobjecttypes = $this->cacheService->searchObjects(null, ['omschrijving' => $description], [$schema->getId()->toString()])['results'];
$nformatieobjecttypes = $this->cacheService->searchObjects(['omschrijving' => $description], [$schema->getId()->toString()])['results'];

$informatieobjecttypen = [];
// Search levert resultaat op dus haal het bestaande object op.
Expand Down Expand Up @@ -572,7 +572,7 @@ public function getCaseFromDocument(array $zaakDocumentArray): ?ObjectEntity
return null;
}

$zaken = $this->cacheService->searchObjects(null, ['identificatie' => $zaakDocumentArray['zaak']], [$schema->getId()->toString()])['results'];
$zaken = $this->cacheService->searchObjects(['identificatie' => $zaakDocumentArray['zaak']], [$schema->getId()->toString()])['results'];

// Get the zaak id the zaken array is not empty.
if (empty($zaken) === false && count($zaken) === 1) {
Expand Down Expand Up @@ -800,7 +800,7 @@ public function documentActionHandler(array $data, array $config): array
$zaakDocumentArray = $this->convertInformatieobjecttype($zaakDocumentArray, $zaak);

// Search enkelvoudiginformatieobject objects with the identificatie in informatieobject.identificatie.
$documenten = $this->cacheService->searchObjects(null, ['identificatie' => $zaakDocumentArray['informatieobject']['identificatie']], [$schema->getId()->toString()])['results'];
$documenten = $this->cacheService->searchObjects(['identificatie' => $zaakDocumentArray['informatieobject']['identificatie']], [$schema->getId()->toString()])['results'];

// Create response with created zaakinformatieobject if the document is not empty and if there is one result.
if (empty($documenten) === false && count($documenten) === 1) {
Expand Down