diff --git a/library/Metier/insee/classMInsee.php b/library/Metier/insee/classMInsee.php index 8008fb56..16581ed6 100644 --- a/library/Metier/insee/classMInsee.php +++ b/library/Metier/insee/classMInsee.php @@ -5566,9 +5566,16 @@ class MInsee return $tabImportExport; } - function getInfosNotice($siren, $nic) { + function getInfosNotice($siren, $nic) + { /** Elements provenant du Notice 80 hors identité **/ - $tabTmp=$this->iDb->select('insee.insee_notices', 'insSIREN, insNIC, insL4_VOIE, insL6_POST, insRPET, insDEPCOMEN, insRPEN, insARRONET, insCTONET, insTCD, insZEMET, insDU, insTU, insUU, insMMINTRET, insMMINTREN, insVMAJ, insVMAJ1, insVMAJ2, insVMAJ3, insRECME, insEAEANT, insEAEAPET, insEAESEC1T, insEAESEC2T, insEAEANN, insEAEAPEN, insEAESEC1N, insEAESEC2N, insEAESEC3N, insEAESEC4N, dateNotice', "insSIREN=$siren AND insNIC=$nic ORDER BY dateNotice DESC LIMIT 0,1", false, MYSQL_ASSOC); + $tabTmp=$this->iDb->select('insee.insee_notices', + 'insSIREN, insNIC, insL4_VOIE, insL6_POST, LPAD(insRPET,2,0) AS insRPET, insDEPCOMEN, + LPAD(insRPEN,2,0) AS insRPEN, insARRONET, insCTONET, insTCD, LPAD(insZEMET,2,0) AS insZEMET, insDU, + insTU, insUU, insMMINTRET, insMMINTREN, insVMAJ, insVMAJ1, insVMAJ2, insVMAJ3, insRECME, insEAEANT, + insEAEAPET, insEAESEC1T, insEAESEC2T, insEAEANN, insEAEAPEN, insEAESEC1N, insEAESEC2N, insEAESEC3N, + insEAESEC4N, dateNotice', + "insSIREN=$siren AND insNIC=$nic ORDER BY dateNotice DESC LIMIT 0,1", false, MYSQL_ASSOC); return $tabTmp[0]; } diff --git a/library/Metier/partenaires/classMTel.php b/library/Metier/partenaires/classMTel.php index 4d699b78..4bf2d5fa 100644 --- a/library/Metier/partenaires/classMTel.php +++ b/library/Metier/partenaires/classMTel.php @@ -63,6 +63,7 @@ class MTel $strActif=''; if ($actif==1) $strActif=" AND actif=1 "; elseif($actif==0) $strActif=" AND actif=0 "; + $ret=$this->iDb->select( 'telephonie', 'siren,nic,dateProvPartenaire,typeTel,infoTel,LPAD(telephone,10,0) AS telephone,actif,partenaire,idUtilisateur,dateInsert,dateInsert*1 AS dateInsertYmd,dateConfPartenaire,partenaireConf,nbConf,idUpdate,dateUpdate,dateUpdate*1 AS dateUpdateYmd', diff --git a/scripts/jobs/enrichissement.php b/scripts/jobs/enrichissement.php index 2f7d82ef..bf38c7ae 100644 --- a/scripts/jobs/enrichissement.php +++ b/scripts/jobs/enrichissement.php @@ -254,12 +254,14 @@ $tabDico = array( 'GPS', 'NaceEtab', 'NaceEnt', - 'TelOrder' + 'TelOrder', + 'LienHead', ), 'multiple' => array( 'actionnaires', 'participations', 'annoncetxt', + 'groupes', ), ); @@ -1475,6 +1477,7 @@ function TelOrderData($siren, $nic, $values) $c = new MTel(); $result = $c->getTel($siren, 0, true, 1); + $tabData = array(); if ( count($result)>0 ) { $element = array( 'TelOrderTypeTel' => $result['typeTel'], @@ -1490,6 +1493,36 @@ function TelOrderData($siren, $nic, $values) return $tabData; } +function LienHeadEntete() +{ + return array( + 'HeadSiren', + 'HeadIsin', + 'HeadPpPm', + 'HeadRS', + ); +} + +function LienHeadData($siren, $nic, $values) +{ + global $dbJo; + require_once 'Metier/partenaires/classMLiens2.php'; + + $c = new MLiens2($siren, 'siren', $dbJo); + $id = $c->getHead(); + $result = $c->getIdentity($id); + $tabData = array(); + if ( $result ) { + $tabData = array( + 'HeadSiren' => $result->siren, + 'HeadIsin' => $result->isin, + 'HeadPpPm' => $result->PpPm, + 'HeadRS' => $result->RS, + ); + } + return $tabData; +} + function actionnairesEntete() { return array(