Affichage des enrichissements
This commit is contained in:
parent
24eb5def51
commit
878b621a08
@ -80,7 +80,37 @@ class DashboardController extends Libs_Controller
|
||||
*/
|
||||
public function enrichissementsAction()
|
||||
{
|
||||
$enrichissementsM = new Table_EnrichissementCommandes();
|
||||
|
||||
|
||||
$sql = $enrichissementsM->select()
|
||||
->setIntegrityCheck(false)
|
||||
->from(
|
||||
array('p'=> 'enrichissement_profils'),
|
||||
array('idClient', 'login')
|
||||
)
|
||||
->join(
|
||||
array('c'=> 'enrichissement_commandes'), 'p.id = c.idProfil ',
|
||||
array('id', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
|
||||
)
|
||||
->where('c.dateStop = ?', 0);
|
||||
$encours = $enrichissementsM->fetchAll($sql);
|
||||
$this->view->assign('encours', $encours);
|
||||
|
||||
|
||||
$sql = $enrichissementsM->select()
|
||||
->setIntegrityCheck(false)
|
||||
->from(
|
||||
array('p'=> 'enrichissement_profils'),
|
||||
array('idClient', 'login')
|
||||
)
|
||||
->join(
|
||||
array('c'=> 'enrichissement_commandes'), 'p.id = c.idProfil ',
|
||||
array('id', 'fichier', 'nbLigneTotales', 'nbLigneTraites', 'error', 'dateAdded', 'dateStart', 'dateStop')
|
||||
)
|
||||
->where('c.dateStop != ?', 0);
|
||||
$fini = $enrichissementsM->fetchAll($sql);
|
||||
$this->view->assign('fini', $fini);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,7 +118,7 @@ class DashboardController extends Libs_Controller
|
||||
*/
|
||||
public function enrichissementAction()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,64 @@ Enrichissement de fichier
|
||||
|
||||
<h2>Fichiers en cours d'enrichissement</h2>
|
||||
|
||||
<?php if(count($this->encours) > 0):?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Référence</th>
|
||||
<th>Nombre de lignes totales</th>
|
||||
<th>Nombre de lignes traitées</th>
|
||||
<th>Date</th>
|
||||
<th>Etat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->encours as $item):?>
|
||||
<tr>
|
||||
<td><?=$item['reference']?></td>
|
||||
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
|
||||
<td><?=number_format($item['nbLigneTraites'], 0, ',', ' ')?></td>
|
||||
<td><?=$item['dateAdded']?></td>
|
||||
<td>
|
||||
<?php if ( $item['dateStart']!='0000-00-00 00:00:00' ) {?>
|
||||
En cours de traitement
|
||||
<?php } else {?>
|
||||
En attente de traitement
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<p>Aucun enrichissement en cours.<p>
|
||||
<?php endif;?>
|
||||
|
||||
<h2>Fichiers enrichis</h2>
|
||||
|
||||
|
||||
<?php if(count($this->fini) > 0):?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Référence</th>
|
||||
<th>Nombre de lignes totales</th>
|
||||
<th>Date</th>
|
||||
<th>Fichier</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($this->fini as $item):?>
|
||||
<tr>
|
||||
<td><?=$item['reference']?></td>
|
||||
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
|
||||
<td><?=$item['dateAdded']?></td>
|
||||
<td><?=$item['fichier']?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else:?>
|
||||
<p>Aucun enrichissement.<p>
|
||||
<?php endif;?>
|
||||
|
||||
</div>
|
@ -27,7 +27,7 @@
|
||||
<th>Nombre d'entité</th>
|
||||
<th>Unité Insee</th>
|
||||
<th>Date</th>
|
||||
<th colspan="4"></th>
|
||||
<th colspan="4"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user