09/08/2023 - 21h
parent
834646deab
commit
6450813533
|
@ -1,13 +1,10 @@
|
|||
<?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="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$/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$/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" />
|
||||
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -71,13 +68,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</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">
|
||||
<created>1682451543498</created>
|
||||
<option name="number" value="00013" />
|
||||
|
@ -414,7 +404,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1691356503671</updated>
|
||||
</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 />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -429,7 +426,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="13/06/23 - 21h21" />
|
||||
<MESSAGE value="04/07/23 - 10h" />
|
||||
<MESSAGE value="04/07/23 - 17h" />
|
||||
<MESSAGE value="05/07/23 - 12h" />
|
||||
|
@ -454,6 +450,7 @@
|
|||
<MESSAGE value="03/08/23 - 19h" />
|
||||
<MESSAGE value="05/08/23 - 16h" />
|
||||
<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>
|
||||
</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 ")
|
||||
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()):
|
||||
mydata['date_debut'] = diction['date_debut']
|
||||
|
@ -184,33 +179,33 @@ def Add_Update_SessionFormation(diction):
|
|||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
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])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
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])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
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])
|
||||
if (local_status is False):
|
||||
mycommon.myprint(
|
||||
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')):
|
||||
mycommon.myprint(
|
||||
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']) +
|
||||
" 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']) + " "
|
||||
|
||||
|
||||
|
@ -230,11 +225,11 @@ def Add_Update_SessionFormation(diction):
|
|||
str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y')):
|
||||
mycommon.myprint(
|
||||
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']) +
|
||||
" 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']) + " "
|
||||
|
||||
|
||||
|
@ -243,19 +238,19 @@ def Add_Update_SessionFormation(diction):
|
|||
if (datetime.strptime(str(diction['date_debut_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
||||
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
||||
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
|
||||
if (datetime.strptime(str(diction['date_fin_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
||||
str(diction['date_fin'])[0:10], '%d/%m/%Y')):
|
||||
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'])[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'])[0:10] + " "
|
||||
|
||||
|
@ -311,7 +306,7 @@ si le result > 1 une session, alors erreur d'inchorence d'info.
|
|||
def GetSessionFormation(diction):
|
||||
try:
|
||||
|
||||
field_list = ['token', 'class_internal_url', 'formation_session_id', ]
|
||||
field_list = ['token', 'class_internal_url', 'code_session', ]
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list:
|
||||
|
@ -322,7 +317,7 @@ def GetSessionFormation(diction):
|
|||
"""
|
||||
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:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
@ -351,18 +346,18 @@ def GetSessionFormation(diction):
|
|||
if diction['class_internal_url']:
|
||||
class_internal_url = diction['class_internal_url']
|
||||
|
||||
formation_session_id = ""
|
||||
if ("formation_session_id" in diction.keys()):
|
||||
if diction['formation_session_id']:
|
||||
formation_session_id = diction['formation_session_id']
|
||||
code_session = ""
|
||||
if ("code_session" in diction.keys()):
|
||||
if diction['code_session']:
|
||||
code_session = diction['code_session']
|
||||
|
||||
coll_session = MYSY_GV.dbname['session_formation']
|
||||
myquery = {}
|
||||
myquery['formation_session_id'] = formation_session_id
|
||||
myquery['code_session'] = code_session
|
||||
myquery['class_internal_url'] = class_internal_url
|
||||
|
||||
|
||||
print(" ##### myquery = "+str(myquery))
|
||||
print(" ##### myquery GetSessionFormation = "+str(myquery))
|
||||
RetObject = []
|
||||
|
||||
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
|
||||
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")
|
||||
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
|
||||
|
||||
|
@ -563,7 +558,7 @@ def GetAllValideSessionPartner_List(diction):
|
|||
}
|
||||
}
|
||||
]
|
||||
#print("#### query = ", query)
|
||||
print("#### query = ", query)
|
||||
RetObject = []
|
||||
cpt = 1
|
||||
for retVal in MYSY_GV.dbname['session_formation'].aggregate(query):
|
||||
|
|
Loading…
Reference in New Issue