Simplification structure
This commit is contained in:
parent
89514cf074
commit
e2a783c44a
@ -1,6 +1,6 @@
|
||||
Type[] = "ErrorType"
|
||||
Type[] = "StatusReturn"
|
||||
Type[] = "IdentiteReturn"
|
||||
Type[] = "Identite"
|
||||
Type[] = "GeoInfos"
|
||||
Type[] = "IdentiteBilan"
|
||||
Type[] = "IdentiteBourse"
|
||||
@ -28,7 +28,6 @@ Type[] = "TribunauxReturn"
|
||||
Type[] = "Tribunal"
|
||||
Type[] = "InfosRegReturn"
|
||||
Type[] = "InfosReg"
|
||||
Type[] = "InfosBourseReturn"
|
||||
Type[] = "InfosBourse"
|
||||
Type[] = "ListeBilansReturn"
|
||||
Type[] = "ListeBilans"
|
||||
@ -38,21 +37,17 @@ Type[] = "SurveillancesFiltre"
|
||||
Type[] = "Surveillance"
|
||||
Type[] = "MandatairesReturn"
|
||||
Type[] = "Mandataire"
|
||||
Type[] = "BilanReturn"
|
||||
Type[] = "Bilan"
|
||||
Type[] = "BilanPoste"
|
||||
Type[] = "RechercheAnnonceReturn"
|
||||
Type[] = "RechercheAnnonceResult"
|
||||
Type[] = "RechercheAnnonceCriteres"
|
||||
Type[] = "RechercheAnnonce"
|
||||
Type[] = "IndiscoreReturn"
|
||||
Type[] = "Bilan"
|
||||
Type[] = "BilanPoste"
|
||||
Type[] = "RatiosReturn"
|
||||
Type[] = "RatiosResult"
|
||||
Type[] = "RatiosBilansInfos"
|
||||
Type[] = "RatiosInfos"
|
||||
Type[] = "RatiosSecteur"
|
||||
Type[] = "Ratios"
|
||||
Type[] = "RapportReturn"
|
||||
Type[] = "Rapport"
|
||||
Type[] = "Indiscore"
|
||||
Type[] = "Scores"
|
||||
|
@ -27,7 +27,7 @@ class Entreprise 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
|
||||
* @return IdentiteReturn
|
||||
* @return Identite
|
||||
*/
|
||||
public function getIdentite($siret, $id = 0)
|
||||
{
|
||||
@ -77,7 +77,7 @@ class Entreprise extends WsScore
|
||||
$iBourse = new MBourse($siren);
|
||||
$bourse = $iBourse->getInfosBourse($siren);
|
||||
|
||||
$identite = new IdentiteReturn();
|
||||
$identite = new Identite();
|
||||
$identite->id = $entrep['id'];
|
||||
$identite->Siret = $entrep['Siret'];
|
||||
$identite->SiretSiege = $entrep['SiretSiege'];
|
||||
@ -710,7 +710,7 @@ class Entreprise extends WsScore
|
||||
* @param string $siren Siren de l'entreprise
|
||||
* @param string $nic
|
||||
* @param int $niveau
|
||||
* @return IndiscoreReturn
|
||||
* @return Indiscore
|
||||
*/
|
||||
public function getIndiScore($siren, $nic=0, $niveau=2, $plus=false)
|
||||
{
|
||||
@ -761,7 +761,7 @@ class Entreprise extends WsScore
|
||||
}
|
||||
|
||||
//Zend_Registry::get('WsLogger')->info("INDISCORE : ".print_r($tabRet,1));
|
||||
$result = new Indiscore();
|
||||
$output = new Indiscore();
|
||||
foreach($tabRet as $key => $value){
|
||||
if ($key=='paiements'){
|
||||
$parMont = $value['parMont'];
|
||||
@ -819,9 +819,13 @@ class Entreprise extends WsScore
|
||||
$paiement = new IndiscorePaiement();
|
||||
$paiement->parMont = $tabMont;
|
||||
$paiement->parTrim = $tabTrim;
|
||||
$result->paiements = $paiement;
|
||||
$output->paiements = $paiement;
|
||||
} elseif ($key=='Bilans') {
|
||||
|
||||
|
||||
|
||||
// @todo : Liste des bilans
|
||||
|
||||
|
||||
} elseif ($key=='Notes_Structure') {
|
||||
$notesStructure = new IndiscoreNotesStructure();
|
||||
$notesStructure->activite = $value['activite'];
|
||||
@ -832,7 +836,7 @@ class Entreprise extends WsScore
|
||||
$notesStructure->fj = $value['fj'];
|
||||
$notesStructure->localite = $value['localite'];
|
||||
$notesStructure->singulier = $value['singulier'];
|
||||
$result->Notes_Structure = $notesStructure;
|
||||
$output->Notes_Structure = $notesStructure;
|
||||
} elseif ($key=='tabBilans') {
|
||||
$tabRet = array();
|
||||
foreach($value as $bilan)
|
||||
@ -850,15 +854,17 @@ class Entreprise extends WsScore
|
||||
$element->source = $bilan['source'];
|
||||
$tabRet[] = $element;
|
||||
}
|
||||
$result->tabBilans = $tabRet;
|
||||
$output->tabBilans = $tabRet;
|
||||
} elseif ($key=='tabBilan') {
|
||||
|
||||
|
||||
// @todo : Liste des détails des bilans
|
||||
|
||||
} elseif ($key=='tabInfosNotations') {
|
||||
$infosNotation = new IndiscoreInfosNotations();
|
||||
$infosNotation->SituationFinanciere = $value['SituationFinanciere'];
|
||||
$infosNotation->Notation = $value['Notation'];
|
||||
$infosNotation->ProbabiliteDefaut = $value['ProbabiliteDefaut'];
|
||||
$result->tabInfosNotations = $infosNotation;
|
||||
$output->tabInfosNotations = $infosNotation;
|
||||
} elseif ($key=='tabImportExport') {
|
||||
$tabRet = array();
|
||||
foreach($value as $element){
|
||||
@ -869,13 +875,13 @@ class Entreprise extends WsScore
|
||||
$importExport->deptSiege = $element['deptSiege'];
|
||||
$tabRet[] = $importExport;
|
||||
}
|
||||
$result->tabImportExport = $tabRet;
|
||||
$output->tabImportExport = $tabRet;
|
||||
} elseif ($key=='tabCommentaires') {
|
||||
$tab = array();
|
||||
foreach($value as $comment) {
|
||||
$tab[] = $comment;
|
||||
}
|
||||
$result->tabCommentaires = $tab;
|
||||
$output->tabCommentaires = $tab;
|
||||
} elseif ($key=='tabVariables') {
|
||||
$tab = $value['CA_Y'];
|
||||
$tabVar = array();
|
||||
@ -887,16 +893,14 @@ class Entreprise extends WsScore
|
||||
}
|
||||
$variables = new IndiscoreVariables();
|
||||
$variables->CA_Y = $tabVar;
|
||||
$result->tabVariables = $variables;
|
||||
$output->tabVariables = $variables;
|
||||
|
||||
|
||||
} else {
|
||||
$result->$key = $value;
|
||||
$output->$key = $value;
|
||||
}
|
||||
}
|
||||
$this->wsLog('indiscore',$siren);
|
||||
$output = new IndiscoreReturn();
|
||||
$output->result = $result;
|
||||
return $output;
|
||||
}
|
||||
|
||||
@ -1265,7 +1269,7 @@ class Entreprise extends WsScore
|
||||
/**
|
||||
* Retourne les informations boursières de l'entreprise
|
||||
* @param string $siren SIREN de l'entreprise
|
||||
* @return InfosBourseReturn
|
||||
* @return InfosBourse
|
||||
*/
|
||||
public function getInfosBourse($siren)
|
||||
{
|
||||
@ -1334,9 +1338,7 @@ class Entreprise extends WsScore
|
||||
$result->coursMax = $bourse['coursMax'];
|
||||
|
||||
$this->wsLog('bourse',$siren,$id);
|
||||
$output = new InfosBourseReturn();
|
||||
$output->result = $result;
|
||||
return $output;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1695,7 +1697,7 @@ class Entreprise extends WsScore
|
||||
* @param string $millesime Date du bilan au format AAAAMMJJ
|
||||
* @param string $typeBilan N:Réel Normal, S:Réel Simplifié, C:Consolidé
|
||||
* @param string $ref Référence S&D obligatoire
|
||||
* @return BilanReturn
|
||||
* @return Bilan
|
||||
*/
|
||||
public function getBilan($siren, $millesime, $typeBilan='N', $ref='')
|
||||
{
|
||||
@ -1737,9 +1739,7 @@ class Entreprise extends WsScore
|
||||
}
|
||||
$this->wsLog('bilan',$siren, $millesime.':'.$typeBilan.':'.$ref);
|
||||
$resultBilan->POSTES = $tabPoste;
|
||||
$output = new BilanReturn();
|
||||
$output->result = $resultBilan;
|
||||
return $output;
|
||||
return $resultBilan;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2093,24 +2093,22 @@ class Entreprise extends WsScore
|
||||
}
|
||||
//$tabRatiosSecteurs=array(count($tabTmp), "1 $strNaf AND annee IN ($strAnnees) ORDER BY annee DESC, id ASC");
|
||||
|
||||
$result = new RatiosResult();
|
||||
$result->Nom = $tabIdentite['Nom'];
|
||||
$result->NafEnt = $tabIdentite['NafEnt'];
|
||||
$result->NafEntLib = $tabIdentite['NafEntLib'];
|
||||
$result->FJ = $fj;
|
||||
$result->FJ_lib = $tabIdentite['FJ_lib'];
|
||||
$result->Siren = $siren;
|
||||
$result->NbEntNaf = $nbRatiosSec;
|
||||
$result->BilansInfos = $tabBilansR;
|
||||
$result->RatiosInfos = $tabRatiosInfos;
|
||||
$result->RatiosSecteur = $tabRatiosSecteurs;
|
||||
$output = new RatiosReturn();
|
||||
$output->Nom = $tabIdentite['Nom'];
|
||||
$output->NafEnt = $tabIdentite['NafEnt'];
|
||||
$output->NafEntLib = $tabIdentite['NafEntLib'];
|
||||
$output->FJ = $fj;
|
||||
$output->FJ_lib = $tabIdentite['FJ_lib'];
|
||||
$output->Siren = $siren;
|
||||
$output->NbEntNaf = $nbRatiosSec;
|
||||
$output->BilansInfos = $tabBilansR;
|
||||
$output->RatiosInfos = $tabRatiosInfos;
|
||||
$output->RatiosSecteur = $tabRatiosSecteurs;
|
||||
|
||||
//Zend_Registry::get('WsLogger')->info(__FUNCTION__." : ".print_r($result,1));
|
||||
|
||||
debugLog('I',"Liste des Ratios demandée pour $siren RETURN",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
$this->wsLog($page, $siren);
|
||||
$output = new RatiosReturn();
|
||||
$output->result = $result;
|
||||
return $output;
|
||||
|
||||
}
|
||||
@ -2120,7 +2118,7 @@ class Entreprise extends WsScore
|
||||
* @param string $siren
|
||||
* @param integer $niveau
|
||||
* @param integer $id
|
||||
* @return RapportReturn
|
||||
* @return Rapport
|
||||
*/
|
||||
public function getRapport($siren, $niveau=3, $id=0)
|
||||
{
|
||||
@ -2146,9 +2144,7 @@ class Entreprise extends WsScore
|
||||
$result->Ratios = $this->getRatios($siren, $page="rapport$niveau");
|
||||
$result->Annonces = $this->getAnnonces($siren, $filtre, $idAnn);
|
||||
}
|
||||
$output = new RapportReturn();
|
||||
$output->result = $result;
|
||||
return $output;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@ class ErrorType
|
||||
public $errmsg = '';
|
||||
}
|
||||
|
||||
class IdentiteReturn
|
||||
class Identite
|
||||
{
|
||||
/**
|
||||
* Identifiant interne de l'établissement
|
||||
@ -1701,12 +1701,6 @@ class InfosReg
|
||||
public $dateInsertionSD;
|
||||
}
|
||||
|
||||
class InfosBourseReturn
|
||||
{
|
||||
/** @var InfosBourse */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class InfosBourse
|
||||
{
|
||||
/** Siren de l'entreprise côtée
|
||||
@ -2071,12 +2065,6 @@ class Mandataire
|
||||
public $mand;
|
||||
}
|
||||
|
||||
class BilanReturn
|
||||
{
|
||||
/** @var Bilan */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class Bilan
|
||||
{
|
||||
/** Siren de l'entreprise
|
||||
@ -2238,12 +2226,6 @@ class RechercheAnnonce
|
||||
public $Annonce;
|
||||
}
|
||||
|
||||
class IndiscoreReturn
|
||||
{
|
||||
/** @var Indiscore */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class Indiscore
|
||||
{
|
||||
/** Identifiant de l'entreprise
|
||||
@ -2714,12 +2696,6 @@ class Scores
|
||||
}
|
||||
|
||||
class RatiosReturn
|
||||
{
|
||||
/** @var RatiosResult */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class RatiosResult
|
||||
{
|
||||
/** Raison sociale de l'entreprise
|
||||
* @var string
|
||||
@ -2826,15 +2802,9 @@ class RatiosSecteur
|
||||
public $liste;
|
||||
}
|
||||
|
||||
class RapportReturn
|
||||
{
|
||||
/** @var Rapport */
|
||||
public $result;
|
||||
}
|
||||
|
||||
class Rapport
|
||||
{
|
||||
/** @var IdentiteReturn */
|
||||
/** @var Identite */
|
||||
public $Identite;
|
||||
/** @var DirigeantsReturn */
|
||||
public $Dirigeants;
|
||||
@ -2842,7 +2812,7 @@ class Rapport
|
||||
public $Liens;
|
||||
/** @var RatiosReturn */
|
||||
public $Ratios;
|
||||
/** @var IndiscoreReturn */
|
||||
/** @var Indiscore */
|
||||
public $Indiscore;
|
||||
/** @var AnnoncesReturn */
|
||||
public $Annonces;
|
||||
|
Loading…
x
Reference in New Issue
Block a user