Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
f13484e8
Commit
f13484e8
authored
Jul 17, 2019
by
Laurent Lécluse
Browse files
Amélioration de performances pour l'affichage des données personnelles
parent
e28745a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
f13484e8
...
...
@@ -30,6 +30,7 @@ les nouveaux volumes horaires négatifs générés portent maintenant les mêmes
*
Les coordonnées bancaires peuvent être saisies même si elles sont hors zone SEPA (une case à cocher limite le contrôle)
*
L'export PDF des services est maintenant personnalisable.
*
Le pays "France" est détecté automatiquement. Il n'a donc plus besoin d'être identifié via administration/paramètres généraux.
*
Amélioration de performances pour l'affichage des données personnelles
## Notes de mise à jour
...
...
module/Application/src/Application/Service/PaysService.php
View file @
f13484e8
...
...
@@ -18,6 +18,10 @@ class PaysService extends AbstractEntityService
use
ParametresServiceAwareTrait
;
/**
* @var array
*/
private
$idsByLibelle
;
/**
...
...
@@ -49,15 +53,19 @@ class PaysService extends AbstractEntityService
*/
public
function
getIdByLibelle
(
string
$libelle
)
{
$sql
=
'SELECT id FROM pays WHERE ose_divers.str_reduce(libelle_court) = :pays AND histo_destruction IS NULL'
;
if
(
!
isset
(
$this
->
idsByLibelle
[
$libelle
]))
{
$sql
=
'SELECT id FROM pays WHERE ose_divers.str_reduce(libelle_court) = :pays AND histo_destruction IS NULL'
;
$res
=
$this
->
getEntityManager
()
->
getConnection
()
->
fetchAll
(
$sql
,
[
'pays'
=>
Util
::
reduce
(
$libelle
)]);
$res
=
$this
->
getEntityManager
()
->
getConnection
()
->
fetchAll
(
$sql
,
[
'pays'
=>
Util
::
reduce
(
$libelle
)]);
if
(
isset
(
$res
[
0
][
'ID'
])){
return
(
int
)
$res
[
0
][
'ID'
];
if
(
isset
(
$res
[
0
][
'ID'
]))
{
$this
->
idsByLibelle
[
$libelle
]
=
(
int
)
$res
[
0
][
'ID'
];
}
else
{
$this
->
idsByLibelle
[
$libelle
]
=
null
;
}
}
return
null
;
return
$this
->
idsByLibelle
[
$libelle
]
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment