From 420ef2ca7608b27841eb8e8e280021d70ca48fa7 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 18 Oct 2013 15:44:12 +0000 Subject: [PATCH] Suppression evitement des procols --- scripts/calculScoreSurv.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/calculScoreSurv.php b/scripts/calculScoreSurv.php index 5834d391..38d9df4e 100644 --- a/scripts/calculScoreSurv.php +++ b/scripts/calculScoreSurv.php @@ -76,13 +76,13 @@ $tabQueries = array( /* Dirigeants */ 'dirigeants' => "SELECT $strSelect, 'dirigeants' AS source FROM jo.scores_surveillance_tmp s, jo.rncs_dirigeants d WHERE d.siren>1000 AND s.siren = d.siren AND (d.dateInsert>s.dateUpdate OR d.dateUpdate>s.dateUpdate) AND (d.dateInsert>'2013-03-15 00:00:00' OR d.dateUpdate>'2013-03-15 00:00:00') AND s.procol NOT IN('P') GROUP BY siren", /* Evenements INSEE */ - 'insee' => "SELECT $strSelect, 'insee' as source FROM jo.scores_surveillance_tmp s, insee.insee_even i WHERE i.insSIREN>1000 AND s.siren=i.insSIREN AND i.dateInsert>s.dateUpdate AND s.procol NOT IN('P') AND /*i.insEVE IN ('400','410','420','425') AND*/ i.insSIEGE=1 GROUP BY siren", + 'insee' => "SELECT $strSelect, 'insee' as source FROM jo.scores_surveillance_tmp s, insee.insee_even i WHERE i.insSIREN>1000 AND s.siren=i.insSIREN AND i.dateInsert>s.dateUpdate /*AND s.procol NOT IN('P') AND i.insEVE IN ('400','410','420','425')*/ AND i.insSIEGE=1 GROUP BY siren", /* Entreprises RNCS */ //'rncs' => "SELECT $strSelect, 'rncs' as source FROM scores_surveillance_tmp s, rncs_entrep r WHERE s.siren>1000 AND s.siren=r.siren AND (r.dateInsert>s.dateUpdate OR r.dateUpdate>s.dateUpdate) /*AND (d.dateInsert>'2013-03-15 00:00:00' OR d.dateUpdate>'2013-03-15 00:00:00')*/ AND s.procol NOT IN('P') GROUP BY siren", /* Bodacc */ - 'bodacc' => "SELECT $strSelect, 'bodacc' as source FROM jo.scores_surveillance_tmp s, jo.bodacc_detail b WHERE b.siren>1000 AND s.siren=b.siren AND( b.dateInsert>s.dateUpdate OR b.dateUpdate>s.dateUpdate) AND s.procol NOT IN('P') AND b.Rubrique NOT IN('creations','comptes') GROUP BY siren", + 'bodacc' => "SELECT $strSelect, 'bodacc' as source FROM jo.scores_surveillance_tmp s, jo.bodacc_detail b WHERE b.siren>1000 AND s.siren=b.siren AND( b.dateInsert>s.dateUpdate OR b.dateUpdate>s.dateUpdate) /*AND s.procol NOT IN('P')*/ AND b.Rubrique NOT IN('creations','comptes') GROUP BY siren", /* Collecte */ - 'collecte' => "SELECT $strSelect, 'collecte' as source FROM jo.scores_surveillance_tmp s, jo.annonces b WHERE b.siren>1000 AND s.siren=b.siren AND b.dateInsert>s.dateUpdate AND s.procol NOT IN('P') /*AND b.typeEven NOT IN(3200)*/ GROUP BY siren", + 'collecte' => "SELECT $strSelect, 'collecte' as source FROM jo.scores_surveillance_tmp s, jo.annonces b WHERE b.siren>1000 AND s.siren=b.siren AND b.dateInsert>s.dateUpdate /*AND s.procol NOT IN('P') AND b.typeEven NOT IN(3200)*/ GROUP BY siren", /* Bilans en base */ 'bilans1' => "SELECT $strSelect, 'bilans1' as source FROM jo.scores_surveillance_tmp s, jo.bilans b WHERE b.siren>1000 AND s.siren=b.siren AND b.dateInsert>s.dateUpdate AND (DATEDIFF(b.dateExercice,s.dateBilan)>1 OR DATEDIFF(b.dateExercice,s.dateBilan) IS NULL) AND s.procol NOT IN('P') GROUP BY siren", /* Défaut divers Facto (D:Défaut, 24:Groupe en diff, 31:Cessation Annoncée, 50:Terrorisme)*/ @@ -225,11 +225,11 @@ foreach ($tabQueries as $declencheur=>$query) $sourceModif = $entrep['source']; $procol = $entrep['procol']; $nbModifs = ($entrep['nbModifs']*1)+1; - if ($procol=='P') { + /*if ($procol=='P') { $nbScoresProcol++; if ($opts->verbose) echo date('Y/m/d - H:i:s') ." - Ligne $iRow/$nbRowsTot - Siren $siren : $indiScorePre / 100 ($encoursPre EUR) inchangé depuis $dateScore (Source=$sourceModif) car ProCol.".PHP_EOL; continue; - } + }*/ //echo date('Y/m/d - H:i:s') ." - Siren $siren : AVANT SCORE".PHP_EOL; $tabScore = calculIndiScore($siren, $nic, false, 0, false, 'scores', $declencheur); //echo date('Y/m/d - H:i:s') ." - Siren $siren : APRES SCORE".PHP_EOL;