11/07/2024 - 13h14
parent
a4df7a0358
commit
47cd3eb277
|
@ -1,15 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="wwssdssddd">
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="11/07/2024 - 13h14">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Dashbord_queries/formation_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/formation_tbd_qries.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Dashbord_queries/inscription_tdb_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/inscription_tdb_qries.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_factures_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/ela_factures_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/emargement.py" beforeDir="false" afterPath="$PROJECT_DIR$/emargement.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/module_editique.py" beforeDir="false" afterPath="$PROJECT_DIR$/module_editique.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partner_invoice.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_invoice.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -79,13 +77,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00299" summary="sds">
|
||||
<created>1715795512375</created>
|
||||
<option name="number" value="00299" />
|
||||
<option name="presentableId" value="LOCAL-00299" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1715795512375</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00300" summary="sdsdd">
|
||||
<created>1715805416758</created>
|
||||
<option name="number" value="00300" />
|
||||
|
@ -422,7 +413,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1720630401947</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="348" />
|
||||
<task id="LOCAL-00348" summary="11/07/2024 - 13h14">
|
||||
<created>1720696494604</created>
|
||||
<option name="number" value="00348" />
|
||||
<option name="presentableId" value="LOCAL-00348" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1720696494605</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="349" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -464,7 +462,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="01/06/2024 - 14h30" />
|
||||
<MESSAGE value="qsdsq" />
|
||||
<MESSAGE value="qsdsqsqdsq" />
|
||||
<MESSAGE value="05/06/2024 - 23h" />
|
||||
|
@ -489,6 +486,7 @@
|
|||
<MESSAGE value="wwssdss" />
|
||||
<MESSAGE value="wwssdssd" />
|
||||
<MESSAGE value="wwssdssddd" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="wwssdssddd" />
|
||||
<MESSAGE value="11/07/2024 - 13h14" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="11/07/2024 - 13h14" />
|
||||
</component>
|
||||
</project>
|
|
@ -526,3 +526,603 @@ def Get_Qery_Formation_By_Session_By_Periode_Export_CSV(diction):
|
|||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
||||
"""
|
||||
V2 : Recuperation du nombre de session par periode
|
||||
"""
|
||||
def Get_Qery_Session_By_Periode_V2(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_start_date', 'session_end_date', 'filter_value', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'session_start_date', 'session_end_date']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
filt_session_start_date = ""
|
||||
if ("session_start_date" in diction.keys() and diction['session_start_date']):
|
||||
filt_session_start_date = str(diction['session_start_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_start_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
filt_session_end_date = ""
|
||||
if ("session_end_date" in diction.keys() and diction['session_end_date']):
|
||||
filt_session_end_date = str(diction['session_end_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_end_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
"""
|
||||
Si la valeur de 'filter_value' est m0 ou m1, on va aller recuperer les date du mois correspondant.
|
||||
On ecrase les valeur de filt_session_start_date et filt_session_end_date
|
||||
"""
|
||||
if ('filter_value' in diction.keys()):
|
||||
if (str(diction['filter_value']) == "m0"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Current_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
elif (str(diction['filter_value']) == "m1"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Previous_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
filt_session_start_date_ISODATE = datetime.strptime(str(filt_session_start_date), '%d/%m/%Y')
|
||||
filt_session_end_date_ISODATE = datetime.strptime(str(filt_session_end_date), '%d/%m/%Y')
|
||||
|
||||
"""
|
||||
Creation de la range des mois entre filt_periode_start_date_ISODATE et
|
||||
filt_periode_end_date_ISODATE
|
||||
"""
|
||||
range_date_month = []
|
||||
start = filt_session_start_date_ISODATE
|
||||
end = filt_session_end_date_ISODATE
|
||||
while start <= end:
|
||||
node = {}
|
||||
node['month_year'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['label'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['TotalAmount'] = 0
|
||||
node['value'] = 0
|
||||
node['count'] = 0
|
||||
|
||||
range_date_month.append(node)
|
||||
start += relativedelta(months=1)
|
||||
|
||||
|
||||
|
||||
filt_session_start_date_ISODATE_work = filt_session_start_date_ISODATE
|
||||
filt_session_end_date_ISODATE_work = filt_session_end_date_ISODATE
|
||||
|
||||
qery_match = {'$and': [{"partner_owner_recid": str(my_partner['recid'])}, {"valide": '1'},
|
||||
|
||||
{'mysy_session_date_debut': {'$gte': filt_session_start_date_ISODATE,
|
||||
'$lte': filt_session_end_date_ISODATE}},
|
||||
]}
|
||||
|
||||
|
||||
# print(" ### qery_match = ", qery_match)
|
||||
|
||||
pipe_qry = ([
|
||||
{"$addFields": {
|
||||
"mysy_session_date_debut": {
|
||||
'$dateFromString': {
|
||||
'dateString': { "$substr": [ "$date_debut", 0, 10 ] },
|
||||
'format': "%d/%m/%Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{'$match': qery_match},
|
||||
|
||||
{
|
||||
"$lookup": {
|
||||
'from': 'myclass',
|
||||
'localField': 'class_internal_url',
|
||||
'foreignField': 'internal_url',
|
||||
"pipeline": [{'$project': {'title': 1, 'internal_url': 1, 'external_code': 1, 'published': 1}}
|
||||
|
||||
],
|
||||
"as": "myclass_collection"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{'$group': {
|
||||
'_id': {
|
||||
|
||||
"mois_annee_inscription": {
|
||||
"$concat": [{'$substr': ["$date_debut", 3, 2]}, "_", {'$substr': ["$date_debut", 6, 4]}]},
|
||||
"annee_inscription": {'$substr': ["$date_debut", 6, 4]},
|
||||
"mois_inscription": {'$substr': ["$date_debut", 3, 2]},
|
||||
},
|
||||
"count": {"$sum": 1}
|
||||
}
|
||||
},
|
||||
{
|
||||
'$sort': {'_id.mois_annee_inscription': 1}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
|
||||
print(" ### Get_Qery_Session_By_Formation_By_Periode_V2 ici pipe_qry = ", pipe_qry)
|
||||
|
||||
axis_data = []
|
||||
cpt = 0
|
||||
tab_lines_inscription_data = []
|
||||
for retval in MYSY_GV.dbname['session_formation'].aggregate(pipe_qry):
|
||||
cpt = cpt + 1
|
||||
for tmp in range_date_month:
|
||||
axis_data.append(str(tmp['month_year']))
|
||||
|
||||
if( str(retval['_id']['mois_annee_inscription']) == str(tmp['month_year']) ):
|
||||
tmp['count'] = mycommon.tryFloat(str(retval['count']))
|
||||
|
||||
|
||||
RetObject = []
|
||||
json_retval = {}
|
||||
json_retval['data'] = range_date_month
|
||||
json_retval['axis_data'] = axis_data
|
||||
|
||||
#print(" ### json_retval = ", json_retval)
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
||||
"""
|
||||
V2 : Recuperation du nombre de session par periode
|
||||
"""
|
||||
def Get_Qery_Session_By_Formation_V2(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_start_date', 'session_end_date', 'filter_value', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'session_start_date', 'session_end_date']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
filt_session_start_date = ""
|
||||
if ("session_start_date" in diction.keys() and diction['session_start_date']):
|
||||
filt_session_start_date = str(diction['session_start_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_start_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
filt_session_end_date = ""
|
||||
if ("session_end_date" in diction.keys() and diction['session_end_date']):
|
||||
filt_session_end_date = str(diction['session_end_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_end_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
"""
|
||||
Si la valeur de 'filter_value' est m0 ou m1, on va aller recuperer les date du mois correspondant.
|
||||
On ecrase les valeur de filt_session_start_date et filt_session_end_date
|
||||
"""
|
||||
if ('filter_value' in diction.keys()):
|
||||
if (str(diction['filter_value']) == "m0"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Current_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
elif (str(diction['filter_value']) == "m1"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Previous_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
filt_session_start_date_ISODATE = datetime.strptime(str(filt_session_start_date), '%d/%m/%Y')
|
||||
filt_session_end_date_ISODATE = datetime.strptime(str(filt_session_end_date), '%d/%m/%Y')
|
||||
|
||||
"""
|
||||
Creation de la range des mois entre filt_periode_start_date_ISODATE et
|
||||
filt_periode_end_date_ISODATE
|
||||
"""
|
||||
range_date_month = []
|
||||
start = filt_session_start_date_ISODATE
|
||||
end = filt_session_end_date_ISODATE
|
||||
while start <= end:
|
||||
node = {}
|
||||
node['month_year'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['label'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['TotalAmount'] = 0
|
||||
node['value'] = 0
|
||||
node['count'] = 0
|
||||
|
||||
range_date_month.append(node)
|
||||
start += relativedelta(months=1)
|
||||
|
||||
|
||||
|
||||
filt_session_start_date_ISODATE_work = filt_session_start_date_ISODATE
|
||||
filt_session_end_date_ISODATE_work = filt_session_end_date_ISODATE
|
||||
|
||||
qery_match = {'$and': [{"partner_owner_recid": str(my_partner['recid'])}, {"valide": '1'},
|
||||
|
||||
{'mysy_session_date_debut': {'$gte': filt_session_start_date_ISODATE,
|
||||
'$lte': filt_session_end_date_ISODATE}},
|
||||
]}
|
||||
|
||||
|
||||
# print(" ### qery_match = ", qery_match)
|
||||
|
||||
pipe_qry = ([
|
||||
{"$addFields": {
|
||||
"mysy_session_date_debut": {
|
||||
'$dateFromString': {
|
||||
'dateString': { "$substr": [ "$date_debut", 0, 10 ] },
|
||||
'format': "%d/%m/%Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{'$match': qery_match},
|
||||
|
||||
{
|
||||
"$lookup": {
|
||||
'from': 'myclass',
|
||||
'localField': 'class_internal_url',
|
||||
'foreignField': 'internal_url',
|
||||
"pipeline": [{'$project': {'title': 1, 'internal_url': 1, 'external_code': 1, 'published': 1}}
|
||||
|
||||
],
|
||||
"as": "myclass_collection"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"$group": {
|
||||
"_id": {
|
||||
|
||||
"class_id": "$myclass_collection._id",
|
||||
"class_code": "$myclass_collection.external_code",
|
||||
"class_title": "$myclass_collection.title",
|
||||
|
||||
},
|
||||
"count": {
|
||||
"$sum": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
'$sort': {'count': -1}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
|
||||
print(" ### Get_Qery_Session_By_Formation_V2 ici pipe_qry = ", pipe_qry)
|
||||
|
||||
axis_data = []
|
||||
my_data = []
|
||||
cpt = 0
|
||||
for retval in MYSY_GV.dbname['session_formation'].aggregate(pipe_qry):
|
||||
cpt = cpt + 1
|
||||
axis_data.append(str(retval['_id']['class_code'][0]))
|
||||
node = {}
|
||||
node['class_code'] = str(retval['_id']['class_code'][0])
|
||||
node['class_title'] = str(retval['_id']['class_title'][0])
|
||||
node['label'] = str(retval['_id']['class_code'][0])
|
||||
node['value'] = mycommon.tryFloat(str(retval['count']))
|
||||
node['count'] = mycommon.tryFloat(str(retval['count']))
|
||||
my_data.append(node)
|
||||
|
||||
RetObject = []
|
||||
json_retval = {}
|
||||
json_retval['data'] = my_data
|
||||
json_retval['axis_data'] = axis_data
|
||||
|
||||
#print(" ### json_retval = ", json_retval)
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
||||
|
||||
"""
|
||||
V2 : Recuperation du nombre de session par periode, CUMULE
|
||||
"""
|
||||
def Get_Qery_Session_By_Periode_Cumule_V2(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_start_date', 'session_end_date', 'filter_value', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'session_start_date', 'session_end_date']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
filt_session_start_date = ""
|
||||
if ("session_start_date" in diction.keys() and diction['session_start_date']):
|
||||
filt_session_start_date = str(diction['session_start_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_start_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
filt_session_end_date = ""
|
||||
if ("session_end_date" in diction.keys() and diction['session_end_date']):
|
||||
filt_session_end_date = str(diction['session_end_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_end_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
"""
|
||||
Si la valeur de 'filter_value' est m0 ou m1, on va aller recuperer les date du mois correspondant.
|
||||
On ecrase les valeur de filt_session_start_date et filt_session_end_date
|
||||
"""
|
||||
if ('filter_value' in diction.keys()):
|
||||
if (str(diction['filter_value']) == "m0"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Current_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
elif (str(diction['filter_value']) == "m1"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Previous_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
filt_session_start_date_ISODATE = datetime.strptime(str(filt_session_start_date), '%d/%m/%Y')
|
||||
filt_session_end_date_ISODATE = datetime.strptime(str(filt_session_end_date), '%d/%m/%Y')
|
||||
|
||||
"""
|
||||
Creation de la range des mois entre filt_periode_start_date_ISODATE et
|
||||
filt_periode_end_date_ISODATE
|
||||
"""
|
||||
range_date_month = []
|
||||
start = filt_session_start_date_ISODATE
|
||||
end = filt_session_end_date_ISODATE
|
||||
while start <= end:
|
||||
node = {}
|
||||
node['month_year'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['label'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['TotalAmount'] = 0
|
||||
node['value'] = 0
|
||||
node['count'] = 0
|
||||
|
||||
range_date_month.append(node)
|
||||
start += relativedelta(months=1)
|
||||
|
||||
|
||||
|
||||
filt_session_start_date_ISODATE_work = filt_session_start_date_ISODATE
|
||||
filt_session_end_date_ISODATE_work = filt_session_end_date_ISODATE
|
||||
|
||||
qery_match = {'$and': [{"partner_owner_recid": str(my_partner['recid'])}, {"valide": '1'},
|
||||
|
||||
{'mysy_session_date_debut': {'$gte': filt_session_start_date_ISODATE,
|
||||
'$lte': filt_session_end_date_ISODATE}},
|
||||
]}
|
||||
|
||||
|
||||
# print(" ### qery_match = ", qery_match)
|
||||
|
||||
pipe_qry = ([
|
||||
{"$addFields": {
|
||||
"mysy_session_date_debut": {
|
||||
'$dateFromString': {
|
||||
'dateString': { "$substr": [ "$date_debut", 0, 10 ] },
|
||||
'format': "%d/%m/%Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{'$match': qery_match},
|
||||
|
||||
{
|
||||
"$lookup": {
|
||||
'from': 'myclass',
|
||||
'localField': 'class_internal_url',
|
||||
'foreignField': 'internal_url',
|
||||
"pipeline": [{'$project': {'title': 1, 'internal_url': 1, 'external_code': 1, 'published': 1}}
|
||||
|
||||
],
|
||||
"as": "myclass_collection"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{'$group': {
|
||||
'_id': {
|
||||
|
||||
"mois_annee_inscription": {
|
||||
"$concat": [{'$substr': ["$date_debut", 3, 2]}, "_", {'$substr': ["$date_debut", 6, 4]}]},
|
||||
"annee_inscription": {'$substr': ["$date_debut", 6, 4]},
|
||||
"mois_inscription": {'$substr': ["$date_debut", 3, 2]},
|
||||
},
|
||||
"count": {"$sum": 1}
|
||||
}
|
||||
},
|
||||
{
|
||||
'$sort': {'_id.mois_annee_inscription': 1}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
|
||||
print(" ### Get_Qery_Session_By_Formation_By_Periode_V2 ici pipe_qry = ", pipe_qry)
|
||||
|
||||
axis_data = []
|
||||
cpt = 0
|
||||
tab_lines_inscription_data = []
|
||||
count_cumule = 0
|
||||
|
||||
for retval in MYSY_GV.dbname['session_formation'].aggregate(pipe_qry):
|
||||
cpt = cpt + 1
|
||||
for tmp in range_date_month:
|
||||
axis_data.append(str(tmp['month_year']))
|
||||
|
||||
if( str(retval['_id']['mois_annee_inscription']) == str(tmp['month_year']) ):
|
||||
count_cumule = mycommon.tryFloat(str(retval['count'])) + count_cumule
|
||||
tmp['count'] = count_cumule
|
||||
|
||||
|
||||
RetObject = []
|
||||
json_retval = {}
|
||||
json_retval['data'] = range_date_month
|
||||
json_retval['axis_data'] = axis_data
|
||||
|
||||
#print(" ### json_retval = ", json_retval)
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
|
|
@ -566,6 +566,285 @@ def Get_Qery_Inscription_By_Session_By_Periode(diction):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
||||
def Get_Qery_Inscription_By_Session_By_Periode_cumule(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token', 'session_start_date', 'session_end_date', 'filter_value', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list and val.startswith('my_') is False:
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le champ '" + val + "' n'existe pas")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token', 'session_start_date', 'session_end_date']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Les informations fournies sont incorrectes",
|
||||
|
||||
"""
|
||||
Verification de l'identité et autorisation de l'entité qui
|
||||
appelle cette API
|
||||
"""
|
||||
token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
token = diction['token']
|
||||
|
||||
local_status, my_partner = mycommon.Check_Connexion_And_Return_Partner_Data(diction)
|
||||
if (local_status is not True):
|
||||
return local_status, my_partner
|
||||
|
||||
filt_session_start_date = ""
|
||||
if ("session_start_date" in diction.keys() and diction['session_start_date']):
|
||||
filt_session_start_date = str(diction['session_start_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_start_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de debut de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
filt_session_end_date = ""
|
||||
if ("session_end_date" in diction.keys() and diction['session_end_date']):
|
||||
filt_session_end_date = str(diction['session_end_date'])[0:10]
|
||||
local_status = mycommon.CheckisDate(filt_session_end_date)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(
|
||||
inspect.stack()[0][3]) + " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa.")
|
||||
return False, " Le filtre : 'date de fin de session' n'est pas au format jj/mm/aaaa."
|
||||
|
||||
"""
|
||||
Si la valeur de 'filter_value' est m0 ou m1, on va aller recuperer les date du mois correspondant.
|
||||
On ecrase les valeur de filt_session_start_date et filt_session_end_date
|
||||
"""
|
||||
if ('filter_value' in diction.keys()):
|
||||
if (str(diction['filter_value']) == "m0"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Current_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
elif (str(diction['filter_value']) == "m1"):
|
||||
# On recupere les date du mois en cours
|
||||
local_status, start_current_month_date, end_current_month_date = mycommon.Get_Previous_Month_Start_End_Date()
|
||||
if (local_status is False):
|
||||
return local_status, start_current_month_date
|
||||
|
||||
filt_session_start_date = start_current_month_date
|
||||
filt_session_end_date = end_current_month_date
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 1
|
||||
|
||||
filt_session_start_date_ISODATE = datetime.strptime(str(filt_session_start_date), '%d/%m/%Y')
|
||||
filt_session_end_date_ISODATE = datetime.strptime(str(filt_session_end_date), '%d/%m/%Y')
|
||||
|
||||
"""
|
||||
Creation de la range des mois entre filt_periode_start_date_ISODATE et
|
||||
filt_periode_end_date_ISODATE
|
||||
"""
|
||||
range_date_month = []
|
||||
start = filt_session_start_date_ISODATE
|
||||
end = filt_session_end_date_ISODATE
|
||||
while start <= end:
|
||||
node = {}
|
||||
node['month_year'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['label'] = '{:02d}'.format(start.month) + "_" + str(start.year)
|
||||
node['TotalAmount'] = 0
|
||||
node['value'] = 0
|
||||
node['count'] = 0
|
||||
|
||||
range_date_month.append(node)
|
||||
start += relativedelta(months=1)
|
||||
|
||||
|
||||
|
||||
filt_session_start_date_ISODATE_work = filt_session_start_date_ISODATE
|
||||
filt_session_end_date_ISODATE_work = filt_session_end_date_ISODATE
|
||||
|
||||
qery_match = {'$and': [{"partner_owner_recid": str(my_partner['recid'])}, {"valide": '1'},
|
||||
{"apprenant_id": {"$exists": True}},
|
||||
{"inscription_validation_date": {"$exists": True}},
|
||||
{"status": "1"},
|
||||
{'mysy_inscription_validation_date': {'$gte': filt_session_start_date_ISODATE,
|
||||
'$lte': filt_session_end_date_ISODATE}},
|
||||
]}
|
||||
"""
|
||||
|
||||
qery_match = {'$and': [{"partner_owner_recid": str(my_partner['recid'])}, {"valide": '1'},
|
||||
{"apprenant_id": {"$exists": True}},
|
||||
]}
|
||||
"""
|
||||
|
||||
# print(" ### qery_match = ", qery_match)
|
||||
|
||||
pipe_qry = ([
|
||||
{"$addFields": {
|
||||
"mysy_inscription_validation_date": {
|
||||
'$dateFromString': {
|
||||
'dateString': { "$substr": [ "$inscription_validation_date", 0, 10 ] },
|
||||
'format': "%d/%m/%Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{'$match': qery_match},
|
||||
# ----
|
||||
{'$lookup': {
|
||||
'from': 'session_formation',
|
||||
'let': {'session_id': "$session_id", 'partner_owner_recid': '$partner_owner_recid'},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$session_id",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$partner_owner_recid", '$$partner_owner_recid']}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'session_formation_collection'
|
||||
}
|
||||
},
|
||||
|
||||
# ---
|
||||
{
|
||||
"$lookup": {
|
||||
'from': 'myclass',
|
||||
'localField': 'session_formation_collection.class_internal_url',
|
||||
'foreignField': 'internal_url',
|
||||
"pipeline": [{'$project': {'title': 1, 'internal_url': 1, 'external_code': 1, 'published': 1}}
|
||||
|
||||
],
|
||||
"as": "myclass_collection"
|
||||
}
|
||||
},
|
||||
|
||||
# --
|
||||
# ---
|
||||
{'$lookup': {
|
||||
'from': 'apprenant',
|
||||
"let": {'apprenant_id': "$apprenant_id", 'partner_owner_recid': '$partner_owner_recid'},
|
||||
'pipeline': [
|
||||
{'$match':
|
||||
{'$expr':
|
||||
{'$and':
|
||||
[
|
||||
|
||||
{'$eq': ["$_id", {'$convert': {
|
||||
'input': "$$apprenant_id",
|
||||
'to': "objectId",
|
||||
'onError': {'error': 'true'},
|
||||
'onNull': {'isnull': 'true'}
|
||||
}}]},
|
||||
|
||||
{'$eq': ["$valide", "1"]},
|
||||
{'$eq': ["$partner_owner_recid", '$$partner_owner_recid']}
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
],
|
||||
'as': 'apprenant_collection'
|
||||
}
|
||||
},
|
||||
{'$group': {
|
||||
'_id': {
|
||||
|
||||
"mois_annee_inscription": {
|
||||
"$concat": [{'$substr': ["$inscription_validation_date", 3, 2]}, "_", {'$substr': ["$inscription_validation_date", 6, 4]}]},
|
||||
"annee_inscription": {'$substr': ["$inscription_validation_date", 6, 4]},
|
||||
"mois_inscription": {'$substr': ["$inscription_validation_date", 3, 2]},
|
||||
},
|
||||
"count": {"$sum": 1}
|
||||
}
|
||||
},
|
||||
{
|
||||
'$sort': { "_id.mois_annee_inscription":1}
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
"""
|
||||
Cette requete donne le tableau complete des apprenants avec les sessions
|
||||
si on veut faire des group by, on ajoute ceci :
|
||||
{'$group': {
|
||||
'_id': {
|
||||
|
||||
"apprenant_collection_nom":"$apprenant_collection.nom",
|
||||
"apprenant_collection_prenom":"$apprenant_collection.prenom",
|
||||
"apprenant_collection_session":"$session_formation_collection.code_session",
|
||||
|
||||
},
|
||||
'count': {'$count': {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"""
|
||||
print(" ### Get_Qery_Inscription_By_Session_By_Periode ici pipe_qry = ", pipe_qry)
|
||||
|
||||
axis_data = []
|
||||
cpt = 0
|
||||
tab_lines_inscription_data = []
|
||||
count_cumule = 0
|
||||
for retval in MYSY_GV.dbname['inscription'].aggregate(pipe_qry):
|
||||
cpt = cpt + 1
|
||||
for tmp in range_date_month:
|
||||
axis_data.append(str(tmp['month_year']))
|
||||
|
||||
if( str(retval['_id']['mois_annee_inscription']) == str(tmp['month_year']) ):
|
||||
count_cumule = mycommon.tryFloat(str(retval['count'])) + count_cumule
|
||||
tmp['count'] = count_cumule
|
||||
|
||||
|
||||
RetObject = []
|
||||
json_retval = {}
|
||||
json_retval['data'] = range_date_month
|
||||
json_retval['axis_data'] = axis_data
|
||||
|
||||
#print(" ### json_retval = ", json_retval)
|
||||
|
||||
RetObject.append(mycommon.JSONEncoder().encode(json_retval))
|
||||
|
||||
#print(" ### RetObject = ", RetObject)
|
||||
|
||||
return True, RetObject
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de récupérer les données "
|
||||
|
||||
|
||||
|
||||
"""
|
||||
TBD inscription groupé par Formation
|
||||
"""
|
||||
|
@ -834,8 +1113,6 @@ def Get_Qery_Inscription_Group_By_Class(diction):
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
RetObject = []
|
||||
json_retval = {}
|
||||
json_retval['data'] = my_data
|
||||
|
|
2211
Log/log_file.log
2211
Log/log_file.log
File diff suppressed because it is too large
Load Diff
60
main.py
60
main.py
|
@ -7207,6 +7207,48 @@ def Get_Qery_Formation_By_Session_By_Periode():
|
|||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API/ TBD / QERY / session par periode
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Qery_Session_By_Periode_V2/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Qery_Session_By_Periode_V2():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Qery_Session_By_Periode_V2 payload = ",payload)
|
||||
status, retval = formation_tbd_qries.Get_Qery_Session_By_Periode_V2(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API/ TBD / QERY / session par formation
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Qery_Session_By_Formation_V2/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Qery_Session_By_Formation_V2():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Qery_Session_By_Formation_V2 payload = ",payload)
|
||||
status, retval = formation_tbd_qries.Get_Qery_Session_By_Formation_V2(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API/ TBD / QERY / session par periode cumule
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Qery_Session_By_Periode_Cumule_V2/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Qery_Session_By_Periode_Cumule_V2():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Qery_Session_By_Periode_Cumule_V2 payload = ",payload)
|
||||
status, retval = formation_tbd_qries.Get_Qery_Session_By_Periode_Cumule_V2(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
"""
|
||||
API/ TBD / QERY / Formation ==> Export CSV/EXCEL
|
||||
"""
|
||||
|
@ -7221,7 +7263,6 @@ def Get_Qery_Formation_By_Session_By_Periode_Export_CSV(token, user_dashbord_id)
|
|||
|
||||
|
||||
print(" ### Get_Qery_Formation_By_Session_By_Periode_Export_CSV payload = ",payload)
|
||||
|
||||
status, retval = formation_tbd_qries.Get_Qery_Formation_By_Session_By_Periode_Export_CSV(payload)
|
||||
if(status ):
|
||||
return retval
|
||||
|
@ -7671,6 +7712,23 @@ def Get_Qery_Inscription_By_Session_By_Periode():
|
|||
status, retval = inscription_tdb_qries.Get_Qery_Inscription_By_Session_By_Periode(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API / TBD / QRY : Recuperation des données des inscriptions 01 en CUMULE
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Qery_Inscription_By_Session_By_Periode_cumule/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Qery_Inscription_By_Session_By_Periode_cumule():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_Qery_Inscription_By_Session_By_Periode_cumule payload = ",payload)
|
||||
status, retval = inscription_tdb_qries.Get_Qery_Inscription_By_Session_By_Periode_cumule(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API / TBD / QRY : Recuperation des données des inscriptions groupé par formation
|
||||
"""
|
||||
|
|
|
@ -3189,6 +3189,12 @@ def GetAttendeeDetail_perSession(diction):
|
|||
my_retrun_dict['apprenant_id'] = ""
|
||||
|
||||
|
||||
if ("invoiced" in local_Insc_retval.keys()):
|
||||
my_retrun_dict['invoiced'] = str(local_Insc_retval['invoiced']).lower()
|
||||
else:
|
||||
my_retrun_dict['invoiced'] = "0"
|
||||
|
||||
|
||||
if ("civilite" in local_Insc_retval.keys()):
|
||||
my_retrun_dict['civilite'] = str(local_Insc_retval['civilite']).lower()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue