ddd
parent
1b25a8db5a
commit
d9312eb403
|
@ -1,12 +1,11 @@
|
|||
<?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="11/08/2024 - 18h32s">
|
||||
<change afterPath="$PROJECT_DIR$/model_planning_sequence_mgt.py" afterDir="false" />
|
||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="dd">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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_Sequence.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation_Sequence.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" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -76,13 +75,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1680804787304</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00321" summary="qsdsq">
|
||||
<created>1717533847419</created>
|
||||
<option name="number" value="00321" />
|
||||
<option name="presentableId" value="LOCAL-00321" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1717533847419</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00322" summary="qsdsq">
|
||||
<created>1717577652189</created>
|
||||
<option name="number" value="00322" />
|
||||
|
@ -419,7 +411,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1723371666602</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="370" />
|
||||
<task id="LOCAL-00370" summary="dd">
|
||||
<created>1723488781960</created>
|
||||
<option name="number" value="00370" />
|
||||
<option name="presentableId" value="LOCAL-00370" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1723488781961</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="371" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -461,7 +460,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="wwssdssddd" />
|
||||
<MESSAGE value="11/07/2024 - 13h14" />
|
||||
<MESSAGE value="13/07/2024 - 22h" />
|
||||
<MESSAGE value="14/07/2024 - 22h" />
|
||||
|
@ -486,6 +484,7 @@
|
|||
<MESSAGE value="10/08/2024 - 20h32s" />
|
||||
<MESSAGE value="11/08/2024 - 12h32s" />
|
||||
<MESSAGE value="11/08/2024 - 18h32s" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="11/08/2024 - 18h32s" />
|
||||
<MESSAGE value="dd" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="dd" />
|
||||
</component>
|
||||
</project>
|
1453
Log/log_file.log
1453
Log/log_file.log
File diff suppressed because it is too large
Load Diff
28
main.py
28
main.py
|
@ -10773,18 +10773,30 @@ def Delete_Sequence_Planning_Model():
|
|||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
"""
|
||||
API pour la liste des modele de planning
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Sequence_Planning_Model_Header/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Sequence_Planning_Model_Header():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_List_Sequence_Planning_Model_Header payload = ",payload)
|
||||
status, retval = model_planning_sequence_mgt.Get_List_Sequence_Planning_Model_Header(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
API pour recuperer un modele de planning sans option
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Sequence_Planning_Model/', methods=['POST','GET'])
|
||||
@app.route('/myclass/api/Get_Given_Sequence_Planning_Model/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Sequence_Planning_Model():
|
||||
def Get_Given_Sequence_Planning_Model():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_List_Sequence_Planning_Model payload = ",payload)
|
||||
status, retval = model_planning_sequence_mgt.Get_List_Sequence_Planning_Model(payload)
|
||||
print(" ### Get_Given_Sequence_Planning_Model payload = ",payload)
|
||||
status, retval = model_planning_sequence_mgt.Get_Given_Sequence_Planning_Model(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
@ -10793,13 +10805,13 @@ API pour recuperer un modele de planning AVEC option
|
|||
- la date_debut d'application du planning
|
||||
- l'application du calendrier (date et jours travaillés)
|
||||
"""
|
||||
@app.route('/myclass/api/Get_List_Sequence_Planning_Model_With_Option/', methods=['POST','GET'])
|
||||
@app.route('/myclass/api/Get_Given_Sequence_Planning_Model_With_Option/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_List_Sequence_Planning_Model_With_Option():
|
||||
def Get_Given_Sequence_Planning_Model_With_Option():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||
print(" ### Get_List_Sequence_Planning_Model_With_Option payload = ",payload)
|
||||
status, retval = model_planning_sequence_mgt.Get_List_Sequence_Planning_Model_With_Option(payload)
|
||||
print(" ### Get_Given_Sequence_Planning_Model_With_Option payload = ",payload)
|
||||
status, retval = model_planning_sequence_mgt.Get_Given_Sequence_Planning_Model_With_Option(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
||||
|
|
|
@ -229,11 +229,82 @@ def Delete_Sequence_Planning_Model(diction):
|
|||
return False, " Impossible de supprimer le modèle de planning "
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Recuperer la liste des modeles de planning,(SEULEMENT LES ENTETES)
|
||||
"""
|
||||
def Get_List_Sequence_Planning_Model_Header(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
"""
|
||||
Verification des input acceptés
|
||||
"""
|
||||
field_list = ['token',]
|
||||
|
||||
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'est pas autorisé")
|
||||
return False, " Les informations fournies sont incorrectes"
|
||||
|
||||
"""
|
||||
Verification des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['token',]
|
||||
|
||||
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
|
||||
|
||||
|
||||
data_header_qry = {'partner_owner_recid': str(my_partner['recid']),
|
||||
'valide':'1',
|
||||
'locked':'0'}
|
||||
|
||||
|
||||
|
||||
RetObject = []
|
||||
val_tmp = 0
|
||||
for retval in MYSY_GV.dbname['planning_model_header'].find(data_header_qry):
|
||||
user = retval
|
||||
user['id'] = str(val_tmp)
|
||||
val_tmp = val_tmp + 1
|
||||
RetObject.append(mycommon.JSONEncoder().encode(user))
|
||||
|
||||
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écuperer le modèle de planning "
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Recuperer la liste des modeles de planning
|
||||
"""
|
||||
|
||||
def Get_List_Sequence_Planning_Model(diction):
|
||||
def Get_Given_Sequence_Planning_Model(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
|
@ -328,7 +399,7 @@ Recuperer la liste des modeles de planning avec les options suivantes :
|
|||
"""
|
||||
|
||||
|
||||
def Get_List_Sequence_Planning_Model_With_Option(diction):
|
||||
def Get_Given_Sequence_Planning_Model_With_Option(diction):
|
||||
try:
|
||||
diction = mycommon.strip_dictionary(diction)
|
||||
|
||||
|
@ -582,8 +653,6 @@ def Get_List_Sequence_Planning_Model_With_Option(diction):
|
|||
is_off_day_of_week = is_existe_valide_journee_model_data[str(jour_name)]['is_off_day']
|
||||
|
||||
|
||||
|
||||
|
||||
RetObject = {}
|
||||
RetObject['header_data'] = mycommon.JSONEncoder().encode(header_data)
|
||||
RetObject['lines_data'] = mycommon.JSONEncoder().encode(lines_data)
|
||||
|
|
Loading…
Reference in New Issue