Reference et Commande pour l'enrichissement
This commit is contained in:
parent
219f23f227
commit
54c828c7ff
@ -80,9 +80,13 @@ class EnrichissementController extends Zend_Controller_Action
|
||||
|
||||
$structure = json_decode($criteres->criteres, true);
|
||||
|
||||
//@todo : comment envoyé la structure de la bdd dans fields
|
||||
require_once 'Scores/Field.php';
|
||||
$field = new Fields();
|
||||
|
||||
//Actualisation du comptage
|
||||
require_once 'Scores/Ciblage.php';
|
||||
$ciblage = new Ciblage($structure);
|
||||
$ciblage = new Ciblage($field->getValues());
|
||||
$infosExtraction = $ciblage->extract();
|
||||
|
||||
//Enregistrement du nouveau comptage
|
||||
@ -132,12 +136,32 @@ class EnrichissementController extends Zend_Controller_Action
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$request = $this->getRequest();
|
||||
$id = $request->getParam('id', null);
|
||||
$this->view->assign('id', $id);
|
||||
|
||||
|
||||
|
||||
$idCritere = $request->getParam('id', null);
|
||||
|
||||
$comptagesM = new Table_Comptages();
|
||||
$sql = $comptagesM->select()
|
||||
->where('idDefinition = ?', $idCritere)
|
||||
->order('dateAjout DESC')
|
||||
->limit(1);
|
||||
$comptages = $comptagesM->fetchAll($sql);
|
||||
if ( $comptages->count()>0 ) {
|
||||
$item = $comptages[0];
|
||||
//Si le ciblage n'est pas du jour, refaire le comptage par rapport aux critères de ciblage
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->view->assign('resultat', $item['resultat']);
|
||||
$this->view->assign('uniteInsee', $item['uniteInsee']);
|
||||
|
||||
//Récupération du profil de l'utilisateur
|
||||
|
||||
//Calcul du prix
|
||||
|
||||
$this->view->assign('id', $item['id']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user