20/11/2023 - 17h
parent
894dcd1970
commit
d1a5042e1b
|
@ -1,12 +1,14 @@
|
||||||
<?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="17/11/2023 - 16h">
|
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="18/11/2023 - 17h00">
|
||||||
|
<change afterPath="$PROJECT_DIR$/Session_Formation_Sequence.py" afterDir="false" />
|
||||||
<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$/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$/agenda.py" beforeDir="false" afterPath="$PROJECT_DIR$/agenda.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/agenda.py" beforeDir="false" afterPath="$PROJECT_DIR$/agenda.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/partner_document_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/partner_document_mgt.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" />
|
||||||
|
@ -76,13 +78,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680804787304</updated>
|
<updated>1680804787304</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00104" summary="13/09/2023 - 18h">
|
|
||||||
<created>1694620818831</created>
|
|
||||||
<option name="number" value="00104" />
|
|
||||||
<option name="presentableId" value="LOCAL-00104" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1694620818831</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00105" summary="14/09/2023 - 21h">
|
<task id="LOCAL-00105" summary="14/09/2023 - 21h">
|
||||||
<created>1694717319294</created>
|
<created>1694717319294</created>
|
||||||
<option name="number" value="00105" />
|
<option name="number" value="00105" />
|
||||||
|
@ -419,7 +414,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1700233488530</updated>
|
<updated>1700233488530</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="153" />
|
<task id="LOCAL-00153" summary="18/11/2023 - 17h00">
|
||||||
|
<created>1700322992177</created>
|
||||||
|
<option name="number" value="00153" />
|
||||||
|
<option name="presentableId" value="LOCAL-00153" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1700322992178</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="154" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -434,7 +436,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="07/10/2023 - 16h40" />
|
|
||||||
<MESSAGE value="07/10/2023 - 22h40" />
|
<MESSAGE value="07/10/2023 - 22h40" />
|
||||||
<MESSAGE value="08/10/2023 - 22h40" />
|
<MESSAGE value="08/10/2023 - 22h40" />
|
||||||
<MESSAGE value="17/10/2023 - 22h40" />
|
<MESSAGE value="17/10/2023 - 22h40" />
|
||||||
|
@ -459,6 +460,7 @@
|
||||||
<MESSAGE value="15/11/2023 - 17h" />
|
<MESSAGE value="15/11/2023 - 17h" />
|
||||||
<MESSAGE value="15/11/2023 - 21h" />
|
<MESSAGE value="15/11/2023 - 21h" />
|
||||||
<MESSAGE value="17/11/2023 - 16h" />
|
<MESSAGE value="17/11/2023 - 16h" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="17/11/2023 - 16h" />
|
<MESSAGE value="18/11/2023 - 17h00" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="18/11/2023 - 17h00" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
3117
Log/log_file.log
3117
Log/log_file.log
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -510,7 +510,7 @@ def get_Agenda_Event_List_With_Filter(diction):
|
||||||
if (filter_date_debut and filter_date_fin):
|
if (filter_date_debut and filter_date_fin):
|
||||||
|
|
||||||
|
|
||||||
if (New_retVal_start_date.strftime("%d/%m/%Y") >= datetime.strptime(str(filter_date_debut)[0:10], '%d/%m/%Y') and
|
if ( datetime.strptime(str(New_retVal_start_date)[0:10], '%d/%m/%Y') >= datetime.strptime(str(filter_date_debut)[0:10], '%d/%m/%Y') and
|
||||||
New_retVal_end_date <= datetime.strptime(str(filter_date_fin)[0:10], '%d/%m/%Y')):
|
New_retVal_end_date <= datetime.strptime(str(filter_date_fin)[0:10], '%d/%m/%Y')):
|
||||||
user['id'] = str(val_tmp)
|
user['id'] = str(val_tmp)
|
||||||
val_tmp = val_tmp + 1
|
val_tmp = val_tmp + 1
|
||||||
|
@ -518,7 +518,7 @@ def get_Agenda_Event_List_With_Filter(diction):
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||||
|
|
||||||
elif (filter_date_debut):
|
elif (filter_date_debut):
|
||||||
if (New_retVal_start_date.strftime("%d/%m/%Y") >= datetime.strptime(str(filter_date_debut)[0:10], '%d/%m/%Y')):
|
if ( datetime.strptime(str(New_retVal_start_date)[0:10], '%d/%m/%Y') >= datetime.strptime(str(filter_date_debut)[0:10], '%d/%m/%Y')):
|
||||||
user['id'] = str(val_tmp)
|
user['id'] = str(val_tmp)
|
||||||
val_tmp = val_tmp + 1
|
val_tmp = val_tmp + 1
|
||||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||||
|
|
121
main.py
121
main.py
|
@ -59,6 +59,7 @@ import attached_file_mgt as attached_file_mgt
|
||||||
import base_specific_fields as base_specific_fields
|
import base_specific_fields as base_specific_fields
|
||||||
import agenda as agenda
|
import agenda as agenda
|
||||||
import base_partner_session_step as base_partner_session_step
|
import base_partner_session_step as base_partner_session_step
|
||||||
|
import Session_Formation_Sequence as Session_Formation_Sequence
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
cors = CORS(app, resources={r"/foo": {"origins": "*"}})
|
cors = CORS(app, resources={r"/foo": {"origins": "*"}})
|
||||||
|
@ -5521,6 +5522,126 @@ def Get_Given_Partner_session_step():
|
||||||
return jsonify(status=status, message=retval)
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API qui ajoute une sequence à une session de formation
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Add_Session_Sequence/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Add_Session_Sequence():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Add_Session_Sequence payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Add_Session_Sequence(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API qui met à jour une sequence à une session de formation
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Update_Session_Sequence/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Update_Session_Sequence():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Update_Session_Sequence payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Update_Session_Sequence(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API qui recupere la liste des séquences d'une session de formation
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Get_Session_Sequence_List/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Get_Session_Sequence_List():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Get_Session_Sequence_List payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Get_Session_Sequence_List(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API qui recupere les données d'une séquence d'une session de formation
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Get_Given_Session_Sequence/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Get_Given_Session_Sequence():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Get_Given_Session_Sequence payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Get_Given_Session_Sequence(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API qui supprime une sequence à une session de formation
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Delete_Given_Session_Sequence/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Delete_Given_Session_Sequence():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Delete_Given_Session_Sequence payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Delete_Given_Session_Sequence(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API Affecter une ressource à une sequence (humaine ou materielle)
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Add_Sequence_Affectation_Ressource_Poste/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Add_Sequence_Affectation_Ressource_Poste():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Add_Sequence_Affectation_Ressource_Poste payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Add_Sequence_Affectation_Ressource_Poste(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
"""
|
||||||
|
API AMettre à jour une affectation de ressource
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Update_Sequence_Affectation_Ressource_Poste/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Update_Sequence_Affectation_Ressource_Poste():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Update_Sequence_Affectation_Ressource_Poste payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Update_Sequence_Affectation_Ressource_Poste(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API Supprimer une affectation de ressource à une sequence
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Delete_Sequence_Affectation_Ressource_Poste/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Delete_Sequence_Affectation_Ressource_Poste():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Delete_Sequence_Affectation_Ressource_Poste payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Delete_Sequence_Affectation_Ressource_Poste(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
API Recuperer la liste des affectations de ressource à une sequence
|
||||||
|
"""
|
||||||
|
@app.route('/myclass/api/Get_List_Sequence_Ressource_Affectation/', methods=['POST','GET'])
|
||||||
|
@crossdomain(origin='*')
|
||||||
|
def Get_List_Sequence_Ressource_Affectation():
|
||||||
|
# On recupere le corps (payload) de la requete
|
||||||
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
|
print(" ### Get_List_Sequence_Ressource_Affectation payload = ",payload)
|
||||||
|
status, retval = Session_Formation_Sequence.Get_List_Sequence_Ressource_Affectation(payload)
|
||||||
|
return jsonify(status=status, message=retval)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(" debut api")
|
print(" debut api")
|
||||||
|
|
|
@ -553,7 +553,7 @@ def Get_List_Default_Partner_Document(diction):
|
||||||
RetObject = []
|
RetObject = []
|
||||||
val_tmp = 1
|
val_tmp = 1
|
||||||
|
|
||||||
for retval in MYSY_GV.dbname['courrier_template'].find(data_cle, {'_id':1, 'nom':1, 'ref_interne':1 }):
|
for retval in MYSY_GV.dbname['courrier_template'].find(data_cle, {'_id':1, 'nom':1, 'ref_interne':1, 'type_doc':1 }):
|
||||||
user = retval
|
user = retval
|
||||||
user['id'] = str(val_tmp)
|
user['id'] = str(val_tmp)
|
||||||
val_tmp = val_tmp + 1
|
val_tmp = val_tmp + 1
|
||||||
|
|
|
@ -660,6 +660,24 @@ def CheckisDate(mydate):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
Cette fonction verifie si une chaine est de type date time jj/mm/aaaa hh:mm
|
||||||
|
'''
|
||||||
|
def CheckisDate_Hours(mydate):
|
||||||
|
# mydate doit etre au format : jj/mm/aaaa
|
||||||
|
try:
|
||||||
|
#print(" analyse de "+mydate)
|
||||||
|
val = datetime.strptime(str(mydate).strip(), '%d/%m/%Y %H:%M')
|
||||||
|
|
||||||
|
return True
|
||||||
|
except Exception as e:
|
||||||
|
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
|
myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Verification que le mot n'est pas
|
Verification que le mot n'est pas
|
||||||
stemisable à traver la tabla "word_not_stem
|
stemisable à traver la tabla "word_not_stem
|
||||||
|
|
Loading…
Reference in New Issue