issue #0001616 : Création clé AdresseNormaliseeInsee pour l'enrichissement d'adresse normalisé uniquement Insee

This commit is contained in:
Michael RICOIS 2013-04-25 09:13:57 +00:00
parent b865936904
commit bc6933ec2b
3 changed files with 51 additions and 36 deletions

View File

@ -19,7 +19,7 @@ profil.mail.method = smtp
profil.mail.smtp_host = smtp.free.fr
profil.mail.email.support = support@scores-decisions.com
profil.mail.email.supportdev = supportdev@scores-decisions.com
profil.path.data = "C:\Users\mricois\www\dataenrichissement"
profil.path.data = "C:\Users\mricois\www\data\enrichissement"
profil.db.local.adapter=mysqli
profil.db.local.params.host=127.0.0.1

View File

@ -175,19 +175,6 @@ $tabDico = array(
),
'where' => ' WHERE insSIREN=$siren AND insNIC=$nicV',
),
'notice80' => array(
'db' => 'insee.notice80',
'cle' => array(
'insL1_nomen' => '',
'insL2_ComP' => '',
'insL3_cadr' => '',
'insL4_VOIE' => '',
'insL5_disp' => '',
'insL6_post' => '',
'insL7_ETRG' => '',
),
'where' => ' WHERE insSIRET=$siren AND insNIC=$nicV',
),
'rncs_entrep' => array(
'db' => 'jo.rncs_entrep',
'cle' => array(
@ -256,6 +243,7 @@ $tabDico = array(
'bilanN2',
'annonces',
'AdresseNormalise',
'AdresseNormaliseInsee',
'SiretSuc',
'privilege',
'GPS',
@ -1349,7 +1337,7 @@ function AdresseNormaliseData($siren, $nic, $values = false)
$output['AdresseL5_DISTSP'] ='';
$output['AdresseL6_POST'] ='';
$output['AdresseL7_PAYS'] ='';
$tmp = $iInsee->getAdresse($siren, $nic);
$tmp = $iInsee->getAdresse($siren, $nic, 0);
if (count($tmp)>0) {
$output['AdresseL1_NOM'] = $tmp['L1_NOM'];
$output['AdresseL2_NOM2'] = $tmp['L2_NOM2'];
@ -1362,6 +1350,42 @@ function AdresseNormaliseData($siren, $nic, $values = false)
return $output;
}
function AdresseNormaliseInseeEntete($values)
{
return array(
'L1_NOM',
'L2_NOM2',
'L3_ADRCOMP',
'L4_VOIE',
'L5_DISTSP',
'L6_POST',
'L7_PAYS',
);
}
function AdresseNormaliseInseeData($siren, $nic, $values = false)
{
$iInsee = new MInsee();
$output['L1_NOM'] ='';
$output['L2_NOM2'] ='';
$output['L3_ADRCOMP'] ='';
$output['L4_VOIE'] ='';
$output['L5_DISTSP'] ='';
$output['L6_POST'] ='';
$output['L7_PAYS'] ='';
$tmp = $iInsee->getAdresse($siren, $nic);
if (count($tmp)>0) {
$output['L1_NOM'] = $tmp['L1_NOM'];
$output['L2_NOM2'] = $tmp['L2_NOM2'];
$output['L3_ADRCOMP'] = $tmp['L3_ADRCOMP'];
$output['L4_VOIE'] = $tmp['L4_VOIE'];
$output['L5_DISTSP'] = $tmp['L5_DISTP'];
$output['L6_POST'] = $tmp['L6_POST'];
$output['L7_PAYS'] = $tmp['L1_PAYS'];
}
return $output;
}
function SiretSucEntete($values)
{
return array(

View File

@ -344,27 +344,6 @@ class Enrichissement
'NBETEXPL' => array(
'lib' => "Insee : Nombre d'établissement exploitant actif"
),
'insL1_nomen' => array(
'lib' => "Insee : insL1_nomen"
),
'insL2_ComP' => array(
'lib' => "Insee : insL2_ComP"
),
'insL3_cadr' => array(
'lib' => "Insee : insL3_cadr"
),
'insL4_VOIE' => array(
'lib' => "Insee : insL4_VOIE"
),
'insL5_disp' => array(
'lib' => "Insee : insL5_disp"
),
'insL6_post' => array(
'lib' => "Insee : insL6_post"
),
'insL7_ETRG' => array(
'lib' => "Insee : insL7_ETRG"
),
'entActiveRncs' => array(
'lib' => "RNCS : Actif - Entreprise"
),
@ -483,6 +462,18 @@ class Enrichissement
'AdresseL7_PAYS' => '',
),
),
'AdresseNormaliseInsee' => array(
'lib' => 'AdresseNormaliseInsee',
'columns' => array(
'L1_NOM' => 'L1_NOMEN',
'L2_NOM2' => 'L2_COMP',
'L3_ADRCOMP' => 'L3_CADR',
'L4_VOIE' => 'L4_VOIE',
'L5_DISTSP' => 'L5_DISP',
'L6_POST' => 'L6_POST',
'L7_PAYS' => 'L7_ETRG',
),
),
'SiretSuc' => array(
'lib' => 'INSEE : Siret Successeur',
'help' => "",