dbilayer_mssql_database
This commit is contained in:
commit
38b2c49875
0
Dockerfile
Normal file
0
Dockerfile
Normal file
BIN
core/__pycache__/constants.cpython-38.pyc
Normal file
BIN
core/__pycache__/constants.cpython-38.pyc
Normal file
Binary file not shown.
BIN
core/bll/__pycache__/bllengine.cpython-311.pyc
Normal file
BIN
core/bll/__pycache__/bllengine.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/bll/__pycache__/bllengine.cpython-38.pyc
Normal file
BIN
core/bll/__pycache__/bllengine.cpython-38.pyc
Normal file
Binary file not shown.
5482
core/bll/bllengine.py
Normal file
5482
core/bll/bllengine.py
Normal file
File diff suppressed because it is too large
Load Diff
45
core/constants.py
Normal file
45
core/constants.py
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
columns_users_table="`username`,`useremail`,`userpassword`,`userdesig`,`status`"
|
||||||
|
column_dbtype_table="dbtypename,dbtypeid,dbtypedesc,dbschemaid,dbcategoryid,dbinstanceid,dbnameid,status"
|
||||||
|
columns_dbacl_table = "dbaclname,dbuserid,dbaclid,status"
|
||||||
|
column_dbauth_table = "dbauthdesc,dbauthid,status"
|
||||||
|
column_dbbilling_table = "dbbillingname,dbbillingid,dbcustomerid,amount,dbbillingdate,dbbillinglastupdate,dbinvoiceid,status"
|
||||||
|
column_dbcategory_table = "dbcategoryname,dbcategoryid,dbschemaid,dbcategorydesc,status"
|
||||||
|
column_dbcharges_table = "dbchargename,dbchargeid,dbschemaid,status"
|
||||||
|
column_dbcity_table = "dbcityname,dbcityid,dbstateid,status"
|
||||||
|
column_dbconnectionstring_table = "dbconnectionstringname,dbconnectionstringid,dbusernameid,dbpasswordid,dbipaddressid,dbtypeid,status"
|
||||||
|
column_dbcollection_table = "dbcollectionname,dbcollectionid,status"
|
||||||
|
column_dbcountry_table = "dbcountryname,dbcountryid,dbcountrydesc,status"
|
||||||
|
column_dbcustomer_table = "dbfirstname,dbcustomerid,dblastname,dbemailid,dbuserid,dbaddress,dbcreatedate,dblastupdated,dbplanid,status"
|
||||||
|
column_dbdeleteNote_table = "dbdeletenotename,dbdeletenoteid,dbdeletenotedesc,status"
|
||||||
|
column_dbdeploy_table = "dbdeployname,dbdeployid,dbbillingid,status"
|
||||||
|
column_dbemail_table = "dbemail,dbemailid,status"
|
||||||
|
column_dbencoding_table = "dbencodingdesc,dbencodingid,dbencodingname,status"
|
||||||
|
column_dbGenInvoice_table = "dbgeninvoiceid,dbgeninvoicetype,dbinvoiceid,status"
|
||||||
|
column_dbgst_table = "dbgstnumber,dbgstid,status"
|
||||||
|
column_dbhash_table = "dbhashname,dbhashid,dbhashtype,status"
|
||||||
|
column_dbinstance_table = "dbinstancename,dbinstanceid,dbportid,dbipaddressid,dbusernameid,dbpasswordid,dbschemaid,status"
|
||||||
|
column_dbinvoice_table = "dbinvoicenumber,dbinvoiceid,dbinvoiceperiodstartdate,dbinvoicelineitemid,dbcustomerid,dbinvoicedate,dbinvoiceperiodenddate,dbchargeid,status"
|
||||||
|
column_dbinvoicelineitem_table = "dbinvoicelineitemname,dbinvoicelineitemid,status"
|
||||||
|
column_dbipaddress_table = "dbipaddressvalue,dbipaddressid,dbipaddressdesc,dbusernameid,dbpasswordid,status"
|
||||||
|
column_dbkyc_table = "dbkycdesc,dbkycid,dbtypeid,status"
|
||||||
|
column_dbname_table = "dbname,dbnameid,dbschemaid,dbcategoryid,status"
|
||||||
|
column_dborders_table = "dborderid,dbordername,dbbillingid,dbpackageid,status"
|
||||||
|
column_dborganization_table = "dborganizationname,dborganizationid,dborganizationdesc,dbpanid,status"
|
||||||
|
column_dbpackage_table = "dbpackagename,dbpackageid,status"
|
||||||
|
column_dbpan_table = "dbpannumber,dbpanid,dbemailid,dbphoneid,dbkycid,status"
|
||||||
|
column_dbpassword_table = "dbpassword,dbpasswordid,dbpassworddesc,dbusernameid,dbcategoryid,status"
|
||||||
|
column_dbpermission_table = "dbpermissionname,dbpermissionid,dbtypeid,dbaclid,status"
|
||||||
|
column_dbphone_table = "dbphonenumber,dbphoneid,status"
|
||||||
|
column_dbpincode_table = "dbpincode,dbpincodeid,dbcityid,dbstateid,dbcountryid,status"
|
||||||
|
column_dbplan_table = "dbplanname,dbplanid,status"
|
||||||
|
column_dbplanbilling_table = "dbplanbillingname,dbplanbillingid,dbpackageid,dbplanid,status"
|
||||||
|
column_dbplans_table = "dbplansid,dbplansname,dbtypeid,dbbillingid,status"
|
||||||
|
column_dbpo_table = "dbponumber,dbpoid,dbinvoiceid,dbbillingid,dbcustomerid,dborganizationid,status"
|
||||||
|
column_dbportnumber_table = "dbportnumbername,dbportid,dbportnumbercategory,dbportnumberdesc,dbcountryid,dbpincodeid,dbusernameid,dbpasswordid,status"
|
||||||
|
column_dbprod_table = "dbprodname,dbprodid,status"
|
||||||
|
column_dbrole_table = "dbrolename,dbroleid,dbuserid,dbroledesc,dbpermissionid,status"
|
||||||
|
column_dbschema_table = "dbschemaname,dbschemaid,dbschemadesc,dbcollectionid,dbauthid,dbencodingid,dbvariabletypeid,status"
|
||||||
|
column_dbstate_table = "dbstatename,dbstateid,dbcountryid,dbstatedesc,status"
|
||||||
|
column_dbuac_table = "dbuactype,dbuacid,dbroleid,dbuacname,status"
|
||||||
|
column_username_table = "dbusername,dbusernameid,dbusernamedesc,dbnameid,dbcategoryid,status"
|
||||||
|
column_dbusagelimit_table = "dbusagelimitmin,dbusagelimitid,dbschemaid,dborganizationid,dbroleid,dbplanid,dbusagelimitmax,status"
|
BIN
core/dbil/__pycache__/dbilayer.cpython-311.pyc
Normal file
BIN
core/dbil/__pycache__/dbilayer.cpython-311.pyc
Normal file
Binary file not shown.
BIN
core/dbil/__pycache__/dbilayer.cpython-38.pyc
Normal file
BIN
core/dbil/__pycache__/dbilayer.cpython-38.pyc
Normal file
Binary file not shown.
811
core/dbil/dbilayer.py
Normal file
811
core/dbil/dbilayer.py
Normal file
|
@ -0,0 +1,811 @@
|
||||||
|
|
||||||
|
# import mysql.connector
|
||||||
|
import re
|
||||||
|
from werkzeug.security import generate_password_hash
|
||||||
|
import json
|
||||||
|
|
||||||
|
import pyodbc
|
||||||
|
|
||||||
|
# Set up the connection string
|
||||||
|
connection_string = 'DRIVER={ODBC Driver 17 for SQL Server};SERVER=localhost;DATABASE=dbilayer;UID=sa;PWD=Ganesh@m0477;'
|
||||||
|
# Connect to the database
|
||||||
|
db_connection = pyodbc.connect(connection_string)
|
||||||
|
|
||||||
|
# db_connection = mysql.connector.connect(
|
||||||
|
# host="localhost",
|
||||||
|
# user="root",
|
||||||
|
# passwd="Machint@123",
|
||||||
|
# database="dbiLayer"
|
||||||
|
# )
|
||||||
|
|
||||||
|
# db_connection = mysql.connector.connect(
|
||||||
|
# host="10.11.0.24",
|
||||||
|
# user="root",
|
||||||
|
# passwd="Machint@2022",
|
||||||
|
# database="reactpropmod",
|
||||||
|
# port=3303
|
||||||
|
# )
|
||||||
|
|
||||||
|
# Registration for user
|
||||||
|
|
||||||
|
def registerUserNow(tablename, fields, userData):
|
||||||
|
my_database=db_connection.cursor()
|
||||||
|
username=userData['username']
|
||||||
|
useremail=userData['useremail']
|
||||||
|
userpassword=userData['userpassword']
|
||||||
|
userdesig=userData['userdesig']
|
||||||
|
status=userData['status']
|
||||||
|
try:
|
||||||
|
query_for_user_existence="SELECT * FROM {} WHERE username='{}'".format(tablename, username)
|
||||||
|
if not re.fullmatch(r'[^@]+@[^@]+\.[^@]+', useremail):
|
||||||
|
msg='Invalid Email Address !'
|
||||||
|
elif not re.fullmatch(r'[A-Za-z0-9]+', username):
|
||||||
|
msg='Username must contain only characters and numbers !'
|
||||||
|
elif (not username) or (not userpassword) or (not useremail):
|
||||||
|
msg='Please provide the complete details !'
|
||||||
|
elif username:
|
||||||
|
try:
|
||||||
|
my_database.execute(query_for_user_existence)
|
||||||
|
user_exist=my_database.fetchone()
|
||||||
|
if user_exist:
|
||||||
|
msg='User already exists!'
|
||||||
|
else:
|
||||||
|
hashed_password=generate_password_hash(userpassword)
|
||||||
|
sql_query="INSERT INTO {}({}) VALUES('{}', '{}','{}','{}','{}')".format(tablename, fields,username,useremail,hashed_password,userdesig,status)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
db_connection.commit()
|
||||||
|
msg='User Register/Created Successfully !'
|
||||||
|
except:
|
||||||
|
msg='User Creation Failed'
|
||||||
|
except:
|
||||||
|
msg='Failed'
|
||||||
|
except:
|
||||||
|
msg='Failed'
|
||||||
|
# db_connection.close()
|
||||||
|
return msg
|
||||||
|
|
||||||
|
# Login User
|
||||||
|
|
||||||
|
def getUserActivity(tablename, fields, userData):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
sql_query="SELECT {} FROM {} WHERE username='{}'".format(fields, tablename, userData['username'])
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
output=my_database.fetchone()
|
||||||
|
except:
|
||||||
|
output={"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
print(output)
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def readallWithoutCondition(tablename, fields):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_query = "SELECT {} FROM {}".format(fields,tablename)
|
||||||
|
print(sql_query)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
rows = my_database.fetchall()
|
||||||
|
columns = [column[0] for column in my_database.description]
|
||||||
|
results = [dict(zip(columns, row)) for row in rows]
|
||||||
|
retval = "Success"
|
||||||
|
return results
|
||||||
|
except :
|
||||||
|
retval = "Failure"
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def readallWithCondition(tablename, fields, condition):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_query = "SELECT {} FROM {} WHERE {}".format(fields,tablename,condition)
|
||||||
|
print(sql_query)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
rows = my_database.fetchall()
|
||||||
|
columns = [column[0] for column in my_database.description]
|
||||||
|
results = [dict(zip(columns, row)) for row in rows]
|
||||||
|
retval = "Success"
|
||||||
|
return results
|
||||||
|
except :
|
||||||
|
retval = "Failure"
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def readOneWithcondition(tablename, fields, cond):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_query = "SELECT {} FROM {} WHERE {}".format(fields,tablename,cond)
|
||||||
|
print(sql_query)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
rows = my_database.fetchall()
|
||||||
|
columns = [column[0] for column in my_database.description]
|
||||||
|
results = [dict(zip(columns, row)) for row in rows]
|
||||||
|
print(rows)
|
||||||
|
return results
|
||||||
|
except :
|
||||||
|
retval = "Failure"
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def insertIntoDBWithoutCondition(tablename,fields,data):
|
||||||
|
my_database=db_connection.cursor()
|
||||||
|
sql_query="INSERT INTO {} ({}) VALUES({})".format(tablename, fields, data)
|
||||||
|
print(sql_query)
|
||||||
|
# try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
db_connection.commit()
|
||||||
|
retval = "Success"
|
||||||
|
return retval
|
||||||
|
# except:
|
||||||
|
# retval = "Failure"
|
||||||
|
# return retval
|
||||||
|
|
||||||
|
def updateValuesIndb(tablename,updatestatement,condition):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_statement = "UPDATE " + tablename + " SET " + updatestatement + " WHERE " + condition + ""
|
||||||
|
print(sql_statement)
|
||||||
|
# try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
db_connection.commit()
|
||||||
|
retval = "Success"
|
||||||
|
return retval
|
||||||
|
# except:
|
||||||
|
# retval = "Failure"
|
||||||
|
# return retval
|
||||||
|
|
||||||
|
def updateDataWithCondition(tablename,updateStatement,condition):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
def registerUserNow(tablename, fields, userData):
|
||||||
|
my_database=db_connection.cursor()
|
||||||
|
username=userData['username']
|
||||||
|
useremail=userData['useremail']
|
||||||
|
userpassword=userData['userpassword']
|
||||||
|
userdesig=userData['userdesig']
|
||||||
|
status=userData['status']
|
||||||
|
try:
|
||||||
|
query_for_user_existence="SELECT * FROM {} WHERE username='{}'".format(tablename, username)
|
||||||
|
if not re.fullmatch(r'[^@]+@[^@]+\.[^@]+', useremail):
|
||||||
|
msg='Invalid Email Address !'
|
||||||
|
elif not re.fullmatch(r'[A-Za-z0-9]+', username):
|
||||||
|
msg='Username must contain only characters and numbers !'
|
||||||
|
elif (not username) or (not userpassword) or (not useremail):
|
||||||
|
msg='Please provide the complete details !'
|
||||||
|
elif username:
|
||||||
|
try:
|
||||||
|
my_database.execute(query_for_user_existence)
|
||||||
|
user_exist=my_database.fetchone()
|
||||||
|
if user_exist:
|
||||||
|
msg='User already exists!'
|
||||||
|
else:
|
||||||
|
hashed_password=generate_password_hash(userpassword)
|
||||||
|
sql_query="INSERT INTO {}({}) VALUES('{}', '{}','{}','{}','{}')".format(tablename, fields,username,useremail,hashed_password,userdesig,status)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
db_connection.commit()
|
||||||
|
msg='User Register/Created Successfully !'
|
||||||
|
except:
|
||||||
|
msg='User Creation Failed'
|
||||||
|
except:
|
||||||
|
msg='Failed'
|
||||||
|
except:
|
||||||
|
msg='Failed'
|
||||||
|
# db_connection.close()
|
||||||
|
return msg
|
||||||
|
|
||||||
|
# Login User
|
||||||
|
|
||||||
|
def getUserActivity(tablename, fields, userData):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
sql_query="SELECT {} FROM {} WHERE username='{}'".format(fields, tablename, userData['username'])
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
output=my_database.fetchone()
|
||||||
|
except:
|
||||||
|
output={"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
print(output)
|
||||||
|
return output
|
||||||
|
|
||||||
|
# Return List of Available stored single column values for any table
|
||||||
|
|
||||||
|
def returnspecificlist(field, tablename):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
sql_query="SELECT {} FROM {}".format(field, tablename)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
stored_column_data=my_database.fetchall()
|
||||||
|
final_stored_column_data_list=[]
|
||||||
|
for name_dict in stored_column_data:
|
||||||
|
final_stored_column_data_list.append(name_dict[field])
|
||||||
|
except:
|
||||||
|
final_stored_column_data_list=[]
|
||||||
|
return final_stored_column_data_list
|
||||||
|
|
||||||
|
#Inseret Values into any table except propset
|
||||||
|
|
||||||
|
def insertintotablewocond(tablename, fields, data, namefield):
|
||||||
|
final_stored_names_list=returnspecificlist(namefield, tablename)
|
||||||
|
print(final_stored_names_list)
|
||||||
|
my_database=db_connection.cursor()
|
||||||
|
sql_query="INSERT INTO {}({}) VALUES({})".format(tablename, fields, data)
|
||||||
|
print(sql_query)
|
||||||
|
print(final_stored_names_list)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename + " GROUP BY" + fields
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
db_connection.commit()
|
||||||
|
|
||||||
|
my_database.execute("SELECT LAST_INSERT_ID()")
|
||||||
|
last_inserted_id=my_database.fetchone()
|
||||||
|
last_inserted_id=last_inserted_id[0]
|
||||||
|
|
||||||
|
retVal={"message": "Success", "last_insert_id": last_inserted_id, "stored_names": final_stored_names_list}
|
||||||
|
except:
|
||||||
|
retVal={"message": "Failed", "last_insert_id": None}
|
||||||
|
return retVal
|
||||||
|
|
||||||
|
|
||||||
|
#Read one with condition from any table
|
||||||
|
|
||||||
|
def readoneonewithcond(tablename, fields, condition):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
condition_data=''
|
||||||
|
for key, value in condition.items():
|
||||||
|
if isinstance(value, str):
|
||||||
|
condition_data += " {}='{}' AND".format(key, value)
|
||||||
|
else:
|
||||||
|
condition_data += " {}={} AND".format(key, value)
|
||||||
|
len_of_condition=len(condition_data)
|
||||||
|
condition_data=condition_data[:(len_of_condition-3)]
|
||||||
|
sql_query="SELECT {} FROM {} WHERE {}".format(fields, tablename, condition_data)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
output=my_database.fetchall()
|
||||||
|
""" if (len(output) == 1):
|
||||||
|
output=output[0]
|
||||||
|
else:
|
||||||
|
output=output """
|
||||||
|
except:
|
||||||
|
output = {"Error":"No Data Recieved or Error Occured"}
|
||||||
|
return output
|
||||||
|
|
||||||
|
#Read many with condition from any table
|
||||||
|
|
||||||
|
def readmanywithcond(tablename, fields, condition):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
condition_data=''
|
||||||
|
request_condition=''
|
||||||
|
for key,value in condition.items():
|
||||||
|
if isinstance(value, str):
|
||||||
|
condition_data += "{}={}".format(key, value)
|
||||||
|
request_condition=value
|
||||||
|
if request_condition == 'all':
|
||||||
|
sql_query="SELECT {} FROM {} WHERE status='1'".format(fields, tablename)
|
||||||
|
else:
|
||||||
|
sql_query="SELECT {} FROM {} WHERE status='1' AND {}".format(fields, tablename, condition_data)
|
||||||
|
print(sql_query)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
output=my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No Data Recieved or Error Occured"}
|
||||||
|
return output
|
||||||
|
|
||||||
|
#Read Many without condition(status) from any table
|
||||||
|
|
||||||
|
def readmanywocond(tablename, fields, condition):
|
||||||
|
my_database=db_connection.cursor(dictionary=True)
|
||||||
|
condition_data=''
|
||||||
|
request_condition=''
|
||||||
|
for key,value in condition.items():
|
||||||
|
if isinstance(value, str):
|
||||||
|
condition_data += "{}={}".format(key, value)
|
||||||
|
request_condition=value
|
||||||
|
if request_condition == 'all':
|
||||||
|
sql_query="SELECT {} FROM {}".format(fields, tablename)
|
||||||
|
else:
|
||||||
|
sql_query="SELECT {} FROM {} WHERE {}".format(fields, tablename, condition_data)
|
||||||
|
print(sql_query)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_query)
|
||||||
|
output=my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No Data Recieved or Error Occured"}
|
||||||
|
return output
|
||||||
|
|
||||||
|
#Delete (Means update status) with condition anything(0,1) to 9 for any table
|
||||||
|
|
||||||
|
def updatevaluesindb(condition, updatestatement, tablename):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_statement = "UPDATE " + tablename + " SET " + updatestatement + " WHERE " + condition + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
db_connection.commit()
|
||||||
|
retval = "Success"
|
||||||
|
except:
|
||||||
|
retval = "Failed"
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def insertintodb(condition, fields, values, tablename):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_statement = "INSERT INTO " + tablename + "(" + fields + ") VALUES(" + values + ") WHERE " + condition + ""
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
db_connection.commit()
|
||||||
|
retval = "Success"
|
||||||
|
except:
|
||||||
|
retval = "Failed"
|
||||||
|
db_connection.close()
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def insertintodbwocondition(fields, values, tablename):
|
||||||
|
my_database = db_connection.cursor()
|
||||||
|
sql_statement = "INSERT INTO " + tablename + "(" + fields + ") VALUES(" + values + ")"
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
db_connection.commit()
|
||||||
|
retval = "Success"
|
||||||
|
except:
|
||||||
|
retval = "Failed"
|
||||||
|
#db_connection.close()
|
||||||
|
return retval
|
||||||
|
|
||||||
|
def getfromdbwithcondition(condition, fields, tablename):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename + " WHERE " + condition + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwocondition(fields, tablename):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwoconditiongroupBy(fields, tablename):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename + " GROUP BY" + fields + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwithconditiongroupBy(condition, fields, tablename):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from" + tablename + " WHERE" + condition + " GROUP BY" + fields + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def unionwocondition(fields, tablename1, tablename2):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT" + fields + " from" + tablename1 + " UNION" + " SELECT" + fields + " from" + tablename2 + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def unionwithcondition(fields, condition, tablename1, tablename2):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT" + fields + " from" + tablename1 + " WHERE" + condition + "UNION" + " SELECT" + fields + " from" + tablename2 + " WHERE" + condition + ""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def groupbyhavingorderby(fields, condition, tablename):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
sql_statement = "SELECT" + fields + "FROM" + tablename + "GROUP BY" + fields + "HAVING" + condition + "ORDER BY" + fields + "DESC" + ""
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def insertselectwhereorderby(fields, condition, tablename1, tablename2):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
sql_statement = "INSERT INTO" + tablename1 + " SELECT" + fields + " from" + tablename2 + " WHERE" + condition + "ORDER BY" + fields + "DESC" + ""
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def insertselectwhere(fields, condition, tablename1, tablename2):
|
||||||
|
# my_database = db_connection.cursor()
|
||||||
|
sql_statement = "INSERT INTO" + tablename1 + "SELECT" + fields + "FROM" + tablename2 + "WHERE" + condition + ""
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwithconditionrange(fields,tablename,columnname,value_1,value_2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} BETWEEN {} AND {}".format(fields,tablename,columnname,value_1,value_2)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwoorderby(fields,tablename,order_by):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} ORDER BY {}".format(fields,tablename,order_by)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwoalias(old_columnname,new_columnname,tablename,):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} AS {}".format(old_columnname,new_columnname,tablename)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwithconditionhaving(fields,tablename,columnname,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} GROUP BY {} HAVING {} ORDER BY {}".format(fields,tablename,columnname,condition)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbinnerjoinwithorderby(fields,tableName,columnName,condition,order_by):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} INNER JOIN {} ON {} WHERE {} ORDER BY {}".format(fields,tableName,columnName,condition,order_by)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwithExists(columnname,tablename,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE EXISTS {}".format(columnname,tablename,condition)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwithand(fields,columnname,tablename,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} AND {}".format(fields,columnname,tablename,condition)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwithor(fields,columnname,tablename,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} OR {}".format(fields,columnname,tablename,condition)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
def getfromdbwithnot(fields,columnname,tablename,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} NOT {}".format(fields,columnname,tablename,condition)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def getfromdbwithconditionin(fields,tablename,columnname,values):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement="SELECT {} FROM {} WHERE {} IN {}".format(fields,columnname,tablename,values)
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
# db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
def innerJoinwithCondition(fields, tablename1,tabelname2,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +" INNER JOIN " +tabelname2 +" ON " +condition
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def leftJoinwithCondition(fields, tablename1,tabelname2,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"LEFT JOIN" +""+tabelname2 +" ON " +condition+""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def rightJoinwithCondition(fields, tablename1,tabelname2,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"RIGHT JOIN"+""+tabelname2 +"ON" +condition+""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def fullOuterJoinwithCondition(fields, tablename1,tabelname2,condition):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"FULL OUTER JOIN" +tabelname2 +"ON" +condition
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def innerLeftJoinwithCondition(fields, tablename1,tabelname2,condition,condition2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"INNER JOIN" +tabelname2 +"ON" +condition + "" +"LEFT JOIN" +""+tabelname2 +"ON" +condition2+""
|
||||||
|
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def innerRightJoinwithCondition(fields, tablename1,tabelname2,condition,condition2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"INNER JOIN" +tabelname2 +"ON" +condition + "" +"RIGHT JOIN" +""+tabelname2 +"ON" +condition2+""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def leftRightJoinwithCondition(fields, tablename1,tabelname2,condition,condition2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"LEFT JOIN" +tabelname2 +"ON" +condition + "" +"RIGHT JOIN" +""+tabelname2 +"ON" +condition2+""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def fullOuterRightJoinwithCondition(fields, tablename1,tabelname2,condition,condition2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"FULL OUTER JOIN" +tabelname2 +"ON" +condition + "" +"RIGHT JOIN" +""+tabelname2 +"ON" +condition2+""
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def leftJoinwithOutCondition(fields, tablename1,tabelname2,):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"LEFT JOIN" +""+tabelname2
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def rightJoinwithOutCondition(fields, tablename1,tabelname2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"RIGHT JOIN"+""+tabelname2
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
def fullOuterJoinwithoutcondition(fields, tablename1,tabelname2):
|
||||||
|
my_database = db_connection.cursor(dictionary = True)
|
||||||
|
sql_statement = "SELECT " + fields + " from " + tablename1 + "" +"FULL OUTER JOIN" +tabelname2
|
||||||
|
print(sql_statement)
|
||||||
|
try:
|
||||||
|
my_database.execute(sql_statement)
|
||||||
|
output = my_database.fetchall()
|
||||||
|
except:
|
||||||
|
output = {"Error":"No data recieved or error occured"}
|
||||||
|
db_connection.close()
|
||||||
|
return output
|
||||||
|
|
||||||
|
'''
|
4353
core/extra.py
Normal file
4353
core/extra.py
Normal file
File diff suppressed because it is too large
Load Diff
BIN
core/modules/__pycache__/common.cpython-38.pyc
Normal file
BIN
core/modules/__pycache__/common.cpython-38.pyc
Normal file
Binary file not shown.
0
core/modules/common.py
Normal file
0
core/modules/common.py
Normal file
10508
dbiLAyer.postman_collection_crud.json
Normal file
10508
dbiLAyer.postman_collection_crud.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
reqhandlers/__pycache__/blocklist.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/blocklist.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbacl.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbacl.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbauth.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbauth.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbbilling.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbbilling.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcategory.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcategory.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcharges.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcharges.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcity.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcity.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcnnstring.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcnnstring.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcollection.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcollection.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcountry.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcountry.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbcustomer.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbcustomer.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbdelnote.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbdelnote.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbdeploye.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbdeploye.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbemail.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbemail.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbencoding.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbencoding.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbgeninv.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbgeninv.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbgst.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbgst.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbhash.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbhash.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbinstance.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbinstance.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbinvoice.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbinvoice.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbinvoicelineitem.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbinvoicelineitem.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbipaddress.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbipaddress.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbkyc.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbkyc.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbname.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbname.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dborders.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dborders.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dborganization.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dborganization.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpackage.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpackage.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpan.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpan.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpassword.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpassword.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpermission.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpermission.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbphone.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbphone.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpincode.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpincode.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbplan.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbplan.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbplanbilling.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbplanbilling.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbplans.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbplans.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbpo.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbpo.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbportnumber.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbportnumber.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbprod.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbprod.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbrole.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbrole.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbschema.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbschema.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbstate.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbstate.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbtype.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbtype.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbuac.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbuac.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbuname.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbuname.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbusagelimit.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbusagelimit.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/dbusers.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/dbusers.cpython-38.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/users.cpython-311.pyc
Normal file
BIN
reqhandlers/__pycache__/users.cpython-311.pyc
Normal file
Binary file not shown.
BIN
reqhandlers/__pycache__/users.cpython-38.pyc
Normal file
BIN
reqhandlers/__pycache__/users.cpython-38.pyc
Normal file
Binary file not shown.
1
reqhandlers/blocklist.py
Normal file
1
reqhandlers/blocklist.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
BLOCKLIST=set() #This page is used to store insert jti of user, to maintain it as unique we always insert it in set
|
90
reqhandlers/dbacl.py
Normal file
90
reqhandlers/dbacl.py
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbacl = Blueprint('dbacl', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
@dbacl.route('/dbacl/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbacl.route('/dbacl/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbacl():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbacl.route('/dbacl/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbaclwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbacl.route('/dbacl/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbaclwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbacl.route('/dbacl/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbaclwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbacl.route('/dbacl/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbaclwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbacl.route('/dbacl/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbaclwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbacl.route('/dbacl/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
async def createdbacl():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbacl_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
90
reqhandlers/dbauth.py
Normal file
90
reqhandlers/dbauth.py
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbauth = Blueprint('dbauth', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
@dbauth.route('/dbauth/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbauth.route('/dbauth/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbauth():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbauth.route('/dbauth/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbauthwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbauth.route('/dbauth/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbauthwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbauth.route('/dbauth/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbauthwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbauth.route('/dbauth/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbauthwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbauth.route('/dbauth/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbauthwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbauth.route('/dbauth/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbauth():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbauth_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbbilling.py
Normal file
91
reqhandlers/dbbilling.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbbilling = Blueprint('dbbilling', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbbilling.route('/dbbilling/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbbilling.route('/dbbilling/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbbilling():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbbilling.route('/dbbilling/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbbillingwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbbilling.route('/dbbilling/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbbillingwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbbilling.route('/dbbilling/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbbillingwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbbilling.route('/dbbilling/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbbillingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbbilling.route('/dbbilling/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbbillingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbbilling.route('/dbbilling/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbbilling():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbbilling_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcategory.py
Normal file
91
reqhandlers/dbcategory.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcategory = Blueprint('dbcategory', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcategory.route('/dbcategory/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcategory.route('/dbcategory/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcategory():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcategory.route('/dbcategory/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcategorywithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcategory.route('/dbcategory/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbcategorywithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcategory.route('/dbcategory/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcategorywithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcategory.route('/dbcategory/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcategorywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcategory.route('/dbcategory/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcategorywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcategory.route('/dbcategory/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcategory():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcategory_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcharges.py
Normal file
91
reqhandlers/dbcharges.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcharges = Blueprint('dbcharges', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcharges.route('/dbcharges/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcharges.route('/dbcharges/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcharges():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcharges.route('/dbcharges/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbchargeswithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcharges.route('/dbcharges/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbchargeswithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcharges.route('/dbcharges/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbchargeswithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcharges.route('/dbcharges/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbchargeswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcharges.route('/dbcharges/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbchargeswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcharges.route('/dbcharges/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcharges():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcharge_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcity.py
Normal file
91
reqhandlers/dbcity.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcity = Blueprint('dbcity', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcity.route('/dbcity/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcity.route('/dbcity/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcity():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcity.route('/dbcity/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcitywithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcity.route('/dbcity/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.csached(timeout=50)
|
||||||
|
def reaManydbcitywithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcity.route('/dbcity/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcitywithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcity.route('/dbcity/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcitywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcity.route('/dbcity/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcitywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcity.route('/dbcity/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcity():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcity_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcnnstring.py
Normal file
91
reqhandlers/dbcnnstring.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcnnstring = Blueprint('dbcnnstring', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcnnstring():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcnnstringwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbcnnstringwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcnnstringwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcnnstringwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcnnstringwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcnnstring.route('/dbconnectionstring/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcnnstring():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbconnectionstring_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcollection.py
Normal file
91
reqhandlers/dbcollection.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcollection = Blueprint('dbcollection', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcollection.route('/dbcollection/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcollection.route('/dbcollection/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcollection():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcollection.route('/dbcollection/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcollectionwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcollection.route('/dbcollection/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbcollectionwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcollection.route('/dbcollection/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcollectionwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcollection.route('/dbcollection/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcollectionwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcollection.route('/dbcollection/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcollectionwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcollection.route('/dbcollection/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcollection():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcollection_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcountry.py
Normal file
91
reqhandlers/dbcountry.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcountry = Blueprint('dbcountry', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcountry.route('/dbcountry/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcountry.route('/dbcountry/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcountry():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcountry.route('/dbcountry/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcountrywithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcountry.route('/dbcountry/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbcountrywithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcountry.route('/dbcountry/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcountrywithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcountry.route('/dbcountry/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcountrywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcountry.route('/dbcountry/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcountrywithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcountry.route('/dbcountry/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcountry():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcountry_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbcustomer.py
Normal file
91
reqhandlers/dbcustomer.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbcustomer = Blueprint('dbcustomer', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbcustomer.route('/dbcustomer/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbcustomer.route('/dbcustomer/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcustomer():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbcustomer.route('/dbcustomer/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbcustomerwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbcustomer.route('/dbcustomer/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbcustomerwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbcustomer.route('/dbcustomer/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbcustomerwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbcustomer.route('/dbcustomer/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbcustomerwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbcustomer.route('/dbcustomer/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbcustomerwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbcustomer.route('/dbcustomer/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbcustomer():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbcustomer_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbdelnote.py
Normal file
91
reqhandlers/dbdelnote.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbdelnote = Blueprint('dbdelnote', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbdelnote.route('/dbdelnote/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbdelnote.route('/dbdelnote/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbdelnote():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbdelnote.route('/dbdelnote/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbdelnotewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbdelnote.route('/dbdelnote/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbdelnotewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbdelnote.route('/dbdelnote/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbdelnotewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processreadall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbdelnote.route('/dbdelnote/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbdelnotewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbdelnote.route('/dbdelnote/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbdelnotewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbdelnote.route('/dbdelnote/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbdelnote():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdelnote_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbdeploye.py
Normal file
91
reqhandlers/dbdeploye.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbdeploye = Blueprint('dbdeploye', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbdeploye.route('/dbdeploye/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbdeploye.route('/dbdeploye/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbdeploye():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbdeploye.route('/dbdeploye/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbdeployewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbdeploye.route('/dbdeploye/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbdeployewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbdeploye.route('/dbdeploye/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbdeployewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbdeploye.route('/dbdeploye/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbdeployewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbdeploye.route('/dbdeploye/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbdeployewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbdeploye.route('/dbdeploye/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
# @jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbdeploye():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbdeploye_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbemail.py
Normal file
91
reqhandlers/dbemail.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbemail = Blueprint('dbemail', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbemail.route('/dbemail/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbemail.route('/dbemail/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbemail():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbemail.route('/dbemail/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbemailwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbemail.route('/dbemail/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbemailwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbemail.route('/dbemail/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbemailwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbemail.route('/dbemail/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbemailwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbemail.route('/dbemail/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbemailwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbemail.route('/dbemail/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbemail():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbemail_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbencoding.py
Normal file
91
reqhandlers/dbencoding.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbencoding = Blueprint('dbencoding', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbencoding.route('/dbencoding/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbencoding.route('/dbencoding/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbencoding():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbencoding.route('/dbencoding/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbencodingwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbencoding.route('/dbencoding/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbencodingwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbencoding.route('/dbencoding/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbencodingwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbencoding.route('/dbencoding/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbencodingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbencoding.route('/dbencoding/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbencodingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbencoding.route('/dbencoding/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbencoding():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbencoding_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbgeninv.py
Normal file
91
reqhandlers/dbgeninv.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbgeninv = Blueprint('dbgeninv', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbgeninv.route('/dbgeninv/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbgeninv.route('/dbgeninv/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbgeninv():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbgeninv.route('/dbgeninv/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbgeninvwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbgeninv.route('/dbgeninv/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbgeninvwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbgeninv.route('/dbgeninv/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbgeninvwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbgeninv.route('/dbgeninv/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbgeninvwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbgeninv.route('/dbgeninv/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbgeninvwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbgeninv.route('/dbgeninv/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbgeninv():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgeninv_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbgst.py
Normal file
91
reqhandlers/dbgst.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbgst = Blueprint('dbgst', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbgst.route('/dbgst/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbgst.route('/dbgst/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbgst():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbgst.route('/dbgst/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbgstwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbgst.route('/dbgst/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbgstwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbgst.route('/dbgst/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbgstwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbgst.route('/dbgst/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbgstwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbgst.route('/dbgst/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbgstwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbgst.route('/dbgst/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbgst():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbgst_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbhash.py
Normal file
91
reqhandlers/dbhash.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbhash = Blueprint('dbhash', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbhash.route('/dbhash/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbhash.route('/dbhash/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbhash():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbhash.route('/dbhash/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbhashwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbhash.route('/dbhash/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbhashwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbhash.route('/dbhash/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbhashwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbhash.route('/dbhash/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbhashwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbhash.route('/dbhash/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbhashwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbhash.route('/dbhash/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbhash():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbhash_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbinstance.py
Normal file
91
reqhandlers/dbinstance.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbinstance = Blueprint('dbinstance', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbinstance.route('/dbinstance/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbinstance.route('/dbinstance/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinstance():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbinstance.route('/dbinstance/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbinstancewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbinstance.route('/dbinstance/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbinstancewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbinstance.route('/dbinstance/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbinstancewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbinstance.route('/dbinstance/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbinstancewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbinstance.route('/dbinstance/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbinstancewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbinstance.route('/dbinstance/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinstance():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinstance_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbinvoice.py
Normal file
91
reqhandlers/dbinvoice.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbinvoice = Blueprint('dbinvoice', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbinvoice.route('/dbinvoice/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbinvoice.route('/dbinvoice/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinvoice():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbinvoice.route('/dbinvoice/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbinvoicewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbinvoice.route('/dbinvoice/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbinvoicewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbinvoice.route('/dbinvoice/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbinvoicewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbinvoice.route('/dbinvoice/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbinvoicewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbinvoice.route('/dbinvoice/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbinvoicewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbinvoice.route('/dbinvoice/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinvoice():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoice_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbinvoicelineitem.py
Normal file
91
reqhandlers/dbinvoicelineitem.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbinvoicelineitem = Blueprint('dbinvoicelineitem', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinvoicelineitem():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbinvoicelineitemwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbinvoicelineitemwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbinvoicelineitemwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbinvoicelineitemwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbinvoicelineitemwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbinvoicelineitem.route('/dbinvoicelineitem/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbinvoicelineitem():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbinvoicelineitem_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbipaddress.py
Normal file
91
reqhandlers/dbipaddress.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbipaddress = Blueprint('dbipaddress', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbipaddress.route('/dbipaddress/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbipaddress.route('/dbipaddress/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbipaddress():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbipaddress.route('/dbipaddress/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbipaddresswithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbipaddress.route('/dbipaddress/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbipaddresswithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbipaddress.route('/dbipaddress/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbipaddresswithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbipaddress.route('/dbipaddress/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbipaddresswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbipaddress.route('/dbipaddress/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbipaddresswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbipaddress.route('/dbipaddress/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbipaddress():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbipaddress_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbkyc.py
Normal file
91
reqhandlers/dbkyc.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbkyc = Blueprint('dbkyc', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbkyc.route('/dbkyc/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbkyc.route('/dbkyc/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbkyc():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbkyc.route('/dbkyc/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbkycwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbkyc.route('/dbkyc/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbkycwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbkyc.route('/dbkyc/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbkycwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbkyc.route('/dbkyc/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbkycwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbkyc.route('/dbkyc/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbkycwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbkyc.route('/dbkyc/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbkyc():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbkyc_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbname.py
Normal file
91
reqhandlers/dbname.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbname = Blueprint('dbname', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbname.route('/dbname/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbname.route('/dbname/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbname():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbname.route('/dbname/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbnamewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbname.route('/dbname/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbnamewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbname.route('/dbname/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbnamewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbname.route('/dbname/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbnamewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbname.route('/dbname/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbnamewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbname.route('/dbname/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbname():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbname_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dborders.py
Normal file
91
reqhandlers/dborders.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dborders = Blueprint('dborders', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dborders.route('/dborders/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dborders.route('/dborders/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdborders():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dborders.route('/dborders/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedborderswithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dborders.route('/dborders/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydborderswithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dborders.route('/dborders/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydborderswithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dborders.route('/dborders/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedborderswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dborders.route('/dborders/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedborderswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dborders.route('/dborders/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdborders():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborders_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dborganization.py
Normal file
91
reqhandlers/dborganization.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dborganization = Blueprint('dborganization', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dborganization.route('/dborganization/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dborganization.route('/dborganization/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdborganization():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dborganization.route('/dborganization/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedborganizationwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dborganization.route('/dborganization/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydborganizationwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dborganization.route('/dborganization/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydborganizationwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dborganization.route('/dborganization/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedborganizationwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dborganization.route('/dborganization/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedborganizationwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dborganization.route('/dborganization/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdborganization():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dborganization_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpackage.py
Normal file
91
reqhandlers/dbpackage.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpackage = Blueprint('dbpackage', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpackage.route('/dbpackage/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpackage.route('/dbpackage/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpackage():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpackage.route('/dbpackage/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbpackagewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpackage.route('/dbpackage/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbpackagewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpackage.route('/dbpackage/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbpackagewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpackage.route('/dbpackage/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbpackagewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpackage.route('/dbpackage/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbpackagewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpackage.route('/dbpackage/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpackage():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpackage_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpan.py
Normal file
91
reqhandlers/dbpan.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpan = Blueprint('dbpan', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpan.route('/dbpan/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpan.route('/dbpan/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplan():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpan.route('/dbpan/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbplanwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpan.route('/dbpan/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbplanwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpan.route('/dbpan/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbplanwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpan.route('/dbpan/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbplanwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpan.route('/dbpan/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbplanwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpan.route('/dbpan/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplan():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpan_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpassword.py
Normal file
91
reqhandlers/dbpassword.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpassword = Blueprint('dbpassword', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpassword.route('/dbpassword/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpassword.route('/dbpassword/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpassword():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpassword.route('/dbpassword/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbpasswordwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpassword.route('/dbpassword/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbpasswordwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpassword.route('/dbpassword/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbpasswordwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpassword.route('/dbpassword/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbpasswordwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpassword.route('/dbpassword/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbpasswordwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpassword.route('/dbpassword/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpassword():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpassword_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpermission.py
Normal file
91
reqhandlers/dbpermission.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpermission = Blueprint('dbpermission', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpermission.route('/dbpermission/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpermission.route('/dbpermission/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpermission():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpermission.route('/dbpermission/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbpermissionwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpermission.route('/dbpermission/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbpermissionwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpermission.route('/dbpermission/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbpermissionwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpermission.route('/dbpermission/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbpermissionwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpermission.route('/dbpermission/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbpermissionwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpermission.route('/dbpermission/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpermission():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpermission_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbphone.py
Normal file
91
reqhandlers/dbphone.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbphone = Blueprint('dbphone', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbphone.route('/dbphone/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbphone.route('/dbphone/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbphone():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbphone.route('/dbphone/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbphonewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbphone.route('/dbphone/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbphonewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbphone.route('/dbphone/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbphonewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbphone.route('/dbphone/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbphonewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbphone.route('/dbphone/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbphonewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbphone.route('/dbphone/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbphone():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbphone_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpincode.py
Normal file
91
reqhandlers/dbpincode.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpincode = Blueprint('dbpincode', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpincode.route('/dbpincode/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpincode.route('/dbpincode/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpincode():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpincode.route('/dbpincode/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbpincodewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpincode.route('/dbpincode/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbpincodewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpincode.route('/dbpincode/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbpincodewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpincode.route('/dbpincode/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbpincodewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpincode.route('/dbpincode/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbpincodewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpincode.route('/dbpincode/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpincode():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpincode_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbplan.py
Normal file
91
reqhandlers/dbplan.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbplan = Blueprint('dbplan', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbplan.route('/dbplan/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbplan.route('/dbplan/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplan():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbplan.route('/dbplan/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbplanwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbplan.route('/dbplan/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbplanwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbplan.route('/dbplan/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbplanwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbplan.route('/dbplan/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbplanwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbplan.route('/dbplan/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbplanwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbplan.route('/dbplan/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplan():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplan_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbplanbilling.py
Normal file
91
reqhandlers/dbplanbilling.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbplanbilling = Blueprint('dbplanbilling', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbplanbilling.route('/dbplanbilling/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbplanbilling.route('/dbplanbilling/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplanbilling():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbplanbilling.route('/dbplanbilling/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbplanbillingwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbplanbilling.route('/dbplanbilling/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbplanbillingwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbplanbilling.route('/dbplanbilling/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbplanbillingwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbplanbilling.route('/dbplanbilling/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbplanbillingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbplanbilling.route('/dbplanbilling/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbplanbillingwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbplanbilling.route('/dbplanbilling/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplanbilling():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplanbilling_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbplans.py
Normal file
91
reqhandlers/dbplans.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbplans = Blueprint('dbplans', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbplans.route('/dbplans/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbplans.route('/dbplans/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplans():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbplans.route('/dbplans/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbplanswithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbplans.route('/dbplans/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbplanswithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbplans.route('/dbplans/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbplanswithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbplans.route('/dbplans/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbplanswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbplans.route('/dbplans/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbplanswithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbplans.route('/dbplans/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbplans():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbplans_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbpo.py
Normal file
91
reqhandlers/dbpo.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbpo = Blueprint('dbpo', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbpo.route('/dbpo/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbpo.route('/dbpo/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpo():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbpo.route('/dbpo/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbpowithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbpo.route('/dbpo/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbpowithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbpo.route('/dbpo/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbpowithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbpo.route('/dbpo/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbpowithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbpo.route('/dbpo/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbpowithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbpo.route('/dbpo/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbpo():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbpo_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbportnumber.py
Normal file
91
reqhandlers/dbportnumber.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbportnumber = Blueprint('dbportnumber', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbportnumber.route('/dbportnumber/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbportnumber.route('/dbportnumber/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbportnumber():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbportnumber.route('/dbportnumber/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbportnumberwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbportnumber.route('/dbportnumber/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbportnumberwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbportnumber.route('/dbportnumber/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbportnumberwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbportnumber.route('/dbportnumber/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbportnumberwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbportnumber.route('/dbportnumber/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbportnumberwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbportnumber.route('/dbportnumber/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbportnumber():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbportnumber_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbprod.py
Normal file
91
reqhandlers/dbprod.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbprod = Blueprint('dbprod', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbprod.route('/dbprod/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbprod.route('/dbprod/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createPropSet():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbprod.route('/dbprod/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnePropSetwithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbprod.route('/dbprod/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManyPropSetwithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbprod.route('/dbprod/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManyPropSetwithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbprod.route('/dbprod/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnePropSetwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbprod.route('/dbprod/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonePropSetwithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbprod.route('/dbprod/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createPropSet():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbprod_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
91
reqhandlers/dbrole.py
Normal file
91
reqhandlers/dbrole.py
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
from flask import Blueprint, request, jsonify
|
||||||
|
from core.bll import bllengine
|
||||||
|
from flask_cors import cross_origin
|
||||||
|
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
|
||||||
|
from reqhandlers.blocklist import BLOCKLIST
|
||||||
|
import datetime
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
|
dbrole = Blueprint('dbrole', __name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@dbrole.route('/dbrole/reqtest')
|
||||||
|
def retest():
|
||||||
|
return "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1. Create
|
||||||
|
@dbrole.route('/dbrole/create', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbrole():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processcreate(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.2. Read One Conditional
|
||||||
|
@dbrole.route('/dbrole/readonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readOnedbrolewithCondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processreadonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.3. Read Multiple Conditional
|
||||||
|
@dbrole.route('/dbrole/readmanycond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
##@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def reaManydbrolewithCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processreadmanycond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.4. Read All
|
||||||
|
@dbrole.route('/dbrole/readall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def readManydbrolewithoutCond():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processreadmanywithoutcond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
# 1.5. Delete One Conditional
|
||||||
|
@dbrole.route('/dbrole/deleteonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def deleteOnedbrolewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processdeleteonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
# 1.6. Update One Conditional
|
||||||
|
@dbrole.route('/dbrole/updateonecond', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def updateonedbrolewithcondition():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processupdateonecond(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
|
||||||
|
""""# 1.7. Update All
|
||||||
|
@dbrole.route('/dbrole/updateall', methods=["POST"])
|
||||||
|
@cross_origin()
|
||||||
|
#@jwt_required()
|
||||||
|
#@cache.cached(timeout=50)
|
||||||
|
def createdbrole():
|
||||||
|
req = request.json
|
||||||
|
resp = bllengine.dbrole_processupdateall(req)
|
||||||
|
return jsonify(resp)
|
||||||
|
|
||||||
|
"""
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user