Ajout wsLog pour la plupart des méthodes
This commit is contained in:
parent
409f064673
commit
ff6a7d0670
@ -392,7 +392,6 @@ class Entreprise extends WsScore
|
||||
}
|
||||
debugLog('I', "Nb Etablissements retournés ($departement, $actif) = ". count($result), __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
$this->wsLog('etablissements',$siren);
|
||||
|
||||
$output = new ListeEtablissementsReturn();
|
||||
$output->nbReponses = $nbReponses;
|
||||
$output->liste = $result;
|
||||
@ -754,23 +753,23 @@ class Entreprise extends WsScore
|
||||
debugLog('I',"IndiScore demandée pour $siren en niveau $niveau",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
if (strlen($siren)>9 || (substr($siren,0,9)*1)<100 ){
|
||||
debugLog('W', "Siren $siren incorrect", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
$error->errnum = 102;
|
||||
$error->errmsg = 'Siren incorrect';
|
||||
} else {
|
||||
$tDeb = microtime(true);
|
||||
require_once 'Metier/scores/classMScores.php';
|
||||
$tabRet = calculIndiScore($siren, $nic, $accesDist, $niveau);
|
||||
$duree = round(microtime(true)-$tDeb,3);
|
||||
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
$this->wsLog('indiscore',$siren);
|
||||
$this->sendError('1010');
|
||||
}
|
||||
|
||||
$tDeb = microtime(true);
|
||||
require_once 'Metier/scores/classMScores.php';
|
||||
$tabRet = calculIndiScore($siren, $nic, $accesDist, $niveau);
|
||||
$duree = round(microtime(true)-$tDeb,3);
|
||||
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
|
||||
if ($plus) {
|
||||
$this->setSurveillance($siren, $this->tabInfoUser['email'], 'Indiscore+', 'privileges', false, 0);
|
||||
$this->setSurveillance($siren, $this->tabInfoUser['email'], 'Indiscore+', 'score');
|
||||
if ($this->tabInfoUser['idClient']==89)
|
||||
$this->setSurveillance($siren, $this->tabInfoUser['email'], 'Indiscore+', 'annonces');
|
||||
}
|
||||
Zend_Registry::get('WsLogger')->info("INDISCORE : ".print_r($tabRet,1));
|
||||
|
||||
//Zend_Registry::get('WsLogger')->info("INDISCORE : ".print_r($tabRet,1));
|
||||
$result = new Indiscore();
|
||||
foreach($tabRet as $key => $value){
|
||||
if ($key=='paiements'){
|
||||
@ -904,6 +903,7 @@ class Entreprise extends WsScore
|
||||
$result->$key = $value;
|
||||
}
|
||||
}
|
||||
$this->wsLog('indiscore',$siren);
|
||||
$output = new IndiscoreReturn();
|
||||
$output->error = $error;
|
||||
$output->result = $result;
|
||||
@ -962,8 +962,7 @@ class Entreprise extends WsScore
|
||||
}
|
||||
}
|
||||
debugLog('I', 'Nb évènements retournés = '. count($tabRet), __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
//$this->wsLog('etablissements',$siren);
|
||||
|
||||
$this->wsLog('evenements',$siren);
|
||||
$output = new InseeReturn();
|
||||
$output->nbReponses = count($tabRet);
|
||||
$output->result = $tabRet;
|
||||
@ -1208,6 +1207,7 @@ class Entreprise extends WsScore
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->wsLog('tribunaux', '', print_r($tabTypes,1));
|
||||
$output = new TribunauxReturn();
|
||||
$output->tribunaux = $tabRet;
|
||||
return $output;
|
||||
@ -1372,9 +1372,42 @@ class Entreprise extends WsScore
|
||||
$iPriv = new MPrivileges();
|
||||
$ret = $iPriv->getPrivilegesDetail($siren, $tabTypes); //@todo : date
|
||||
|
||||
|
||||
|
||||
|
||||
$tabRet = array();
|
||||
if (count($tabRet)>0) {
|
||||
foreach ($ret as item ) {
|
||||
$privileges = new PrivilegesDetail();
|
||||
$privileges->numDebiteur = $item['numDebiteur'];
|
||||
$privileges->greffe = $item['greffe'];
|
||||
$privileges->greffeLib = $item['greffeLib'];
|
||||
$privileges->dateEven = $item['dateEven'];
|
||||
$privileges->dateFraiche = $item['dateFraiche'];
|
||||
$privileges->dateSD = $item['dateSD'];
|
||||
$privileges->insType = $item['insType'];
|
||||
$privileges->insTypeLib = $item['insTypeLib'];
|
||||
$privileges->insNum = $item['insNum'];
|
||||
$privileges->insDate = $item['insDate'];
|
||||
$privileges->insDateEch = $item['insDateEch'];
|
||||
$privileges->insObjet = $item['insObjet'];
|
||||
$privileges->insMontant = $item['insMontant'];
|
||||
$privileges->insDev = $item['insDev'];
|
||||
$privileges->insDateFin = $item['insDateFin'];
|
||||
$privileges->radDate = $item['radDate'];
|
||||
$privileges->radMention = $item['radMention'];
|
||||
$privileges->radPartiel = $item['radPartiel'];
|
||||
$privileges->radPartMt = $item['radPartMt'];
|
||||
$privileges->radDev = $item['radDev'];
|
||||
$privileges->creNom = $item['creNom'];
|
||||
$privileges->creAdresse1 = $item['creAdresse1'];
|
||||
$privileges->creAdresse2 = $item['creAdresse2'];
|
||||
$privileges->creAdresse3 = $item['creAdresse3'];
|
||||
$privileges->creCP = $item['creCP'];
|
||||
$privileges->creVille = $item['creVille'];
|
||||
$privileges->crePays = $item['crePays'];
|
||||
$privileges->creAutres = $item['creAutres'];
|
||||
$tabRet[] = $privileges;
|
||||
}
|
||||
}
|
||||
$this->wsLog('privdetail', $siren, print_r($tabTypes,1));
|
||||
$output = new PrivilegesDetailReturn();
|
||||
$output->result = $tabRet;
|
||||
return $output;
|
||||
@ -1428,7 +1461,7 @@ class Entreprise extends WsScore
|
||||
$priv->insCumul = $value['insCumul'];
|
||||
$tabRet[] = $priv;
|
||||
}
|
||||
|
||||
$this->wsLog('privcumul', $siren, print_r($tabTypes,1));
|
||||
$output = new PrivilegesCumulReturn();
|
||||
$output->result = $tabRet;
|
||||
return $output;
|
||||
@ -1719,6 +1752,7 @@ class Entreprise extends WsScore
|
||||
$resultBilan->$key = $value;
|
||||
}
|
||||
}
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
$resultBilan->POSTES = $tabPoste;
|
||||
$output = new BilanReturn();
|
||||
$output->result = $resultBilan;
|
||||
@ -1764,6 +1798,7 @@ class Entreprise extends WsScore
|
||||
}
|
||||
|
||||
debugLog('I', 'Nb Bilans retournés = '. count($tabBilans), __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
$this->wsLog('listebilans', $siren);
|
||||
$output = new ListeBilansReturn();
|
||||
$output->nbReponses = count($tabRet);
|
||||
$output->result = $tabRet;
|
||||
@ -2214,6 +2249,7 @@ class Entreprise extends WsScore
|
||||
$error->errnum = 256454;
|
||||
$error->errmsg = 'Aucune relation bancaire en base';
|
||||
}
|
||||
$this->wsLog('banque', $siren);
|
||||
$output = new BanquesReturn();
|
||||
$output->result = $tabRet;
|
||||
return $output;
|
||||
@ -2384,7 +2420,6 @@ class Entreprise extends WsScore
|
||||
$tabRet[] = $competence;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($type=='adm')
|
||||
|
Loading…
x
Reference in New Issue
Block a user