SD-29 version beta
This commit is contained in:
parent
f1e51cf91c
commit
550c409a4b
@ -47,7 +47,8 @@ class ProfilController extends Zend_Controller_Action
|
||||
if( $profil->current()->doublon!='' ) {
|
||||
$doublon = json_decode($profil->current()->doublon, true);
|
||||
}
|
||||
$tmp = array();
|
||||
$tmp = array();
|
||||
if(empty($criteres)){$criteres=array();}
|
||||
foreach ($criteres as $critere) {
|
||||
$values = false;
|
||||
if (preg_match('/(.*)\((.*)\)/', $critere, $matches))
|
||||
@ -167,5 +168,6 @@ class ProfilController extends Zend_Controller_Action
|
||||
$this->view->assign('lib', $dico->getDicoLib($key));
|
||||
$this->view->assign('help', $dico->getDicoHelp($key));
|
||||
$this->view->assign('columns', $dico->getDicoColumns($key));
|
||||
$this->view->assign('values', $dico->getDicoValues($key));
|
||||
}
|
||||
}
|
@ -4,10 +4,34 @@
|
||||
<br/>
|
||||
<p>Colonnes de sortie</p>
|
||||
<ul>
|
||||
<?php if ( $this->columns!==false && count($this->columns)>0 ) {?>
|
||||
<?php if ( $this->values===false ):?>
|
||||
<?php if ( $this->columns!==false && count($this->columns)>0 ):?>
|
||||
<?php foreach ( $this->columns as $code => $lib ) {?>
|
||||
<li><?=$code?> : <?=$lib?></li>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<?php if ( $this->columns!==false && count($this->columns)>0 ):?>
|
||||
<?php foreach ( $this->columns as $code => $lib ) {?>
|
||||
<input type="checkbox" id="help<?=$code?>" onClick=setHelpVal(this)>
|
||||
<span style="font-size:9px;"><?=$code?> : <?=$lib?></span><br>
|
||||
<?php }?>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
function setHelpVal(obj){
|
||||
var iref = $('input[name=contentieuxliste]').val();
|
||||
var chp = obj.id.substr(4);
|
||||
if(obj.checked){
|
||||
if(iref.length>0){
|
||||
chp=','+chp;
|
||||
}
|
||||
$('input[name=contentieuxliste]').val(iref+chp);
|
||||
}else{
|
||||
iref=iref.replace(chp,"");
|
||||
iref=iref.replace(",,",",");
|
||||
$('input[name=contentieuxliste]').val(iref);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -559,15 +559,37 @@ class Scores_Extract_Dict
|
||||
'columns' => array()
|
||||
),
|
||||
'nbContentieuxDE'=> array(
|
||||
'lib' => 'Greffe Contentieux DE',
|
||||
'lib' => 'Greffe Nbre Contentieux DE',
|
||||
'help' => "Nbre de contentieux DE",
|
||||
'columns' => array()
|
||||
),
|
||||
'nbContentieuxDF'=> array(
|
||||
'lib' => 'Greffe Contentieux DF',
|
||||
'lib' => 'Greffe Nbre Contentieux DF',
|
||||
'help' => "Nbre de contentieux DF",
|
||||
'columns' => array()
|
||||
),
|
||||
'contentieuxliste'=> array(
|
||||
'values'=>'',
|
||||
'lib' => 'Liste des contentieux',
|
||||
'help' => "Multiple, entrer les colonnes souhaitées.
|
||||
NB le fichier en sortie contiendra plus de lignes que le fichier en entrée.",
|
||||
'columns' => array(
|
||||
'idAffaire' => 'identifiant de l\'afaire',
|
||||
'qualite' => 'En qualité de DE = Demandeur, DF = Défendeur',
|
||||
'dateAffaire' => 'Date d\'enrôlement au greffe',
|
||||
'categorieAffaire' => 'Categorie d\'affaire',
|
||||
'typeAffaire' => 'Nature de demande abregée',
|
||||
'natureDemande' => 'Nature de demande',
|
||||
'nomDemandeur' => 'Nom du/des demandeur(s)',
|
||||
'nomDefendeur' => 'Nom du/des défendeur(s)',
|
||||
'statutAffaire' => 'Etat de l\'affaire',
|
||||
'codeGreffe' => 'Code du greffe',
|
||||
'nomGreffe' => 'Nom du greffe',
|
||||
'representants' => 'Représentants',
|
||||
'nomsRepresentants' => 'Noms du/des représentants',
|
||||
'historique' => 'Historique des actions : date, libellé',
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
@ -687,4 +709,17 @@ class Scores_Extract_Dict
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Retourne les values de sortie
|
||||
public function getDicoValues($key)
|
||||
{
|
||||
if (array_key_exists($key, $this->tabDico)) {
|
||||
$element = $this->tabDico[$key];
|
||||
if (array_key_exists('values', $element)) {
|
||||
return $element['values'];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2101,29 +2101,96 @@ function etablissementlisteMultiple($siren, $nic, $values = false)
|
||||
}
|
||||
return $tabData;
|
||||
}
|
||||
function contentieuxlisteEntete()
|
||||
function contentieuxlisteEntete($values)
|
||||
{
|
||||
return array(
|
||||
'dateAffaire',
|
||||
'categorieAffaire',
|
||||
'typeAffaire',
|
||||
'natureDemande',
|
||||
'nomDemandeur',
|
||||
'nomDefendeur',
|
||||
'statutAffaire',
|
||||
'codeGreffe',
|
||||
'nomGreffe',
|
||||
'representants',
|
||||
'nomsRepresentants'
|
||||
);
|
||||
if ($values!==false) {
|
||||
$values = explode(',', $values);
|
||||
$tmp = array();
|
||||
foreach($values as $value){
|
||||
$tmp[] = $value;
|
||||
}
|
||||
if(in_array('historique',$tmp)){
|
||||
$tmp[]='dateDecision';
|
||||
$tmp[]='libelleDecision';
|
||||
}
|
||||
return $tmp;
|
||||
} else {
|
||||
return array(
|
||||
'dateAffaire',
|
||||
'categorieAffaire',
|
||||
'typeAffaire',
|
||||
'natureDemande',
|
||||
'nomDemandeur',
|
||||
'nomDefendeur',
|
||||
'statutAffaire',
|
||||
'codeGreffe',
|
||||
'nomGreffe',
|
||||
'representants',
|
||||
'nomsRepresentants'
|
||||
);
|
||||
}
|
||||
}
|
||||
function contentieuxlisteMultiple($siren, $nic=0, $values = false)
|
||||
{
|
||||
global $iDb;
|
||||
$histojoin='';
|
||||
$fields=array(
|
||||
'idAffaire' => 'a.idAffaire',
|
||||
'qualite' => 's.qualite',
|
||||
'dateAffaire' => 'dateEnrolement as dateAffaire',
|
||||
'categorieAffaire' => 'typeAffaireEnum as categorieAffaire',
|
||||
'typeAffaire' => 'codNatureDemande as typeAffaire',
|
||||
'natureDemande' => 'natureDemande',
|
||||
'nomDemandeur' => 'nomDemandeur',
|
||||
'nomDefendeur' => 'nomDefendeur',
|
||||
'statutAffaire' => 'etatAffaire as statutAffaire',
|
||||
'codeGreffe' => 'codeGreffe',
|
||||
'nomGreffe' => 'nomGreffe',
|
||||
'representants' => 'representants',
|
||||
'nomsRepresentants' => 'rep0nom as nomsRepresentants',
|
||||
'historique' => 'h.numLigneHisto as historique',
|
||||
'dateDecision' => 'h.dateDecision',
|
||||
'libelleDecision' => 'h.libelleDecision'
|
||||
);
|
||||
if(!$values){
|
||||
$tabFields=array(
|
||||
'dateAffaire',
|
||||
'categorieAffaire',
|
||||
'typeAffaire',
|
||||
'natureDemande',
|
||||
'nomDemandeur',
|
||||
'nomDefendeur',
|
||||
'statutAffaire',
|
||||
'codeGreffe',
|
||||
'nomGreffe',
|
||||
'representants',
|
||||
'nomsRepresentants'
|
||||
);
|
||||
}else{
|
||||
$tabFields = explode(',', $values);
|
||||
}
|
||||
if(in_array('historique',$tabFields)){
|
||||
$histojoin=' left join greffes_affaires_histo h on h.idAffaire=a.idAffaire ';
|
||||
$tabFields[]='dateDecision';
|
||||
$tabFields[]='libelleDecision';
|
||||
}
|
||||
|
||||
foreach($tabFields as $field){
|
||||
if(isset($fields[$field])){
|
||||
$tabSelect[]=$fields[$field];
|
||||
}else{
|
||||
throw new Exception(__METHOD__ . ': ' . $field . ' does not exist');
|
||||
return;
|
||||
}
|
||||
}
|
||||
$select = implode(',',$tabSelect);
|
||||
$conn = Zend_Registry::get('doctrine');
|
||||
$sql='select dateEnrolement as dateAffaire,typeAffaireEnum as categorieAffaire,codNatureDemande as typeAffaire,natureDemande,nomDemandeur,
|
||||
$sql='select '.$select .'
|
||||
from (greffes_affaires_siren s inner join greffes_affaires a using(id)) '.$histojoin.' where
|
||||
entSiren=:siren';
|
||||
/*$sql='select dateEnrolement as dateAffaire,typeAffaireEnum as categorieAffaire,codNatureDemande as typeAffaire,natureDemande,nomDemandeur,
|
||||
nomDefendeur,etatAffaire as statutAffaire,codeGreffe,nomGreffe,representants,rep0nom as nomsRepresentants
|
||||
from greffes_affaires_siren s inner join greffes_affaires a using(id) where entSiren=:siren';
|
||||
from greffes_affaires_siren s inner join greffes_affaires a using(id) where entSiren=:siren';*/
|
||||
try {
|
||||
$stmt=$conn->prepare($sql);
|
||||
$stmt->bindValue('siren', $siren);
|
||||
|
Loading…
Reference in New Issue
Block a user