пытаюсь понять как переадть аргументы
parent
05ffc95778
commit
12571ba0c8
|
|
@ -1,6 +1,6 @@
|
||||||
from os import getenv, environ
|
from os import getenv, environ
|
||||||
import hvac
|
import hvac
|
||||||
from oracledb import Error, create_pool, init_oracle_client, CLOB
|
from oracledb import Error, create_pool, init_oracle_client, DatabaseError
|
||||||
from fastapi import HTTPException
|
from fastapi import HTTPException
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
|
||||||
|
|
@ -68,15 +68,15 @@ class SimpleDB:
|
||||||
organ, names, date_from_str, date_to_str, ver = value
|
organ, names, date_from_str, date_to_str, ver = value
|
||||||
# Парсим даты
|
# Парсим даты
|
||||||
if date_from_str:
|
if date_from_str:
|
||||||
date_from = parser.parse(date_from_str)
|
date_from = parser.parse(date_from_str).date()
|
||||||
date_from = str(date_from.strftime('%d.%m.%Y'))
|
#date_from = str(date_from.strftime('%d.%m.%Y'))
|
||||||
else: date_from = '01.01.2000'
|
else: date_from = '01.01.2000'
|
||||||
if date_to_str:
|
if date_to_str:
|
||||||
date_to = parser.parse(date_to_str)
|
date_to = parser.parse(date_to_str).date()
|
||||||
date_to = str(date_to.strftime('%d.%m.%Y'))
|
#date_to = str(date_to.strftime('%d.%m.%Y'))
|
||||||
else: date_to = '01.01.2000'
|
else: date_to = '01.01.2000'
|
||||||
print("Вывод отправляемых агрументов: ", int(id), organ, names, date_from, date_to, ver)
|
print("Вывод отправляемых агрументов: ", id, organ, names, date_from, date_to, ver)
|
||||||
print(type(str(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))
|
||||||
|
|
||||||
cursor.callproc('P_RK_SEND_JSON_LIST_FACEACC', [
|
cursor.callproc('P_RK_SEND_JSON_LIST_FACEACC', [
|
||||||
int(id),
|
int(id),
|
||||||
|
|
@ -88,3 +88,4 @@ class SimpleDB:
|
||||||
])
|
])
|
||||||
except Error as e:
|
except Error as e:
|
||||||
raise HTTPException(status_code=500, detail=f"Database error: {e}")
|
raise HTTPException(status_code=500, detail=f"Database error: {e}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue