16/11/25 - 16h30

Signed-off-by: Cherif <cbalde@mysy-training.com>
master_Elyos_FI
Cherif 2025-11-16 16:33:49 +01:00
parent c92204accc
commit f8431d5cf9
9 changed files with 1376 additions and 30 deletions

View File

@ -4,24 +4,16 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="13/11/2025 - 22h30">
<change afterPath="$PROJECT_DIR$/stage_mgt.py" afterDir="false" />
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="15/11/2025 - 22h30">
<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$/Dashbord_queries/BPF.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/BPF.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/attached_file_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/attached_file_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/base_class_calcul_note.py" beforeDir="false" afterPath="$PROJECT_DIR$/base_class_calcul_note.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/email_queu/email_queu_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_queu/email_queu_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/internal_email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/internal_email_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_planning_sequence_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_planning_sequence_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/note_evaluation_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/note_evaluation_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/unite_enseignement_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/unite_enseignement_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/user_session.py" beforeDir="false" afterPath="$PROJECT_DIR$/user_session.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/module_editique.py" beforeDir="false" afterPath="$PROJECT_DIR$/module_editique.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -464,7 +456,7 @@
<option name="project" value="LOCAL" />
<updated>1747251650255</updated>
</task>
<option name="localTasksCounter" value="512" />
<option name="localTasksCounter" value="513" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -506,7 +498,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="25/06/2025 - 18h" />
<MESSAGE value="qsdssdd" />
<MESSAGE value="ss" />
<MESSAGE value="ssss" />
@ -531,6 +522,7 @@
<MESSAGE value="04/11/2025 - 12h" />
<MESSAGE value="12/11/2025 - 22h30" />
<MESSAGE value="13/11/2025 - 22h30" />
<option name="LAST_COMMIT_MESSAGE" value="13/11/2025 - 22h30" />
<MESSAGE value="15/11/2025 - 22h30" />
<option name="LAST_COMMIT_MESSAGE" value="15/11/2025 - 22h30" />
</component>
</project>

View File

@ -721,7 +721,20 @@ def Get_Qery_Generate_BPF_From_partner_invoice_header(diction):
#print(" ### retval (employé ayant un contrat valide) = ", retval)
formateur_id = str(retval['_id'])
formateur_data = str(retval['nom']) + " " + str(retval['prenom']) + " - " + str(retval['email']) + " - " + str(retval['_id'])
nom = ""
if( "nom" in retval.keys() ):
nom = retval['nom']
prenom = ""
if ("prenom" in retval.keys()):
prenom = retval['prenom']
email = ""
if ("email" in retval.keys()):
email = retval['email']
formateur_data = str(nom) + " " + str(prenom) + " - " + str(email) + " - " + str(retval['_id'])
formateur_contrat_type = ""
if( "collection_ressource_humaine_contrat" in retval.keys() and "type_contrat" in retval['collection_ressource_humaine_contrat'].keys()):
formateur_contrat_type = retval['collection_ressource_humaine_contrat']["type_contrat"]
@ -1943,8 +1956,23 @@ def Prepare_and_Print_BPF_PDF(diction):
# print(" ### retval (employé ayant un contrat valide) = ", retval)
formateur_id = str(retval['_id'])
formateur_data = str(retval['nom']) + " " + str(retval['prenom']) + " - " + str(
retval['email']) + " - " + str(retval['_id'])
nom = ""
if ("nom" in retval.keys()):
nom = retval['nom']
prenom = ""
if ("prenom" in retval.keys()):
prenom = retval['prenom']
email = ""
if ("email" in retval.keys()):
email = retval['email']
formateur_data = str(nom) + " " + str(prenom) + " - " + str(email) + " - " + str(retval['_id'])
formateur_contrat_type = ""
if ("collection_ressource_humaine_contrat" in retval.keys() and "type_contrat" in retval[
'collection_ressource_humaine_contrat'].keys()):

View File

@ -300,7 +300,7 @@ def Get_Humain_Ressource_With_Planning(diction):
event_duration_hour = round(divmod(event_duration_second, 3600)[0]+divmod(event_duration_second, 3600)[1]/3600, 2)
total_duration = total_duration + event_duration_hour
total_duration = round(total_duration + event_duration_hour, 2)
new_node['event_duration_second'] = str(event_duration_second)
new_node['event_duration_hour'] = str(event_duration_hour)

View File

@ -9915,7 +9915,7 @@ def Sent_Convention_Stagiaire_By_Email(tab_files, Folder, diction):
new_e_document_diction['file_cononical_name'] = cononic_name
new_e_document_diction['type'] = "convention"
print(" ### 022 new_e_document_diction = ", new_e_document_diction)
#print(" ### 022 new_e_document_diction = ", new_e_document_diction)
local_status_e_doc, local_retval_e_doc = E_Sign_Document.Create_E_Document(new_e_document_diction)

File diff suppressed because one or more lines are too long

View File

@ -379,6 +379,9 @@ def Internal_Usage_Store_User_Downloaded_File(Folder=None, diction=None, tab_rel
local_node['related_collection'] = diction['object_owner_collection']
local_node['related_collection_id'] = diction['object_owner_id']
if( tab_related_collection is None ):
tab_related_collection = []
tab_related_collection.append(local_node)

View File

@ -806,11 +806,19 @@ def Cacul_UE_Note_Finale_For_calcul_mode_1(diction):
classement = 0
note_precedente = ""
for sorted_data in MYSY_GV.dbname['session_formation_final_note_classement'].find(basic_qry).sort([("note_finale", pymongo.DESCENDING), ]).collation({'locale': "fr", 'numericOrdering': True}):
# Gestion des Execo
new_execo_classement = ""
is_execo = ""
if( str(note_precedente) != str(sorted_data['note_finale'])):
classement = classement + 1
note_precedente = str(sorted_data['note_finale'])
else:
new_execo_classement = classement + 1
is_execo = '1'
#MAJ du rang
#print(" MAJJ classement 0222 = ", classement)
@ -826,6 +834,9 @@ def Cacul_UE_Note_Finale_For_calcul_mode_1(diction):
upsert=False,
)
if (is_execo == '1'):
classement = new_execo_classement
return True, "Calcul Final Moyenne et Classement ok"
except Exception as e:
@ -1468,14 +1479,20 @@ def Cacul_Session_Note_Finale_For_calcul_mode_1(diction):
'locked': '0' }).sort(
[("note_finale", pymongo.DESCENDING), ]).collation({'locale': "fr", 'numericOrdering': True}):
new_execo_classement = ""
is_execo = ""
if( sorted_data and "note_finale" in sorted_data.keys() ):
# Gestion des Execo
if (str(note_precedente) != str(sorted_data['note_finale'])):
classement = classement + 1
note_precedente = str(sorted_data['note_finale'])
else:
new_execo_classement = classement + 1
is_execo = '1'
print(" 11111 ")
# MAJ du rang
#print(" MAJJ classement = ", classement)
MYSY_GV.dbname['inscription'].find_one_and_update(
{'_id': ObjectId(str(sorted_data['_id'])),
'partner_owner_recid': str(sorted_data['partner_owner_recid']),
@ -1488,6 +1505,9 @@ def Cacul_Session_Note_Finale_For_calcul_mode_1(diction):
upsert=False,
)
if (is_execo == '1'):
classement = new_execo_classement
return True, "Calcul Final Moyenne et Classement ok"
@ -1649,6 +1669,23 @@ def Calcul_Note_Classement_Session(diction):
"""
Preparation des calculs
"""
"""
# 1 - On nettoies les anciens calcul qui sont stoké dans les collections :
- session_formation_final_note_classement et
- session_formation_final_note_classement_detail
qui concerne cette session_id
"""
MYSY_GV.dbname['session_formation_final_note_classement_detail'].delete_many({'session_id':diction['session_id'],
'partner_owner_recid': str(
my_partner['recid'])
})
MYSY_GV.dbname['session_formation_final_note_classement'].delete_many(
{'session_id': diction['session_id'],
'partner_owner_recid': str(
my_partner['recid'])
})
# On recupere la liste des ue_id de la promotion
tab_ue_id = []
@ -2182,9 +2219,15 @@ def Cacul_UE_Note_Finale_Standard(diction):
#print(" ### sorted_data = ", sorted_data)
# Gestion des Execo
new_execo_classement = ""
is_execo = ""
if (str(note_precedente) != str(sorted_data['note_finale'])):
classement = classement + 1
note_precedente = str(sorted_data['note_finale'])
else:
new_execo_classement = classement + 1
is_execo = '1'
# MAJ du rang
#print(" MAJJ classement = ", classement)
@ -2200,6 +2243,9 @@ def Cacul_UE_Note_Finale_Standard(diction):
upsert=False,
)
if (is_execo == '1'):
classement = new_execo_classement
"""
Remplir la collection 'note_categorie_session_ue'
qui permet de connaitre le pourcentage de personnes
@ -2489,7 +2535,7 @@ def run_ue_pre_calcul_moyenne_somme_v2(diction):
"""
08/11/2025
Enveler de cette liste, les type d'evaluation qui sont pas configurée sur la formation.
Enveler de cette liste, les type d'evaluation, celles qui ne sont pas configurée sur la formation.
"""
Class_UE_type_eval = MYSY_GV.dbname['class_unite_enseignement_type_evaluation'].distinct(
"type_evaluation_id",
@ -2621,6 +2667,7 @@ def run_ue_pre_calcul_moyenne_somme_v2(diction):
"""
Mise à jour de la collection des notes d'une session de formation : 'session_formation_final_note_classement_detail'
"""
#print(" ### tab_note_final = ", tab_note_final)
for note_finale in tab_note_final:
qry_key = {}
@ -2862,15 +2909,21 @@ def Cacul_Session_Note_Finale_For_calcul_Stanard(diction):
'locked': '0' }).sort(
[("note_finale", pymongo.DESCENDING), ]).collation({'locale': "fr", 'numericOrdering': True}):
new_execo_classement = ""
is_execo = ""
if( sorted_data and "note_finale" in sorted_data.keys() ):
# Gestion des Execo
if (str(note_precedente) != str(sorted_data['note_finale'])):
classement = classement + 1
note_precedente = str(sorted_data['note_finale'])
else:
new_execo_classement = classement + 1
is_execo = '1'
# MAJ du rang
MYSY_GV.dbname['inscription'].find_one_and_update(
{'_id': ObjectId(str(sorted_data['_id'])),
'partner_owner_recid': str(sorted_data['partner_owner_recid']),
@ -2883,6 +2936,10 @@ def Cacul_Session_Note_Finale_For_calcul_Stanard(diction):
upsert=False,
)
if( is_execo == '1'):
classement = new_execo_classement
return True, "Calcul Final Moyenne et Classement ok"

View File

@ -2490,7 +2490,7 @@ def ManualSendInvoiceEmailRIB_CIC_JMJFormation(diction):
body = {
"params": {"order_id": "MTT/2025_N°0012/JMJ FORMATION",
"date_order": ": 14/07/2025",
"periode":"14/10/2025 au 13/11/2025",
"periode":"13/11/2025 au 14/12/2025",
"total_ht": "130",
"tva": "11.05",
"total_ttc": "141,05 ",
@ -2506,9 +2506,9 @@ def ManualSendInvoiceEmailRIB_CIC_JMJFormation(diction):
"montant": "130 €",
"invoice_id": "FACT_20251012",
"invoice_date": "19/10/2025",
"due_date": "19/10/2025",
"invoice_id": "FACT_20251114",
"invoice_date": "16/11/2025",
"due_date": "16/11/2025",
"orign_order": "Contrat MTT/2025_N°0012/JMJ FORMATION",
}
}
@ -2542,7 +2542,7 @@ def ManualSendInvoiceEmailRIB_CIC_JMJFormation(diction):
#print(" ### body 22 = ", body)
sourceHtml = template.render(json_data=body["params"])
orig_file_name = "invoice_FACT_20251012.pdf"
orig_file_name = "invoice_FACT_20251114.pdf"
outputFilename = str(MYSY_GV.INVOICE_DIRECTORY) + str(orig_file_name)
# open output file for writing (truncated binary)

View File

@ -1107,7 +1107,7 @@ def Editic_Log_History_Action(my_partner, courrier_template_data, related_collec
'locked':'0',
'courrier_template_type_document_ref_interne':str(courrier_template_type_document_ref_interne)}
print(" ### 0123 local_qry = ", local_qry)
#print(" ### 0123 local_qry = ", local_qry)
#print(" ### 0123 target_collection = ", target_collection)
#print(" ### 0123 target_collection_recid = ", target_collection_recid)