issue #0000533, Méthode commandeAsso transformé en setCmdAsso, renvoi fonctionnel sur getMarques
This commit is contained in:
parent
71dc230ba9
commit
88d228f8be
@ -20,7 +20,7 @@ Type[] = "InfoCommandeKbis"
|
||||
Type[] = "ListeCmdAssoReturn"
|
||||
Type[] = "CmdAssoReturn"
|
||||
Type[] = "CmdAssoDetail"
|
||||
Type[] = "InfoCommandeAsso"
|
||||
Type[] = "InfoCmdAsso"
|
||||
Type[] = "ListeBilan"
|
||||
Type[] = "ListeActe"
|
||||
Type[] = "CommandeReturnType"
|
||||
@ -68,8 +68,6 @@ Type[] = "ListeUtilisateursReturn"
|
||||
Type[] = "Utilisateur"
|
||||
Type[] = "CommandeEnqueteReturn"
|
||||
Type[] = "CommandeEnquete"
|
||||
Type[] = "CommandeAssoReturn"
|
||||
Type[] = "CommandeAsso"
|
||||
Type[] = "LogsClientsReturn"
|
||||
Type[] = "LogsClients"
|
||||
Type[] = "ListeSurveillancesCsvReturn"
|
||||
|
@ -28,7 +28,7 @@ class RefCommande
|
||||
public $fichier;
|
||||
|
||||
/**
|
||||
* Information sur lpublic $état de la commande
|
||||
* Information sur l'état de la commande
|
||||
* @var string
|
||||
*/
|
||||
public $info;
|
||||
@ -284,6 +284,18 @@ class ListeCmdAssoReturn
|
||||
public $liste;
|
||||
}
|
||||
|
||||
class InfoCmdAsso
|
||||
{
|
||||
/** @var string */
|
||||
public $siren;
|
||||
/** @var string */
|
||||
public $waldec;
|
||||
/** @var int */
|
||||
public $idEntreprise;
|
||||
/** @var string */
|
||||
public $raisonSociale;
|
||||
}
|
||||
|
||||
class CmdAssoReturn
|
||||
{
|
||||
/** @var ErrorType */
|
||||
@ -293,25 +305,18 @@ class CmdAssoReturn
|
||||
}
|
||||
|
||||
class CmdAssoDetail
|
||||
{
|
||||
/** @var InfoCommandeAsso */
|
||||
public $infoCommande;
|
||||
/** @var InfoDemandeur */
|
||||
public $infoDemandeur;
|
||||
/** @var RefCommande */
|
||||
public $refCommande;
|
||||
}
|
||||
|
||||
class InfoCommandeAsso
|
||||
{
|
||||
/** @var string */
|
||||
public $siren;
|
||||
/** @var string */
|
||||
public $waldec;
|
||||
/** @var int */
|
||||
public $idEntreprise;
|
||||
public $emailCommande;
|
||||
/** @var string */
|
||||
public $dateCommande;
|
||||
/** @var string */
|
||||
public $refCmde;
|
||||
}
|
||||
|
||||
|
||||
class ListeBilan
|
||||
{
|
||||
/** @var ErrorType */
|
||||
@ -1071,26 +1076,6 @@ class CommandeEnquete
|
||||
public $refCmde;
|
||||
}
|
||||
|
||||
class CommandeAssoReturn
|
||||
{
|
||||
/** @var ErrorType */
|
||||
public $error;
|
||||
/** @var CommandeAsso */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class CommandeAsso
|
||||
{
|
||||
/** @var string */
|
||||
public $siren;
|
||||
/** @var string */
|
||||
public $emailCommande;
|
||||
/** @var string */
|
||||
public $dateCommande;
|
||||
/** @var string */
|
||||
public $refCmde;
|
||||
}
|
||||
|
||||
class LogsClientsReturn
|
||||
{
|
||||
/** @var ErrorType */
|
||||
|
@ -546,21 +546,6 @@ class WsInterne extends WsScore
|
||||
*/
|
||||
public function getCmdKbis( $reference ){}
|
||||
|
||||
/**
|
||||
* Commande de statut association
|
||||
* @param InfoCommandeAsso $infoCommande
|
||||
* @param InfoDemandeur $infoDemandeur
|
||||
* @return CmdAssoReturn
|
||||
*/
|
||||
public function setCmdAsso( $infoCommande, $infoDemandeur ){}
|
||||
|
||||
/**
|
||||
* Renvoi des informations sur une commande association
|
||||
* @param string $reference
|
||||
* @return CmdAssoReturn
|
||||
*/
|
||||
public function getCmdAsso( $reference ){}
|
||||
|
||||
/**
|
||||
* Commande de privilèges et nantissements par email
|
||||
* @param InfoCommandePieces $infoCommande
|
||||
@ -803,22 +788,6 @@ class WsInterne extends WsScore
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des bilans
|
||||
* @param string $siren
|
||||
* @param string $waldec
|
||||
* @param int $idEntreprise
|
||||
* @return ListeBilan
|
||||
*/
|
||||
public function getListeBilan( $siren, $waldec = null, $idEntreprise = null ){}
|
||||
|
||||
/**
|
||||
* Liste des actes
|
||||
* @param string $siren
|
||||
* @return ListeActe
|
||||
*/
|
||||
public function getListeActe( $siren ){}
|
||||
|
||||
/**
|
||||
* Retourne la liste des statuts de commande
|
||||
* @param string $type
|
||||
@ -1853,38 +1822,44 @@ class WsInterne extends WsScore
|
||||
if (empty($idDepot)) $idDepot = 0;
|
||||
$error = new ErrorType();
|
||||
$marques = array();
|
||||
$iDb = new WDB();
|
||||
require_once 'Metier/partenaires/classMMarques.php';
|
||||
$iMarque = new MMarques();
|
||||
$ret = $iMarque->getMarques($siren, $idDepot);
|
||||
foreach ($ret as $marque) {
|
||||
if (trim($marque['imgLink'])<>'') $idLien=$marque['numeroMarque'];
|
||||
else $idLien='';
|
||||
if ($idDepot==$marque['numeroMarque']) {
|
||||
Zend_Registry::get('WsLogger')->info(__FUNCTION__.' : '.
|
||||
print_r($ret,1));
|
||||
|
||||
foreach ($ret as $item) {
|
||||
if (trim($item['imgLink'])<>'') $idLien = $item['numeroMarque'];
|
||||
else $idLien = '';
|
||||
if ($idDepot==$item['numeroMarque']) {
|
||||
$marque = new Marque();
|
||||
$marque->Marques = $marque['nomMarque'];
|
||||
$marque->Date = $marque['dateDepot'];
|
||||
$marque->Depot = $marque['numeroMarque'];
|
||||
$marque->Marques = $item['nomMarque'];
|
||||
$marque->Date = $item['dateDepot'];
|
||||
$marque->Depot = $item['numeroMarque'];
|
||||
$marque->IdLien = $idLien;
|
||||
$marque->UrlLien = $marque['UrlLien'];
|
||||
$marque->PdfDispo = $marque['pdfLink'];
|
||||
$marque->Classes = $marque['classesMarque'];
|
||||
$marque->Perimetre = $marque['periMarque'];
|
||||
$marque->DateExpir = $marque['dateExpir'];
|
||||
$marque->UrlLien = $item['UrlLien'];
|
||||
$marque->PdfDispo = $item['pdfLink'];
|
||||
$marque->Classes = $item['classesMarque'];
|
||||
$marque->Perimetre = $item['periMarque'];
|
||||
$marque->DateExpir = $item['dateExpir'];
|
||||
$marques = array();
|
||||
$marques[] = $marque;
|
||||
break;
|
||||
} else {
|
||||
$marque = new Marque();
|
||||
$marque->Marques = $marque['nomMarque'];
|
||||
$marque->Date = $marque['dateDepot'];
|
||||
$marque->Depot = $marque['numeroMarque'];
|
||||
$marque->Marques = $item['nomMarque'];
|
||||
$marque->Date = $item['dateDepot'];
|
||||
$marque->Depot = $item['numeroMarque'];
|
||||
$marque->IdLien = $idLien;
|
||||
$marque->UrlLien = $marque['UrlLien'];
|
||||
$marque->PdfDispo = $marque['pdfLink'];
|
||||
$marque->UrlLien = $item['UrlLien'];
|
||||
$marque->PdfDispo = $item['pdfLink'];
|
||||
$marques[] = $marque;
|
||||
}
|
||||
}
|
||||
|
||||
Zend_Registry::get('WsLogger')->info(__FUNCTION__.' : '.
|
||||
print_r($marques,1));
|
||||
|
||||
$this->wsLog('marques',$siren);
|
||||
$output = new MarquesReturn();
|
||||
$output->error = $error;
|
||||
@ -1949,14 +1924,13 @@ class WsInterne extends WsScore
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* commandeAsso
|
||||
* @param string $siren
|
||||
* @param array $infoAsso
|
||||
* @param array $infoDemande
|
||||
* @return CommandeAssoReturn
|
||||
*/
|
||||
public function commandeAsso($siren, $infoAsso=array(), $infoDemande=array())
|
||||
/**
|
||||
* Commande de statut association
|
||||
* @param InfoCmdAsso $infosCommande
|
||||
* @param InfoDemandeur $infosDemandeur
|
||||
* @return CmdAssoReturn
|
||||
*/
|
||||
public function setCmdAsso( $infoCommande, $infoDemandeur )
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('actes');
|
||||
@ -1965,8 +1939,9 @@ class WsInterne extends WsScore
|
||||
|
||||
$iDb = new WDB();
|
||||
|
||||
$idEntreprise = $infoAsso['idEntreprise']*1;
|
||||
$assoNom = $infoAsso['RaisonSociale'];
|
||||
$siren = $infoCommande->siren;
|
||||
$idEntreprise = intval($infoCommande->idEntreprise);
|
||||
$assoNom = $infoCommande->raisonSociale;
|
||||
debugLog('I',"commandeAsso pour $assoNom ($siren) début",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
|
||||
$iInsee = new MInsee();
|
||||
@ -1976,7 +1951,7 @@ class WsInterne extends WsScore
|
||||
$assoCP = $tabIdentite['CP'];
|
||||
$assoVille = $tabIdentite['Ville'];
|
||||
|
||||
$mail = trim($infoDemande['Email']);
|
||||
$mail = trim($infoDemandeur->email);
|
||||
if ($mail=='') $mail = $this->tabInfoUser['email'];
|
||||
|
||||
$tabInsert=array(
|
||||
@ -1985,9 +1960,9 @@ class WsInterne extends WsScore
|
||||
'login' => $this->tabInfoUser['login'],
|
||||
'emailCommande' => $mail,
|
||||
'siren' => $siren,
|
||||
'refUtilisateur' => $infoDemande['Ref'],
|
||||
'refDocument' => serialize($infoDemande),
|
||||
'refCommande' => serialize($infoAsso),
|
||||
'refUtilisateur' => $infoDemandeur->reference,
|
||||
'refDocument' => serialize($infoDemandeur),
|
||||
'refCommande' => serialize($infoCommande),
|
||||
'dateCommande' => DATETIME,
|
||||
);
|
||||
|
||||
@ -2038,14 +2013,14 @@ class WsInterne extends WsScore
|
||||
{
|
||||
@sendMail('production@scores-decisions.com', 'asso@scores-decisions.com',
|
||||
"Commande de statuts association pour $assoNom ($siren)",
|
||||
"Association :".EOL.print_r($infoAsso, true).EOL.EOL.
|
||||
"Demandeur:".EOL.print_r($infoDemande, true).EOL.EOL.
|
||||
"Association :".EOL.print_r($infoCommande, true).EOL.EOL.
|
||||
"Demandeur:".EOL.print_r($infoDemandeur, true).EOL.EOL.
|
||||
"Réponse RefAsso en $duree secondes :".EOL.print_r($page, true)
|
||||
);
|
||||
$iDbCrm = new WDB('sdv1');
|
||||
$ret = $iDbCrm->insert('commandes', $tabInsert, true);
|
||||
|
||||
$result = new CommandeAsso();
|
||||
$result = new CmdAssoDetail();
|
||||
$result->siren = $siren;
|
||||
$result->emailCommande = $mail;
|
||||
$result->dateCommande = DATETIME;
|
||||
@ -2056,23 +2031,28 @@ class WsInterne extends WsScore
|
||||
debugLog('I',"commandeAsso pour $assoNom ($siren) fin",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
} else {
|
||||
@sendMail('production@scores-decisions.com', 'asso@scores-decisions.com',
|
||||
"ERREUR lors de lommande de statuts association pour $assoNom ($siren)", "Association :".EOL.print_r($infoAsso, true).EOL.EOL.
|
||||
"Demandeur:".EOL.print_r($infoDemande, true).EOL.EOL.
|
||||
"ERREUR lors de lommande de statuts association pour $assoNom ($siren)", "Association :".EOL.print_r($infoCommande, true).EOL.EOL.
|
||||
"Demandeur:".EOL.print_r($infoDemandeur, true).EOL.EOL.
|
||||
"Réponse RefAsso en $duree secondes :".EOL.print_r($page, true));
|
||||
|
||||
$result = new CommandeAsso();
|
||||
$result->siren = $siren;
|
||||
$result->emailCommande = $mail;
|
||||
$result->dateCommande = DATETIME;
|
||||
$result->refCmd = 'ERREUR';
|
||||
$error->errmsg = 'ERREUR';
|
||||
$error->errnum = 1;
|
||||
debugLog('E',"commandeAsso pour $assoNom ($siren) fin",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
}
|
||||
$output = new CommandeAssoReturn();
|
||||
$output = new CmdAssoReturn();
|
||||
$output->error = $error;
|
||||
$output->result = $result;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi des informations sur une commande association
|
||||
* @param string $reference
|
||||
* @return CmdAssoReturn
|
||||
*/
|
||||
public function getCmdAsso( $reference ){}
|
||||
|
||||
|
||||
/**
|
||||
* Commande d'une enquête sur une entreprise en France ou à l'Internationale
|
||||
* @param string $siren
|
||||
|
Loading…
x
Reference in New Issue
Block a user