ZonePrioritaire, AdresseDom, Iris
This commit is contained in:
parent
03539ead8c
commit
4264241547
@ -543,6 +543,21 @@ class Scores_Extract_Dict
|
||||
'help' => "",
|
||||
'columns' => array()
|
||||
),
|
||||
'ZonePrioritaire' => array(
|
||||
'lib' => '',
|
||||
'help' => "",
|
||||
'columns' => array()
|
||||
),
|
||||
'AdresseDom'=> array(
|
||||
'lib' => '',
|
||||
'help' => "",
|
||||
'columns' => array()
|
||||
),
|
||||
'Iris'=> array(
|
||||
'lib' => '',
|
||||
'help' => "",
|
||||
'columns' => array()
|
||||
),
|
||||
);
|
||||
|
||||
public function __construct(){}
|
||||
|
@ -248,6 +248,9 @@ $tabDico = array(
|
||||
'TelOrder',
|
||||
'LienHead',
|
||||
'LienHeadUltimate',
|
||||
'ZonePrioritaire',
|
||||
'AdresseDom',
|
||||
'Iris',
|
||||
),
|
||||
'multiple' => array(
|
||||
'actionnaires',
|
||||
@ -1663,6 +1666,92 @@ function LienHeadUltimateData($siren, $nic, $values)
|
||||
return $tabData;
|
||||
}
|
||||
|
||||
function ZonePrioritaireEntete() {
|
||||
return array(
|
||||
'ZUS',
|
||||
'NZUS',
|
||||
'ZRU',
|
||||
'NZRU',
|
||||
'ZFU',
|
||||
'NZFU',
|
||||
'CUCS',
|
||||
'NCUCS',
|
||||
'ZRR',
|
||||
'NZRR',
|
||||
'ZAFR',
|
||||
'NZAFR',
|
||||
);
|
||||
}
|
||||
function ZonePrioritaireData($siren, $nic, $value) {
|
||||
global $iDb;
|
||||
$tabData = array();
|
||||
$result = $iDb->select(
|
||||
'etablissements e, insee.identite i',
|
||||
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
|
||||
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
|
||||
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
|
||||
if (count($result) > 0) {
|
||||
$iAmabis = new Metier_Partenaires_MAmabis($iDb);
|
||||
$tabData = $iAmabis->getZonage($result['adr_num'], $result['adr_btq'], $result['adr_typeVoie'], $result['adr_libVoie'],
|
||||
$result['adr_cp'], $result['adr_ville'], trim($result['ADR_DEP'].$result['ADR_COM'].$result['CODEVOIE']),
|
||||
false, 'TEST', false);
|
||||
}
|
||||
return $tabData;
|
||||
}
|
||||
|
||||
function AdresseDomEntete() {
|
||||
return array(
|
||||
'AdresseDomNb',
|
||||
);
|
||||
}
|
||||
function AdresseDomData($siren, $nic, $value) {
|
||||
global $iDb;
|
||||
$tabData = array();
|
||||
$result = $iDb->select(
|
||||
'etablissements e, insee.identite i',
|
||||
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
|
||||
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
|
||||
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
|
||||
if (count($result) > 0) {
|
||||
$c = new Metier_Insee_MInsee();
|
||||
$dom = $c->infoAdresseDom($result['adr_num'], $result['adr_btq'], $result['adr_typeVoie'], $result['adr_libVoie'],
|
||||
$result['adr_cp'], $result['adr_ville']);
|
||||
$tabData['AdresseDomNb'] = $dom['nbEntrep'];
|
||||
}
|
||||
|
||||
return $tabData;
|
||||
}
|
||||
|
||||
function IrisEntete() {
|
||||
return array(
|
||||
'codIris',
|
||||
'codComIris',
|
||||
'libIris',
|
||||
'typIris',
|
||||
'evoIris',
|
||||
'trIris',
|
||||
'grdQuartier',
|
||||
'rivoli',
|
||||
);
|
||||
}
|
||||
function IrisData($siren, $nic, $values) {
|
||||
global $iDb;
|
||||
$tabData = array();
|
||||
$result = $iDb->select(
|
||||
'etablissements e, insee.identite i',
|
||||
"LPAD(e.adr_num,4,0) AS adr_num, e.adr_btq, e.adr_typeVoie, e.adr_libVoie, e.adr_comp,
|
||||
LPAD(e.adr_cp,5,0) AS adr_cp, e.adr_ville, i.ADR_DEP, LPAD(i.ADR_COM,3,0) AS ADR_COM, i.CODEVOIE",
|
||||
"i.SIREN=e.siren AND i.NIC=e.nic AND siren=$siren AND nic=$nic", false, MYSQL_ASSOC);
|
||||
if (count($result) > 0) {
|
||||
$c = new Metier_Insee_MInsee();
|
||||
$tabData = $c->getInfosIris($result['ADR_DEP'].$result['ADR_COM'],
|
||||
substr($result['CODEVOIE'],0,4), $result['adr_num'], $result['adr_btq'],
|
||||
$result['adr_typeVoie'], $result['adr_libVoie']);
|
||||
}
|
||||
|
||||
return $tabData;
|
||||
}
|
||||
|
||||
function actionnairesEntete()
|
||||
{
|
||||
return array(
|
||||
|
Loading…
Reference in New Issue
Block a user