issue #0000533 : rechercheAnnonce fonctionnelle
This commit is contained in:
parent
eae07a7de8
commit
6e4e45c725
@ -1865,8 +1865,8 @@ class Entreprise extends WsScore
|
||||
|
||||
debugLog('I',"Annonce précise demandée pour $source, $dateAnnee, $numParution, $numAnnonce",__LINE__,__FILE__, __FUNCTION__, __CLASS__);
|
||||
|
||||
if (strlen($dateAnnee)==4) $annee=$dateAnnee;
|
||||
else $annee=substr($dateAnnee,0,4);
|
||||
if (strlen($dateAnnee)==4) $annee = $dateAnnee;
|
||||
else $annee = substr($dateAnnee,0,4);
|
||||
|
||||
$iDb = new WDB('jo');
|
||||
|
||||
@ -1876,8 +1876,7 @@ class Entreprise extends WsScore
|
||||
case 'BODB':
|
||||
case 'BODC':
|
||||
$lettre = substr(strtoupper($source),3,1);
|
||||
if ($annee<2005)
|
||||
{
|
||||
if ($annee<2005) {
|
||||
if ($lettre=='A'){ $numJAL=1; }
|
||||
elseif ($lettre=='B'){ $numJAL=200; }
|
||||
else{ break; }
|
||||
@ -1885,27 +1884,31 @@ class Entreprise extends WsScore
|
||||
$anneeFin = $annee.'1231';
|
||||
$res = $iDb->select('historiques.entrep e, texte t',
|
||||
"$annee AS Annee_Parution, e.NOBOD AS Num_Parution, e.NOANN AS Num_Annonce, e.NOPAGE AS Num_Page, e.`DATE` AS Date_Parution, e.DEPT AS Departement, e.CODTRI AS Tribunal_Code, 'I' AS typeAnnonce, CONCAT(e.NOANN,' - ',t.annonceTxt) AS annonce",
|
||||
"e.JAL=$numJAL AND e.NOBOD=$numParution AND e.`DATE` BETWEEN $anneeDeb AND $anneeFin AND e.NOANN=$numAnnonce AND e.ANBASE=t.annonceNum");
|
||||
"e.JAL=$numJAL AND e.NOBOD=$numParution AND e.`DATE` BETWEEN $anneeDeb AND $anneeFin AND e.NOANN=$numAnnonce AND e.ANBASE=t.annonceNum", false, MYSQL_ASSOC);
|
||||
} else {
|
||||
$res = $iDb->select('bodacc',
|
||||
'Bodacc_Annee_Parution AS Annee_Parution, Bodacc_Num AS Num_Parution, Num_Annonce, Bodacc_Page AS Num_Page, Bodacc_Date_Parution AS Date_Parution, Tribunal_Dept AS Departement, Tribunal_Code, typeAnnonce, annonce',
|
||||
"Bodacc_Code='$lettre' AND Bodacc_Annee_Parution=$annee AND Bodacc_Num=$numParution AND Num_Annonce=$numAnnonce");
|
||||
"Bodacc_Code='$lettre' AND Bodacc_Annee_Parution=$annee AND Bodacc_Num=$numParution AND Num_Annonce=$numAnnonce", false, MYSQL_ASSOC);
|
||||
}
|
||||
break;
|
||||
case 'ASSO':
|
||||
$res=$iDb->select('asso', 'YEAR(Date_Parution) AS Annee_Parution, Num_Parution, Num_Annonce, pageDeb AS Num_Page, Date_Parution, Departement, codTribunal AS Tribunal_Code, typeAnnonce, Annonce_Html AS annonce', "Date_Parution BETWEEN '$annee-01-01' AND '$annee-12-31' AND Num_Parution=$annee".sprintf('%04d', $numParution)." AND Num_Annonce=$numAnnonce");
|
||||
$res = $iDb->select('asso',
|
||||
'YEAR(Date_Parution) AS Annee_Parution, Num_Parution, Num_Annonce, pageDeb AS Num_Page, Date_Parution, Departement, codTribunal AS Tribunal_Code, typeAnnonce, Annonce_Html AS annonce', "Date_Parution BETWEEN '$annee-01-01' AND '$annee-12-31' AND Num_Parution=$annee".sprintf('%04d', $numParution)." AND Num_Annonce=$numAnnonce",
|
||||
false, MYSQL_ASSOC);
|
||||
break;
|
||||
case 'BALO':
|
||||
$res=$iDb->select('balo', "YEAR(Date_Parution) AS Annee_Parution, Num_Parution, Num_Affaire AS Num_Annonce, '' AS Num_Page, Date_Parution, '' AS Departement, '' AS Tribunal_Code, 'Insertion' AS typeAnnonce, Annonce_Html AS annonce", "Date_Parution BETWEEN '$annee-01-01' AND '$annee-12-31' AND Num_Parution=$numParution AND Num_Affaire=$numAnnonce");
|
||||
$res = $iDb->select('balo',
|
||||
"YEAR(Date_Parution) AS Annee_Parution, Num_Parution, Num_Affaire AS Num_Annonce, '' AS Num_Page, Date_Parution, '' AS Departement, '' AS Tribunal_Code, 'Insertion' AS typeAnnonce, Annonce_Html AS annonce", "Date_Parution BETWEEN '$annee-01-01' AND '$annee-12-31' AND Num_Parution=$numParution AND Num_Affaire=$numAnnonce",
|
||||
false, MYSQL_ASSOC);
|
||||
break;
|
||||
}
|
||||
|
||||
if (count($res)>0)
|
||||
{
|
||||
$iBodacc = new MBodacc();
|
||||
foreach ($res as $i=>$etab)
|
||||
foreach ($res as $i => $etab)
|
||||
{
|
||||
$annonces = RechercheAnnonce();
|
||||
$annonces = new RechercheAnnonce();
|
||||
$annonces->Annee_Parution = $etab['Annee_Parution'];
|
||||
$annonces->Num_Parution = $etab['Num_Parution'];
|
||||
$annonces->Num_Annonce = $etab['Num_Annonce'];
|
||||
@ -1923,7 +1926,6 @@ class Entreprise extends WsScore
|
||||
$tabRet[] = $annonces;
|
||||
}
|
||||
}
|
||||
|
||||
$nbTot = count($tabRet);
|
||||
$result = new RechercheAnnonceResult();
|
||||
$result->criteres = $criteres;
|
||||
|
Loading…
x
Reference in New Issue
Block a user