Rev 1585 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1585 | Rev 1586 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.queries; |
1 | package pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.queries; |
2 | 2 | ||
3 | import jomm.dao.impl.AbstractDao; |
3 | import jomm.dao.impl.AbstractDao; |
4 | import org.hibernate.Query; |
4 | import org.hibernate.Query; |
- | 5 | import org.json.JSONArray; |
|
5 | import pt.estgp.estgweb.domain.OlapStarFactQuestionario; |
6 | import pt.estgp.estgweb.domain.OlapStarFactQuestionario; |
6 | import pt.estgp.estgweb.services.questionarios.PedagogicoAlunosProcessor; |
7 | import pt.estgp.estgweb.services.questionarios.PedagogicoAlunosProcessor; |
7 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.EntityEvaluated; |
8 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.EntityEvaluated; |
8 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.QuestionariosAlunosReport; |
9 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.QuestionariosAlunosReport; |
9 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.QuestionariosReport; |
10 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportdomains.QuestionariosReport; |
Line 188... | Line 189... | ||
188 | rowDistrito.addColTextCenter("" + num); |
189 | rowDistrito.addColTextCenter("" + num); |
189 | int percentage = (int)(((float)(num) / ((float)docenteReport.getInquiridosComResposta()) * 100.0)); |
190 | int percentage = (int)(((float)(num) / ((float)docenteReport.getInquiridosComResposta()) * 100.0)); |
190 | rowDistrito.addColPercentageCenter("" + percentage); |
191 | rowDistrito.addColPercentageCenter("" + percentage); |
191 | } |
192 | } |
192 | 193 | ||
- | 194 | //build JSON Localidades |
|
- | 195 | JSONArray citiesJson = new JSONArray(); |
|
- | 196 | for(int i = 0; i < localidades.size(); i++) |
|
- | 197 | { |
|
- | 198 | JSONArray city = new JSONArray(); |
|
- | 199 | citiesJson.put(city); |
|
- | 200 | ||
- | 201 | 1.5.0/docs/api/java/lang/Long.html">Long num = (1.5.0/docs/api/java/lang/Long.html">Long)localidades.get(i)[0]; |
|
- | 202 | 1.5.0/docs/api/java/lang/String.html">String distrit = (1.5.0/docs/api/java/lang/String.html">String)localidades.get(i)[1]; |
|
- | 203 | int percentage = (int)(((float)(num) / ((float)docenteReport.getInquiridosComResposta()) * 100.0)); |
|
- | 204 | city.put(distrit); |
|
- | 205 | city.put(percentage); |
|
- | 206 | } |
|
- | 207 | docenteReport.setDistritosJson(citiesJson.toString()); |
|
- | 208 | ||
193 | //int contagemOutros = 0; |
209 | //int contagemOutros = 0; |
194 | /*for(int i = 3; i < localidades.size(); i++) |
210 | /*for(int i = 3; i < localidades.size(); i++) |
195 | { |
211 | { |
196 | Long outro = (Long)localidades.get(i)[0]; |
212 | Long outro = (Long)localidades.get(i)[0]; |
197 | if(outro != null) |
213 | if(outro != null) |