-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1179: Implémentation des outils de suivi du nombre d'avis à base des…
… tableaux d’agrégats * Ajout de la page de comptages des données détaillés des avis par période pour toutes les démarches ou pour une démarche donnée (implémentée par @ldubost)
- Loading branch information
Showing
2 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
127 changes: 127 additions & 0 deletions
127
.../main/resources/Avis/Admin/Statistiques/ComptagesAggregats/ExportComptageSatisfaction.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?xml version="1.1" encoding="UTF-8"?> | ||
|
||
<!-- | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<xwikidoc version="1.3" reference="Avis.Admin.Statistiques.ComptagesAggregats.ExportComptageSatisfaction" locale=""> | ||
<web>Avis.Admin.Statistiques.ComptagesAggregats</web> | ||
<name>ExportComptageSatisfaction</name> | ||
<language/> | ||
<defaultLanguage/> | ||
<translation>0</translation> | ||
<creator>xwiki:XWiki.Admin</creator> | ||
<creationDate>1544396400000</creationDate> | ||
<parent>xwiki:Avis.Admin.Statistiques.ComptagesAggregats.WebHome</parent> | ||
<author>xwiki:XWiki.Admin</author> | ||
<contentAuthor>xwiki:XWiki.Admin</contentAuthor> | ||
<date>1544396400000</date> | ||
<contentUpdateDate>1544396400000</contentUpdateDate> | ||
<version>1.1</version> | ||
<title>Export (Comptage et Satisfaction)</title> | ||
<comment/> | ||
<minorEdit>false</minorEdit> | ||
<syntaxId>xwiki/2.1</syntaxId> | ||
<hidden>false</hidden> | ||
<content>{{velocity}} | ||
#if($request.date) | ||
#set($date = $request.date) | ||
#else | ||
#set($date = "2021-01-01") | ||
#end | ||
#if($request.date) | ||
#set($type = $request.type) | ||
#else | ||
#set($type = "mois") | ||
#end | ||
#if($request.page) | ||
#set($page = $request.page) | ||
#else | ||
#set($page = "") | ||
#end | ||
#set($spage = $escapetool.xml($page)) | ||
=Avis détaillés par $type depuis le $date = | ||
|
||
{{html clean="false"}} | ||
<form action=""> | ||
Date: <input type="date" name="date" value="${date}" /> | ||
Type: <select name="type"> | ||
<option value="an" #if($type=="an")selected#end>Année</option> | ||
<option value="mois" #if($type=="mois")selected#end>Mois</option> | ||
<option value="trimestre" #if($type=="trimestre")selected#end>Trimestre</option> | ||
<option value="semaine" #if($type=="semaine")selected#end>Semaine</option> | ||
<option value="jour" #if($type=="jour")selected#end>Jour</option> | ||
</select> | ||
Top 250: <input type="checkbox" name="top250" value="1" #if("$!request.top250" == '1')checked=checked#end/> | ||
Demarche: <input type="text" name="page" value="$spage" class="suggest-pages" /> | ||
<input type="submit" value="Go" /> | ||
</form> | ||
{{/html}} | ||
|
||
#if($type=="an") | ||
#set($colFormat = "%Y") | ||
#set($colDisplay = "an") | ||
#elseif($type=="semaine") | ||
#set($colFormat = "%Y%u") | ||
#set($colDisplay = "semaine") | ||
#elseif($type=="jour") | ||
#set($colFormat = "%Y%m%d") | ||
#set($colDisplay = "jour") | ||
#elseif($type=="mois") | ||
#set($colFormat = "%Y%m") | ||
#set($colDisplay = "mois") | ||
#elseif($type=="trimestre") | ||
#set($colFormat = "%Y") | ||
#set($colDisplay = "trimestre") | ||
#end | ||
|
||
#set($extraQuery = "") | ||
#if($page && $page!="") | ||
#set($extraQuery = "and demarche='Demarches.${escapetool.sql($page)}'") | ||
#end | ||
|
||
==Data == | ||
|
||
#if($type=="trimestre") | ||
#set($dateField = "CONCAT(date_format(day, '$colFormat'),'T',QUARTER(day))") | ||
#else | ||
#set($dateField = "date_format(day, '$colFormat')") | ||
#end | ||
|
||
#set($query = "select demarche, $dateField as $colDisplay, sum(nbAvis) as nbAvis, 5.0 * ((sum(avis3)*3.0 + sum(avis2)*2.0 + sum(avis1)) / sum(nbAvis) -1) as satisfaction, sum(avis1), sum(avis2), sum(avis3), sum(comprehension1), sum(comprehension2), sum(comprehension3), sum(facile1), sum(facile2), sum(facile3), sum(diffManquedinformations), sum(diffDysfonctionnement), sum(diffMobile), sum(diffPiecesjointes), sum(diffSuite), sum(diffAutre), sum(aideProche), sum(aideAssociation), sum(aideAgent), sum(aideInternet), sum(aideAutre) from AvisAggregateByDay where day>'$date' $extraQuery group by 1, 2") | ||
|=Démarche|=Numéro|=Top250|=Mois|=Nb Avis|=Satisfaction|Avis TB|Avis M|Avis PB|Comprehension TB|Comprehension M|Comprehension PB|Facilité TB|Facilité M|Facilité PB|Diff Manque d'Info|Diff Dysfonctionnement|Diff Mobile|Diff Pièces Jointes|Diff Suite|Diff Autre|Aide Proche|Aide Association|Aide Agent|Aide Internet|Aide Autre | ||
#foreach($item in $services.query.hql($query).execute()) | ||
#set($demarche = $item[0]) | ||
#set($mois = $item[1]) | ||
#set($nbAvis = $item[2]) | ||
#set($satisfaction = $item[3]) | ||
#set($demarcheDoc = $xwiki.getDocument($demarche)) | ||
#set($demarcheTitle = $demarcheDoc.getDisplayTitle()) | ||
#set($demarcheTop250 = "Non") | ||
#if($demarcheDoc.getValue("top")==1) | ||
#set($demarcheTop250 = "Oui") | ||
#end | ||
#set($satisfaction = $item[3]) | ||
#if(($request.top250!=1) || ($demarcheTop250=="Oui")) | ||
|$demarcheTitle|$demarche.replaceAll("Demarches.", "")|$demarcheTop250|$mois|$nbAvis|$satisfaction.toString().replaceAll("[.]", ",")#foreach($i in [4..23])|$item[$i]#end | ||
#end | ||
|
||
#end | ||
{{/velocity}}</content> | ||
</xwikidoc> |
44 changes: 44 additions & 0 deletions
44
wikis/xwiki/src/main/resources/Avis/Admin/Statistiques/ComptagesAggregats/WebHome.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.1" encoding="UTF-8"?> | ||
|
||
<!-- | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<xwikidoc version="1.3" reference="Avis.Admin.Statistiques.ComptagesAggregats.WebHome" locale=""> | ||
<web>Avis.Admin.Statistiques.ComptagesAggregats</web> | ||
<name>WebHome</name> | ||
<language/> | ||
<defaultLanguage/> | ||
<translation>0</translation> | ||
<creator>xwiki:XWiki.Admin</creator> | ||
<creationDate>1544396400000</creationDate> | ||
<parent>Avis.Admin.Statistiques.WebHome</parent> | ||
<author>xwiki:XWiki.Admin</author> | ||
<contentAuthor>xwiki:XWiki.Admin</contentAuthor> | ||
<date>1544396400000</date> | ||
<contentUpdateDate>1544396400000</contentUpdateDate> | ||
<version>1.1</version> | ||
<title>Comptages par Aggregats</title> | ||
<comment/> | ||
<minorEdit>false</minorEdit> | ||
<syntaxId>xwiki/2.1</syntaxId> | ||
<hidden>false</hidden> | ||
<content> | ||
{{children /}}</content> | ||
</xwikidoc> |