Saisie Bilan : sql format

This commit is contained in:
Michael RICOIS 2015-01-06 21:37:24 +00:00
parent 9db0232201
commit e8bbf842da

View File

@ -14,7 +14,7 @@ class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
* @param unknown_type $bilanDuree * @param unknown_type $bilanDuree
*/ */
public function setInformations($cliendId, $utilisateurId, $utilisateurLogin, $email, $method, $confidentiel, $siren, $bilanCloture, $format, $bilanDuree) public function setInformations($cliendId, $utilisateurId, $utilisateurLogin, $email, $method, $confidentiel, $siren, $bilanCloture, $format, $bilanDuree)
{ {
$env = 'PRD'; $env = 'PRD';
$data = array( $data = array(
'clientId' => $cliendId, 'clientId' => $cliendId,
@ -30,15 +30,15 @@ class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
'format' => $format, 'format' => $format,
'bilanDuree' => $bilanDuree, 'bilanDuree' => $bilanDuree,
'dateInsert' => date('Y-m-d H:i:s'), 'dateInsert' => date('Y-m-d H:i:s'),
); );
return $this->insert($data); return $this->insert($data);
} }
/** /**
* Retourne les informations * Retourne les informations
* @param string $ref * @param string $ref
*/ */
public function getInfosBilan($ref) public function getInfosBilan($ref)
{ {
$sql = $this->select()->where(" ref='$ref'"); $sql = $this->select()->where(" ref='$ref'");
$result = $this->fetchAll($sql)->toArray(); $result = $this->fetchAll($sql)->toArray();
@ -50,7 +50,7 @@ class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
* @param string $ref * @param string $ref
* @param string $name * @param string $name
*/ */
public function setFilename($ref, $name) public function setFilename($ref, $name)
{ {
$data = array( 'fichier' => $name ); $data = array( 'fichier' => $name );
$this->update($data, "ref='$ref'"); $this->update($data, "ref='$ref'");
@ -59,10 +59,10 @@ class Application_Model_BilanSaisie extends Zend_Db_Table_Abstract
public function listBilans() public function listBilans()
{ {
$sql = $this->select() $sql = $this->select()
->from($this, array('ref','utilisateurId','confidentiel','siren','bilanCloture','bilanDuree','fichier','env')) ->from($this, array('ref','utilisateurId','confidentiel','siren','bilanCloture','format','bilanDuree','fichier','env'))
->where("dateEnvoi='0000-00-00 00:00:00' AND fichier!=''"); ->where("dateEnvoi='0000-00-00 00:00:00' AND fichier!=''");
$result = $this->fetchAll($sql)->toArray(); $result = $this->fetchAll($sql)->toArray();
return $result; return $result;
} }
public function setDateEnvoi($ref) public function setDateEnvoi($ref)