Modification getAnnoncesLegales
This commit is contained in:
parent
66a3b144af
commit
4df64f60bb
File diff suppressed because it is too large
Load Diff
@ -634,6 +634,7 @@ class SdMetier_Sfr_Scoring
|
||||
if ( $this->ValInseeActif==1 && !empty($this->ValSituationJuridique) ) {
|
||||
|
||||
$this->ValRJ = 0; //Liste des codes - 1200
|
||||
$classInsee->AnnoncesLegalesVisu = true;
|
||||
$retRJ = $classInsee->getAnnoncesLegales($siren, 0, array('1200','1201','1202','1203','1204','1205','1206','1207','1208','1209','1210','1211','1212','1214','1215','1216'));
|
||||
if (count($retRJ)>0) {
|
||||
$this->ValRJ = 1;
|
||||
@ -641,6 +642,7 @@ class SdMetier_Sfr_Scoring
|
||||
if ($this->debug) file_put_contents('sfr.log', "RJ = ".$this->ValRJ."\n", FILE_APPEND);
|
||||
|
||||
$this->ValSV = 0; //Liste des codes - 1100
|
||||
$classInsee->AnnoncesLegalesVisu = true;
|
||||
$retSV = $classInsee->getAnnoncesLegales($siren, 0, array('1100','1101','1102','1110','1119'));
|
||||
if (count($retSV)>0) {
|
||||
$this->ValSV = 1;
|
||||
@ -648,6 +650,7 @@ class SdMetier_Sfr_Scoring
|
||||
if ($this->debug) file_put_contents('sfr.log', "SV = ".$this->ValSV."\n", FILE_APPEND);
|
||||
|
||||
$this->ValLJ = 0; //Liste des codes - 1300
|
||||
$classInsee->AnnoncesLegalesVisu = true;
|
||||
$retLJ = $classInsee->getAnnoncesLegales($siren, 0, array('1300','1301','1302', '1303', '1304', '1305', '1306', '1307', '1308', '1309', '13010', '1311', '1312', '1313', '1346'));
|
||||
if (count($retLJ)>0) {
|
||||
$this->ValLJ = 1;
|
||||
|
@ -110,6 +110,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
$inseeM = new MInsee();
|
||||
$inseeM->AnnoncesLegalesVisu = true;
|
||||
$tabProcol = $inseeM->getAnnoncesLegales($siren, 0, 'P', false);
|
||||
if ( count($tabProcol)>0 ) {
|
||||
$modelIdentite->JugementDate = $tabProcol[0]['dateJugement'];
|
||||
|
@ -64,14 +64,17 @@ class Entreprise extends Scores_Ws_Server
|
||||
$DateCreaEn = $evaluation['DateCreaEt'];
|
||||
} elseif ( $evaluation['DateCreaEn'] > 0 ) {
|
||||
$DateCreaEn = $evaluation['DateCreaEn'];
|
||||
}
|
||||
if ( !empty($DateCreaEn) ) {
|
||||
if (substr($DateCreaEn, -2) * 1 == 0) {
|
||||
$Infos->DateCreaEn = substr($DateCreaEn,0,6).'01';
|
||||
} else {
|
||||
$Infos->DateCreaEn = $DateCreaEn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- Correction pour l'envoi des dates
|
||||
if ( !empty($DateCreaEn) ) {
|
||||
if (strlen($DateCreaEn)<8) {
|
||||
$DateCreaEn = str_pad($DateCreaEn, 8, '0', STR_PAD_RIGHT);
|
||||
}
|
||||
if (substr($DateCreaEn, -2) * 1 == 0) {
|
||||
$DateCreaEn = substr($DateCreaEn,0,6).'01';
|
||||
}
|
||||
}
|
||||
|
||||
$Infos->AdresseNum = str_pad($evaluation['AdresseNum'], 5, 0, STR_PAD_LEFT);
|
||||
$Infos->AdresseBtq = $evaluation['AdresseBtq'];
|
||||
|
@ -1762,9 +1762,11 @@ class Entreprise extends Scores_Ws_Server
|
||||
} elseif (intval($siren)!=0) {
|
||||
$types = array('bodacc', 'balo', 'boamp', 'asso');
|
||||
$iInsee = new MInsee();
|
||||
$iInsee->AnnoncesLegalesVisu = true;
|
||||
foreach ($types as $type) {
|
||||
switch($type) {
|
||||
case 'bodacc':
|
||||
//@ todo : Get count
|
||||
$anns = $iInsee->getAnnoncesLegales($siren);
|
||||
$total = count($anns);
|
||||
break;
|
||||
@ -1820,6 +1822,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
$iInsee = new MInsee();
|
||||
$iInsee->AnnoncesLegalesVisu = true;
|
||||
|
||||
$isList = false;
|
||||
|
||||
@ -1835,27 +1838,29 @@ class Entreprise extends Scores_Ws_Server
|
||||
$liste = array();
|
||||
$cpt = 0;
|
||||
|
||||
if (is_array($anns))
|
||||
{
|
||||
if ( is_array($anns) && $nbReponses > 0 ) {
|
||||
foreach ($anns as $nb => $ann) {
|
||||
if ($isList===true && $nb<$position) { continue; }
|
||||
$cpt++;
|
||||
if ($isList===true && $cpt>$nbRep) { break; }
|
||||
|
||||
//@todo : Entites
|
||||
/**
|
||||
* Si l'annonce est une annonce BODACC alors
|
||||
* recherche des entités concernées
|
||||
*/
|
||||
$entites = array();
|
||||
if (in_array($ann['BodaccCode'], array('BODA', 'BODB', 'BODC'))) {
|
||||
$detailM = new Application_Model_JoBodaccDetail();
|
||||
$sql = $detailM->select()->from($detailM, array(
|
||||
'LPAD(siren, 9, 000000000) AS siren',
|
||||
'LPAD(nic, 5, 00000) AS nic',
|
||||
'LPAD(siren, 9, 0) AS siren',
|
||||
'LPAD(nic, 5, 0) AS nic',
|
||||
'raisonSociale','adresse', 'codePostal', 'ville', 'typeEven')
|
||||
)->where('id=?', $ann['id']);
|
||||
$result = $detailM->fetchAll($sql);
|
||||
if (count($result)>1) {
|
||||
foreach ($result as $entity) {
|
||||
$entite = new AnnonceEntite();
|
||||
$entite->siret = $entity->siren.$entity->nic;
|
||||
$entite->siret = $entity->siren . $entity->nic;
|
||||
$entite->raisonSociale = $entity->raisonSociale;
|
||||
|
||||
$iBodacc = new MBodacc();
|
||||
|
@ -601,6 +601,13 @@ class Entreprise extends Scores_Ws_Server
|
||||
'Iris_Ilot99',
|
||||
'Iris_CodeIris',
|
||||
'Iris_Canton',
|
||||
/*
|
||||
Cdx_Matricule
|
||||
Cdx_V5Geo
|
||||
Cdx_V6Geo
|
||||
Cdx_V5Cdx
|
||||
Cdx_V6Cdx
|
||||
*/
|
||||
'dateInsert',
|
||||
'dateUpdate',
|
||||
))->where('source=?', $source)->where('source_id=?', $sourceId);
|
||||
@ -673,6 +680,14 @@ class Entreprise extends Scores_Ws_Server
|
||||
$InfoRNVP->GeoIris = $rnvpResult->Iris_CodeIris;
|
||||
$InfoRNVP->GeoCanton = $rnvpResult->Iris_Canton;
|
||||
|
||||
/*
|
||||
Cdx_Matricule int(7) Matricule contrat Cedex
|
||||
Cdx_V5Geo varchar(38) Ligne 5 géographique
|
||||
Cdx_V6Geo varchar(38) Ligne 6 géographique
|
||||
Cdx_V5Cdx varchar(38) Mention spéciale de distribution
|
||||
Cdx_V6Cdx varchar(38) Acheminement Cedex
|
||||
*/
|
||||
|
||||
$InfoRNVP->DateInsert = $rnvpResult->dateInsert;
|
||||
$InfoRNVP->DateUpdate = $rnvpResult->dateUpdate;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user