aboutsummaryrefslogtreecommitdiffstats
path: root/update_db.py
diff options
context:
space:
mode:
authorPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-06-10 23:36:54 +0200
committerPetr Šmerkl <46304018+SveterCZE@users.noreply.github.com>2021-06-10 23:36:54 +0200
commitcc86be247b6e10ccc0d21771c8d3583eb501b54e (patch)
tree2687f6e511d283621fc5b1d171cd3bccac926947 /update_db.py
parenta52388e1a55bb973c401350d9fb4633ef185ee61 (diff)
downloadjustice-cc86be247b6e10ccc0d21771c8d3583eb501b54e.tar.gz
updating the ubo feature
Diffstat (limited to 'update_db.py')
-rw-r--r--update_db.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/update_db.py b/update_db.py
index 6c50b70..2f86c35 100644
--- a/update_db.py
+++ b/update_db.py
@@ -193,20 +193,18 @@ def find_UBO(c, ICO, elem2, conn, primary_sql_key, element):
for elem in my_iter:
zapis_datum = str(get_prop(elem, "zapisDatum"))
vymaz_datum = str(get_prop(elem, "vymazDatum"))
- UBO_valid = str(get_prop(elem, "hodnotaUdaje/valid"))
- spravce = str(get_prop(elem, "hodnotaUdaje/spravce"))
- T_TBC = str(get_prop(elem, "hodnotaUdaje/T"))
- postaveni_jinak = str(get_prop(elem, "hodnotaUdaje/postaveniJinak"))
- postaveni = str(get_prop(elem, "hodnotaUdaje/postaveni"))
- primaUcast = str(get_prop(elem, "hodnotaUdaje/PrimaUcast"))
- primaUcastPodil = str(get_prop(elem, "hodnotaUdaje/primaUcastPodil"))
- rozdeleniProstredku = str(get_prop(elem, "hodnotaUdaje/PrimaUcast"))
- slovni_vyjadreni = str(get_prop(elem, "hodnotaUdaje/slovniVyjadreni"))
- urcenPoziciVeStatOrg = str(get_prop(elem, "hodnotaUdaje/urcenPoziciVeStatOrg"))
- email = str(get_prop(elem, "hodnotaUdaje/email"))
+ postaveni = str(get_prop(elem, "hodnotaUdaje/postaveni")).split(";")[0]
+ koncovyPrijemceText = str(get_prop(elem, "hodnotaUdaje/koncovyPrijemceText"))
+ skutecnymMajitelemOd = str(get_prop(elem, "hodnotaUdaje/skutecnymMajitelemOd"))
+ vlastniPodilNaProspechu = str(get_prop(elem, "hodnotaUdaje/vlastniPodilNaProspechu"))
+ vlastniPodilNaProspechu_typ = str(get_prop(elem, "hodnotaUdaje/podilNaProspechu/typ"))
+ vlastniPodilNaProspechu_textValue = str(get_prop(elem, "hodnotaUdaje/podilNaProspechu/textValue"))
+ vlastniPodilNaHlasovani = str(get_prop(elem, "hodnotaUdaje/podilNaHlasovani"))
+ vlastniPodilNaHlasovani_typ = str(get_prop(elem, "hodnotaUdaje/podilNaHlasovani/typ"))
+ vlastniPodilNaHlasovani_value = str(get_prop(elem, "hodnotaUdaje/podilNaHlasovani/textValue"))
adresa_id = find_sidlo(c, elem, primary_sql_key)
UBO_id = find_fyzicka_osoba(c, ICO, elem, conn, primary_sql_key, element, adresa_id)
- c.execute("INSERT INTO ubo (company_id, UBO_id, zapis_datum, vymaz_datum, UBO_valid, spravce, T_TBC, postaveni_jinak, postaveni, primaUcast, primaUcastPodil, rozdeleniProstredku, slovni_vyjadreni, urcenPoziciVeStatOrg, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (primary_sql_key, UBO_id, zapis_datum, vymaz_datum, UBO_valid, spravce, T_TBC, postaveni_jinak, postaveni, primaUcast, primaUcastPodil, rozdeleniProstredku, slovni_vyjadreni, urcenPoziciVeStatOrg, email,))
+ c.execute("INSERT INTO ubo (company_id, UBO_id, adresa_id, zapis_datum, vymaz_datum, postaveni, koncovyPrijemceText, skutecnymMajitelemOd, vlastniPodilNaProspechu, vlastniPodilNaProspechu_typ, vlastniPodilNaProspechu_textValue, vlastniPodilNaHlasovani, vlastniPodilNaHlasovani_typ, vlastniPodilNaHlasovani_value) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (primary_sql_key, UBO_id, adresa_id, zapis_datum, vymaz_datum, postaveni, koncovyPrijemceText, skutecnymMajitelemOd, vlastniPodilNaProspechu, vlastniPodilNaProspechu_typ, vlastniPodilNaProspechu_textValue, vlastniPodilNaHlasovani, vlastniPodilNaHlasovani_typ, vlastniPodilNaHlasovani_value,))
except Exception as f:
print(f)