master
cherif 2024-07-09 21:26:21 +02:00
parent ed58489236
commit 2509c3e9f6
3 changed files with 2314 additions and 18 deletions

View File

@ -1,11 +1,9 @@
<?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="wwssd">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="wwssdssd">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/survey_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/survey_mgt.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -76,13 +74,6 @@
<option name="presentableId" value="Default" />
<updated>1680804787304</updated>
</task>
<task id="LOCAL-00296" summary="12/05/2024 - 21h30">
<created>1715541456510</created>
<option name="number" value="00296" />
<option name="presentableId" value="LOCAL-00296" />
<option name="project" value="LOCAL" />
<updated>1715541456510</updated>
</task>
<task id="LOCAL-00297" summary="13/05/2024 - 18h30">
<created>1715618340942</created>
<option name="number" value="00297" />
@ -419,7 +410,14 @@
<option name="project" value="LOCAL" />
<updated>1720184777417</updated>
</task>
<option name="localTasksCounter" value="345" />
<task id="LOCAL-00345" summary="wwssdss">
<created>1720531095887</created>
<option name="number" value="00345" />
<option name="presentableId" value="LOCAL-00345" />
<option name="project" value="LOCAL" />
<updated>1720531095888</updated>
</task>
<option name="localTasksCounter" value="346" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -461,8 +459,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="qsdsqqsdsq" />
<MESSAGE value="sd" />
<MESSAGE value="sss" />
<MESSAGE value="01/06/2024 - 14h30" />
<MESSAGE value="qsdsq" />
@ -486,6 +482,8 @@
<MESSAGE value="ww" />
<MESSAGE value="wws" />
<MESSAGE value="wwssd" />
<option name="LAST_COMMIT_MESSAGE" value="wwssd" />
<MESSAGE value="wwssdss" />
<MESSAGE value="wwssdssd" />
<option name="LAST_COMMIT_MESSAGE" value="wwssdssd" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@ -247,7 +247,7 @@ def Record_Survey_Data_No_Token(diction):
node = {"question_id":question_id, "question":str(associated_question), "response":response}
"""
05/07/204 - On va aller recuperer l'info 'is_statistic' sur la question
05/07/204 - On va aller recuperer l'info 'is_statistic' et le 'type' sur la question
"""
question_is_statistic = ""
question_type = ""
@ -2406,7 +2406,8 @@ def Get_Survey_Stat_Data_For_Given_related_collection_id(diction):
for local_data in raw_reponse_data:
if (str(local_data['question_date_reponse_mois_annee']) == str(tmp['month_year'])):
nb_question_response = nb_question_response + 1
somme_question_response = somme_question_response + mycommon.tryFloat(str(local_data['question_response']))
if( str(local_data['question_response']).lower().strip() == "oui"):
somme_question_response = somme_question_response + 1
if( nb_question_response > 0 ):
moyenne_question_response = round(somme_question_response / nb_question_response, 2)
@ -2418,8 +2419,11 @@ def Get_Survey_Stat_Data_For_Given_related_collection_id(diction):
tmp['count'] = mycommon.tryFloat(str(nb_question_response))
if( str(question_analyse_type) == "moyenne"):
tmp['value'] = mycommon.tryFloat(str(moyenne_question_response))
tmp['type_question'] = "moyenne"
elif( str(question_analyse_type) == "somme"):
tmp['value'] = mycommon.tryFloat(str(somme_question_response))
tmp['type_question'] = "somme"
else:
tmp['nb_question_response'] = 0
@ -2428,7 +2432,7 @@ def Get_Survey_Stat_Data_For_Given_related_collection_id(diction):
tmp['count'] = 0
tmp['value'] = 0
print(" ### les reponses range_date_month: ", range_date_month)
#print(" ### les reponses range_date_month: ", range_date_month)
RetObject = []
RetObject.append(mycommon.JSONEncoder().encode(range_date_month))
return True, RetObject
@ -2511,7 +2515,7 @@ def Get_Entity_Question_List_With_Stat_For_Given_related_collection_id(diction):
for tmp in retval['user_response']:
if (tmp['is_statistic'] == "1" and str(tmp['question_id']) not in raw_question_id):
raw_question_id.append(str(tmp['question_id']))
print(" ## tmp = ", tmp)
node = {}
node['id'] = str(cpt)
cpt = cpt + 1
@ -2520,6 +2524,18 @@ def Get_Entity_Question_List_With_Stat_For_Given_related_collection_id(diction):
node['related_collection_id'] = str(diction['related_collection_id'])
node['question_id'] = str(tmp['question_id'])
node['question_question'] = str(tmp['question'])
if (str(tmp['type']) in ['note', 'entier']):
node['question_type'] = "Moyenne"
elif (str(tmp['type'])in ['bool']):
node['question_type'] = "Somme"
else:
mycommon.myprint(
" Le paramétrage de la question ne permet pas de déterminer la nature statistiques des données ")
return False, " Le paramétrage de la question ne permet pas de déterminer la nature statistiques des données "
RetObject.append(mycommon.JSONEncoder().encode(node))