Method getOld : récupération des vieux fichiers
This commit is contained in:
parent
1de181e007
commit
ddc583d1ca
@ -10,11 +10,29 @@ class FluxFileoutRepository extends EntityRepository
|
||||
*/
|
||||
public function getNotSent()
|
||||
{
|
||||
$dql = "SELECT f FROM Application\Entity\FluxFileout f WHERE f.dateend!=:dateEnd AND f.depotdate=:depotDate";
|
||||
$dql = "SELECT f FROM Application\Entity\FluxFileout f WHERE ".
|
||||
"f.dateend!=:dateEnd AND f.depotdate=:depotDate";
|
||||
$query = $this->getEntityManager()->createQuery($dql)
|
||||
->setParameter('dateEnd', '0000-00-00 00:00:00')
|
||||
->setParameter('depotDate', '0000-00-00 00:00:00');
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste les fichiers plus vieux que la date spécifiée
|
||||
* @param string $date
|
||||
*/
|
||||
public function getOld($date)
|
||||
{
|
||||
$dql = "SELECT f FROM Application\Entity\FluxFileout f WHERE ".
|
||||
"f.depotdate BETWEEN :depotDateStart AND :depotDateEnd AND ".
|
||||
"f.depotdateread!=0 AND f.depotdateread<:depotDateRead";
|
||||
$query = $this->getEntityManager()->createQuery($dql)
|
||||
->setParameter('depotDateStart', date('Ym').'01000000')
|
||||
->setParameter('depotDateEnd', date('Ym').'31235959')
|
||||
->setParameter('depotDateRead', $date);
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user