09/08/2023 - 21h
parent
834646deab
commit
6450813533
|
@ -1,13 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="06/08/23 - 23h">
|
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="08/08/2023 - 16h">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.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$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -71,13 +68,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680804787304</updated>
|
<updated>1680804787304</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00012" summary="24/04/23 - 21h">
|
|
||||||
<created>1682362261760</created>
|
|
||||||
<option name="number" value="00012" />
|
|
||||||
<option name="presentableId" value="LOCAL-00012" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1682362261760</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00013" summary="25/04/23 - 21h">
|
<task id="LOCAL-00013" summary="25/04/23 - 21h">
|
||||||
<created>1682451543498</created>
|
<created>1682451543498</created>
|
||||||
<option name="number" value="00013" />
|
<option name="number" value="00013" />
|
||||||
|
@ -414,7 +404,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1691356503671</updated>
|
<updated>1691356503671</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="61" />
|
<task id="LOCAL-00061" summary="08/08/2023 - 16h">
|
||||||
|
<created>1691504850587</created>
|
||||||
|
<option name="number" value="00061" />
|
||||||
|
<option name="presentableId" value="LOCAL-00061" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1691504850588</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="62" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -429,7 +426,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="13/06/23 - 21h21" />
|
|
||||||
<MESSAGE value="04/07/23 - 10h" />
|
<MESSAGE value="04/07/23 - 10h" />
|
||||||
<MESSAGE value="04/07/23 - 17h" />
|
<MESSAGE value="04/07/23 - 17h" />
|
||||||
<MESSAGE value="05/07/23 - 12h" />
|
<MESSAGE value="05/07/23 - 12h" />
|
||||||
|
@ -454,6 +450,7 @@
|
||||||
<MESSAGE value="03/08/23 - 19h" />
|
<MESSAGE value="03/08/23 - 19h" />
|
||||||
<MESSAGE value="05/08/23 - 16h" />
|
<MESSAGE value="05/08/23 - 16h" />
|
||||||
<MESSAGE value="06/08/23 - 23h" />
|
<MESSAGE value="06/08/23 - 23h" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="06/08/23 - 23h" />
|
<MESSAGE value="08/08/2023 - 16h" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="08/08/2023 - 16h" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
4173
Log/log_file.log
4173
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -102,11 +102,6 @@ def Add_Update_SessionFormation(diction):
|
||||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer les données du partenaire ")
|
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer les données du partenaire ")
|
||||||
return False, "Impossible de recuperer les données du partenaire "
|
return False, "Impossible de recuperer les données du partenaire "
|
||||||
|
|
||||||
formation_session_id = ""
|
|
||||||
if ("formation_session_id" in diction.keys()):
|
|
||||||
mydata['formation_session_id'] = diction['formation_session_id']
|
|
||||||
formation_session_id = diction['formation_session_id']
|
|
||||||
|
|
||||||
|
|
||||||
if ("date_debut" in diction.keys()):
|
if ("date_debut" in diction.keys()):
|
||||||
mydata['date_debut'] = diction['date_debut']
|
mydata['date_debut'] = diction['date_debut']
|
||||||
|
@ -184,33 +179,33 @@ def Add_Update_SessionFormation(diction):
|
||||||
if (local_status is False):
|
if (local_status is False):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " - Formation : "+str(formation_session_id)+" : Impossible de créer/mettre à jour la session de formation. La date de debut n'est pas au format jj/mm/aaaa ")
|
3]) + " - Formation : "+str(code_session)+" : Impossible de créer/mettre à jour la session de formation. La date de debut n'est pas au format jj/mm/aaaa ")
|
||||||
|
|
||||||
return False, " - Formation : "+str(formation_session_id)+" : Impossible de créer/mettre à jour la session de formation. La date de debut n'est pas au format jj/mm/aaaa "
|
return False, " - Formation : "+str(code_session)+" : Impossible de créer/mettre à jour la session de formation. La date de debut n'est pas au format jj/mm/aaaa "
|
||||||
|
|
||||||
local_status = mycommon.CheckisDate(str(diction['date_fin'])[0:10])
|
local_status = mycommon.CheckisDate(str(diction['date_fin'])[0:10])
|
||||||
if (local_status is False):
|
if (local_status is False):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " -Formation : "+str(formation_session_id)+" : Impossible de créer/mettre à jour la session de formation. La date de fin n'est pas au format jj/mm/aaaa ")
|
3]) + " -Formation : "+str(code_session)+" : Impossible de créer/mettre à jour la session de formation. La date de fin n'est pas au format jj/mm/aaaa ")
|
||||||
|
|
||||||
return False, " -Formation : "+str(formation_session_id)+" : La date de fin n'est pas au format jj/mm/aaaa "
|
return False, " -Formation : "+str(code_session)+" : La date de fin n'est pas au format jj/mm/aaaa "
|
||||||
|
|
||||||
local_status = mycommon.CheckisDate(str(diction['date_debut_inscription'])[0:10])
|
local_status = mycommon.CheckisDate(str(diction['date_debut_inscription'])[0:10])
|
||||||
if (local_status is False):
|
if (local_status is False):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " - Formation : "+str(formation_session_id)+" : Impossible de créer/mettre à jour la session de formation. La date_debut_inscription n'est pas au format jj/mm/aaaa ")
|
3]) + " - Formation : "+str(code_session)+" : Impossible de créer/mettre à jour la session de formation. La date_debut_inscription n'est pas au format jj/mm/aaaa ")
|
||||||
|
|
||||||
return False, " -Formation : "+str(formation_session_id)+" : La date de début d'inscription n'est pas au format jj/mm/aaaa "
|
return False, " -Formation : "+str(code_session)+" : La date de début d'inscription n'est pas au format jj/mm/aaaa "
|
||||||
|
|
||||||
local_status = mycommon.CheckisDate(str(diction['date_fin_inscription'])[0:10])
|
local_status = mycommon.CheckisDate(str(diction['date_fin_inscription'])[0:10])
|
||||||
if (local_status is False):
|
if (local_status is False):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " -Formation : "+str(formation_session_id)+" : La date de fin d'inscription n'est pas au format jj/mm/aaaa ")
|
3]) + " -Formation : "+str(code_session)+" : La date de fin d'inscription n'est pas au format jj/mm/aaaa ")
|
||||||
|
|
||||||
return False, " - Formation : "+str(formation_session_id)+" :La date de fin d'inscription n'est pas au format jj/mm/aaaa "
|
return False, " - Formation : "+str(code_session)+" :La date de fin d'inscription n'est pas au format jj/mm/aaaa "
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,11 +213,11 @@ def Add_Update_SessionFormation(diction):
|
||||||
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " Formation : "+str(formation_session_id)+" : La date debut " + str(
|
3]) + " Formation : "+str(code_session)+" : La date debut " + str(
|
||||||
diction['date_debut']) +
|
diction['date_debut']) +
|
||||||
" est postérieure à la date de fin " + str(diction['date_fin']) )
|
" est postérieure à la date de fin " + str(diction['date_fin']) )
|
||||||
|
|
||||||
return False, " Formation : "+str(formation_session_id)+" : La date debut de formation " + str(diction['date_debut']) + \
|
return False, " Formation : "+str(code_session)+" : La date debut de formation " + str(diction['date_debut']) + \
|
||||||
" est postérieure à la date de fin de formation " + str(diction['date_fin']) + " "
|
" est postérieure à la date de fin de formation " + str(diction['date_fin']) + " "
|
||||||
|
|
||||||
|
|
||||||
|
@ -230,11 +225,11 @@ def Add_Update_SessionFormation(diction):
|
||||||
str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y')):
|
str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y')):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][
|
str(inspect.stack()[0][
|
||||||
3]) + " Formation : "+str(formation_session_id)+" : La date date_debut_inscription " + str(
|
3]) + " Formation : "+str(code_session)+" : La date date_debut_inscription " + str(
|
||||||
diction['date_debut_inscription']) +
|
diction['date_debut_inscription']) +
|
||||||
" est postérieure à la date de date_fin_inscription " + str(diction['date_fin_inscription']) )
|
" est postérieure à la date de date_fin_inscription " + str(diction['date_fin_inscription']) )
|
||||||
|
|
||||||
return False, " Formation : "+str(formation_session_id)+" : La date_debut_inscription " + str(diction['date_debut_inscription']) + \
|
return False, " Formation : "+str(code_session)+" : La date_debut_inscription " + str(diction['date_debut_inscription']) + \
|
||||||
" est postérieure à la date_fin_inscription " + str(diction['date_fin_inscription']) + " "
|
" est postérieure à la date_fin_inscription " + str(diction['date_fin_inscription']) + " "
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,19 +238,19 @@ def Add_Update_SessionFormation(diction):
|
||||||
if (datetime.strptime(str(diction['date_debut_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
if (datetime.strptime(str(diction['date_debut_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
||||||
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][3]) + " -Formation : "+str(formation_session_id)+" : La date de debut d'inscription " + str( diction['date_debut_inscription']) + " est postérieure à la date de fin de formation " + str(diction['date_fin']))
|
str(inspect.stack()[0][3]) + " -Formation : "+str(code_session)+" : La date de debut d'inscription " + str( diction['date_debut_inscription']) + " est postérieure à la date de fin de formation " + str(diction['date_fin']))
|
||||||
|
|
||||||
return False, " Formation : "+str(formation_session_id)+" : La date de debut d'inscription " + str( diction['date_debut_inscription']) + " est postérieure à la date de fin de formation " + str(diction['date_fin'])+" "
|
return False, " Formation : "+str(code_session)+" : La date de debut d'inscription " + str( diction['date_debut_inscription']) + " est postérieure à la date de fin de formation " + str(diction['date_fin'])+" "
|
||||||
|
|
||||||
# Verification : Date de fin inscription n'est pas > date de fin de formation
|
# Verification : Date de fin inscription n'est pas > date de fin de formation
|
||||||
if (datetime.strptime(str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
if (datetime.strptime(str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
||||||
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
str(inspect.stack()[0][3]) + " -Formation : "+str(formation_session_id)+" : La date de fin d'inscription " + str(
|
str(inspect.stack()[0][3]) + " -Formation : "+str(code_session)+" : La date de fin d'inscription " + str(
|
||||||
diction['date_fin_inscription'])[0:10] + " est postérieure à la date de fin de la formation " + str(
|
diction['date_fin_inscription'])[0:10] + " est postérieure à la date de fin de la formation " + str(
|
||||||
diction['date_fin'])[0:10])
|
diction['date_fin'])[0:10])
|
||||||
|
|
||||||
return False, " Formation : "+str(formation_session_id)+" : La date de fin d'inscription " + str(
|
return False, " Formation : "+str(code_session)+" : La date de fin d'inscription " + str(
|
||||||
diction['date_fin_inscription'])[0:10] + " est postérieure à la date de fin de la formation " + str(
|
diction['date_fin_inscription'])[0:10] + " est postérieure à la date de fin de la formation " + str(
|
||||||
diction['date_fin'])[0:10] + " "
|
diction['date_fin'])[0:10] + " "
|
||||||
|
|
||||||
|
@ -311,7 +306,7 @@ si le result > 1 une session, alors erreur d'inchorence d'info.
|
||||||
def GetSessionFormation(diction):
|
def GetSessionFormation(diction):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
field_list = ['token', 'class_internal_url', 'formation_session_id', ]
|
field_list = ['token', 'class_internal_url', 'code_session', ]
|
||||||
incom_keys = diction.keys()
|
incom_keys = diction.keys()
|
||||||
for val in incom_keys:
|
for val in incom_keys:
|
||||||
if val not in field_list:
|
if val not in field_list:
|
||||||
|
@ -322,7 +317,7 @@ def GetSessionFormation(diction):
|
||||||
"""
|
"""
|
||||||
Verification de la liste des champs obligatoires
|
Verification de la liste des champs obligatoires
|
||||||
"""
|
"""
|
||||||
field_list_obligatoire = ['token', 'class_internal_url', 'formation_session_id', ]
|
field_list_obligatoire = ['token', 'class_internal_url', 'code_session', ]
|
||||||
for val in field_list_obligatoire:
|
for val in field_list_obligatoire:
|
||||||
if val not in diction:
|
if val not in diction:
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
|
@ -351,18 +346,18 @@ def GetSessionFormation(diction):
|
||||||
if diction['class_internal_url']:
|
if diction['class_internal_url']:
|
||||||
class_internal_url = diction['class_internal_url']
|
class_internal_url = diction['class_internal_url']
|
||||||
|
|
||||||
formation_session_id = ""
|
code_session = ""
|
||||||
if ("formation_session_id" in diction.keys()):
|
if ("code_session" in diction.keys()):
|
||||||
if diction['formation_session_id']:
|
if diction['code_session']:
|
||||||
formation_session_id = diction['formation_session_id']
|
code_session = diction['code_session']
|
||||||
|
|
||||||
coll_session = MYSY_GV.dbname['session_formation']
|
coll_session = MYSY_GV.dbname['session_formation']
|
||||||
myquery = {}
|
myquery = {}
|
||||||
myquery['formation_session_id'] = formation_session_id
|
myquery['code_session'] = code_session
|
||||||
myquery['class_internal_url'] = class_internal_url
|
myquery['class_internal_url'] = class_internal_url
|
||||||
|
|
||||||
|
|
||||||
print(" ##### myquery = "+str(myquery))
|
print(" ##### myquery GetSessionFormation = "+str(myquery))
|
||||||
RetObject = []
|
RetObject = []
|
||||||
|
|
||||||
nb_val = 0
|
nb_val = 0
|
||||||
|
@ -374,7 +369,7 @@ def GetSessionFormation(diction):
|
||||||
# Si le nombre de session trouvé est > 1 alors incohérence, retourner une message d'erreur
|
# Si le nombre de session trouvé est > 1 alors incohérence, retourner une message d'erreur
|
||||||
if( nb_val > 1 ):
|
if( nb_val > 1 ):
|
||||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - la query "+str(myquery)+" retourne "+str(nb_val)+" session. ceci n'est pas normal. il ne doit pas y avoir plus 1 session")
|
mycommon.myprint(str(inspect.stack()[0][3]) + " - la query "+str(myquery)+" retourne "+str(nb_val)+" session. ceci n'est pas normal. il ne doit pas y avoir plus 1 session")
|
||||||
return False, " Les informations de la session "+str(formation_session_id)+" sont incohérentes. Merci de contacter le support"
|
return False, " Les informations de la session "+str(code_session)+" sont incohérentes. Merci de contacter le support"
|
||||||
|
|
||||||
return True, RetObject
|
return True, RetObject
|
||||||
|
|
||||||
|
@ -563,7 +558,7 @@ def GetAllValideSessionPartner_List(diction):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
#print("#### query = ", query)
|
print("#### query = ", query)
|
||||||
RetObject = []
|
RetObject = []
|
||||||
cpt = 1
|
cpt = 1
|
||||||
for retVal in MYSY_GV.dbname['session_formation'].aggregate(query):
|
for retVal in MYSY_GV.dbname['session_formation'].aggregate(query):
|
||||||
|
|
Loading…
Reference in New Issue