issue #0001649: Retrive monitoring data receive

This commit is contained in:
Arman KYOKCHAN 2013-06-20 10:35:49 +00:00
parent ad6f5233f1
commit cd055836d1
7 changed files with 208 additions and 8 deletions

View File

@ -300,4 +300,32 @@ class GiantController extends Zend_Controller_Action
}
}
public function retrivemonitoringAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->retrivemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('StartFrom'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
$merged =Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged[$MonitoringEvent->Company->Event[0]->EventCode]){
array_push($merged[$MonitoringEvent->Company->Event[0]->EventCode],$MonitoringEvent) ;
} else {
$merged[$MonitoringEvent->Company->Event[0]->EventCode][]=$MonitoringEvent;
}
endforeach;
$this->view->val = $merged;
}
}

View File

@ -135,7 +135,8 @@
<a class="dial" title="Start Monitoring" href='/giant/startmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Start monitoring</a><br />
<a class="dial" title="Stop Monitoring" href='/giant/stopmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Stop monitoring</a><br />
<a class="dial" title="Update Monitoring" href='/giant/updatemonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Update monitoring</a>
<a class="dial" title="Update Monitoring" href='/giant/updatemonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Update monitoring</a><br />
<a title="Retrive Monitoring" href='/giant/retrivemonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>/InternalOrderId/32768032781/StartFrom/1'>Retrive monitoring</a>
<?php echo'<pre>';print_r($this->modification); ?>

View File

@ -0,0 +1,153 @@
<div id="center">
<pre>
<div class='acord'>
<div id="accordion">
<h3>GENERAL.ADDRESS_CHANGE</h3>
<div>
<?foreach ($this->val['GENERAL.ADDRESS_CHANGE'] as $report):?>
<?print_r($report)?>
<div>
<a name="1"></a>
<span style="font-size:16px;color:#00008C;font-weight:800">Données officielles</span><br /><br />
<ul style="font-size:12px;list-style: none">
<li><b>ProviderEventId</b> <span style="float:right"><?=$report->ProviderEventId?></span></li>
<li><b>InternalEventId</b> <span style="float:right"><?=$report->InternalEventId?></span></li>
<li><b>CompanyId </b> <span style="float:right"><?=$report->Company->CompanyId?></span></li>
<li><b>CompanyName </b> <span style="float:right"><?=$report->Company->CompanyName[0]->_?></span></li>
<li><b>EventCode </b> <span style="float:right"><?=$report->Company->Event[0]->EventCode?></span></li>
<li><b>ProviderEventCode </b> <span style="float:right"><?=$report->Company->Event[0]->ProviderEventCode->_?></span></li>
<li><b>Source </b> <span style="float:right"><?=$report->Company->Event[0]->Source->_?></span></li>
<li><b>Description </b> <span style="float:right"><?=$report->Company->Event[0]->Description->_?></span></li>
<li><b>FreeText </b> <span style="float:right"><?=$report->Company->Event[0]->FreeText->_?></span></li>
</ul>
<br />
<a name="2"></a>
<span style="font-size:16px;color:#00008C;font-weight:800">Données officielles</span><br /><br />
<ul style="font-size:12px;list-style: none">
<li><b>OldCompanyName</b> <span style="float:right"><?=$report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_?></span></li>
<li><b>NewCompanyName</b> <span style="float:right"><?=$report->Company->Event[0]->Value[1]->Company[0]->CompanyName[0]->_?></span></li>
</ul>
<span style="font-size:16px;color:#00008C;font-weight:800">Old Address</span>
<ul style="font-size:12px;list-style: none">
<li><b>InternalEventId</b> <span style="float:right"><?=$report->InternalEventId?></span></li>
<li><b>CompanyId </b> <span style="float:right"><?=$report->Company->CompanyId?></span></li>
<li><b>CompanyName </b> <span style="float:right"><?=$report->Company->CompanyName[0]->_?></span></li>
<li><b>EventCode </b> <span style="float:right"><?=$report->Company->Event[0]->EventCode?></span></li>
<li><b>ProviderEventCode </b> <span style="float:right"><?=$report->Company->Event[0]->ProviderEventCode->_?></span></li>
<li><b>Source </b> <span style="float:right"><?=$report->Company->Event[0]->Source->_?></span></li>
<li><b>Description </b> <span style="float:right"><?=$report->Company->Event[0]->Description->_?></span></li>
<li><b>FreeText </b> <span style="float:right"><?=$report->Company->Event[0]->FreeText->_?></span></li>
</ul>
</div>
<?endforeach;?>
</div>
<h3>GENERAL.COMPANY_NAME_CHANGE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>GENERAL.LEGALFORM_CHANGE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>GENERAL.POSITION_CHANGE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>GENERAL.NEWS</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>GENERAL.MERGER</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>GENERAL.SPLIT_UP</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>FINANCIAL.ANNUAL_ACCOUNT_AVAILABLE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>FINANCIAL.ANNUAL_ACCOUNT_FILED</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>FINANCIAL.CAPITAL_CHANGE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>FINANCIAL.CREDIT_RECOMMENDATION_CHANGE</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>EXCEPTION.BANKRUPTCY_OR_LIQUIDATION</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>EXCEPTION.DEBT_RESTRUCTURING</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
<h3>EXCEPTION.PROTEST_OR_NONPAYMENT</h3>
<div>
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam.
Integer ut neque. Vivamus nisi metus, molestie vel, gravida in,
condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam
mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a
velit eu ante scelerisque vulputate.</p>
</div>
</div>
</div>
</pre>
</div>

View File

@ -79,7 +79,12 @@ Class GiantControllerLib
$result = $rapport->GetUpdateMonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode);
return ($result);
}
public function retrivemonitoring($CompanyId, $StartFrom,$InternalOrderId,$Pays,$TestIndication)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetretriveMonitoring($CompanyId, $StartFrom,$InternalOrderId);
return ($result);
}
protected function parcourTableau($array)
{
$tableau = array();
@ -273,7 +278,12 @@ Class GiantRechercheController extends GiantFunction
$result = $this->CreditData->getMethode('UpdateMonitoringOptions', array($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode));
return ($result);
}
public function GetRetriveMonitoring($CompanyId, $StartFrom, $InternalOrderId)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('RetrieveMonitoringEventsForOrder', array($CompanyId, $StartFrom, $InternalOrderId));
return ($result);
}
public function ListeRapport($CompanyId)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);

View File

@ -268,7 +268,7 @@ Class CreditData extends GiantFunction
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->PreferredEndDate = $PreferredEndDate;
$parametres->InternalOrderId = $InternalOrderId;
$parametres->InternalOrderId = (float)$InternalOrderId;
try {
$result = $this->soapG->StopMonitoring($parametres);
} catch (SoapFault $soapFault) {
@ -277,11 +277,12 @@ Class CreditData extends GiantFunction
return ($result);
}
protected function RetrieveMonitoringEventsForOrder($InternalOrderId, $StartFrom)
protected function RetrieveMonitoringEventsForOrder($CompanyId, $StartFrom,$InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->StartFrom = $StartFrom;
$parametres->InternalOrderId = (float)$InternalOrderId;
var_dump((float)$InternalOrderId);
if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;}
try {
$result = $this->soapG->RetrieveMonitoringEventsForOrder($parametres);
} catch (SoapFault $soapFault) {

View File

@ -12,7 +12,9 @@ $("[required]").on("change", function(){
});
$(document).ready(function() {
validate();
$(function() {
$( "#accordion" ).accordion({heightStyle: "content"});
});
$(function() {
$.datepicker.setDefaults( $.datepicker.regional[ "fr" ] );
$( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd" });

View File

@ -289,4 +289,9 @@
.all_select
{
width: 140px;
}
.acord
{
width:671px;
margin: 0 auto;
}