Adresse Normalisé

This commit is contained in:
Michael RICOIS 2012-06-29 14:38:15 +00:00
parent 1d7eaf9d06
commit f8f6e9dfa3
3 changed files with 414 additions and 374 deletions

View File

@ -226,6 +226,7 @@ $tabDico = array(
'bilanN1',
'bilanN2',
'annonces',
'AdresseNormalise'
),
);
@ -1149,6 +1150,44 @@ function indiScoreData($siren, $nic, $values = false)
return $tabData;
}
function AdresseNormaliseEntete($values)
{
return array(
'AdresseL1_NOM',
'AdresseL2_NOM2',
'AdresseL3_ADRCOMP',
'AdresseL4_VOIE',
'AdresseL5_DISTSP',
'AdresseL6_POST',
'AdresseL7_PAYS',
);
}
function AdresseNormaliseData($siren, $nic, $values = false)
{
$iInsee = new MInsee();
$output['AdresseL1_NOM'] ='';
$output['AdresseL2_NOM2'] ='';
$output['AdresseL3_ADRCOMP'] ='';
$output['AdresseL4_VOIE'] ='';
$output['AdresseL5_DISTSP'] ='';
$output['AdresseL6_POST'] ='';
$output['AdresseL7_PAYS'] ='';
$tmp = $iInsee->getAdresse($siren, $nic);
if (count($tmp)>0) {
$output['AdresseL1_NOM'] = $tmp['L1_NOM'];
$output['AdresseL2_NOM2'] = $tmp['L2_NOM2'];
$output['AdresseL3_ADRCOMP'] = $tmp['L3_ADRCOMP'];
$output['AdresseL4_VOIE'] = $tmp['L4_VOIE'];
$output['AdresseL5_DISTSP'] = $tmp['L5_DISTP'];
$output['AdresseL6_POST'] = $tmp['L6_POST'];
$output['AdresseL7_PAYS'] = $tmp['L1_PAYS'];
}
return $output;
}
/* == FUNCTION == */
/**

File diff suppressed because it is too large Load Diff

View File

@ -382,6 +382,7 @@ class Enrichissement
'bilanN1'=> array('values'=>''),
'bilanN2'=> array('values'=>''),
'annonces'=> array('values'=>''),
'AdresseNormalise' => array('values'=>''),
);
public function __construct(){}