Skip to content
Snippets Groups Projects
Commit c8c8e11e authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #8759 send doc in maarchParapheur

parent 40256b48
No related branches found
No related tags found
No related merge requests found
...@@ -105,11 +105,11 @@ class MaarchParapheurController ...@@ -105,11 +105,11 @@ class MaarchParapheurController
$encodedZipDocument = MaarchParapheurController::createZip(['filepath' => $filePath, 'filename' => $adrInfo['filename']]); $encodedZipDocument = MaarchParapheurController::createZip(['filepath' => $filePath, 'filename' => $adrInfo['filename']]);
$attachments = [ $attachmentsData = [[
'encodedZipDocument' => $encodedMainZipFile, 'encodedZipDocument' => $encodedMainZipFile,
'subject' => $mainResource[0]['subject'], 'subject' => $mainResource[0]['subject'],
'reference' => $mainResource[0]['alt_identifier'] 'reference' => $mainResource[0]['alt_identifier']
]; ]];
$bodyData = [ $bodyData = [
'reference' => $value['identifier'], 'reference' => $value['identifier'],
...@@ -120,9 +120,9 @@ class MaarchParapheurController ...@@ -120,9 +120,9 @@ class MaarchParapheurController
'sender_entity' => $senderPrimaryEntity['entity_label'], 'sender_entity' => $senderPrimaryEntity['entity_label'],
'processing_user' => $processingUser, 'processing_user' => $processingUser,
'recipient' => trim($mainResource[0]['contact_firstname'] . ' ' . $mainResource[0]['contact_lastname'] . ' ' . $mainResource[0]['contact_society']), 'recipient' => trim($mainResource[0]['contact_firstname'] . ' ' . $mainResource[0]['contact_lastname'] . ' ' . $mainResource[0]['contact_society']),
'limit_data' => $processLimitDate , 'limit_date' => $processLimitDate ,
'encodedZipDocument' => $encodedZipDocument, 'encodedZipDocument' => $encodedZipDocument,
'attachments' => $attachments 'attachments' => $attachmentsData
]; ];
$response = \SrcCore\models\CurlModel::exec([ $response = \SrcCore\models\CurlModel::exec([
...@@ -133,7 +133,7 @@ class MaarchParapheurController ...@@ -133,7 +133,7 @@ class MaarchParapheurController
'bodyData' => $bodyData 'bodyData' => $bodyData
]); ]);
$attachmentToFreeze[$value['res_id']] = $response['id']; $attachmentToFreeze[$value['res_id']] = $response['documentId'];
} }
return $attachmentToFreeze; return $attachmentToFreeze;
......
...@@ -168,7 +168,6 @@ abstract class AttachmentModelAbstract ...@@ -168,7 +168,6 @@ abstract class AttachmentModelAbstract
public static function freezeAttachment(array $aArgs) public static function freezeAttachment(array $aArgs)
{ {
ValidatorModel::notEmpty($aArgs, ['table', 'resId', 'externalId']); ValidatorModel::notEmpty($aArgs, ['table', 'resId', 'externalId']);
ValidatorModel::stringType($aArgs, ['table', 'externalId']);
ValidatorModel::intType($aArgs, ['resId']); ValidatorModel::intType($aArgs, ['resId']);
DatabaseModel::update([ DatabaseModel::update([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment