issue #0001635 : Fetch the row with the good method
This commit is contained in:
parent
5ef04f1cfb
commit
4c3a34ea59
@ -2262,7 +2262,7 @@ class Saisie extends WsScore
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cutoffM = new Application_Model_JoScoresCutoff();
|
$cutoffM = new Application_Model_JoScoresCutoff();
|
||||||
$row = $cutoffM->find($infos['siren'])->current();
|
$row = $cutoffM->fetchRow($infos['siren']);
|
||||||
if ( null === $row ) {
|
if ( null === $row ) {
|
||||||
$data = array_merge($data, array('dateInsert'=>date('YmdHis')));
|
$data = array_merge($data, array('dateInsert'=>date('YmdHis')));
|
||||||
try {
|
try {
|
||||||
@ -2325,6 +2325,34 @@ class Saisie extends WsScore
|
|||||||
if ( null === $row ) {
|
if ( null === $row ) {
|
||||||
$result = false;
|
$result = false;
|
||||||
} else {
|
} else {
|
||||||
|
if ( $this->tabInfoUser['typeScore']==20 ) {
|
||||||
|
$convert100to20 = array(
|
||||||
|
0 => 0,
|
||||||
|
19 => 1,
|
||||||
|
29 => 2,
|
||||||
|
34 => 3,
|
||||||
|
35 => 4,
|
||||||
|
38 => 5,
|
||||||
|
40 => 6,
|
||||||
|
44 => 7,
|
||||||
|
45 => 8,
|
||||||
|
49 => 9,
|
||||||
|
50 => 10,
|
||||||
|
54 => 11,
|
||||||
|
56 => 12,
|
||||||
|
59 => 13,
|
||||||
|
61 => 14,
|
||||||
|
64 => 15,
|
||||||
|
68 => 16,
|
||||||
|
72 => 17,
|
||||||
|
79 => 18,
|
||||||
|
80 => 19,
|
||||||
|
90 => 20,
|
||||||
|
);
|
||||||
|
$row->scoreSolv = $convert100to20[$row->scoreSolv];
|
||||||
|
$row->scoreDir = $convert100to20[$row->scoreDir];
|
||||||
|
$row->scoreConf = $convert100to20[$row->scoreConf];
|
||||||
|
}
|
||||||
$result = json_encode(array(
|
$result = json_encode(array(
|
||||||
'siren' => $row->siren,
|
'siren' => $row->siren,
|
||||||
'encours' => $row->encours,
|
'encours' => $row->encours,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user