diff --git a/application/controllers/GiantController.php b/application/controllers/GiantController.php index 75ec92911..edb8e4517 100644 --- a/application/controllers/GiantController.php +++ b/application/controllers/GiantController.php @@ -330,4 +330,35 @@ class GiantController extends Zend_Controller_Action endforeach; $this->view->val = $merged; } + public function retriveAction() + { + $this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript'); + $giantController = new GiantControllerLib(); + $result = $giantController->retrive( + 1, + $this->TestIndication, + 'RetrieveMonitoringEventsForCustomer' + ); + $this->view->result = $result; + $merged =Array(); + foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent): + if ($merged[$MonitoringEvent->ProviderOrderId]){ + array_push($merged[$MonitoringEvent->ProviderOrderId],$MonitoringEvent) ; + } else { + $merged[$MonitoringEvent->ProviderOrderId][]=$MonitoringEvent; + } + endforeach; + $this->view->val = $merged; + + $merged_siren =Array(); + foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent): + if ($merged_siren[$MonitoringEvent->Company->CompanyId]){ + array_push($merged_siren[$MonitoringEvent->Company->CompanyId],$MonitoringEvent) ; + } else { + $merged_siren[$MonitoringEvent->Company->CompanyId][]=$MonitoringEvent; + } + endforeach; + $this->view->val_siren = $merged_siren; + + } } \ No newline at end of file diff --git a/application/views/default/scripts/giant/retrive.phtml b/application/views/default/scripts/giant/retrive.phtml new file mode 100644 index 000000000..4c141aed1 --- /dev/null +++ b/application/views/default/scripts/giant/retrive.phtml @@ -0,0 +1,226 @@ +
+

SURVEILLANCE

+
+source) ){ +?> + + + + + + + + + +
Nombre d'entités affichéesresult->MonitoringEvents->MonitoringEvent)?>
Nombre de surveillancesval)?>
+ + + + + + +
Nombre de surveillances source?>nbSurveillances?>
+ +
+ + + +

Options de recherche

+ +
+ + +
+
+Tri + +par + +
+ +
+
+" /> + +
+
+ + +

Liste des surveillances

+
+curPage>=1) { ?> + + +curPage!=$this->totPage) { ?> +Page / totPage?> + + +curPage+1<$this->totPage) { ?> + + +
+ +
+ + + + + + + + + + + + +val_siren as $monitor) {?> +
+ + + + + + + + + + + + +
SirenRaison SocialeRéférenceSurveillanceAjout leEnvoyé le
+

Company->CompanyId ?>

+
+

Company->CompanyName['0']->_ ?>

+
+

ProviderOrderId?>

+
+ ".$monitor_type->Company->Event[0]->EventCode."

"; + + + } //Fin foreach?> +
+ ".$monitor_type->Company->Event[0]->Date->_."

"; + } + ?> +
+ ".$monitor_type->Company->Event[0]->Date->_."

"; + } + ?> +
+
+ +
+curPage>=1) { ?> + + +curPage!=$this->totPage) { ?> +Page / totPage?> + + +curPage+1<$this->totPage) { ?> + + +
+ +
+ + + + diff --git a/library/Giant/Controllers.lib.php b/library/Giant/Controllers.lib.php index e5e088bbf..7eba19aef 100644 --- a/library/Giant/Controllers.lib.php +++ b/library/Giant/Controllers.lib.php @@ -100,6 +100,7 @@ Class GiantControllerLib $result = $rapport->GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode); $CommandeP->InternalOrderId = $result->Order->InternalOrderId; + $CommandeP->ProviderOrderId = $result->Order->ProviderOrderId; $Commande->setMonitoring($CommandeP); return ($result); } @@ -135,6 +136,13 @@ Class GiantControllerLib $result = $rapport->GetRetriveMonitoring($CompanyId, $StartFrom,$InternalOrderId,$EventType); return ($result); } + public function retrive($StartFrom,$TestIndication,$EventType) + { + $Utilisateur = new Scores_Utilisateur(); + $rapport = new GiantRechercheController('FR', $TestIndication); + $result = $rapport->GetRetrive($StartFrom,$TestIndication,$EventType); + return ($result); + } protected function parcourTableau($array) { $tableau = array(); @@ -334,6 +342,12 @@ Class GiantRechercheController extends GiantFunction $result = $this->CreditData->getMethode('RetrieveMonitoringEventsFor'.$EventType, array($CompanyId, $StartFrom, $InternalOrderId)); return ($result); } + public function GetRetrive($StartFrom,$TestIndication, $EventType) + { + $this->CreditData = new CreditData($this->soapG); + $result = $this->CreditData->getMethode($EventType, array($CompanyId,$StartFrom)); + return ($result); + } public function ListeRapport($CompanyId) { $this->CreditData = new CreditData($this->soapG, $CompanyId); diff --git a/library/Giant/RequestDatabase.lib.php b/library/Giant/RequestDatabase.lib.php index 808229a6d..e7af2ab6d 100644 --- a/library/Giant/RequestDatabase.lib.php +++ b/library/Giant/RequestDatabase.lib.php @@ -41,6 +41,7 @@ Class Commandes 'ActualStartDate' => $parametres->ActualStartDate, 'ActualEndDate' => $parametres->ActualEndDate, 'InternalOrderId' => $parametres->InternalOrderId, + 'ProviderOrderId' => $parametres->ProviderOrderId, ); $commandes->insert($data); } diff --git a/library/Giant/WSgiant.php b/library/Giant/WSgiant.php index f4dc3a14b..aea3c1d47 100644 --- a/library/Giant/WSgiant.php +++ b/library/Giant/WSgiant.php @@ -33,7 +33,7 @@ class WSgiant extends Zend_Soap_Client $giantHeader = new stdClass(); $giantHeader->ConsumerId = $this->wsService->header->ConsumerId; - $giantHeader->CustomerId = $utilisateur->getLogin(); + $giantHeader->CustomerId = '001'; $giantHeader->Provider = new stdClass(); $giantHeader->Provider->CountryCode = $parametres->CountryCode; diff --git a/library/Scores/Utilisateur.php b/library/Scores/Utilisateur.php index e19d93c74..49247cb81 100644 --- a/library/Scores/Utilisateur.php +++ b/library/Scores/Utilisateur.php @@ -18,13 +18,18 @@ class Scores_Utilisateur /** * Récupére les valeurs du profil depuis le webservice * @param stdClass $InfosLogin + * @params string $password * @return stdClass */ - public function updateProfil($InfosLogin) + public function updateProfil($InfosLogin, $password = null) { $identity = new stdClass; - $identity->username = $login; - $identity->password = $password; + $identity->username = $InfosLogin->result->login; + if ($password === null) { + $identity->password = $this->identity->password; + } else { + $identity->password = $password; + } $identity->email = $InfosLogin->result->email; $identity->profil = $InfosLogin->result->profil; $identity->pref = $InfosLogin->result->pref; @@ -56,6 +61,8 @@ class Scores_Utilisateur $identity->langtmp = $lang; $identity->browser = $this->getBrowserInfo(); + $this->identity = $identity; + return $identity; } diff --git a/scripts/jobs/getActes.php b/scripts/jobs/getActes.php index 978cb18ad..5b5d0d35d 100644 --- a/scripts/jobs/getActes.php +++ b/scripts/jobs/getActes.php @@ -277,11 +277,11 @@ foreach ($tabCommandes as $ref => $commande){ if (preg_match('/^([0-9]{4}_).*?$/', $refC, $matches)){ $path = $infogreffe->bilanPath($refC); $nomCible = $infogreffe->bilanFilename($sirenC, $refC); - $type = 'acte'; + $type = 'bilan'; } else { $path = $infogreffe->actePath($refC); $nomCible = $infogreffe->acteFilename($sirenC, $refC); - $type = 'bilan'; + $type = 'acte'; } if (file_exists(ACTES_IGNUM_LOCAL_DIR.$fichier)