Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
ed711821
Verified
Commit
ed711821
authored
5 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #10633 TIME 0:15 Action visa
parent
88bc92a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/action/controllers/ActionMethodController.php
+28
-3
28 additions, 3 deletions
src/app/action/controllers/ActionMethodController.php
src/app/action/controllers/PreProcessActionController.php
+1
-2
1 addition, 2 deletions
src/app/action/controllers/PreProcessActionController.php
with
29 additions
and
5 deletions
src/app/action/controllers/ActionMethodController.php
+
28
−
3
View file @
ed711821
...
@@ -16,6 +16,7 @@ use AcknowledgementReceipt\models\AcknowledgementReceiptModel;
...
@@ -16,6 +16,7 @@ use AcknowledgementReceipt\models\AcknowledgementReceiptModel;
use
Action\models\ActionModel
;
use
Action\models\ActionModel
;
use
Action\models\BasketPersistenceModel
;
use
Action\models\BasketPersistenceModel
;
use
Action\models\ResMarkAsReadModel
;
use
Action\models\ResMarkAsReadModel
;
use
Attachment\models\AttachmentModel
;
use
Entity\controllers\ListInstanceController
;
use
Entity\controllers\ListInstanceController
;
use
Entity\models\ListInstanceModel
;
use
Entity\models\ListInstanceModel
;
use
ExternalSignatoryBook\controllers\MaarchParapheurController
;
use
ExternalSignatoryBook\controllers\MaarchParapheurController
;
...
@@ -48,6 +49,7 @@ class ActionMethodController
...
@@ -48,6 +49,7 @@ class ActionMethodController
'createAcknowledgementReceiptsAction'
=>
'createAcknowledgementReceipts'
,
'createAcknowledgementReceiptsAction'
=>
'createAcknowledgementReceipts'
,
'updateAcknowledgementSendDateAction'
=>
'updateAcknowledgementSendDateAction'
,
'updateAcknowledgementSendDateAction'
=>
'updateAcknowledgementSendDateAction'
,
'sendShippingAction'
=>
'createMailevaShippings'
,
'sendShippingAction'
=>
'createMailevaShippings'
,
'sendSignatureBookAction'
=>
'sendSignatureBook'
,
'noConfirmAction'
=>
null
'noConfirmAction'
=>
null
];
];
...
@@ -253,8 +255,6 @@ class ActionMethodController
...
@@ -253,8 +255,6 @@ class ActionMethodController
ValidatorModel
::
intVal
(
$args
,
[
'resId'
]);
ValidatorModel
::
intVal
(
$args
,
[
'resId'
]);
ValidatorModel
::
arrayType
(
$args
,
[
'data'
]);
ValidatorModel
::
arrayType
(
$args
,
[
'data'
]);
$currentUser
=
UserModel
::
getByLogin
([
'login'
=>
$GLOBALS
[
'userId'
],
'select'
=>
[
'id'
]]);
$listInstances
=
[];
$listInstances
=
[];
if
(
!
empty
(
$args
[
'data'
][
'onlyRedirectDest'
]))
{
if
(
!
empty
(
$args
[
'data'
][
'onlyRedirectDest'
]))
{
if
(
count
(
$args
[
'data'
][
'listInstances'
])
==
1
)
{
if
(
count
(
$args
[
'data'
][
'listInstances'
])
==
1
)
{
...
@@ -263,7 +263,7 @@ class ActionMethodController
...
@@ -263,7 +263,7 @@ class ActionMethodController
}
}
$listInstances
=
array_merge
(
$listInstances
,
$args
[
'data'
][
'listInstances'
]);
$listInstances
=
array_merge
(
$listInstances
,
$args
[
'data'
][
'listInstances'
]);
$controller
=
ListInstanceController
::
updateListInstance
([
'data'
=>
[[
'resId'
=>
$args
[
'resId'
],
'listInstances'
=>
$listInstances
]],
'userId'
=>
$
currentUser
[
'id'
]]);
$controller
=
ListInstanceController
::
updateListInstance
([
'data'
=>
[[
'resId'
=>
$args
[
'resId'
],
'listInstances'
=>
$listInstances
]],
'userId'
=>
$
GLOBALS
[
'id'
]]);
if
(
!
empty
(
$controller
[
'errors'
]))
{
if
(
!
empty
(
$controller
[
'errors'
]))
{
return
[
'errors'
=>
[
$controller
[
'errors'
]]];
return
[
'errors'
=>
[
$controller
[
'errors'
]]];
}
}
...
@@ -271,6 +271,31 @@ class ActionMethodController
...
@@ -271,6 +271,31 @@ class ActionMethodController
return
true
;
return
true
;
}
}
public
function
sendSignatureBook
(
array
$args
)
{
ValidatorModel
::
notEmpty
(
$args
,
[
'resId'
]);
ValidatorModel
::
intVal
(
$args
,
[
'resId'
]);
$signableAttachmentsTypes
=
[];
$attachmentsTypes
=
AttachmentModel
::
getAttachmentsTypesByXML
();
foreach
(
$attachmentsTypes
as
$key
=>
$type
)
{
if
(
$type
[
'sign'
])
{
$signableAttachmentsTypes
[]
=
$key
;
}
}
$attachments
=
AttachmentModel
::
get
([
'select'
=>
[
1
],
'where'
=>
[
'res_id_master = ?'
,
'attachment_type in (?)'
,
'in_signature_book = ?'
,
'status not in (?)'
],
'data'
=>
[
$args
[
'resId'
],
$signableAttachmentsTypes
,
true
,
[
'OBS'
,
'DEL'
,
'FRZ'
]]
]);
if
(
empty
(
$attachments
))
{
return
[
'errors'
=>
[
'No available attachments'
]];
}
return
true
;
}
public
static
function
sendExternalNoteBookAction
(
array
$args
)
public
static
function
sendExternalNoteBookAction
(
array
$args
)
{
{
ValidatorModel
::
notEmpty
(
$args
,
[
'resId'
]);
ValidatorModel
::
notEmpty
(
$args
,
[
'resId'
]);
...
...
This diff is collapsed.
Click to expand it.
src/app/action/controllers/PreProcessActionController.php
+
1
−
2
View file @
ed711821
...
@@ -834,8 +834,7 @@ class PreProcessActionController
...
@@ -834,8 +834,7 @@ class PreProcessActionController
$attachments
=
AttachmentModel
::
get
([
$attachments
=
AttachmentModel
::
get
([
'select'
=>
[
1
],
'select'
=>
[
1
],
'where'
=>
[
'res_id_master = ?'
,
'attachment_type in (?)'
,
'in_signature_book = ?'
,
'status not in (?)'
],
'where'
=>
[
'res_id_master = ?'
,
'attachment_type in (?)'
,
'in_signature_book = ?'
,
'status not in (?)'
],
'data'
=>
[
$resId
,
$signableAttachmentsTypes
,
true
,
[
'OBS'
,
'DEL'
,
'FRZ'
]],
'data'
=>
[
$resId
,
$signableAttachmentsTypes
,
true
,
[
'OBS'
,
'DEL'
,
'FRZ'
]]
'groupBy'
=>
[
'res_id_master'
]
]);
]);
if
(
empty
(
$attachments
))
{
if
(
empty
(
$attachments
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment