Vue cadastre, patrimoine foncier

This commit is contained in:
Michael RICOIS 2016-07-29 17:37:50 +02:00
parent 53c96de7cd
commit 978c11bd20
4 changed files with 160 additions and 0 deletions

View File

@ -1038,4 +1038,24 @@ class 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;
$response = $ws->getCadastrePatrimoine($params);
$this->view->List = $response->item;
$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,131 @@
<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>
<h2>Propriétés baties</h2>
<div class="paragraph">
<table>
<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 == 'locaux') {?>
<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><?=$p->SurfaceTotal?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10"></td>
<td><?=$s->Surface?></td>
<td><?=$s->NatureLabel?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
<h2>Propriétés non baties</h2>
<div class="paragraph">
<table>
<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 == 'parcelles') {?>
<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->SurfaceTotal?></td>
<td></td>
</tr>
<?php if (count($p->SurfaceDetail->item) > 0) {?>
<?php foreach($p->SurfaceDetail->item as $s) {?>
<tr>
<td colspan="10"></td>
<td><?=$s->Surface?></td>
<td><?=$s->NatureLabel?></td>
</tr>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
<?php }?>
</tbody>
</table>
</div>
</div>

View File

@ -384,6 +384,11 @@ class Scores_Menu
'action' => 'enquetec',
'permission' => 'ENQUETEC',
),
array(
'label' => "Patrimoine",
'controller' => 'evaluation',
'action' => 'cadastre',
),
),
),
array(

View File

@ -29,5 +29,9 @@ return array(
'debug' => true,
'log' => 'mail',
),
'getCadastrePatrimoine' => array(
'debug' => true,
'log' => 'mail',
)
),
);