merge develop
This commit is contained in:
commit
eac4ac48e4
@ -208,7 +208,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
$level = Logger::DEBUG;
|
||||
} else {
|
||||
$level = Logger::INFO;
|
||||
$level = Logger::NOTICE;
|
||||
}
|
||||
$log->pushHandler(new StreamHandler($logFile), $level);
|
||||
$log->pushProcessor(new IntrospectionProcessor());
|
||||
|
@ -78,6 +78,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
} else {
|
||||
$pathServiceUrl = 'clients/'.$client.'/v'.$version.'?wsdl';
|
||||
}
|
||||
$pathServiceUri = 'clients/'.$client.'/v'.$version;
|
||||
// --- On redéfini le nom du service
|
||||
$serviceClassName = 'Entreprise';
|
||||
$fichierWsdl = $clientClassName.'-'.$serviceClassName.'-'.$version.'.wsdl';
|
||||
@ -92,6 +93,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
} else {
|
||||
$pathServiceUrl = $serviceName.'/v'.$version.'?wsdl';
|
||||
}
|
||||
$pathServiceUri = $serviceName.'/v'.$version;
|
||||
$fichierWsdl = $serviceClassName.'-'.$version.'.wsdl';
|
||||
}
|
||||
|
||||
@ -104,6 +106,11 @@ class ServiceController extends Zend_Controller_Action
|
||||
// --- Get hostname - add compatibility with Reverse Proxy
|
||||
$hostName = $request->getHttpHost();
|
||||
$hostScheme = $request->getScheme();
|
||||
$http = new Zend_Controller_Request_Http();
|
||||
$proxyScheme = $http->getHeader('X-Forwarded-Proto');
|
||||
if ($proxyScheme == 'https') {
|
||||
$hostScheme = 'https';
|
||||
}
|
||||
$fichierWsdl = $hostName . '-' . $hostScheme . '-' . $fichierWsdl;
|
||||
$c = Zend_registry::get('config');
|
||||
$wsdlPath = $c->profil->path->shared . '/wsdl';
|
||||
@ -124,6 +131,10 @@ class ServiceController extends Zend_Controller_Action
|
||||
$wsdl->setBindingStyle(array('style' => 'document'));
|
||||
$wsdl->setClass($serviceClassName);
|
||||
|
||||
if ($hostScheme == 'https') {
|
||||
$wsdl->setUri($hostScheme.'://'.$hostName.'/'.$pathServiceUri);
|
||||
}
|
||||
|
||||
// --- Enregistrement du WSDL dans un fichier
|
||||
if (isset($_GET['wsdl-generate'])) {
|
||||
if (file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
@ -131,7 +142,6 @@ class ServiceController extends Zend_Controller_Action
|
||||
}
|
||||
$wsdl->dump($wsdlPath . '/' . $fichierWsdl);
|
||||
echo "Le fichier $fichierWsdl a été généré";
|
||||
|
||||
// --- Génération/Fourniture du wsdl
|
||||
} elseif (isset($_GET['wsdl']) && !file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
$wsdl->dump($wsdlPath . '/' . $fichierWsdl);
|
||||
|
@ -591,11 +591,11 @@ class Entreprise extends Scores_Ws_Server
|
||||
$tabAct = array();
|
||||
foreach ($tabA as $i=>$lien) {
|
||||
$liens = new Actionnaire();
|
||||
$liens->Pmin = $lien['PDetention'];
|
||||
$liens->MajMin = $lien['MajMin'];
|
||||
$liens->RaisonSociale = $lien['RS'];
|
||||
$liens->Pays = $lien['adresse_pays'];
|
||||
$liens->Siren = $lien['siren'];
|
||||
$liens->Pmin = $lien->PDetention;
|
||||
$liens->MajMin = $lien->MajMin;
|
||||
$liens->RaisonSociale = $lien->RS;
|
||||
$liens->Pays = $lien->adresse_pays;
|
||||
$liens->Siren = $lien->siren;
|
||||
$liens->Actif = 1;
|
||||
$tabAct[] = $liens;
|
||||
}
|
||||
@ -631,6 +631,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
/** Y a t il eu des informations relatives à une cession ? **/
|
||||
$iGreffes = new Metier_Partenaires_MGreffes();
|
||||
$tabCes = $iGreffes->getInfosCessions($siren);
|
||||
if ($tabCes) {
|
||||
$identiteProcol->CessionJugeLib = $tabCes['cessJuge'];
|
||||
$identiteProcol->CessionJugeDate = $tabCes['cessDateJuge'];
|
||||
@ -911,14 +912,15 @@ class Entreprise extends Scores_Ws_Server
|
||||
$annsB=$iInsee->getAnnoncesBalo($siren);
|
||||
$annsA=$iInsee->getAnnoncesAsso($siren);
|
||||
$annsM=$iInsee->getAnnoncesBoamp($siren, $idAnn);
|
||||
} elseif ($filtre==1)
|
||||
$anns=$iInsee->getAnnoncesLegales($siren, $idAnn);
|
||||
elseif ($filtre==2)
|
||||
$annsB=$iInsee->getAnnoncesBalo($siren, $idAnn);
|
||||
elseif ($filtre==3)
|
||||
$annsA=$iInsee->getAnnoncesAsso($siren, $idAnn);
|
||||
elseif ($filtre==4)
|
||||
$annsM=$iInsee->getAnnoncesBoamp($siren, $idAnn);
|
||||
} elseif ($filtre==1) {
|
||||
$anns=$iInsee->getAnnoncesLegales($siren, $idAnn);
|
||||
} elseif ($filtre==2) {
|
||||
$annsB=$iInsee->getAnnoncesBalo($siren, $idAnn);
|
||||
} elseif ($filtre==3) {
|
||||
$annsA=$iInsee->getAnnoncesAsso($siren, $idAnn);
|
||||
} elseif ($filtre==4) {
|
||||
$annsM=$iInsee->getAnnoncesBoamp($siren, $idAnn);
|
||||
}
|
||||
|
||||
if (empty($anns) && empty($annsB) && empty($annsA) && empty($annsM))
|
||||
{
|
||||
@ -3335,7 +3337,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
if(!in_array($key, array('SIREN', 'DATE_FRAICHE_BILAN',
|
||||
'DATE_CLOTURE', 'DATE_CLOTURE_PRE', 'DUREE_MOIS',
|
||||
'DUREE_MOIS_PRE', 'MONNAIE', 'CONSOLIDE', 'MONNAIE_ORI',
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise'))){
|
||||
'MONNAIE_LIV_UNITE', 'SOURCE', 'devise', 'TOP_CONFIDENTIEL'))){
|
||||
$resultPoste = new BilanPoste();
|
||||
$resultPoste->id = $key;
|
||||
$resultPoste->val = $value;
|
||||
|
@ -4384,7 +4384,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(true);
|
||||
$tabBilans = $mBil->listeBilans(true, 0, $this->User->idClient);
|
||||
foreach($tabBilans as $bilan) {
|
||||
$element = new ListeBilans();
|
||||
$element->dateProvPartenaire = $bilan['dateProvPartenaire']; //@todo : date
|
||||
@ -4397,6 +4397,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$element->dureeExercicePre = $bilan['dureeExercicePre'];
|
||||
$element->monnaie = $bilan['monnaie'];
|
||||
$element->source = $bilan['source'];
|
||||
$element->confidentiel = $bilan['confidentiel'];
|
||||
$element->confidentielClient = $bilan['confidentielClient'];
|
||||
$tabRet[] = $element;
|
||||
}
|
||||
|
||||
@ -4703,7 +4705,7 @@ class Entreprise extends Scores_Ws_Server
|
||||
// Ratios
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5, $this->User->idClient);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
if ($nbBilans > 0) {
|
||||
|
@ -2366,6 +2366,11 @@ class ListeBilans
|
||||
* @var int
|
||||
*/
|
||||
public $source;
|
||||
|
||||
/** Confidentialité du bilan (1 si confidentiel, 0 sinon)
|
||||
* @var int
|
||||
*/
|
||||
public $confidentiel;
|
||||
}
|
||||
|
||||
class SetSurveillanceReturn
|
||||
@ -2550,6 +2555,11 @@ class Bilan
|
||||
*/
|
||||
public $SOURCE;
|
||||
|
||||
/** Bilan confidentiel ou non
|
||||
* @var string
|
||||
*/
|
||||
public $TOP_CONFIDENTIEL;
|
||||
|
||||
/** Tableau de postes du bilan dans le formalisme associé au Type de bilan
|
||||
* @var BilanPoste[]
|
||||
*/
|
||||
|
@ -1460,10 +1460,10 @@ class Saisie extends Scores_Ws_Server
|
||||
$row = $bilansM->fetchRow($sql);
|
||||
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1485,7 +1485,7 @@ class Saisie extends Scores_Ws_Server
|
||||
'unite' => $data->unite,
|
||||
'postes' => $data->postes,
|
||||
'partenaire' => 1,
|
||||
'confidentiel' => 0,
|
||||
'confidentiel' => 0,
|
||||
'dateInsert' => date('YmdHis'),
|
||||
);
|
||||
|
||||
@ -1493,10 +1493,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$id = $bilansM->insert($dataToInsert);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1512,10 +1512,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$historiquesM->insert($backupData);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1532,7 +1532,7 @@ class Saisie extends Scores_Ws_Server
|
||||
'unite' => $data->unite,
|
||||
'postes' => $data->postes,
|
||||
'partenaire' => 1,
|
||||
'confidentiel' => 0,
|
||||
'confidentiel' => 0,
|
||||
'dateInsert' => date('YmdHis'),
|
||||
);
|
||||
|
||||
@ -1540,10 +1540,10 @@ class Saisie extends Scores_Ws_Server
|
||||
try {
|
||||
$id = $bilansM->update($dataToUpdate, 'id = '.$row->id);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1566,10 +1566,10 @@ class Saisie extends Scores_Ws_Server
|
||||
'postesDiff' => implode(';', $postesDiff),
|
||||
));
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->User->idClient!=1) {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
} else {
|
||||
if ($this->User->idClient == 1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
} else {
|
||||
throw new SoapFault('ERR', "Application error");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ callInfo.inparams
|
||||
callInfo.inparams[0].name
|
||||
u'parameters'
|
||||
callInfo.inparams[0].type
|
||||
(u'http://wse.scores-decisions.com:8081/service', u'status')
|
||||
(u'http://hostname/service', u'status')
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user