Prepare new release 2.8, issue #0002114

This commit is contained in:
Michael RICOIS 2015-05-28 13:19:28 +00:00
parent aef8f4d490
commit 9f2f33a6b8
10 changed files with 435 additions and 246 deletions

View File

@ -1,13 +1,14 @@
<?php
// Generated by ZF's ./bin/classmap_generator.php
return array(
'SdMetier_Graydon_Service' => dirname(__FILE__) . '//Graydon/Service.php',
'SdMetier_Infogreffe_DocAC' => dirname(__FILE__) . '//Infogreffe/DocAC.php',
'SdMetier_Infogreffe_DocBI' => dirname(__FILE__) . '//Infogreffe/DocBI.php',
'SdMetier_Infogreffe_DocST' => dirname(__FILE__) . '//Infogreffe/DocST.php',
'SdMetier_Infogreffe_Service' => dirname(__FILE__) . '//Infogreffe/Service.php',
'SdMetier_Scoring_Vars' => dirname(__FILE__) . '//Scoring/Vars.php',
'SdMetier_Search_Engine' => dirname(__FILE__) . '//Search/Engine.php',
'SdMetier_Sfr_Compile' => dirname(__FILE__) . '//Sfr/Compile.php',
'SdMetier_Sfr_Scoring' => dirname(__FILE__) . '//Sfr/Scoring.php',
'SdMetier_Graydon_Service' => dirname(__FILE__) . '//Graydon/Service.php',
'SdMetier_Infogreffe_DocAC' => dirname(__FILE__) . '//Infogreffe/DocAC.php',
'SdMetier_Infogreffe_DocBI' => dirname(__FILE__) . '//Infogreffe/DocBI.php',
'SdMetier_Infogreffe_DocST' => dirname(__FILE__) . '//Infogreffe/DocST.php',
'SdMetier_Infogreffe_Service' => dirname(__FILE__) . '//Infogreffe/Service.php',
'SdMetier_Intersud_Service' => dirname(__FILE__) . '//Intersud/Service.php',
'SdMetier_Rnvp_Detail' => dirname(__FILE__) . '//Rnvp/Detail.php',
'SdMetier_Search_Engine' => dirname(__FILE__) . '//Search/Engine.php',
'SdMetier_Sfr_Compile' => dirname(__FILE__) . '//Sfr/Compile.php',
'SdMetier_Sfr_Scoring' => dirname(__FILE__) . '//Sfr/Scoring.php',
);

View File

@ -268,8 +268,7 @@ class Entreprise extends Scores_Ws_Server
$identite->DateMajANN = $entrep['dateMajANN']; //@todo : date
$identite->DateMajID = $entrep['dateMajIdentite']; //@todo : date
if (preg_match('/NAF4/i', $this->User->pref))
{
if ( preg_match('/NAF4/i', $this->User->pref) ) {
$entrep2 = $iInsee->getNaf4($siren, $nic, $id);
if ( $entrep2 !== false ) {
$identite->Naf4Ent = $entrep2['apen4'];
@ -279,7 +278,7 @@ class Entreprise extends Scores_Ws_Server
}
}
$this->wsLog('identite',$siret,$id);
$this->wsLog('identite', $siret, $id);
return $identite;
}
@ -300,13 +299,13 @@ class Entreprise extends Scores_Ws_Server
}
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
$output = new AvisRncs();
$iDb = new WDB();
$rncs = new MRncs($iDb);
//jo.etablissements => insee uniquement, rncs ?
//Entreprise
$infosEtab = $rncs->getIdentiteEtab($siren);
if ( $infosEtab === false ) {
@ -317,14 +316,14 @@ class Entreprise extends Scores_Ws_Server
$output->Sigle = $infosEtab['sigle'];
$output->Enseigne = $infosEtab['enseigne'];
$output->NomCommercial = $infosEtab['nomCommercial'];
$output->Siren = $infosEtab['siren'];
$output->NumGest = $infosEtab['numRC'];
$output->RadiationDate = $infosEtab['dateRad'];
$output->ImmatDate = $infosEtab['dateImma'];
$output->NafCode = $infosEtab['nafEnt'];
$output->NafLabel = $infosEtab['nafEntLib'];
if (empty($infosEtab['dateRad']) || $infosEtab['dateRad'] = '0000-00-00') {
$output->TribunalCode = $infosEtab['triCode']; //@todo
$output->TribunalLabel = $infosEtab['libGreffe']; // @todo
@ -336,7 +335,7 @@ class Entreprise extends Scores_Ws_Server
$output->CapitalDev = $infosEtab['capitalDevIso'];
}
$output->CapitalType = $infosEtab['capitalType'];
$output->SiegeAdresseNum = intval($infosEtab['adrNumVoie']);
$output->SiegeAdresseBtq = $infosEtab['adrIndRep'];
$output->SiegeAdresseVoieType = $infosEtab['adrTypeVoie'] ;
@ -344,12 +343,12 @@ class Entreprise extends Scores_Ws_Server
$output->SiegeAdresseComp = $infosEtab['adrComp'];
$output->SiegeAdresseCP = $infosEtab['cp'];
$output->SiegeAdresseVille = $infosEtab['commune'];
$output->DateMajRCS = $infosEtab['DateMajRCS'];
//Durée de la société - impossible
$output->DureeDate = '';
//Date du dernier bilan - MOIS/JOUR au pire chercher dans l'annonce
try {
$bilanM = new Application_Model_JoBilans();
@ -363,18 +362,18 @@ class Entreprise extends Scores_Ws_Server
$output->CompteArretJour = substr($result->dateExercice,6,2);
}
} catch(Zend_Db_Exception $e) {}
//=> Avec l'adresse du premier siège
$output->ConstitutionTribunalCode = '';
$output->ConstitutionTribunalLabel = '';
$iInsee = new MInsee($iDb);
$dirs = $iInsee->getDirigeants($siren, false);
$liste = array();
foreach ($dirs as $nb => $dir)
{
$dirigeant = new AvisRncsAdmin();
$dirigeant->Code = $dir['Fonction'];
$dirigeant->Label = $dir['Titre'];
$dirigeant->CompanyName = $dir['Societe'];
@ -389,23 +388,23 @@ class Entreprise extends Scores_Ws_Server
$liste[] = $dirigeant;
}
$output->Administration = $liste;
$insee = $iInsee->getIdentiteEntreprise($siren);
//Origine, code à transformer - getIdentiteEntreprise - insee
$output->Origine = $insee['OrigineCreation'];
//Activité réelle - getIdentiteEntreprise - insee
$output->Activite = $insee['Activite'];
$output->BodaccActivite = $insee['Activite'];
//Date de création à l'insee - getIdentiteEntreprise - insee
//@todo : Aller cherche dans les annonces bodacc création + acquisition
$output->ActiviteDate = substr($insee['DateCreaEn'],0,4).'-'.substr($insee['DateCreaEn'],4,2).'-'.substr($insee['DateCreaEn'],6,2);
//Type d'exploitation - getIdentiteEntreprise - insee
$output->Exploitation = $insee['TypeExploitation'];
//Liste des jugements
$output->Evenements = array();
$evens = $rncs->getListeJugements($siren);
@ -414,7 +413,7 @@ class Entreprise extends Scores_Ws_Server
$output->Evenements[] = $even['dateEffet'] . ' - ' . $even['libEven'];
}
}
//Liste des dépots
$output->Depots = array();
$infogreffe = new SdMetier_Infogreffe_DocAC($siren);
@ -437,7 +436,7 @@ class Entreprise extends Scores_Ws_Server
$acte->infos[] = $infos['libDepot'];
}
}
//Acte constitutif - Statut
//@todo : STATUTS CONSTITUTIFS
$date = substr($depot->ActeDate,0,4);
@ -445,15 +444,15 @@ class Entreprise extends Scores_Ws_Server
$output->ConstitutionActeDate = $depot->ActeDate;
$output->ConstitutionDepotDate = $depot->DepotDate;
}
$i++;
if ($i < 4 || $i > count($depots)-4) {
$output->Depots[] = $acte;
}
}
}
//Liste des établissements actifs au RNCS
$output->Etablissements = array();
$result = $iInsee->getEtablissements($siren, '', 0, 200, 200, 0, 1);
@ -464,7 +463,7 @@ class Entreprise extends Scores_Ws_Server
}
}
}
$this->wsLog('avisrncs', $siren);
return $output;
@ -2763,7 +2762,7 @@ class Entreprise extends Scores_Ws_Server
$mRatios->setTrancheEffectif($efftr);
$tabRatios = $mRatios->calcul($tabBilan);
}
$nbRatios = count($tabRatios);
debugLog('I',"Liste des Ratios demandée pour $siren après calculRatios ($nbRatios)",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
@ -3073,7 +3072,7 @@ class Entreprise extends Scores_Ws_Server
return $output;
} else {
$O = $this->searchNomAdr(
Scores_Locale_String::cleanstring($entCriteres->raisonSociale),
Scores_Locale_String::cleanstring($entCriteres->adresse),
@ -3461,7 +3460,7 @@ class Entreprise extends Scores_Ws_Server
// --- Supprimer les éléments autres que chiffres dans le siret
$siret = preg_replace('/[^0-9]/', '', $siret);
// --- Controle de la taille du siret/siren
if ( strlen($siret)!=14 && strlen($siret)!=9 ){
debugLog('W', "Siren/Siret $siret incorrect", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
@ -3562,7 +3561,7 @@ class Entreprise extends Scores_Ws_Server
$nbReponses = 1;
$nbReponsesTotal = 1;
}
else {
$iDb = new WDB();
$iDb->insert('jo.siren_inexistants', array(
@ -4634,7 +4633,7 @@ class Entreprise extends Scores_Ws_Server
$tabRatios = $mRatios->calcul($tabBilan);
//file_put_contents('debug.log', print_r($tabRatios,1));
}
$nbRatios = count($tabRatios);
debugLog('I',"Liste des Ratios demandée pour $siren après calculRatios ($nbRatios)",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
@ -4947,18 +4946,18 @@ class Entreprise extends Scores_Ws_Server
elseif ($cp>=99000) $dep=substr($cp,0,2);
elseif ($cp>=98000) $dep=substr($cp,0,3);
elseif ($cp>=97100 && $cp<97700) $dep=substr($cp,0,3);
if ($type=='pre') {
$iDb = new WDB();
$tabTmp2 = $iDb->select('jo.villes', 'DEP, COM, AR, CT', 'codeInsee='.$codeInsee, false, MYSQL_ASSOC);
$arrond = $tabTmp2[0]['AR'];
$tabTmp2 = $iDb->select('insee.insee_tabArrond', 'CHEFLIEU, ARTMAJ, NCC', "DEP='$dep' AND AR='$arrond'", false, MYSQL_ASSOC);
$nomSousPref = trim(strtr($tabTmp2[0]['ARTMAJ'],array('('=>'',')'=>'',' '=>'', "'"=>'')).' '.$tabTmp2[0]['NCC']);
$tabTmp = $iBodacc->getTribunauxParDep($dep);
foreach ($tabTmp as $i=>$tribunal)
{
if ($tribunal['triType']=='A' || $tribunal['triType']=='B')

View File

@ -48,7 +48,7 @@ class Entreprise extends Scores_Ws_Server
}
$db = new WDB();
$iInsee = new MInsee($db);
$entrep = $iInsee->getIdentiteEntreprise($siren, $nic, $id, $forceVerif);
if (empty($entrep) || empty($entrep['id']) ) {
@ -109,7 +109,7 @@ class Entreprise extends Scores_Ws_Server
}
$identite->AdresseDomEnt = $tabAdresseDomEnt;
$identite->AdresseDomNb = $entrep['AdresseDomNb'];
// --- Indicateur Adresse RNVP
try {
$rnvpM = new Application_Model_VillesRnvpSources();
@ -121,8 +121,8 @@ class Entreprise extends Scores_Ws_Server
$identite->AdresseRnvpCode = $rnvpResult->codeRetour;
}
} catch (Zend_Db_Exception $e) {}
$identite->Civilite = $entrep['Civilite'];
$identite->NbEtab = $entrep['NbEtab'];
$identite->Tel = prepareString($entrep['Tel']);
@ -228,7 +228,7 @@ class Entreprise extends Scores_Ws_Server
$identite->Bilan->CAestime = $entrep['bilanFLestime'];
$identite->Bilan->Resultat = prepareString($entrep['bilanHN']);
$identite->Bilan->Effectif = $entrep['bilanYP'];
$iBourse = new MBourse($siren, $db);
$bourse = $iBourse->getInfosBourse($siren);
$identite->Bourse->placeCotation = $bourse['placeCotation'];
@ -290,7 +290,7 @@ class Entreprise extends Scores_Ws_Server
$identite->Naf4EtabLib = prepareString($entrep2['apet4_lib']);
}
}
// --- Détermination du groupe - Tête de groupe
if (!empty($siren)) {
$lienM = new MLiens2($siren, 'siren');
@ -315,7 +315,7 @@ class Entreprise extends Scores_Ws_Server
$sql = $countryM->select()->from($countryM, array('codPays3', 'libPays'));
$result = $countryM->fetchAll($sql);
} catch (Zend_Db_Adapter_Exception $e) {}
$tabPays = array();
if ( $result->count()>0 ) {
foreach ( $result as $item ) {
@ -333,7 +333,7 @@ class Entreprise extends Scores_Ws_Server
}
}
}
$this->wsLog('identite', $siret, $id);
@ -354,13 +354,13 @@ class Entreprise extends Scores_Ws_Server
if ( $len != 9 ) {
$this->sendError('1020');
}
$output = new AvisRncs();
$iDb = new WDB();
$rncs = new MRncs($iDb);
//jo.etablissements => insee uniquement, rncs ?
//Entreprise
$infosEtab = $rncs->getIdentiteEtab($siren);
if ( $infosEtab === false ) {
@ -371,14 +371,14 @@ class Entreprise extends Scores_Ws_Server
$output->Sigle = $infosEtab['sigle'];
$output->Enseigne = $infosEtab['enseigne'];
$output->NomCommercial = $infosEtab['nomCommercial'];
$output->Siren = $infosEtab['siren'];
$output->NumGest = $infosEtab['numRC'];
$output->RadiationDate = $infosEtab['dateRad'];
$output->ImmatDate = $infosEtab['dateImma'];
$output->NafCode = $infosEtab['nafEnt'];
$output->NafLabel = $infosEtab['nafEntLib'];
if (empty($infosEtab['dateRad']) || $infosEtab['dateRad'] = '0000-00-00') {
$output->TribunalCode = $infosEtab['triCode']; //@todo
$output->TribunalLabel = $infosEtab['libGreffe']; // @todo
@ -390,7 +390,7 @@ class Entreprise extends Scores_Ws_Server
$output->CapitalDev = $infosEtab['capitalDevIso'];
}
$output->CapitalType = $infosEtab['capitalType'];
$output->SiegeAdresseNum = intval($infosEtab['adrNumVoie']);
$output->SiegeAdresseBtq = $infosEtab['adrIndRep'];
$output->SiegeAdresseVoieType = $infosEtab['adrTypeVoie'] ;
@ -398,12 +398,12 @@ class Entreprise extends Scores_Ws_Server
$output->SiegeAdresseComp = $infosEtab['adrComp'];
$output->SiegeAdresseCP = $infosEtab['cp'];
$output->SiegeAdresseVille = $infosEtab['commune'];
$output->DateMajRCS = $infosEtab['DateMajRCS'];
//Durée de la société - impossible
$output->DureeDate = '';
//Date du dernier bilan - MOIS/JOUR au pire chercher dans l'annonce
try {
$bilanM = new Application_Model_JoBilans();
@ -417,18 +417,18 @@ class Entreprise extends Scores_Ws_Server
$output->CompteArretJour = substr($result->dateExercice,6,2);
}
} catch(Zend_Db_Exception $e) {}
//=> Avec l'adresse du premier siège
$output->ConstitutionTribunalCode = '';
$output->ConstitutionTribunalLabel = '';
$iInsee = new MInsee($iDb);
$dirs = $iInsee->getDirigeants($siren, false);
$liste = array();
foreach ($dirs as $nb => $dir)
{
$dirigeant = new AvisRncsAdmin();
$dirigeant->Code = $dir['Fonction'];
$dirigeant->Label = $dir['Titre'];
$dirigeant->CompanyName = $dir['Societe'];
@ -443,23 +443,23 @@ class Entreprise extends Scores_Ws_Server
$liste[] = $dirigeant;
}
$output->Administration = $liste;
$insee = $iInsee->getIdentiteEntreprise($siren);
//Origine, code à transformer - getIdentiteEntreprise - insee
$output->Origine = $insee['OrigineCreation'];
//Activité réelle - getIdentiteEntreprise - insee
$output->Activite = $insee['Activite'];
$output->BodaccActivite = $insee['Activite'];
//Date de création à l'insee - getIdentiteEntreprise - insee
//@todo : Aller cherche dans les annonces bodacc création + acquisition
$output->ActiviteDate = substr($insee['DateCreaEn'],0,4).'-'.substr($insee['DateCreaEn'],4,2).'-'.substr($insee['DateCreaEn'],6,2);
//Type d'exploitation - getIdentiteEntreprise - insee
$output->Exploitation = $insee['TypeExploitation'];
//Liste des jugements
$output->Evenements = array();
$evens = $rncs->getListeJugements($siren);
@ -468,7 +468,7 @@ class Entreprise extends Scores_Ws_Server
$output->Evenements[] = $even['dateEffet'] . ' - ' . $even['libEven'];
}
}
//Liste des dépots
$output->Depots = array();
$infogreffe = new SdMetier_Infogreffe_DocAC($siren);
@ -491,7 +491,7 @@ class Entreprise extends Scores_Ws_Server
$acte->infos[] = $infos['libDepot'];
}
}
//Acte constitutif - Statut
//@todo : STATUTS CONSTITUTIFS
$date = substr($depot->ActeDate,0,4);
@ -499,15 +499,15 @@ class Entreprise extends Scores_Ws_Server
$output->ConstitutionActeDate = $depot->ActeDate;
$output->ConstitutionDepotDate = $depot->DepotDate;
}
$i++;
if ($i < 4 || $i > count($depots)-4) {
$output->Depots[] = $acte;
}
}
}
//Liste des établissements actifs au RNCS
$output->Etablissements = array();
$result = $iInsee->getEtablissements($siren, '', 0, 200, 200, 0, 1);
@ -518,12 +518,12 @@ class Entreprise extends Scores_Ws_Server
}
}
}
$this->wsLog('avisrncs', $siren);
return $output;
}
/**
* RNVP
* @param string $companyId
@ -538,8 +538,8 @@ class Entreprise extends Scores_Ws_Server
public function getRNVP($companyId, $type = null)
{
$this->authenticate();
$this->permission('RNVP');
//$this->permission('RNVP');
// --- Identifiant SD : source + id
if ($type === null) {
$source = substr($companyId,0,3);
@ -573,7 +573,7 @@ class Entreprise extends Scores_Ws_Server
else {
throw new SoapFault('ERR', 'type identifiant inconnu');
}
// --- Formattage pour la sortie
try {
$rnvpM = new Application_Model_VillesRnvpSources();
@ -606,7 +606,7 @@ class Entreprise extends Scores_Ws_Server
if ($rnvpResult === null) {
throw new SoapFault('MSG', "Aucun résultat");
}
$InfoRNVP = new Rnvp();
$InfoRNVP->L1 = $rnvpResult->L1rnvp;
$InfoRNVP->L2 = $rnvpResult->L2rnvp;
@ -615,7 +615,7 @@ class Entreprise extends Scores_Ws_Server
$InfoRNVP->L5 = $rnvpResult->L5rnvp;
$InfoRNVP->L6 = $rnvpResult->L6rnvp;
$InfoRNVP->L7 = $rnvpResult->L7rnvp;
$InfoRNVP->ProcessDate = $rnvpResult->dateRetourRnvp;
$InfoRNVP->ProcessCode = $rnvpResult->codeRetour;
switch($rnvpResult->codeRetour) {
@ -637,7 +637,7 @@ class Entreprise extends Scores_Ws_Server
}
$InfoRNVP->QualityCode = $rnvpResult->CQadrs;
$InfoRNVP->QualityLabel = ''; // Label CQadrs
$InfoRNVP->GeoInseeCommune = $rnvpResult->Insee;
$InfoRNVP->GeoHexavia = $rnvpResult->IdHexavia;
$InfoRNVP->GeoHexapost = $rnvpResult->IdHexaposte;
@ -647,14 +647,14 @@ class Entreprise extends Scores_Ws_Server
$InfoRNVP->GeoIlot = $rnvpResult->Iris_Ilot99;
$InfoRNVP->GeoIris = $rnvpResult->Iris_CodeIris;
$InfoRNVP->GeoCanton = $rnvpResult->Iris_Canton;
$InfoRNVP->DateInsert = $rnvpResult->dateInsert;
$InfoRNVP->DateUpdate = $rnvpResult->dateUpdate;
$this->wsLog('rnvp');
return $InfoRNVP;
} catch (Zend_Db_Exception $e) {
if ($this->User->idClient==1) {
throw new SoapFault('ERR', $e->getMessage());
@ -663,15 +663,15 @@ class Entreprise extends Scores_Ws_Server
}
}
}
protected function getIndiScore()
{
//Identite Light => propre à la méthode
//Indiscore
//Text
}
protected function getReportStd()
{
//Identite Light
@ -679,16 +679,16 @@ class Entreprise extends Scores_Ws_Server
//Indiscore
//Commentaires
}
protected function getReportComment()
{
//Commentaires suivant niveau enregistré dans le profil de l'utilisateur
}
protected function getValo(){}
}
?>

View File

@ -233,13 +233,13 @@ class Identite
* @var int
*/
public $AdresseDomNb;
/**
* Date du retour RNVP
* @var string
*/
public $AdresseRnvpDate;
/**
* Indicateur Adresse RVNP (ND|KO|OK)
* @var string
@ -765,6 +765,36 @@ class Identite
* @var AutreSiret[]
*/
public $AutreSiret;
/**
*
* @var string
*/
public $GroupeId;
/**
*
* @var string
*/
public $GroupeName;
/**
*
* @var string
*/
public $GroupeIsin;
/**
*
* @var string
*/
public $GroupeCountryCode;
/**
*
* @var string
*/
public $GroupeCountryLabel;
}
@ -801,6 +831,43 @@ class IdentiteBourse {
public $derCoursCloture;
}
class InfosIris
{
/** Code Iris format court
* @var string
*/
public $codIris;
/** Code Iris format long (code commune Insee + code Iris)
* @var string
*/
public $codComIris;
/** Libellé de la zone Iris
* @var string
*/
public $libIris;
/** Libellé du type de la zone Iris
* @var string
*/
public $typIris;
/** Dernière évolution de la zone Iris
* @var string
*/
public $evoIris;
/** Code TRIRIS de l'Iris
* @var string
*/
public $trIris;
/** Code Grand Quartier de l'Iris
* @var string
*/
public $grdQuartier;
}
class IdentiteBilan
{
@ -1332,97 +1399,97 @@ class Rnvp
* @var string
*/
public $L1;
/**
* @var string
*/
public $L2;
/**
* @var string
*/
public $L3;
/**
* @var string
*/
public $L4;
/**
* @var string
*/
public $L5;
/**
* @var string
*/
public $L6;
/**
* @var string
*/
public $L7;
/**
* @var string
*/
public $ProcessDate;
/**
* @var string
*/
public $ProcessCode;
/**
* @var string
*/
public $ProcessLabel;
/**
* @var string
*/
public $QualityCode;
/**
* @var string
*/
public $QualityLabel;
/**
* @var string
*/
public $GeoInseeCommune;
/**
* @var string
*/
public $GeoHexavia;
/**
* @var string
*/
public $GeoHexapost;
/**
* @var string
*/
public $GeoHexacle;
/**
* @var string
*/
public $GeoDepartement;
/**
* @var string
*/
public $GeoRivoliCode;
/**
* @var string
*/
public $GeoIlot;
/**
* @var string
*/
@ -1432,12 +1499,12 @@ class Rnvp
* @var string
*/
public $GeoCanton;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/

View File

@ -28,10 +28,10 @@ class Gestion extends Scores_Ws_Server
$this->authIp = $ip;
break;
}
//Authentification des applications par login
$this->authenticate();
//Enregistrement authentification OK
try {
$authLogM = new Application_Model_Sdv1UtilisateursAuthLog();
@ -41,7 +41,7 @@ class Gestion extends Scores_Ws_Server
'ip' => $ip,
));
} catch (Zend_Db_Exception $e) {}
//Check App authorization - Find Service parameters
$serviceM = new Application_Model_Sdv1ClientsServices();
@ -180,7 +180,7 @@ class Gestion extends Scores_Ws_Server
}
}
}
/**
* Limite de temps
*/
@ -467,6 +467,7 @@ class Gestion extends Scores_Ws_Server
$acces = new AccesDetails();
$acces->Code = $item->Acces;
$acces->Label = $this->listeDroits[$item->Acces];
//@todo : ajouter Enable
$output->Acces[] = $acces;
}
}
@ -1075,7 +1076,7 @@ class Gestion extends Scores_Ws_Server
} catch ( Zend_Db_Exception $e ) {
return false;
}
//Prepare data to insert
foreach ($infos as $key => $value) {
if (array_key_exists($key, $userData)) {

View File

@ -2,4 +2,5 @@
return array(
'BilanInput' => 'BilanInput',
'PieceKbis' => 'PieceKbis',
'Bilan' => 'Bilan',
);

View File

@ -17,11 +17,11 @@ class Order extends Scores_Ws_Server
{
$this->authenticate();
$this->permission('UPLOADBILAN');
//Check siren
$refCommande = uniqid();
$data = array(
'refCommande' => $refCommande,
'siren' => $siren,
@ -75,7 +75,7 @@ class Order extends Scores_Ws_Server
return false;
}
/**
* Liste des commandes de saisie de bilan
* @param string $month
@ -91,17 +91,17 @@ class Order extends Scores_Ws_Server
}
$dateStart = $month.'-01 00:00:00';
$dateEnd = $month.'-31 23:59:59';
$list = array();
try {
$commandeM = new Application_Model_Sdv1OrderBilanInput();
$sql = $commandeM->select()->where('userId=?', $this->User->id);
$sql = $commandeM->select()->where('userId=?', $this->User->id)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Siren = $item->siren;
$cmd->BilanFileRecv = $item->bilanFileRecv;
$cmd->BilanCloture = $item->bilanCloture;
@ -120,7 +120,7 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return $list;
}
@ -133,14 +133,14 @@ class Order extends Scores_Ws_Server
protected function getBilanInputDetail($ref)
{
$this->authenticate();
try {
$commandeM = new Application_Model_Sdv1OrderBilanInput();
$sql = $commandeM->select()->where('userId=?', $this->User->id)->where('refCommande=?', $ref);
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Siren = $item->siren;
$cmd->BilanFileRecv = $item->bilanFileRecv;
$cmd->BilanCloture = $item->bilanCloture;
@ -158,10 +158,10 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return null;
}
/**
* Liste des commandes KBIS
* @param string $month
@ -177,17 +177,17 @@ class Order extends Scores_Ws_Server
}
$dateStart = $month.'-01 00:00:00';
$dateEnd = $month.'-31 23:59:59';
$list = array();
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new PieceKbis();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -204,10 +204,10 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return $list;
}
/**
* Detail de la commande d'un KBIS
* @param unknown $ref
@ -217,14 +217,14 @@ class Order extends Scores_Ws_Server
protected function getKbisDetail($ref)
{
$this->authenticate();
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -240,14 +240,14 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return null;
}
protected function getKbisFile($ref)
{
$this->authenticate();
// --- Paramètres
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
if ($_SERVER['SERVER_PORT']!='80'){
@ -256,18 +256,18 @@ class Order extends Scores_Ws_Server
$c = Zend_Registry::get('config');
$path = realpath($c->profil->path->secure).'/kbis';
$file = null;
// --- Lecture des informations de la commande
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -283,13 +283,19 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
}
protected function getActeList($month = null)
/**
* Liste des commandes d'acte infogreffe
* @param string $month
* @throws SoapFault
* @return Acte[]
*/
public function getActeList($month = null)
{
$this->authenticate();
@ -298,27 +304,25 @@ class Order extends Scores_Ws_Server
}
$dateStart = $month.'-01 00:00:00';
$dateEnd = $month.'-31 23:59:59';
$list = array();
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesAc();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd = new Acte();
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
//@todo : Génére le libellé du document
$cmd->DocDepotNum;
$cmd->DocDepotDate;
$cmd->DocActeNum;
$cmd->DocActeType;
$cmd->DocActeDate;
$cmd->DocLabel = ''; //@todo : Génére le libellé du document
$cmd->DocDepotNum = $item->depotNum;
$cmd->DocDepotDate = $item->depotDate;
$cmd->DocActeNum = $item->acteNum;
$cmd->DocActeType = $item->acteType;
$cmd->DocActeDate = $item->acteDate;
$cmd->CompanyName = $item->raisonSociale;
$cmd->CompanySiren = $item->siren;
$cmd->DateInsert = $item->dateInsert;
@ -333,20 +337,20 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return $list;
}
protected function getActeDetail($ref){}
protected function getActeFile($ref){}
/**
* Liste des commandes de bilan infogreffe
* @param string $month
* @throws SoapFault
* @return multitype:BilanInput
* @return Bilan[]
*/
protected function getBilanList($month = null)
public function getBilanList($month = null)
{
$this->authenticate();
@ -355,17 +359,17 @@ class Order extends Scores_Ws_Server
}
$dateStart = $month.'-01 00:00:00';
$dateEnd = $month.'-31 23:59:59';
$list = array();
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesBi();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd = new Bilan();
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->DocBilanCloture = $item->bilanCloture;
@ -384,10 +388,10 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return $list;
}
/**
* Détail de la commande de bilan Infogreffe
* @param unknown $ref
@ -397,14 +401,14 @@ class Order extends Scores_Ws_Server
protected function getBilanDetail($ref)
{
$this->authenticate();
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
$sql = $commandeM->select()->where('login=?', $this->User->login)->where('refCommande=?', $ref);
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->DocBilanCloture = $item->bilanCloture;
@ -422,19 +426,19 @@ class Order extends Scores_Ws_Server
throw new SoapFault('ERR', "Application error");
}
}
return null;
}
protected function getBilanFile($ref){}
protected function setInvestigation()
{
$this->authenticate();
$this->permission('enquetec');
//Table pour le stockage des demandes d'investigation
}
}

View File

@ -96,12 +96,12 @@ class Order extends Scores_Ws_Server
try {
$commandeM = new Application_Model_Sdv1OrderBilanInput();
$sql = $commandeM->select()->where('userId=?', $this->User->id);
$sql = $commandeM->select()->where('userId=?', $this->User->id)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Siren = $item->siren;
$cmd->BilanFileRecv = $item->bilanFileRecv;
$cmd->BilanCloture = $item->bilanCloture;
@ -140,7 +140,7 @@ class Order extends Scores_Ws_Server
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Siren = $item->siren;
$cmd->BilanFileRecv = $item->bilanFileRecv;
$cmd->BilanCloture = $item->bilanCloture;
@ -182,12 +182,12 @@ class Order extends Scores_Ws_Server
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesKb();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new PieceKbis();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -224,7 +224,7 @@ class Order extends Scores_Ws_Server
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -267,7 +267,7 @@ class Order extends Scores_Ws_Server
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->CompanyName = $item->raisonSociale;
@ -289,7 +289,13 @@ class Order extends Scores_Ws_Server
}
protected function getActeList($month = null)
/**
* Liste des commandes d'acte infogreffe
* @param string $month
* @throws SoapFault
* @return Acte[]
*/
public function getActeList($month = null)
{
$this->authenticate();
@ -303,22 +309,20 @@ class Order extends Scores_Ws_Server
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesAc();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd = new Acte();
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
//@todo : Génére le libellé du document
$cmd->DocDepotNum;
$cmd->DocDepotDate;
$cmd->DocActeNum;
$cmd->DocActeType;
$cmd->DocActeDate;
$cmd->DocLabel = ''; //@todo : Génére le libellé du document
$cmd->DocDepotNum = $item->depotNum;
$cmd->DocDepotDate = $item->depotDate;
$cmd->DocActeNum = $item->acteNum;
$cmd->DocActeType = $item->acteType;
$cmd->DocActeDate = $item->acteDate;
$cmd->CompanyName = $item->raisonSociale;
$cmd->CompanySiren = $item->siren;
$cmd->DateInsert = $item->dateInsert;
@ -344,9 +348,9 @@ class Order extends Scores_Ws_Server
* Liste des commandes de bilan infogreffe
* @param string $month
* @throws SoapFault
* @return multitype:BilanInput
* @return Bilan[]
*/
protected function getBilanList($month = null)
public function getBilanList($month = null)
{
$this->authenticate();
@ -360,12 +364,12 @@ class Order extends Scores_Ws_Server
try {
$commandeM = new Application_Model_Sdv1GreffeCommandesBi();
$sql = $commandeM->select()->where('login=?', $this->User->login);
$sql = $commandeM->select()->where('login=?', $this->User->login)->order('dateInsert DESC');
$result = $commandeM->fetchAll($sql);
if (count($result) > 0) {
foreach($result as $item) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd = new Bilan();
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->DocBilanCloture = $item->bilanCloture;
@ -404,7 +408,7 @@ class Order extends Scores_Ws_Server
$item = $commandeM->fetchRow($sql);
if ($item !== null) {
$cmd = new BilanInput();
$cmd->Reference = $item->refCommande;
$cmd->Reference = strtoupper($item->refCommande);
$cmd->Mode = $item->mode;
$cmd->Error = $item->cmdError;
$cmd->DocBilanCloture = $item->bilanCloture;

View File

@ -5,42 +5,42 @@ class BilanInput
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Siren;
/**
* @var string
*/
public $BilanFileRecv;
/**
* @var string
*/
public $BilanCloture;
/**
* @var string
*/
public $BilanType;
/**
* @var string
*/
public $ErreurDate;
/**
* @var string
*/
public $ErreurLabel;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
@ -49,37 +49,37 @@ class BilanInput
class PieceKbis
{
/**
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Mode;
/**
* @var string
*/
public $Error;
/**
* @var string
*/
public $CompanyName;
/**
* @var string
*/
public $CompanySiren;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
@ -92,42 +92,42 @@ class PieceBilan
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Mode;
/**
* @var string
*/
public $Error;
/**
* @var string
*/
public $DocBilanCloture;
/**
* @var string
*/
public $DocBilanType;
/**
* @var string
*/
public $CompanyName;
/**
* @var string
*/
public $CompanySiren;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
@ -140,62 +140,172 @@ class PieceActe
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Mode;
/**
* @var string
*/
public $Error;
/**
* @var string
*/
public $DocDepotNum;
/**
* @var string
*/
public $DocDepotDate;
/**
* @var string
*/
public $DocActeNum;
/**
* @var string
*/
public $DocActeType;
/**
* @var string
*/
public $DocActeDate;
/**
* @var string
*/
public $CompanyName;
/**
* @var string
*/
public $CompanySiren;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
public $DateEnvoi;
}
class Bilan
{
/**
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Mode;
/**
* @var string
*/
public $Error;
/**
* @var string
*/
public $DocBilanCloture;
/**
* @var string
*/
public $DocBilanType;
/**
* @var string
*/
public $CompanyName;
/**
* @var string
*/
public $CompanySiren;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
public $DateEnvoi;
}
class Acte
{
/**
* @var string
*/
public $Reference;
/**
* @var string
*/
public $Mode;
/**
* @var string
*/
public $Error;
/**
* @var string
*/
public $DocDepotNum;
/**
* @var string
*/
public $DocDepotDate;
/**
* @var string
*/
public $DocActeNum;
/**
* @var string
*/
public $DocActeType;
/**
* @var string
*/
public $DocActeDate;
/**
* @var string
*/
public $CompanyName;
/**
* @var string
*/
public $CompanySiren;
/**
* @var string
*/
public $DateInsert;
/**
* @var string
*/
public $DateEnvoi;
}

View File

@ -107,6 +107,8 @@ if ($opts->install)
// Generate cache file
// genCache.php
passthru('php '.realpath(dirname(__FILE__)).'/genCache.php --generate Evenements');
// genCodeRatios.php
if ( substr(strtoupper(PHP_OS),0,3) != 'WIN' ) {