issue #0001564 : Change to search with new table
This commit is contained in:
parent
43f83bc94b
commit
e072675d9a
@ -742,7 +742,7 @@ function reponse(&$resSphinx, &$resDB, $criteres, $time, $formR, $form2crit,
|
|||||||
for ($i = 0; $i < $resDB->num_rows; $i++) {
|
for ($i = 0; $i < $resDB->num_rows; $i++) {
|
||||||
$ligne = $resDB->fetch_assoc();
|
$ligne = $resDB->fetch_assoc();
|
||||||
|
|
||||||
//file_put_contents('test.log', "\n".'i = '.$i.print_r($ligne,1), FILE_APPEND);
|
//file_put_contents('test.log', print_r($ligne,1), FILE_APPEND);
|
||||||
|
|
||||||
$ret['reponses'][$i]['id'] = $ligne['id'];
|
$ret['reponses'][$i]['id'] = $ligne['id'];
|
||||||
$pertinence = $pertinence_generale;
|
$pertinence = $pertinence_generale;
|
||||||
@ -773,6 +773,7 @@ function reponse(&$resSphinx, &$resDB, $criteres, $time, $formR, $form2crit,
|
|||||||
$ret['reponses'][$i]['Adresse2'] = $ligne['adr_comp'];
|
$ret['reponses'][$i]['Adresse2'] = $ligne['adr_comp'];
|
||||||
$ret['reponses'][$i]['CP'] = $ligne['adr_cp'];
|
$ret['reponses'][$i]['CP'] = $ligne['adr_cp'];
|
||||||
$ret['reponses'][$i]['Ville'] = $ligne['adr_ville'];
|
$ret['reponses'][$i]['Ville'] = $ligne['adr_ville'];
|
||||||
|
$ret['reponses'][$i]['Pays'] = $ligne['pays'];
|
||||||
$ret['reponses'][$i]['Tel'] = $ligne['tel'];
|
$ret['reponses'][$i]['Tel'] = $ligne['tel'];
|
||||||
$ret['reponses'][$i]['Fax'] = $ligne['fax'];
|
$ret['reponses'][$i]['Fax'] = $ligne['fax'];
|
||||||
$ret['reponses'][$i]['FJ'] = $ligne['cj'];
|
$ret['reponses'][$i]['FJ'] = $ligne['cj'];
|
||||||
@ -793,15 +794,17 @@ function reponse(&$resSphinx, &$resDB, $criteres, $time, $formR, $form2crit,
|
|||||||
$ret['reponses'][$i]['DirDepart'] = '';
|
$ret['reponses'][$i]['DirDepart'] = '';
|
||||||
} elseif ($formR['type']=='act') {
|
} elseif ($formR['type']=='act') {
|
||||||
// Actionnaire
|
// Actionnaire
|
||||||
$ret['reponses'][$i]['ActNomRs'] = $ligneDir[$i]['ActNomRs'];
|
$ret['reponses'][$i]['ActNomRs'] = $ligne['ActRaisonSociale'];
|
||||||
$ret['reponses'][$i]['ActPays'] = $ligneDir[$i]['ActPays'];
|
$ret['reponses'][$i]['ActPays'] = $ligne['ActPays'];
|
||||||
$ret['reponses'][$i]['ActDateLien'] = $ligneDir[$i]['ActDateLien'];
|
$ret['reponses'][$i]['ActDateLien'] = $ligne['dateLien'];
|
||||||
$ret['reponses'][$i]['ActActif'] = $ligneDir[$i]['ActActif'];
|
$ret['reponses'][$i]['ActActif'] = $ligne['ActActif'];
|
||||||
$ret['reponses'][$i]['ActPmin'] = $ligneDir[$i]['ActPmin'];
|
$ret['reponses'][$i]['ActPmin'] = $ligne['ActPmin'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//file_put_contents('test.log', print_r($ret,1), FILE_APPEND);
|
||||||
|
|
||||||
if ($formR['type'] == 'ent') {
|
if ($formR['type'] == 'ent') {
|
||||||
$ret['pass'] = $resSphinx['pass'];
|
$ret['pass'] = $resSphinx['pass'];
|
||||||
}
|
}
|
||||||
@ -923,13 +926,42 @@ function rechercheDir(&$formR, $deb, $nbRep, $max)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$requeteDB =
|
$requeteDB =
|
||||||
"SELECT d.nom, d.prenom, d.naissance_nom, d.naissance_date, d.naissance_lieu, l.libelle AS fonction_lib,".
|
"SELECT
|
||||||
" e.id, CONCAT(e.siren,e.nic) AS siret, e.siren, e.nic, e.siege, e.raisonSociale, e.sigle, e.enseigne,".
|
d.nom,
|
||||||
" e.adr_num, e.adr_typeVoie, e.adr_libVoie, e.adr_comp, e.adr_cp, e.adr_ville, e.tel, e.fax, e.cj, e.actif, e.ape_etab, e.ape_entrep".
|
d.prenom,
|
||||||
" FROM dirigeants d, etablissements e, bodacc_fonctions l".
|
d.naissance_nom,
|
||||||
" WHERE d.fonction_code=l.codeFct AND d.id IN (".$resSphinx['matches'][0]['id'];
|
d.naissance_date,
|
||||||
for ($i = 1; $i + $deb < $resSphinx['total'] && $i < $nbRep; ++$i) {
|
d.naissance_lieu,
|
||||||
$requeteDB .= ",".$resSphinx['matches'][$i]['id'];
|
l.libelle AS fonction_lib,
|
||||||
|
e.id, CONCAT(e.siren,e.nic) AS siret,
|
||||||
|
e.siren,
|
||||||
|
e.nic,
|
||||||
|
e.siege,
|
||||||
|
e.raisonSociale,
|
||||||
|
e.sigle,
|
||||||
|
e.enseigne,
|
||||||
|
e.adr_num,
|
||||||
|
e.adr_typeVoie,
|
||||||
|
e.adr_libVoie,
|
||||||
|
e.adr_comp,
|
||||||
|
e.adr_cp,
|
||||||
|
e.adr_ville,
|
||||||
|
e.tel,
|
||||||
|
e.fax,
|
||||||
|
e.cj,
|
||||||
|
e.actif,
|
||||||
|
e.ape_etab,
|
||||||
|
e.ape_entrep
|
||||||
|
FROM dirigeants d, etablissements e, bodacc_fonctions l
|
||||||
|
WHERE
|
||||||
|
d.fonction_code=l.codeFct
|
||||||
|
AND d.id IN (";
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach ($resSphinx['matches'] as $id => $element) {
|
||||||
|
if($i > 0) $requeteDB.= ',';
|
||||||
|
$requeteDB.= $element['id'];
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
$requeteDB .= ") AND e.id = (";
|
$requeteDB .= ") AND e.id = (";
|
||||||
$requeteDB .= "SELECT tmp.id FROM etablissements tmp ";
|
$requeteDB .= "SELECT tmp.id FROM etablissements tmp ";
|
||||||
@ -1049,79 +1081,88 @@ function rechercheAct($formR, $deb, $nbRep, $max)
|
|||||||
$pass = 0;
|
$pass = 0;
|
||||||
initSphinx($sphinx, $mode, $pass, $deb, $nbRep, $max);
|
initSphinx($sphinx, $mode, $pass, $deb, $nbRep, $max);
|
||||||
|
|
||||||
$Criteres = array('Siren2' => 'siren',
|
$Criteres = array(
|
||||||
'Req' => 'actNomRS',
|
'Siren2' => 'siren',
|
||||||
'@Pays' => 'pays',
|
'Req' => 'actNomRS',
|
||||||
'PminNum' => 'pctMax'
|
'@Pays' => 'pays',
|
||||||
|
//'PDetention' => 'pctMax',
|
||||||
);
|
);
|
||||||
$form2crit = array('actNomRS' => 'N',
|
$form2crit = array(
|
||||||
'pays' => 'P',
|
'actNomRS' => 'N',
|
||||||
'pctMax' => 'M'
|
'pays' => 'P',
|
||||||
|
'pctMax' => 'M'
|
||||||
);
|
);
|
||||||
|
|
||||||
$Requete = constructRequete($formR, $Criteres);
|
$Requete = constructRequete($formR, $Criteres);
|
||||||
if(!empty($formR['pctMin']))
|
|
||||||
$sphinx->SetFilterRange('PminNum', $formR['pctMin'], 99);
|
|
||||||
if(!empty($formR['pctMax']))
|
|
||||||
$sphinx->SetFilterRange('PminNum', $formR['pctMin'], 99);
|
|
||||||
if(!empty($formR['pctMin']) and !empty($formR['pctMax']))
|
|
||||||
$sphinx->SetFilterRange('PminNum', $formR['pctMix'], $formR['pctMax']);
|
|
||||||
|
|
||||||
|
if(!empty($formR['pctMin']))
|
||||||
|
$sphinx->SetFilterFloatRange('PDetention', $formR['pctMin'], 99);
|
||||||
|
if(!empty($formR['pctMax']))
|
||||||
|
$sphinx->SetFilterFloatRange('PDetention', $formR['pctMin'], 99);
|
||||||
|
if(!empty($formR['pctMin']) && !empty($formR['pctMax']))
|
||||||
|
$sphinx->SetFilterFloatRange('PDetention', $formR['pctMin'], $formR['pctMax']);
|
||||||
|
|
||||||
$sphinxreturn = $sphinx->Query($Requete, $index);
|
$sphinxreturn = $sphinx->Query($Requete, $index);
|
||||||
|
|
||||||
|
/*
|
||||||
|
file_put_contents('test.log', print_r($formR,1));
|
||||||
|
file_put_contents('test.log', $sphinx->GetLastError()."\n", FILE_APPEND);
|
||||||
|
file_put_contents('test.log', 'TEST='.print_r($sphinxreturn,1), FILE_APPEND);
|
||||||
|
*/
|
||||||
|
|
||||||
$criteres = 'NPM';
|
$criteres = 'NPM';
|
||||||
$requette = 'SELECT l.id AS lienId, l.actif AS lienActif, l.source, l.Pmin, l.PpPm, l.id2, '.
|
|
||||||
'l.Siren2, l.RaisonSociale, l.Pays, '.
|
|
||||||
'IF(l.dateUpdate>IF(l.dateInsert>l.dateLien,l.dateInsert,l.dateLien),l.dateUpdate,IF(l.dateInsert>l.dateLien,l.dateInsert,l.dateLien)) AS dateLien, '.
|
|
||||||
'e.id, CONCAT(e.siren,e.nic) AS siret, e.siren, e.nic, e.siege, e.raisonSociale, e.sigle, e.enseigne, '.
|
|
||||||
'e.adr_num, e.adr_typeVoie, e.adr_libVoie, e.adr_comp, e.adr_cp, e.adr_ville, e.tel, e.fax, e.cj, e.actif, e.ape_etab, e.ape_entrep ' .
|
|
||||||
'FROM liens l, etablissements e '.
|
|
||||||
'WHERE l.Siren1=e.siren AND e.siege=1 AND l.id IN(';
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
//file_put_contents('test.log', print_r($sphinxreturn['matches'],1));
|
//@todo : Faire correspondre avec la table etablissement
|
||||||
|
$requette = "SELECT
|
||||||
|
/*Liens*/
|
||||||
|
l.PDetention AS Pmin,
|
||||||
|
l.MajMin,
|
||||||
|
l.dateEffetLien AS dateLien,
|
||||||
|
IF(l.dateUpdate>l.dateInsert,l.dateUpdate,l.dateInsert) AS date,
|
||||||
|
|
||||||
foreach($sphinxreturn['matches'] as $id => $element) {
|
/*Participation*/
|
||||||
if($i > 0) $requette.= ',';
|
CONCAT(e.siren, e.nic) AS siret,
|
||||||
|
par.siren,
|
||||||
|
e.nic,
|
||||||
|
e.siege,
|
||||||
|
par.RS AS raisonSociale,
|
||||||
|
/*sigle*/
|
||||||
|
/*enseigne*/
|
||||||
|
par.actif,
|
||||||
|
par.PpPm,
|
||||||
|
par.adresse_num AS adr_num,
|
||||||
|
par.adresse_codvoie AS adr_typeVoie,
|
||||||
|
par.adresse_libvoie AS adr_libVoie,
|
||||||
|
par.adresse_comp AS adr_comp,
|
||||||
|
par.adresse_cp AS adr_cp,
|
||||||
|
par.adresse_ville AS adr_ville,
|
||||||
|
p1.libPays AS pays,
|
||||||
|
par.tel,
|
||||||
|
par.fax,
|
||||||
|
|
||||||
|
/*Actionnaire*/
|
||||||
|
act.id AS ActId,
|
||||||
|
act.actif AS ActActif,
|
||||||
|
act.RS AS ActRaisonSociale,
|
||||||
|
p2.libPays AS ActPays
|
||||||
|
|
||||||
|
FROM liens2 l, liensRef par, liensRef act, tabPays p1, tabPays p2, etablissements e
|
||||||
|
WHERE
|
||||||
|
par.id = l.idPar AND act.id = l.idAct
|
||||||
|
AND p1.codPays3 = par.adresse_pays
|
||||||
|
AND p2.codPays3 = act.adresse_pays
|
||||||
|
AND ( e.siren = par.siren OR (e.source='006' AND e.source_id=l.idPar) )
|
||||||
|
AND l.id IN (";
|
||||||
|
$i = 0;
|
||||||
|
foreach ($sphinxreturn['matches'] as $id => $element) {
|
||||||
|
if($i > 0) $requette.= ',';
|
||||||
$requette.= $element['id'];
|
$requette.= $element['id'];
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$requette.= ') GROUP BY l.Siren1, l.id ORDER BY e.actif DESC, e.siege DESC, e.id ASC';
|
$requette.= ') ORDER BY par.actif DESC, e.siege DESC, e.nic DESC';
|
||||||
|
$req = $gDatabaseJO->query($requette);
|
||||||
|
|
||||||
//file_put_contents('test.log', $requette."\n", FILE_APPEND);
|
return reponse($sphinxreturn, $req, $criteres, $sphinxreturn['time'], $formR, $form2crit, $deb, array());
|
||||||
|
|
||||||
$req = $gDatabaseJO->query($requette);
|
|
||||||
|
|
||||||
|
|
||||||
/*$requette2 ='SELECT id, CONCAT(siren,nic) AS siret, siren, nic, siege, '.
|
|
||||||
'raisonSociale, sigle, enseigne, adr_num, adr_typeVoie, adr_libVoie, '.
|
|
||||||
'adr_comp, adr_cp, adr_ville, tel, fax, cj, actif, ape_etab, '.
|
|
||||||
'ape_entrep FROM etablissements WHERE id IN (';
|
|
||||||
*/
|
|
||||||
$ligneAct = array();
|
|
||||||
for($i = 0; $i < $req->num_rows; $i++) {
|
|
||||||
$ligne = $req->fetch_assoc();
|
|
||||||
|
|
||||||
//file_put_contents('test.log', print_r($ligne,1)."\n", FILE_APPEND);
|
|
||||||
|
|
||||||
$ligneAct[$i] = array(
|
|
||||||
'id' => $ligne['id'],
|
|
||||||
'ActNomRs' => $ligne['RaisonSociale'],
|
|
||||||
'ActPays' => $ligne['Pays'],
|
|
||||||
'ActDateLien'=>$ligne['dateLien'],
|
|
||||||
'ActActif' => $ligne['actif'],
|
|
||||||
'ActPmin' => $ligne['Pmin'],
|
|
||||||
);
|
|
||||||
if($i > 0) $requette2.= ',';
|
|
||||||
//$requette2.= $ligne['id'];
|
|
||||||
}
|
|
||||||
//$requette2.= ') ORDER BY actif DESC, siege DESC';
|
|
||||||
|
|
||||||
//file_put_contents('test.log', $requette2."\n", FILE_APPEND);
|
|
||||||
|
|
||||||
//$req = $gDatabaseJO->query($requette2);
|
|
||||||
|
|
||||||
return reponse($sphinxreturn, $req, $criteres, $sphinxreturn['time'], $formR, $form2crit, $deb, $ligneAct);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
@ -1405,57 +1446,84 @@ function rechercheEnt(&$formR, $deb, $nbRep, $max, $sirenValide = false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($resSphinx['total'] == 0) {
|
if ($resSphinx['total'] == 0) {
|
||||||
return array('nbReponses' => 0,
|
return array(
|
||||||
'nbReponsesTotal' => 0,
|
'nbReponses' => 0,
|
||||||
'duree' => $total_time,
|
'nbReponsesTotal' => 0,
|
||||||
'pass' => $pass,
|
'duree' => $total_time,
|
||||||
'criteres' => $criteres);
|
'pass' => $pass,
|
||||||
|
'criteres' => $criteres);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
$base2form = array('adr_dep' => 'departement',
|
$base2form = array(
|
||||||
'adr_cp' => 'localite',
|
'adr_dep' => 'departement',
|
||||||
'adr_num' => 'numVoie',
|
'adr_cp' => 'localite',
|
||||||
'adr_libVoie' => 'voie',
|
'adr_num' => 'numVoie',
|
||||||
'adr_comp' => 'voie',
|
'adr_libVoie' => 'voie',
|
||||||
'adr_ville' => 'ville',
|
'adr_comp' => 'voie',
|
||||||
'raisonSociale' => 'raisonSociale',
|
'adr_ville' => 'ville',
|
||||||
'enseigne' => 'raisonSociale',
|
'raisonSociale' => 'raisonSociale',
|
||||||
'sigle' => 'raisonSociale',
|
'enseigne' => 'raisonSociale',
|
||||||
'identite_pre' => 'raisonSociale');
|
'sigle' => 'raisonSociale',
|
||||||
afficheDB($resSphinx, $formR, $form2crit, 'etablissements', $base2form,
|
'identite_pre' => 'raisonSociale');
|
||||||
$deb, $nbRep);
|
afficheDB($resSphinx, $formR, $form2crit, 'etablissements', $base2form, $deb, $nbRep);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reponse
|
// Reponse
|
||||||
if ($gDatabaseJO == false) {
|
if ($gDatabaseJO == false) {
|
||||||
return array('nbReponses' => 0,
|
return array(
|
||||||
'nbReponsesTotal' => $resSphinx['total'],
|
'nbReponses' => 0,
|
||||||
'duree' => $total_time,
|
'nbReponsesTotal' => $resSphinx['total'],
|
||||||
'erreur' => 'Base inaccessible');
|
'duree' => $total_time,
|
||||||
|
'erreur' => 'Base inaccessible');
|
||||||
}
|
}
|
||||||
if (isset($resSphinx['matches']) == false) {
|
if (isset($resSphinx['matches']) == false) {
|
||||||
return array('nbReponses' => 0,
|
return array(
|
||||||
'nbReponsesTotal' => $resSphinx['total'],
|
'nbReponses' => 0,
|
||||||
'duree' => $total_time,
|
'nbReponsesTotal' => $resSphinx['total'],
|
||||||
'erreur' => 'Aucun résultat');
|
'duree' => $total_time,
|
||||||
|
'erreur' => 'Aucun résultat');
|
||||||
}
|
}
|
||||||
$requeteDB = 'select id, CONCAT(siren,nic) AS siret, siren, nic, siege, '.
|
$requeteDB = 'SELECT
|
||||||
'raisonSociale, sigle, enseigne, adr_num, adr_typeVoie, adr_libVoie, '.
|
id,
|
||||||
'adr_comp, adr_cp, adr_ville, tel, fax, cj, actif, ape_etab, '.
|
CONCAT(siren,nic) AS siret,
|
||||||
'ape_entrep, (siren>200) AS sirenValide'.
|
siren,
|
||||||
' from etablissements where id='.$resSphinx['matches'][0]['id'];
|
nic,
|
||||||
for ($i = 1; $i + $deb < $resSphinx['total'] && $i < $nbRep; ++$i) {
|
siege,
|
||||||
$requeteDB .= ' or id='.$resSphinx['matches'][$i]['id'];
|
raisonSociale,
|
||||||
|
sigle,
|
||||||
|
enseigne,
|
||||||
|
adr_num,
|
||||||
|
adr_typeVoie,
|
||||||
|
adr_libVoie,
|
||||||
|
adr_comp,
|
||||||
|
adr_cp,
|
||||||
|
adr_ville,
|
||||||
|
libPays AS pays,
|
||||||
|
tel,
|
||||||
|
fax,
|
||||||
|
cj,
|
||||||
|
actif,
|
||||||
|
ape_etab,
|
||||||
|
ape_entrep,
|
||||||
|
(siren>200) AS sirenValide
|
||||||
|
FROM etablissements
|
||||||
|
LEFT OUTER JOIN tabPays ON adr_dep = codePaysInsee
|
||||||
|
WHERE id IN('.
|
||||||
|
$i = 0;
|
||||||
|
foreach ($resSphinx['matches'] as $id => $element) {
|
||||||
|
if($i > 0) $requeteDB.= ',';
|
||||||
|
$requeteDB.= $element['id'];
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
$requeteDB .= ' ORDER BY sirenValide DESC, actif DESC, siege DESC, rang DESC';
|
|
||||||
|
$requeteDB.= ') ORDER BY sirenValide DESC, actif DESC, siege DESC, rang DESC';
|
||||||
|
|
||||||
debugln();
|
debugln();
|
||||||
debugln("requeteDB='$requeteDB'");
|
debugln("requeteDB='$requeteDB'");
|
||||||
$resDB = $gDatabaseJO->query($requeteDB);
|
$resDB = $gDatabaseJO->query($requeteDB);
|
||||||
|
|
||||||
return reponse($resSphinx, $resDB, $criteres, $total_time, $formR,
|
return reponse($resSphinx, $resDB, $criteres, $total_time, $formR,$form2crit, $deb);
|
||||||
$form2crit, $deb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------- //
|
// --------------------------------------------------------------------------- //
|
||||||
|
@ -1090,6 +1090,11 @@ class EntrepriseItem
|
|||||||
*/
|
*/
|
||||||
public $Ville;
|
public $Ville;
|
||||||
|
|
||||||
|
/** Pays
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $Pays;
|
||||||
|
|
||||||
/** Téléphone
|
/** Téléphone
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
@ -1787,44 +1787,57 @@ class Interne extends WsScore
|
|||||||
if (empty($maxRep)) $maxRep = 200;
|
if (empty($maxRep)) $maxRep = 200;
|
||||||
if (empty($pertinence)) $pertinence = false;
|
if (empty($pertinence)) $pertinence = false;
|
||||||
|
|
||||||
$mLiens = new MLiens('');
|
$formR = array(
|
||||||
// rechercheActionnaire($nom, $cpVille, $siren, $pays, $pctMin, $pctMax, $deb, $nbRep, $maxRep, $pertinence)
|
'type' => 'act',
|
||||||
$etabs = $mLiens->rechercheActionnaire($nom, $cpVille, $siren, $pays, $pctMin, $pctMax, $deb, $nbRep, $maxRep, $pertinence);
|
'siren' => $siren,
|
||||||
|
'actNomRS' => join(' ', array($nom, $cpVille)),
|
||||||
|
'pays' => $pays,
|
||||||
|
'pctMin' => $pctMin,
|
||||||
|
'pctMax' => $pctMax,
|
||||||
|
);
|
||||||
|
|
||||||
|
$version = defined('SPHINX_ACT_VERSION') ? SPHINX_ACT_VERSION : 1;
|
||||||
|
require_once 'Metier/sphinx/rechercheFonc.php';
|
||||||
|
$etabs = rechercheAct($formR, $deb, $nbRep, $maxRep);
|
||||||
|
|
||||||
$iInsee = new MInsee();
|
$iInsee = new MInsee();
|
||||||
|
|
||||||
$tabRet = array();
|
$tabRet = array();
|
||||||
foreach ($etabs['reponses'] as $etab) {
|
|
||||||
$act = new EntrepriseActItem();
|
$reponses = $etabs['reponses'];
|
||||||
$act->id = $etab['id'];
|
if (count($reponses)>0) {
|
||||||
$act->Pertinence = $etab['Pertinence'];
|
foreach ($reponses as $etab) {
|
||||||
$act->Siret = $etab['Siret'];
|
$act = new EntrepriseActItem();
|
||||||
$act->Siege = $etab['Siege'];
|
$act->id = $etab['id'];
|
||||||
$act->Nom = prepareString(strtr($etab['Nom'],'/*',' '));
|
$act->Pertinence = $etab['Pertinence'];
|
||||||
$act->Nom2 = prepareString($etab['Nom2']);
|
$act->Siret = $etab['Siret'];
|
||||||
$act->Sigle = prepareString($etab['Sigle']);
|
$act->Siege = $etab['Siege'];
|
||||||
$act->Enseigne = prepareString($etab['Enseigne']);
|
$act->Nom = prepareString(strtr($etab['Nom'],'/*',' '));
|
||||||
$act->Adresse = prepareString($etab['Adresse']);
|
$act->Nom2 = prepareString($etab['Nom2']);
|
||||||
$act->Adresse2 = prepareString($etab['Adresse2']);
|
$act->Sigle = prepareString($etab['Sigle']);
|
||||||
$act->CP = $etab['CP'];
|
$act->Enseigne = prepareString($etab['Enseigne']);
|
||||||
$act->Ville = prepareString($etab['Ville']);
|
$act->Adresse = prepareString($etab['Adresse']);
|
||||||
$act->Tel = $etab['Tel'];
|
$act->Adresse2 = prepareString($etab['Adresse2']);
|
||||||
$act->Fax = $etab['Fax'];
|
$act->CP = $etab['CP'];
|
||||||
$act->FJ = $etab['FJ'];
|
$act->Ville = prepareString($etab['Ville']);
|
||||||
$act->FJLib = prepareString($iInsee->getLibelleFJ($etab['FJ']));
|
$act->Pays = $etab['Pays'];
|
||||||
$act->Siren = $etab['Siren'];
|
$act->Tel = $etab['Tel'];
|
||||||
$act->Nic = $etab['Nic'];
|
$act->Fax = $etab['Fax'];
|
||||||
$act->Actif = $etab['Actif'];
|
$act->FJ = $etab['FJ'];
|
||||||
$act->NafEtab = $etab['NafEtab']; // Etablissement
|
$act->FJLib = prepareString($iInsee->getLibelleFJ($etab['FJ']));
|
||||||
$act->NafEtabLib = prepareString($iInsee->getLibelleNaf($etab['NafEtab'])); // Etablissement
|
$act->Siren = $etab['Siren'];
|
||||||
$act->NafEnt = $etab['NafEnt']; // Entreprise
|
$act->Nic = $etab['Nic'];
|
||||||
$act->NafEntLib = prepareString($iInsee->getLibelleNaf($etab['NafEnt']));
|
$act->Actif = $etab['Actif'];
|
||||||
$act->ActNomRs = $etab['ActNomRs'];
|
$act->NafEtab = $etab['NafEtab']; // Etablissement
|
||||||
$act->ActPays = $etab['ActPays'];
|
$act->NafEtabLib = prepareString($iInsee->getLibelleNaf($etab['NafEtab'])); // Etablissement
|
||||||
$act->ActDateLien = $etab['ActDateLien'];
|
$act->NafEnt = $etab['NafEnt']; // Entreprise
|
||||||
$act->ActActif = $etab['ActActif'];
|
$act->NafEntLib = prepareString($iInsee->getLibelleNaf($etab['NafEnt']));
|
||||||
$act->ActPmin = $etab['ActPmin'];
|
$act->ActNomRs = $etab['ActNomRs'];
|
||||||
$tabRet[] = $act;
|
$act->ActPays = $etab['ActPays'];
|
||||||
|
$act->ActDateLien = $etab['ActDateLien'];
|
||||||
|
$act->ActActif = $etab['ActActif'];
|
||||||
|
$act->ActPmin = $etab['ActPmin'];
|
||||||
|
$tabRet[] = $act;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = new SearchActReturn();
|
$output = new SearchActReturn();
|
||||||
|
@ -1079,6 +1079,12 @@ class EntrepriseActItem
|
|||||||
*/
|
*/
|
||||||
public $Ville;
|
public $Ville;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pays
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $Pays;
|
||||||
|
|
||||||
/** Téléphone
|
/** Téléphone
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user