audit_krs_con_digger.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. $_SERVER['SERVER_NAME'] = 'biuro.biall-net.pl';
  3. //when used in /Library/Server/Web/Data/Sites/bzyk-biale-plamy-php-temp/SE/dev on biuro.biall-net.pl
  4. if( file_exists ( "../../se-lib/bootstrap.php"))
  5. require("../../se-lib/bootstrap.php");
  6. //when used in in native SE
  7. else require("../../../../SE-production-git/SE/se-lib/bootstrap.php");
  8. Lib::loadClass("Vendor_Geophp");
  9. // DB::getPDO()->query("truncate table Rozdzielcza_test_bzyk_Cables_to_PE");
  10. //unset($ID_Way);
  11. /*foreach($cables_from_joins_to_PE_arr as $id_j=>$Path_Point_val) {
  12. $sql_Path_Point_val="insert into Rozdzielcza_test_bzyk_Cables_to_PE (the_geom,ID_Way,ID_Point,len,PE_ID_Join)
  13. values (ST_GeomFromText('".$Path_Point_val['LINESTRING']."'),'".$Path_Point_val['ID_Way']."',
  14. '".$Path_Point_val['ID_Point']."' ,'".$Path_Point_val['len']."','".$Path_Point_val['PE_ID_Join']."' ) ";
  15. echo "#216Query path ins:: ".$sql_Path_Point_val." ";
  16. //if(strlen($edge_joins_filled_paths[$ID_Way]['asText'])>2)
  17. if(strlen($Path_Point_val['LINESTRING'])>1)
  18. DB::getPDO()->query($sql_Path_Point_val);
  19. else echo " ERROR blad danych!!! dla ID_Point:".$Path_Point_val['ID_Point'];
  20. //else echo "#296 path nie wygenerowalo sie !! dla ".$ID_Way." i pkt ".$pkt_A." , ".$pkt_B." \n";
  21. }
  22. */
  23. $tables['Y']['BI_audit_ENERGA_PRACOWNICY']['rel']['pesel']='pesel';
  24. $tables['Y']['BI_audit_ENERGA_PRACOWNICY']['rel']['nip']='nip';
  25. $tables['Y']['BI_audit_ENERGA_PRACOWNICY']['rel']['regon']='regon';
  26. $tables['X']['BI_audit_KW_requested']['rel_search']['pesel']='Seller_Person';
  27. $tables['X']['BI_audit_KW_requested']['rel']['pesel']['search']='like';
  28. $tables['X']['BI_audit_ENERGA_RUM_KONTRAHENCI']['rel']['nip']='NIP';
  29. $tables['X']['BI_audit_ENERGA_RUM_KONTRAHENCI']['rel']['regon']='REGON';
  30. $tables['X']['BI_audit_ENERGA_RUM_KONTRAHENCI']['rel']['pesel']='PESEL';
  31. $tables['X']['BI_audit_ENERGA_RUM_KONTRAHENCI']['rel']['teryt']=1;
  32. $tables['Z']['BI_audit_CEIDG']['rel']['nip']='nip';
  33. $tables['Z']['BI_audit_CEIDG']['rel']['regon']='regon';
  34. $tables['Z']['BI_audit_CEIDG']['ref'][]='BI_audit_CEIDG_pelnomocnicy';
  35. $tables['Z']['BI_audit_CEIDG']['ref'][]='BI_audit_CEIDG_powiazania';
  36. $tables['Z']['BI_audit_CEIDG_pelnomocnicy']['rel']['nip']='nip';
  37. $tables['Z']['BI_audit_CEIDG_pelnomocnicy']['rel_and']['adres']['miejscowosc']='miejscowosc';
  38. $tables['Z']['BI_audit_CEIDG_pelnomocnicy']['rel_and']['adres']['ulica']='ulica';
  39. $tables['Z']['BI_audit_CEIDG_pelnomocnicy']['rel_and']['adres']['kodPocztowy']='kodPocztowy';
  40. //$tables['Z']['BI_audit_CEIDG_pelnomocnicy']['ref'][]='BI_audit_CEIDG';
  41. $tables['Z']['BI_audit_CEIDG_powiazania']['rel']['nip']='nip';
  42. $tables['Z']['BI_audit_CEIDG_powiazania']['rel']['regon']='nip';
  43. //$tables['Z']['BI_audit_CEIDG_powiazania']['ref'][]='BI_audit_CEIDG';
  44. $tables['Z']['BI_audit_KRS']['rel']['nip']='nip';
  45. $tables['Z']['BI_audit_KRS']['rel']['regon']='regon';
  46. $tables['Z']['BI_audit_KRS']['rel']['krs']='krs';
  47. $tables['Z']['BI_audit_KRS']['rel_and']['adres']['miejscowosc']='A_miejscowosc';
  48. $tables['Z']['BI_audit_KRS']['rel_and']['adres']['ulica']='A_ulica';
  49. $tables['Z']['BI_audit_KRS']['rel_and']['adres']['kodPocztowy']='A_kod';
  50. $tables['Z']['BI_audit_KRS']['ref'][]='BI_audit_KRS_person';
  51. $tables['Z']['BI_audit_KRS']['ref'][]='BI_audit_KRS_company';
  52. $tables['Z']['BI_audit_KRS_company']['rel']['regon']='regon';
  53. $tables['Z']['BI_audit_KRS_company']['rel']['krs']='krs';
  54. function start_dig() {
  55. foreach($tables['Y'] as $Y ) {
  56. $sql='select * from '.$Y ;
  57. $res= DB::getPDO()->query($sql);
  58. while ($h= mysql_fetch_array($res)) {
  59. print_r($h);
  60. }
  61. }
  62. }
  63. function dig_next($hist_loop,$prev_dig) {
  64. }
  65. start_dig();