пытаюсь понять как переадть аргументы
parent
981e82dfa8
commit
414b929c25
|
|
@ -62,13 +62,22 @@ class SimpleDB:
|
||||||
try:
|
try:
|
||||||
with self.pool.acquire() as connection:
|
with self.pool.acquire() as connection:
|
||||||
with connection.cursor() as cursor:
|
with connection.cursor() as cursor:
|
||||||
|
# Узнать сигнатуру процедуры
|
||||||
|
cursor.execute("""
|
||||||
|
SELECT argument_name, data_type, in_out
|
||||||
|
FROM all_arguments
|
||||||
|
WHERE object_name = 'P_RK_SEND_JSON_LIST_FACEACC'
|
||||||
|
ORDER BY position
|
||||||
|
""")
|
||||||
|
for arg in cursor:
|
||||||
|
print(f"Name: {arg[0]}, Type: {arg[1]}, Direction: {arg[2]}")
|
||||||
for id, value in dict_data.items():
|
for id, value in dict_data.items():
|
||||||
if len(value) != 5:
|
if len(value) != 5:
|
||||||
continue
|
continue
|
||||||
organ, names, date_from_str, date_to_str, ver = value
|
organ, names, date_from_str, date_to_str, ver = value
|
||||||
# Парсим даты
|
# Парсим даты
|
||||||
date_from = parser.parse(date_from_str).date()
|
date_from = parser.parse(date_from_str).date()
|
||||||
date_to = parser.parse(date_to_str).date() if date_to_str else ""
|
date_to = parser.parse(date_to_str).date() if date_to_str else None
|
||||||
print("Вывод отправляемых агрументов: ", int(id), organ, names, date_from, date_to, ver)
|
print("Вывод отправляемых агрументов: ", int(id), organ, names, date_from, date_to, ver)
|
||||||
print(type(int(id)), type(organ), type(names), type(date_from), type(date_to), type(ver))
|
print(type(int(id)), type(organ), type(names), type(date_from), type(date_to), type(ver))
|
||||||
respons = cursor.callproc('P_RK_SEND_JSON_LIST_FACEACC', [int(id), organ, names, date_from, date_to, ver])
|
respons = cursor.callproc('P_RK_SEND_JSON_LIST_FACEACC', [int(id), organ, names, date_from, date_to, ver])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue