Ajout cadastre

This commit is contained in:
Michael RICOIS 2016-09-05 16:05:03 +02:00
parent acd1358bc0
commit db8af5c492
3 changed files with 169 additions and 0 deletions

View File

@ -204,6 +204,12 @@ return array(
'controller' => 'evaluation',
'action' => 'enquetec',
),
array(
'label' => "Cadastre",
'module' => 'legal',
'controller' => 'evaluation',
'action' => 'cadastre',
),
),
),
array(

View File

@ -1036,4 +1036,29 @@ class Legal_EvaluationController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('exportObjet', $infos);
}
public function cadastreAction()
{
$this->view->headTitle()->prepend("Cadastre");
$this->view->headTitle()->prepend("Siret ".$this->siret);
$request = $this->getRequest();
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret,0,9);
$ws = new Scores_Ws_Client('entreprise', '0.9');
$params = new stdClass();
$params->companyId = $siren;
try {
$response = $ws->getCadastrePatrimoine($params);
$this->view->List = $response->item;
} catch (Exception $e) {
$this->view->MsgTxt = $e->getMessage();
}
$this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id);
$this->view->assign('siren', $siren);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
}
}

View File

@ -0,0 +1,138 @@
<div id="center">
<h1>PATRIMOINE FONCIER</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
</table>
</div>
<?php if ($this->MsgTxt) {?>
<div class="paragraph"><?=$this->MsgTxt?></div>
<?php } else {?>
<h2>Propriétés baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Bât.</th>
<th>Ent.</th>
<th>Niv.</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'local') {?>
<tr>
<td><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=$p->Batiment?></td>
<td><?=$p->Ent?></td>
<td><?=$p->Niveau?></td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<h2>Propriétés non baties</h2>
<div class="paragraph">
<table class="data">
<thead>
<tr>
<th>Rôle</th>
<th>Dépt.</th>
<th>Commune</th>
<th>Section</th>
<th>N° Plan</th>
<th>Fantoir</th>
<th>Adresse</th>
<th>Surface</th>
<th>Nature</th>
</tr>
</thead>
<tbody>
<?php if (count($this->List) > 0) {?>
<?php foreach($this->List as $p) {?>
<?php if ($p->Type == 'parcelle') {?>
<tr>
<td><?=$p->Role?></td>
<td><?=$p->Departement?></td>
<td><?=$p->CommuneLib?></td>
<td><?=$p->Section?></td>
<td><?=$p->PlanNum?></td>
<td><?=$p->Fantoir?></td>
<td>
<?=empty($p->AdresseNum) ? '' : $p->AdresseNum.' ' ; ?>
<?=empty($p->AdresseInd) ? '' : $p->AdresseInd.' ' ; ?>
<?=empty($p->AdresseType) ? '' : $p->AdresseType.' ' ; ?>
<?=empty($p->AdresseLib) ? '' : $p->AdresseLib.' ' ; ?>
</td>
<td><?=number_format($p->SurfaceTotal, 0, ",", " ")?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="7" align="right"><i>Detail</i></td>
<td><?=number_format($s->Surface, 0, ",", " ")?></td>
<td><?=$s->Label?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<?php }?>
</div>