Suppression forceVerif et accesDist
This commit is contained in:
parent
42ab580f6a
commit
7029c55ba5
@ -27,16 +27,15 @@ class WsEntreprise extends WsScore
|
||||
* Retourne les informations identitaires de l'entreprise ou de l'établissement demandé
|
||||
* @param string $siret Siren de l'entreprise ou siret de l'établissement
|
||||
* @param int $id Identifiant interne
|
||||
* @param boolean $forceVerif
|
||||
* @return IdentiteReturn
|
||||
*/
|
||||
public function getIdentite($siret, $id = 0, $forceVerif = false)
|
||||
public function getIdentite($siret, $id = 0)
|
||||
{
|
||||
$this->authenticate();
|
||||
|
||||
//Initialisation
|
||||
if (empty($id)) { $id = 0; }
|
||||
if (empty($forceVerif)) { $forceVerif = false; }
|
||||
$forceVerif = false;
|
||||
|
||||
$outputParams = new IdentiteReturn();
|
||||
$error = new ErrorType();
|
||||
@ -47,29 +46,27 @@ class WsEntreprise extends WsScore
|
||||
$fp = fopen(LOG_PATH.'/accesDistant.log', 'a');
|
||||
fwrite($fp,$ligne.EOL);
|
||||
fclose($fp);
|
||||
|
||||
debugLog('I',"Identités demandée pour siret $siret (id=$id)",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
|
||||
$tabRet = array();
|
||||
$siret = trim($siret);
|
||||
$len = strlen($siret);
|
||||
$siren = substr($siret,0,9);
|
||||
if ($len == 14)
|
||||
{
|
||||
if ($len == 14) {
|
||||
$nic = substr($siret,9,5)*1;
|
||||
}
|
||||
elseif ($len == 9)
|
||||
{
|
||||
} elseif ($len == 9) {
|
||||
$nic = 0;
|
||||
}
|
||||
|
||||
if ($siren*1==0 && $id==0)
|
||||
{
|
||||
if ($siren*1==0 && $id==0) {
|
||||
debugLog('W', "Siren $siren inexistant", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
|
||||
|
||||
$error->errnum = 102;
|
||||
$error->errmsg = 'Siren inexistant';
|
||||
}
|
||||
elseif ($len!=14 && $len!=9)
|
||||
{
|
||||
|
||||
|
||||
} elseif ($len!=14 && $len!=9) {
|
||||
debugLog('W', "Siren/Siret $siren incorrect", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
|
||||
$error->errnum = 102;
|
||||
$error->errmsg = 'Siren/Siret incorrect';
|
||||
@ -748,11 +745,10 @@ class WsEntreprise extends WsScore
|
||||
*
|
||||
* @param string $siren Siren de l'entreprise
|
||||
* @param string $nic
|
||||
* @param bool $accesDist
|
||||
* @param int $niveau
|
||||
* @return IndiscoreReturn
|
||||
*/
|
||||
public function getIndiScore($siren, $nic=0, $accesDist=true, $niveau=2, $plus=false)
|
||||
public function getIndiScore($siren, $nic=0, $niveau=2, $plus=false)
|
||||
{
|
||||
$this->authenticate();
|
||||
$perm = false;
|
||||
@ -775,8 +771,8 @@ class WsEntreprise extends WsScore
|
||||
}
|
||||
|
||||
//Initialisation
|
||||
$accesDist = true;
|
||||
if (empty($nic)) { $nic = 0; }
|
||||
if (empty($accesDist)) { $accesDist = true; }
|
||||
if (empty($niveau)) { $niveau = 2; }
|
||||
if (empty($plus)) { $plus = false; }
|
||||
if ( !in_array($niveau, array(0,1,2,3,4,5)) ) { $niveau = 2; }
|
||||
@ -2231,28 +2227,26 @@ class WsEntreprise extends WsScore
|
||||
* @param boolean $forceVerif
|
||||
* @return RapportReturn
|
||||
*/
|
||||
public function getRapport($siren, $niveau=3, $id=0, $forceVerif=false)
|
||||
public function getRapport($siren, $niveau=3, $id=0)
|
||||
{
|
||||
$this->authenticate();
|
||||
if (empty($niveau)) $niveau = 3;
|
||||
if (empty($id)) $id = 0;
|
||||
if (empty($forceVerif)) $forceVerif = false;
|
||||
$error = new ErrorType();
|
||||
$result = new Rapport();
|
||||
$filtre=0;
|
||||
$idAnn=0;
|
||||
$accesDist=true;
|
||||
$filtre = 0;
|
||||
$idAnn = 0;
|
||||
if ($niveau==1){
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0, $accesDist);
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0);
|
||||
} elseif ($niveau==2) {
|
||||
$result->Identite = $this->getIdentite($siren, $id=0, $forceVerif);
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0, $accesDist);
|
||||
$result->Identite = $this->getIdentite($siren, $id=0);
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0);
|
||||
$result->Dirigeants = $this->getDirigeants($siren, false);
|
||||
$result->Liens = $this->getLiens($siren, true);
|
||||
$result->Ratios = $this->getRatios($siren, $page="rapport$niveau");
|
||||
} elseif ($niveau==3) {
|
||||
$result->Identite = $this->getIdentite($siren, $id=0, $forceVerif);
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0, $accesDist);
|
||||
$result->Identite = $this->getIdentite($siren, $id=0);
|
||||
$result->Indiscore = $this->getIndiScore($siren, 0);
|
||||
$result->Dirigeants = $this->getDirigeants($siren, false);
|
||||
$result->Liens = $this->getLiens($siren, true);
|
||||
$result->Ratios = $this->getRatios($siren, $page="rapport$niveau");
|
||||
|
Loading…
x
Reference in New Issue
Block a user