Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
7e8faed6
Commit
7e8faed6
authored
Jun 23, 2020
by
Antony Le Courtes
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#29565
parent
cd045f3c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
module/Application/src/Application/Service/ContratService.php
+3
-4
3 additions, 4 deletions
...le/Application/src/Application/Service/ContratService.php
module/Application/src/Application/Service/PieceJointeService.php
+8
-6
8 additions, 6 deletions
...pplication/src/Application/Service/PieceJointeService.php
with
11 additions
and
10 deletions
module/Application/src/Application/Service/ContratService.php
+
3
−
4
View file @
7e8faed6
...
...
@@ -28,7 +28,6 @@ class ContratService extends AbstractEntityService
use
FichierServiceAwareTrait
;
/**
* retourne la classe des entités
*
...
...
@@ -87,7 +86,7 @@ class ContratService extends AbstractEntityService
*/
public
function
orderBy
(
QueryBuilder
$qb
=
null
,
$alias
=
null
)
{
list
(
$qb
,
$alias
)
=
$this
->
initQuery
(
$qb
,
$alias
);
[
$qb
,
$alias
]
=
$this
->
initQuery
(
$qb
,
$alias
);
$qb
->
addOrderBy
(
"
$alias
.intervenant,
$alias
.typeContrat,
$alias
.numeroAvenant"
);
...
...
@@ -107,7 +106,7 @@ class ContratService extends AbstractEntityService
*/
public
function
finderByValidation
(
$validation
,
QueryBuilder
$qb
=
null
,
$alias
=
null
)
{
list
(
$qb
,
$alias
)
=
$this
->
initQuery
(
$qb
,
$alias
);
[
$qb
,
$alias
]
=
$this
->
initQuery
(
$qb
,
$alias
);
if
(
$validation
instanceof
\Application\Entity\Db\Validation
)
{
$qb
...
...
@@ -173,7 +172,7 @@ class ContratService extends AbstractEntityService
foreach
(
$files
as
$file
)
{
$path
=
$file
[
'tmp_name'
];
$nomFichier
=
$file
[
'name'
];
$nomFichier
=
str_replace
([
','
,
';'
,
':'
],
''
,
$file
[
'name'
]
)
;
$typeFichier
=
$file
[
'type'
];
$tailleFichier
=
$file
[
'size'
];
...
...
This diff is collapsed.
Click to expand it.
module/Application/src/Application/Service/PieceJointeService.php
+
8
−
6
View file @
7e8faed6
...
...
@@ -126,6 +126,7 @@ class PieceJointeService extends AbstractEntityService
}
/**
* @param Intervenant $intervenant
*
...
...
@@ -155,6 +156,7 @@ class PieceJointeService extends AbstractEntityService
}
/**
* @param Intervenant $intervenant
*
...
...
@@ -194,8 +196,7 @@ class PieceJointeService extends AbstractEntityService
$pj
=
$pjf
->
getPieceJointe
();
$pj
->
annee
=
$pjf
->
getAnnee
();
//Gérer les cas où plusieurs PJ sont éligible mais sans date d'archive, on prend la première uniquement.
if
(
!
array_key_exists
(
$pj
->
getType
()
->
getId
(),
$result
))
{
if
(
!
array_key_exists
(
$pj
->
getType
()
->
getId
(),
$result
))
{
$result
[
$pj
->
getType
()
->
getId
()]
=
$pj
;
}
}
...
...
@@ -233,6 +234,8 @@ class PieceJointeService extends AbstractEntityService
return
$validation
;
}
public
function
archiver
(
PieceJointe
$pj
)
{
$annee
=
$this
->
getServiceContext
()
->
getAnnee
();
...
...
@@ -241,7 +244,6 @@ class PieceJointeService extends AbstractEntityService
$this
->
getEntityManager
()
->
flush
();
return
$pj
;
}
...
...
@@ -298,7 +300,7 @@ class PieceJointeService extends AbstractEntityService
foreach
(
$files
as
$file
)
{
$path
=
$file
[
'tmp_name'
];
$nomFichier
=
$file
[
'name'
];
$nomFichier
=
str_replace
([
','
,
';'
,
':'
],
''
,
$file
[
'name'
]
)
;
$typeFichier
=
$file
[
'type'
];
$tailleFichier
=
$file
[
'size'
];
...
...
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