Rev 1576 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1574 | jmachado | 1 | package pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors; |
2 | |||
3 | import jomm.dao.impl.AbstractDao; |
||
4 | import jomm.utils.PdfUtils; |
||
5 | import org.apache.fop.apps.FOPException; |
||
6 | import org.apache.log4j.Logger; |
||
7 | import org.dom4j.DocumentException; |
||
8 | import org.hibernate.Query; |
||
9 | import pt.estgp.estgweb.Globals; |
||
10 | import pt.estgp.estgweb.domain.OlapStarFactQuestionarioAnswer; |
||
11 | import pt.estgp.estgweb.domain.User; |
||
12 | import pt.estgp.estgweb.domain.dao.DaoFactory; |
||
13 | import pt.estgp.estgweb.services.jobs.ServiceJob; |
||
14 | import pt.estgp.estgweb.services.logresults.ILogMessages; |
||
15 | import pt.estgp.estgweb.services.logresults.impl.DefaultLogMessages; |
||
16 | import pt.estgp.estgweb.services.questionarios.PedagogicoAlunosProcessor; |
||
17 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportsdomain.DocenteReport; |
||
18 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportsdomain.EntityEvaluated; |
||
19 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.reportsdomain.QuestionariosAlunosReport; |
||
20 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.queries.*; |
||
21 | import pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils.*; |
||
22 | import pt.estgp.estgweb.utils.ConfigProperties; |
||
23 | import pt.estgp.estgweb.utils.DatesUtils; |
||
24 | import pt.estgp.estgweb.utils.Dom4jUtil; |
||
25 | |||
26 | import javax.xml.transform.TransformerException; |
||
27 | import javax.xml.transform.dom.DOMSource; |
||
28 | import java.awt.*; |
||
29 | import java.io.File; |
||
30 | import java.io.FileOutputStream; |
||
31 | import java.io.IOException; |
||
32 | import java.text.DecimalFormat; |
||
33 | import java.util.*; |
||
34 | import java.util.List; |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Created by jorgemachado on 05/11/16. |
||
39 | */ |
||
40 | public class DocenteReportGenerator extends ReportAlunosGenerator |
||
41 | { |
||
42 | |||
43 | |||
44 | |||
45 | |||
46 | private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(DocenteReportGenerator.class); |
||
47 | |||
48 | public DocenteReportGenerator(1.5.0/docs/api/java/lang/String.html">String anoLectivo, 1.5.0/docs/api/java/lang/String.html">String[] periodos, 1.5.0/docs/api/java/lang/String.html">String[] degrees) { |
||
49 | super(anoLectivo, periodos, degrees); |
||
50 | |||
51 | } |
||
52 | |||
53 | |||
54 | public static void main(1.5.0/docs/api/java/lang/String.html">String[] args) throws 1.5.0/docs/api/java/io/IOException.html">IOException, DocumentException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException |
||
55 | { |
||
56 | |||
57 | //String teacherCode = "44451"; |
||
58 | //String teacherCode = "20122"; |
||
59 | 1.5.0/docs/api/java/lang/String.html">String teacherCode = "20128"; |
||
60 | 1.5.0/docs/api/java/lang/String.html">String anoLectivo = "201516"; |
||
61 | //String[] periodos = new String[]{"S2","T3","T4","A"}; |
||
62 | 1.5.0/docs/api/java/lang/String.html">String[] periodos = new 1.5.0/docs/api/java/lang/String.html">String[]{"S1"}; |
||
63 | 1.5.0/docs/api/java/lang/String.html">String[] degrees = new 1.5.0/docs/api/java/lang/String.html">String[]{"L","M","T","E"}; |
||
64 | new DocenteReportGenerator(anoLectivo,periodos,degrees).processTeacher(teacherCode); |
||
65 | |||
66 | //teacherCode = "20122"; |
||
67 | |||
68 | //processTeacher(teacherCode,anoLectivo,periodos,degrees); |
||
69 | |||
70 | //teacherCode = "20051"; |
||
71 | |||
72 | //processTeacher(teacherCode,anoLectivo,periodos,degrees); |
||
73 | |||
74 | //teacherCode = "66587"; |
||
75 | |||
76 | //processTeacher(teacherCode,anoLectivo,periodos,degrees); |
||
77 | |||
78 | //teacherCode = "20114"; |
||
79 | //processTeacher(teacherCode,anoLectivo,periodos,degrees); |
||
80 | } |
||
81 | public void processTeacher(1.5.0/docs/api/java/lang/String.html">String teacherCode) throws 1.5.0/docs/api/java/io/IOException.html">IOException, DocumentException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, FOPException |
||
82 | { |
||
83 | |||
84 | |||
85 | //todo ver se ha ocorrencias de respostas do docente neste ano se não houver devolver questionario com info de nao haver resultados para este docente |
||
86 | DocenteReport docenteReport = getDocenteReport(teacherCode); |
||
87 | if(docenteReport == null) |
||
88 | { |
||
89 | serviceLogInfo(" Docente " + teacherCode + " nao tem respostas nestas condições "); |
||
90 | return; |
||
91 | } |
||
92 | |||
93 | ChartBuilderUtil.createChartTiposAlunos(docenteReport,"tiposAlunosTmp"); |
||
94 | ChartBuilderUtil.createChartTaxaRespostas(docenteReport, "taxaRespostasTmp"); |
||
95 | ChartBuilderUtil.createChartTaxaParticipacao(docenteReport, "taxaParticipacaoTmp"); |
||
96 | ChartBuilderUtil.createChartUnidadesContribuicao(docenteReport,"unidadesContribuicao"); |
||
97 | |||
98 | //DocenteReport.RespostasChart respostasChart = ChartBuilderUtil.createChartRespostasPergunta("A sua pontualidade", new int[]{2, 4, 5, 3, 1}, "pontualidadeTmp"); |
||
99 | //docenteReport.getRespostasCharts().add(respostasChart); |
||
100 | |||
101 | |||
102 | 1.5.0/docs/api/java/lang/String.html">String path = generatePdfReport(docenteReport); |
||
103 | |||
104 | } |
||
105 | |||
106 | private 1.5.0/docs/api/java/lang/String.html">String generatePdfReport(DocenteReport docenteReport) throws DocumentException, 1.5.0/docs/api/javax/xml/transform/TransformerException.html">TransformerException, 1.5.0/docs/api/java/io/IOException.html">IOException, FOPException |
||
107 | { |
||
108 | 1.5.0/docs/api/java/lang/String.html">String path = Globals.TMP_DIR + 1.5.0/docs/api/java/io/File.html">File.separator + "reportDocente" + docenteReport.getNumeroDocente() + ".pdf"; |
||
109 | |||
110 | 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream out = new 1.5.0/docs/api/java/io/FileOutputStream.html">FileOutputStream(path); |
||
111 | Map<String,Object> params = new HashMap<String,Object>(); |
||
112 | params.put("site", Globals.SITE_URL); |
||
113 | params.put("updateDate", pt.estgp.estgweb.web.utils.DatesUtils.getStringFromDate(new 5+0%2Fdocs%2Fapi+Date">Date() )); |
||
114 | |||
115 | |||
116 | org.w3c.dom.5+0%2Fdocs%2Fapi+Document">Document dom2 = docenteReport.serialize(); |
||
117 | Dom4jUtil.writeSout(dom2); |
||
118 | |||
119 | PdfUtils.setAuthority("Relatório de Avaliação Pedagógica - Relatório Docente - " + |
||
120 | docenteReport.getNomeDocente() + " (" + docenteReport.getNumeroDocente() + " ) " + |
||
121 | "- Ano letivo " + docenteReport.getAnoLectivo() + " - Periodos " + docenteReport.getSemestres().toString() + "" + |
||
122 | " Tipos de Curso - " + docenteReport.getDegrees().toString(), |
||
123 | docenteReport.getNomeDocente(), "Avaliação Pedagógica Docentes, Inqueritos aos Alunos"); |
||
124 | PdfUtils.createPdfFromXml(new 1.5.0/docs/api/javax/xml/transform/dom/DOMSource.html">DOMSource(dom2), "pt/estgp/estgweb/services/questionarios/pedagogico/reportprocessors/xsl/docenteReport.fo.xsl", out, params); |
||
125 | out.flush(); |
||
126 | out.close(); |
||
127 | return path; |
||
128 | } |
||
129 | |||
130 | |||
131 | private DocenteReport getDocenteReport(1.5.0/docs/api/java/lang/String.html">String teacherCode) |
||
132 | { |
||
133 | |||
134 | AbstractDao.getCurrentSession().beginTransaction(); |
||
135 | |||
136 | User u = DaoFactory.getUserDaoImpl().loadBySigesCode(1.5.0/docs/api/java/lang/Integer.html">Integer.parseInt(teacherCode)); |
||
137 | |||
138 | DocenteReport docenteReport = new DocenteReport(); |
||
139 | |||
140 | docenteReport.setNomeDocente(u.getName()); |
||
141 | docenteReport.setNumeroDocente(teacherCode); |
||
142 | docenteReport.setAnoLectivo(DatesUtils.getImportYearFormatted(anoLectivo)); |
||
143 | docenteReport.setSemestres(ReportUtils.getFormatedSemestres(periodos)); |
||
144 | docenteReport.setDegrees(ReportUtils.getFormatedDegrees(degrees)); |
||
145 | |||
146 | AlunosQueryDao.countAlunosQueResponderamAoDocente(teacherCode, anoLectivo, docenteReport, periodos, degrees); |
||
147 | /*if(docenteReport.getInquiridosTotal() == 0 || docenteReport.getAlunosComResposta() == 0) |
||
148 | { |
||
149 | return null; |
||
150 | }*/ |
||
151 | QuestionariosQueryDao.countQuestionariosRespostasAoDocente(teacherCode, anoLectivo, docenteReport, periodos, degrees); |
||
152 | AlunosQueryDao.countTiposAlunosComRespostasAoDocente(teacherCode, anoLectivo, docenteReport, periodos, degrees); |
||
153 | AlunosQueryDao.countIdadesAlunosComRespostasAoDocente(teacherCode, anoLectivo, docenteReport, periodos, degrees); |
||
154 | |||
155 | //TABELAS |
||
156 | QuestionariosQueryDao.createDataTableIdades(docenteReport, "Alunos"); |
||
157 | QuestionariosQueryDao.createDataTableLocalidadesAoDocente(docenteReport, teacherCode, anoLectivo, periodos, degrees, "Alunos"); |
||
158 | UnidadesQueryDao.createTableTaxaRespostaUnidadeAoDocente(docenteReport, teacherCode, anoLectivo, periodos, degrees); |
||
159 | |||
160 | |||
161 | List<String> codigosCurso = QueryDaoUtils.getCodigosCursoDocente(teacherCode, anoLectivo, periodos, degrees); |
||
162 | List<String> codigosEscola = QueryDaoUtils.getCodigosEscolaDocente(teacherCode, anoLectivo, periodos, degrees); |
||
163 | |||
164 | docenteReport.setDocentesNosCursos((int) QueryDaoUtils.countDocentesNosCursos(codigosCurso, anoLectivo, periodos, degrees)); |
||
165 | docenteReport.setDocentesNasEscolas((int) QueryDaoUtils.countDocentesNasEscolas(codigosEscola, anoLectivo, periodos, degrees)); |
||
166 | |||
167 | docenteReport.setUnidadesNosCursos((int) QueryDaoUtils.countUnidadesNosCursos(codigosCurso, anoLectivo, periodos, degrees)); |
||
168 | docenteReport.setUnidadesNasEscolas((int) QueryDaoUtils.countUnidadesNasEscolas(codigosEscola, anoLectivo, periodos, degrees)); |
||
169 | |||
170 | |||
171 | super.criarGraficosRespostasAgregadas( |
||
172 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
173 | EntityEvaluated.DOCENTE, |
||
174 | anoLectivo, |
||
175 | docenteReport, |
||
176 | codigosCurso, |
||
177 | codigosEscola, |
||
178 | 0, |
||
179 | docenteReport.getRespostasAgregadasGrupoDocente().getRespostasAgregadasChartTable(), |
||
180 | docenteReport.getRespostasAgregadasGrupoDocente(), |
||
181 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,null, |
||
182 | periodos,degrees,true); |
||
183 | |||
184 | criarGraficosRespostasAgregadas( |
||
185 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
186 | EntityEvaluated.DOCENTE, |
||
187 | anoLectivo, |
||
188 | docenteReport, |
||
189 | codigosCurso, |
||
190 | codigosEscola, |
||
191 | 0, |
||
192 | docenteReport.getRespostasAgregadasGrupoDocente().getRespostasAgregadasChartTable(), |
||
193 | docenteReport.getRespostasAgregadasGrupoDocente(), |
||
194 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,null, |
||
195 | periodos,degrees,true); |
||
196 | |||
197 | |||
198 | criarGraficosRespostasAgregadas( |
||
199 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
200 | EntityEvaluated.DOCENTE, |
||
201 | anoLectivo, |
||
202 | docenteReport, |
||
203 | codigosCurso, |
||
204 | codigosEscola, |
||
205 | 2000, |
||
206 | docenteReport.getRespostasAgregadasGrupoDocente().getRespostasAgregadasChartTable2Secs(), |
||
207 | docenteReport.getRespostasAgregadasGrupoDocente(), |
||
208 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,null, |
||
209 | periodos,degrees,false); |
||
210 | |||
211 | criarGraficosRespostasAgregadas( |
||
212 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
213 | EntityEvaluated.DOCENTE, |
||
214 | anoLectivo, |
||
215 | docenteReport, |
||
216 | codigosCurso, |
||
217 | codigosEscola, |
||
218 | 0, |
||
219 | docenteReport.getRespostasAgregadasGrupoUnidade().getRespostasAgregadasChartTable(), |
||
220 | docenteReport.getRespostasAgregadasGrupoUnidade(), |
||
221 | PerguntasGrupoQueryDao.GRUPO_UNIDADE_CODE_PERGUNTAS,null, |
||
222 | periodos,degrees,true); |
||
223 | |||
224 | criarGraficosRespostasAgregadas( |
||
225 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
226 | EntityEvaluated.DOCENTE, |
||
227 | anoLectivo, |
||
228 | docenteReport, |
||
229 | codigosCurso, |
||
230 | codigosEscola, |
||
231 | 2000, |
||
232 | docenteReport.getRespostasAgregadasGrupoUnidade().getRespostasAgregadasChartTable2Secs(), |
||
233 | docenteReport.getRespostasAgregadasGrupoUnidade(), |
||
234 | PerguntasGrupoQueryDao.GRUPO_UNIDADE_CODE_PERGUNTAS,null, |
||
235 | periodos,degrees,false); |
||
236 | |||
237 | criarGraficosRespostasAgregadas( |
||
238 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
239 | EntityEvaluated.DOCENTE, |
||
240 | anoLectivo, |
||
241 | docenteReport, |
||
242 | codigosCurso, |
||
243 | codigosEscola, |
||
244 | 0, |
||
245 | docenteReport.getRespostasAgregadasGrupoDrelDocenteAluno().getRespostasAgregadasChartTable(), |
||
246 | docenteReport.getRespostasAgregadasGrupoDrelDocenteAluno(), |
||
247 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS, |
||
248 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_REL_ALUNO_CODE_PERGUNTAS,periodos,degrees,true); |
||
249 | |||
250 | criarGraficosRespostasAgregadas( |
||
251 | new 1.5.0/docs/api/java/lang/String.html">String[]{teacherCode}, |
||
252 | EntityEvaluated.DOCENTE, |
||
253 | anoLectivo, |
||
254 | docenteReport, |
||
255 | codigosCurso, |
||
256 | codigosEscola, |
||
257 | 0, |
||
258 | docenteReport.getRespostasAgregadasGrupoDdocenteProf().getRespostasAgregadasChartTable(), |
||
259 | docenteReport.getRespostasAgregadasGrupoDdocenteProf(), |
||
260 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS, |
||
261 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_PROFISSIONALISMO_DOCENTE_CODE_PERGUNTAS,periodos,degrees,true); |
||
262 | |||
263 | |||
264 | |||
265 | UnidadesQueryDao.criarTabelasCadeirasDocente(teacherCode, |
||
266 | anoLectivo, |
||
267 | docenteReport, |
||
268 | 0, periodos, degrees, docenteReport.getUnidadesStats()); |
||
269 | |||
270 | |||
271 | criaExtremeCharts(docenteReport); |
||
272 | |||
273 | criarProgressoesCharts(docenteReport,codigosCurso,codigosEscola,degrees,periodos); |
||
274 | |||
275 | criarAnaliseConjuntaDeUnidades(docenteReport); |
||
276 | |||
277 | criarAnaliseDimensionalGeral(docenteReport); |
||
278 | |||
279 | criarAvaliacaoGuiaoDesempenho(docenteReport); |
||
280 | |||
281 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
282 | |||
283 | |||
284 | |||
285 | return docenteReport; |
||
286 | } |
||
287 | |||
288 | private void criarAnaliseDimensionalGeral(DocenteReport report) |
||
289 | { |
||
290 | |||
291 | |||
292 | |||
293 | 1.5.0/docs/api/java/lang/String.html">String grupoRelAlunopropertyIndex = ConfigProperties.getProperty("questionario.group.inverse." + PerguntasGrupoQueryDao.GRUPO_DOCENTE_REL_ALUNO_CODE_PERGUNTAS); |
||
294 | 1.5.0/docs/api/java/lang/String.html">String grupoRelAlunoLabel = ConfigProperties.getProperty("questionario.group" + grupoRelAlunopropertyIndex + ".title"); |
||
295 | |||
296 | 1.5.0/docs/api/java/lang/String.html">String grupoProfDocentepropertyIndex = ConfigProperties.getProperty("questionario.group.inverse." + PerguntasGrupoQueryDao.GRUPO_DOCENTE_PROFISSIONALISMO_DOCENTE_CODE_PERGUNTAS); |
||
297 | 1.5.0/docs/api/java/lang/String.html">String grupoProfDocenteLabel = ConfigProperties.getProperty("questionario.group" + grupoProfDocentepropertyIndex + ".title"); |
||
298 | |||
299 | double valores[][] = new double[][] |
||
300 | { |
||
301 | new double[]{ |
||
302 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getAvaliacaoMedia(), |
||
303 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getMediaGlobalNosCursos() }, |
||
304 | new double[]{ |
||
305 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getAvaliacaoMedia(), |
||
306 | report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getMediaGlobalNosCursos() } |
||
307 | }; |
||
308 | |||
309 | 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat df =new 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat("#.##"); |
||
310 | DataTable tabelaDimensoesGeral = new DataTable(); |
||
311 | DataTable.Row header = tabelaDimensoesGeral.addRowHeader(); |
||
312 | |||
313 | header.addColTextCenter("Dimensão"); |
||
314 | header.addColTextCenter("Média"); |
||
315 | header.addColTextCenter("Desvio"); |
||
316 | header.addColTextCenter("Cursos"); |
||
317 | header.addColTextCenter("Escolas"); |
||
318 | |||
319 | |||
320 | |||
321 | DataTable.Row rowRelAluno = tabelaDimensoesGeral.addRowNormal(); |
||
322 | rowRelAluno.addColTextCenter(grupoRelAlunoLabel); |
||
323 | rowRelAluno.addColPercentageDefinedCenter( |
||
324 | df.format(report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getAvaliacaoMedia()), |
||
325 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getPercentAvaliacaoMediaForTables(),true); |
||
326 | |||
327 | rowRelAluno.addColTextCenter(df.format(report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getDesvioPadrao())); |
||
328 | |||
329 | rowRelAluno.addColPercentageDefinedCenter( |
||
330 | df.format(report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getMediaGlobalNosCursos()), |
||
331 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getPercentMediaGlobalNosCursosForTables(), true); |
||
332 | |||
333 | rowRelAluno.addColPercentageDefinedCenter( |
||
334 | df.format(report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getMediaGlobalNasEscolas()), |
||
335 | report.getRespostasAgregadasGrupoDrelDocenteAluno().getMediasGrupo().getPercentMediaGlobalNasEscolasForTables(),true); |
||
336 | |||
337 | DataTable.Row rowProfissionalismo = tabelaDimensoesGeral.addRowNormal(); |
||
338 | rowProfissionalismo.addColTextCenter(grupoProfDocenteLabel); |
||
339 | rowProfissionalismo.addColPercentageDefinedCenter( |
||
340 | df.format(report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getAvaliacaoMedia()), |
||
341 | report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getPercentAvaliacaoMediaForTables(),true); |
||
342 | |||
343 | rowProfissionalismo.addColTextCenter(df.format(report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getDesvioPadrao())); |
||
344 | |||
345 | rowProfissionalismo.addColPercentageDefinedCenter( |
||
346 | df.format(report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getMediaGlobalNosCursos()), |
||
347 | report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getPercentMediaGlobalNosCursosForTables(),true); |
||
348 | |||
349 | rowProfissionalismo.addColPercentageDefinedCenter( |
||
350 | df.format(report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getMediaGlobalNasEscolas()), |
||
351 | report.getRespostasAgregadasGrupoDdocenteProf().getMediasGrupo().getPercentMediaGlobalNasEscolasForTables(),true); |
||
352 | |||
353 | |||
354 | try { |
||
355 | 1.5.0/docs/api/java/lang/String.html">String path = ChartBuilderUtil.createBarChartBarsCategories( |
||
356 | new 1.5.0/docs/api/java/lang/String.html">String[]{"Docente","Curso"}, |
||
357 | new 1.5.0/docs/api/java/lang/String.html">String[]{grupoRelAlunoLabel,grupoProfDocenteLabel}, |
||
358 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{ChartBuilderUtil.COLOR_SECTION_DIM_DARK,ChartBuilderUtil.COLOR_SECTION_DIM}, |
||
359 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{1.5.0/docs/api/java/awt/Color.html">Color.black,1.5.0/docs/api/java/awt/Color.html">Color.black}, |
||
360 | valores, |
||
361 | 0,5, "dimensoesGeral",300,40); |
||
362 | report.setDimensoesGeralChartAndTable(new ChartWithDataTable("Dimensões Geral", "", path, tabelaDimensoesGeral)); |
||
363 | } catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
364 | { |
||
365 | e.printStackTrace(); |
||
366 | } |
||
367 | |||
368 | |||
369 | } |
||
370 | private void criarAnaliseConjuntaDeUnidades(DocenteReport report) |
||
371 | { |
||
372 | |||
373 | 1.5.0/docs/api/java/lang/String.html">String grupoRelAlunopropertyIndex = ConfigProperties.getProperty("questionario.group.inverse." + PerguntasGrupoQueryDao.GRUPO_DOCENTE_REL_ALUNO_CODE_PERGUNTAS); |
||
374 | 1.5.0/docs/api/java/lang/String.html">String grupoRelAlunoLabel = ConfigProperties.getProperty("questionario.group" + grupoRelAlunopropertyIndex + ".title"); |
||
375 | |||
376 | 1.5.0/docs/api/java/lang/String.html">String grupoProfDocentepropertyIndex = ConfigProperties.getProperty("questionario.group.inverse." + PerguntasGrupoQueryDao.GRUPO_DOCENTE_PROFISSIONALISMO_DOCENTE_CODE_PERGUNTAS); |
||
377 | 1.5.0/docs/api/java/lang/String.html">String grupoProfDocenteLabel = ConfigProperties.getProperty("questionario.group" + grupoProfDocentepropertyIndex + ".title"); |
||
378 | |||
379 | |||
380 | DataTable tabelaDocenteUnidade = new DataTable(); |
||
381 | DataTable tabelaRelDocenteProfDocente = new DataTable(); |
||
382 | try { |
||
383 | |||
384 | 1.5.0/docs/api/java/lang/String.html">String docenteUnidadePath = super.criarChartETabelaMediaGruposPorUnidade( |
||
385 | 400, |
||
386 | 40, |
||
387 | report.getUnidadesStats(), |
||
388 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS, |
||
389 | null, |
||
390 | PerguntasGrupoQueryDao.GRUPO_UNIDADE_CODE_PERGUNTAS, |
||
391 | null, |
||
392 | tabelaDocenteUnidade, |
||
393 | "docenteUnidade", |
||
394 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{ChartBuilderUtil.COLOR_SECTION_BLUE_DARK, ChartBuilderUtil.COLOR_SECTION_GREEN_DARK}, |
||
395 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{1.5.0/docs/api/java/awt/Color.html">Color.black, 1.5.0/docs/api/java/awt/Color.html">Color.black} |
||
396 | ); |
||
397 | |||
398 | 1.5.0/docs/api/java/lang/String.html">String relDocenteProfDocentePath = criarChartETabelaMediaGruposPorUnidade( |
||
399 | 400, |
||
400 | 40, |
||
401 | report.getUnidadesStats(), |
||
402 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS, |
||
403 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_REL_ALUNO_CODE_PERGUNTAS, |
||
404 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS, |
||
405 | PerguntasGrupoQueryDao.GRUPO_DOCENTE_PROFISSIONALISMO_DOCENTE_CODE_PERGUNTAS, |
||
406 | tabelaRelDocenteProfDocente, |
||
407 | "relAlunoDocenteProfDocentePath", |
||
408 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{ChartBuilderUtil.COLOR_SECTION_DIM_DARK, ChartBuilderUtil.COLOR_SECTION_DIM}, |
||
409 | new 1.5.0/docs/api/java/awt/Color.html">Color[]{1.5.0/docs/api/java/awt/Color.html">Color.black, 1.5.0/docs/api/java/awt/Color.html">Color.black} |
||
410 | |||
411 | ); |
||
412 | |||
413 | report.setUnidadesAnalGrDocenteGrUnidadeChartAndTable( |
||
414 | new ChartWithDataTable( |
||
415 | "Analise Conjunta de Unidades", |
||
416 | "Docente VS Unidade", |
||
417 | docenteUnidadePath, |
||
418 | tabelaDocenteUnidade)); |
||
419 | report.setUnidadesAnalGrRelAlunoGrProfDoceChartAndTable( |
||
420 | new ChartWithDataTable("Analise Conjunta de Unidades", |
||
421 | grupoRelAlunoLabel + "VS" + grupoProfDocenteLabel, |
||
422 | relDocenteProfDocentePath, |
||
423 | tabelaRelDocenteProfDocente)); |
||
424 | |||
425 | } catch (1.5.0/docs/api/java/io/IOException.html">IOException e) { |
||
426 | e.printStackTrace(); |
||
427 | } |
||
428 | |||
429 | } |
||
430 | |||
431 | |||
432 | |||
433 | private void criarAvaliacaoGuiaoDesempenho(DocenteReport docenteReport) |
||
434 | { |
||
435 | List<UnidadeStats> unidadeStatses = docenteReport.getUnidadesStats(); |
||
436 | |||
437 | DataTable dataTable = new DataTable(); |
||
438 | |||
439 | DataTable.Row rowHeader = dataTable.addRowHeader(); |
||
440 | rowHeader.addColTextCenter("Cód. Unidade"); |
||
441 | rowHeader.addColTextCenter("Unidade Curricular").setWidth("20%"); |
||
442 | rowHeader.addColTextCenter("Cód. Curso"); |
||
443 | rowHeader.addColTextCenter("Curso").setWidth("20%"); |
||
444 | rowHeader.addColTextCenter("Ano"); |
||
445 | rowHeader.addColTextCenter("Periodo"); |
||
446 | rowHeader.addColTextCenter("resposta média (RM)"); |
||
447 | rowHeader.addColTextCenter("Número de inscritos"); |
||
448 | rowHeader.addColTextCenter("Número de respostas"); |
||
449 | rowHeader.addColTextCenter("Taxa de resposta (TR)"); |
||
450 | rowHeader.addColTextCenter("Taxa de resposta (RMxTR)"); |
||
451 | |||
452 | 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat df = new 1.5.0/docs/api/java/text/DecimalFormat.html">DecimalFormat("#.######"); |
||
453 | 1.5.0/docs/api/java/util/Collections.html">Collections.sort(unidadeStatses,new Comparator<UnidadeStats>(){ |
||
454 | |||
455 | @1.5.0/docs/api/java/lang/Override.html">Override |
||
456 | public int compare(UnidadeStats o1, UnidadeStats o2) |
||
457 | { |
||
458 | int curso = o1.getNomeCurso().compareTo(o2.getNomeCurso()); |
||
459 | if(curso == 0) |
||
460 | return o1.getNomeUnidade().compareTo(o2.getNomeUnidade()); |
||
461 | else return curso; |
||
462 | } |
||
463 | }); |
||
464 | |||
465 | double sumRMTR = 0; |
||
466 | double sumTR = 0; |
||
467 | |||
468 | for(UnidadeStats stats: unidadeStatses) |
||
469 | { |
||
470 | double TR = (((double)stats.getRespostas()/(double)stats.getInscritos())); |
||
471 | double RM = stats.getUnidadeStatsGrupoDocente().getMediasGrupo().getAvaliacaoMedia(); |
||
472 | double RMTR = RM * TR; |
||
473 | sumRMTR += RMTR; |
||
474 | sumTR += TR; |
||
475 | DataTable.Row rowUnit = dataTable.addRowNormal(); |
||
476 | rowUnit.addColTextCenter(stats.getCodigoUnidade()); |
||
477 | rowUnit.addColTextCenter(stats.getNomeUnidade()); |
||
478 | rowUnit.addColTextCenter(stats.getCodigoCurso()); |
||
479 | rowUnit.addColTextCenter(stats.getNomeCurso()); |
||
480 | rowUnit.addColTextCenter(docenteReport.getAnoLectivo()); |
||
481 | rowUnit.addColTextCenter(stats.getSemestre()); |
||
482 | rowUnit.addColNumberRight(df.format(RM)); |
||
483 | rowUnit.addColNumberRight("" + stats.getInscritos()); |
||
484 | rowUnit.addColNumberRight("" + stats.getRespostas()); |
||
485 | rowUnit.addColNumberRight(df.format(TR)); |
||
486 | rowUnit.addColNumberRight(df.format(RMTR)); |
||
487 | } |
||
488 | |||
489 | double media = sumRMTR/sumTR; |
||
490 | |||
491 | DataTable.Row rowFooter = dataTable.addRowFooter(); |
||
492 | DataTable.Row.Col soma = rowFooter.addColTextRight("Somatório das Parcelas"); |
||
493 | soma.setColspan(9); |
||
494 | soma.setFontWeight("bold"); |
||
495 | |||
496 | DataTable.Row.Col sumTRCol = rowFooter.addColNumberRight(df.format(sumTR)); |
||
497 | sumTRCol.setFontWeight("bold"); |
||
498 | DataTable.Row.Col sumRMTRCol = rowFooter.addColNumberRight(df.format(sumRMTR)); |
||
499 | sumRMTRCol.setFontWeight("bold"); |
||
500 | |||
501 | |||
502 | docenteReport.setDocenteAvaliacaoDesempenhoTR(sumTR); |
||
503 | docenteReport.setDocenteAvaliacaoDesempenhoRMTR(sumRMTR); |
||
504 | docenteReport.setDocenteAvaliacaoDesempenhoMediaPeriodo(media); |
||
505 | |||
506 | docenteReport.setDocenteAvaliacaoDesempenhoTRPrint(df.format(sumTR)); |
||
507 | docenteReport.setDocenteAvaliacaoDesempenhoRMTRPrint(df.format(sumRMTR)); |
||
508 | docenteReport.setDocenteAvaliacaoDesempenhoMediaPeriodoPrint(df.format(media)); |
||
509 | |||
510 | docenteReport.setDocenteAvaliacaoDesempenhoTable(dataTable); |
||
511 | } |
||
512 | |||
513 | private void criarProgressoesCharts(DocenteReport docenteReport, List<String> codigosCursos, List<String> codigosEscolas,1.5.0/docs/api/java/lang/String.html">String[] degrees,1.5.0/docs/api/java/lang/String.html">String[] periodos) |
||
514 | { |
||
515 | docenteReport.progressaoAgregadasDocentesVsCurso = criarProgressoChartGrupo(docenteReport, codigosCursos,PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,null,degrees,periodos); |
||
516 | docenteReport.progressaoAgregadasUnidadesVsCurso = criarProgressoChartGrupo(docenteReport, codigosCursos,PerguntasGrupoQueryDao.GRUPO_UNIDADE_CODE_PERGUNTAS,null,degrees,periodos); |
||
517 | |||
518 | docenteReport.progressaoAgregadasDocentesDrelAlunoVsCurso = criarProgressoChartGrupo(docenteReport, codigosCursos,PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,PerguntasGrupoQueryDao.GRUPO_DOCENTE_REL_ALUNO_CODE_PERGUNTAS,degrees,periodos); |
||
519 | docenteReport.progressaoAgregadasDocentesDprofDocenteVsCurso = criarProgressoChartGrupo(docenteReport, codigosCursos,PerguntasGrupoQueryDao.GRUPO_DOCENTE_CODE_PERGUNTAS,PerguntasGrupoQueryDao.GRUPO_DOCENTE_PROFISSIONALISMO_DOCENTE_CODE_PERGUNTAS,degrees,periodos); |
||
520 | |||
521 | } |
||
522 | |||
523 | private 1.5.0/docs/api/java/lang/String.html">String criarProgressoChartGrupo(DocenteReport docenteReport, List<String> codigosCursos,1.5.0/docs/api/java/lang/String.html">String grupo,1.5.0/docs/api/java/lang/String.html">String subGrupo,1.5.0/docs/api/java/lang/String.html">String[] degrees,1.5.0/docs/api/java/lang/String.html">String[] periodos) { |
||
524 | |||
525 | 1.5.0/docs/api/java/lang/String.html">String degreesQuery = QueryDaoUtils.createDegreesQuery(degrees,"curso",true); |
||
526 | 1.5.0/docs/api/java/lang/String.html">String periodosQuery = QueryDaoUtils.createPeriodosQuery(periodos, "quest", true); |
||
527 | //Media do Docente face ao curso Docente |
||
528 | 1.5.0/docs/api/javax/management/Query.html">Query query = AbstractDao.getCurrentSession().createQuery("" + |
||
529 | "SELECT " + |
||
530 | "avg(fc.intResposta) as media, " + |
||
531 | "quest.generatedTime as date " + |
||
532 | "FROM " + OlapStarFactQuestionarioAnswer.class.getName() + " fc " + |
||
533 | "JOIN fc.olapPergunta prgp " + |
||
534 | "JOIN fc.olapTipologia tipo " + |
||
535 | "JOIN fc.olapQuestionario quest " + |
||
536 | "JOIN fc.olapCurso curso " + |
||
537 | "JOIN fc.olapTimeLine timeLine " + |
||
538 | |||
539 | "where " + |
||
540 | "tipo.codigoSiges = :codigoSiges " + |
||
541 | "and timeLine.nome = '" + PedagogicoAlunosProcessor.getHistoryDriveConstraintStatic() + "' " + |
||
542 | (grupo != null ? " and prgp.grupoCode = :grupoCode " : "" ) + |
||
543 | (subGrupo != null ? " and prgp.subGrupoCode = :subGrupoCode " : "" ) + |
||
544 | degreesQuery + |
||
545 | periodosQuery + |
||
546 | " group by quest.generatedTime " + |
||
547 | "order by quest.generatedTime asc "); |
||
548 | if(grupo != null) |
||
549 | query.setString("grupoCode",grupo); |
||
550 | if(subGrupo != null) |
||
551 | query.setString("subGrupoCode",subGrupo); |
||
552 | query.setString("codigoSiges",docenteReport.getNumeroDocente()); |
||
553 | |||
554 | List<Object[]> timeSeriesAvgDocente = query.list(); |
||
555 | if(timeSeriesAvgDocente.size()>0) |
||
556 | { |
||
557 | 5+0%2Fdocs%2Fapi+Date">Date firstOcurrence = (5+0%2Fdocs%2Fapi+Date">Date) timeSeriesAvgDocente.get(0)[1]; |
||
558 | 5+0%2Fdocs%2Fapi+Date">Date lastOcurrence = (5+0%2Fdocs%2Fapi+Date">Date) timeSeriesAvgDocente.get(timeSeriesAvgDocente.size()-1)[1]; |
||
559 | |||
560 | 1.5.0/docs/api/java/lang/String.html">String cursosQuery = QueryDaoUtils.createCursosQuery(codigosCursos, true); |
||
561 | 1.5.0/docs/api/javax/management/Query.html">Query queryCursos = AbstractDao.getCurrentSession().createQuery("" + |
||
562 | "SELECT " + |
||
563 | "avg(fc.intResposta) as media, " + |
||
564 | "quest.generatedTime as date " + |
||
565 | "FROM " + OlapStarFactQuestionarioAnswer.class.getName() + " fc " + |
||
566 | "JOIN fc.olapPergunta prgp " + |
||
567 | "JOIN fc.olapTipologia tipo " + |
||
568 | "JOIN fc.olapQuestionario quest " + |
||
569 | "JOIN fc.olapCurso curso " + |
||
570 | "JOIN fc.olapTimeLine timeLine " + |
||
571 | |||
572 | "where " + |
||
573 | "quest.generatedTime >= :minDate and quest.generatedTime <= :maxDate " + |
||
574 | "and timeLine.nome = '" + PedagogicoAlunosProcessor.getHistoryDriveConstraintStatic() + "' " + |
||
575 | cursosQuery + |
||
576 | degreesQuery + |
||
577 | periodosQuery + |
||
578 | (grupo != null ? " and prgp.grupoCode = :grupoCode " : "" ) + |
||
579 | (subGrupo != null ? " and prgp.subGrupoCode = :subGrupoCode " : "" ) + |
||
580 | " group by quest.generatedTime " + |
||
581 | "order by quest.generatedTime asc "); |
||
582 | if(grupo != null) |
||
583 | queryCursos.setString("grupoCode",grupo); |
||
584 | if(subGrupo != null) |
||
585 | queryCursos.setString("subGrupoCode",subGrupo); |
||
586 | queryCursos.setTimestamp("minDate", firstOcurrence); |
||
587 | queryCursos.setTimestamp("maxDate",lastOcurrence); |
||
588 | List<Object[]> timeSeriesAvgCursosDocente = queryCursos.list(); |
||
589 | |||
590 | try { |
||
591 | 1.5.0/docs/api/java/lang/String.html">String chart = ChartBuilderUtil.createTimeSeriesDiffArea((grupo!=null?grupo:"") + (subGrupo!=null?subGrupo:""), " Docente ", " Curso ", timeSeriesAvgDocente, timeSeriesAvgCursosDocente); |
||
592 | return chart; |
||
593 | } catch (1.5.0/docs/api/java/io/IOException.html">IOException e) { |
||
594 | e.printStackTrace(); |
||
595 | } |
||
596 | } |
||
597 | return null; |
||
598 | } |
||
599 | |||
600 | |||
601 | private void criaExtremeCharts(DocenteReport docenteReport) |
||
602 | { |
||
603 | { |
||
604 | DocenteReport.PerguntaUnidadeStatAux perguntaMaxDocente = docenteReport.extremePerguntaMaxDocente(); |
||
605 | DocenteReport.PerguntaUnidadeStatAux perguntaMinDocente = docenteReport.extremePerguntaMinDocente(); |
||
606 | DocenteReport.PerguntaUnidadeStatAux perguntaMaxUnidade = docenteReport.extremePerguntaMaxUnidade(); |
||
607 | DocenteReport.PerguntaUnidadeStatAux perguntaMinUnidade = docenteReport.extremePerguntaMinUnidade(); |
||
608 | |||
609 | try { |
||
610 | |||
611 | if(perguntaMaxDocente != null) |
||
612 | { |
||
613 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaMaxDocente.pergunta.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaMaxDocente"); |
||
614 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaMinDocente.pergunta.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaMinDocente"); |
||
615 | ChartWithTitleTemp chartPerguntaMaxDocenteChart = new ChartWithTitleTemp(perguntaMaxDocente.pergunta.getPergunta(),perguntaMaxDocente.nomeUnidade,pathExtremePerguntaMaxDocente); |
||
616 | ChartWithTitleTemp chartPerguntaMinDocenteChart = new ChartWithTitleTemp(perguntaMinDocente.pergunta.getPergunta(),perguntaMinDocente.nomeUnidade,pathExtremePerguntaMinDocente); |
||
617 | |||
618 | docenteReport.extremePerguntaAbsolutaAvgMaxDocente = chartPerguntaMaxDocenteChart; |
||
619 | docenteReport.extremePerguntaAbsolutaAvgMinDocente = chartPerguntaMinDocenteChart; |
||
620 | } |
||
621 | if(perguntaMaxUnidade != null) |
||
622 | { |
||
623 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxUnidade = ChartBuilderUtil.createChartRingOneDimension(perguntaMaxUnidade.pergunta.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaMaxUnidade"); |
||
624 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinUnidade = ChartBuilderUtil.createChartRingOneDimension(perguntaMinUnidade.pergunta.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaMinUnidade"); |
||
625 | ChartWithTitleTemp chartPerguntaMaxUnidade = new ChartWithTitleTemp(perguntaMaxUnidade.pergunta.getPergunta(),perguntaMaxUnidade.nomeUnidade,pathExtremePerguntaMaxUnidade); |
||
626 | ChartWithTitleTemp chartPerguntaMinUnidade = new ChartWithTitleTemp(perguntaMinUnidade.pergunta.getPergunta(),perguntaMinUnidade.nomeUnidade,pathExtremePerguntaMinUnidade); |
||
627 | |||
628 | docenteReport.extremePerguntaAbsolutaAvgMaxUnidade = chartPerguntaMaxUnidade; |
||
629 | docenteReport.extremePerguntaAbsolutaAvgMinUnidade = chartPerguntaMinUnidade; |
||
630 | } |
||
631 | } |
||
632 | catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
633 | { |
||
634 | logger.error(e,e); |
||
635 | } |
||
636 | } |
||
637 | |||
638 | { |
||
639 | PerguntaStats perguntaAgregadaMaxDocente = docenteReport.extremeDocentePerguntaAgregadasMax(); |
||
640 | PerguntaStats perguntaAgregadaMinDocente = docenteReport.extremeDocentePerguntaAgregadasMin(); |
||
641 | PerguntaStats perguntaAgregadaMaxUnidade = docenteReport.extremeUnidadePerguntaAgregadaMax(); |
||
642 | PerguntaStats perguntaAgregadaMinUnidade = docenteReport.extremeUnidadePerguntaAgregadaMin(); |
||
643 | |||
644 | try { |
||
645 | if(perguntaAgregadaMaxDocente != null) |
||
646 | { |
||
647 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaAgregadaMaxDocente.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaAgregadaMaxDocente"); |
||
648 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaAgregadaMinDocente.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaAgregadaMinDocente"); |
||
649 | ChartWithTitleTemp chartPerguntaMaxDocente = new ChartWithTitleTemp(perguntaAgregadaMaxDocente.getPergunta(),"",pathExtremePerguntaMaxDocente); |
||
650 | ChartWithTitleTemp chartPerguntaMinDocente = new ChartWithTitleTemp(perguntaAgregadaMinDocente.getPergunta(),"",pathExtremePerguntaMinDocente); |
||
651 | |||
652 | docenteReport.extremePerguntaAgregadaAvgMaxDocente = chartPerguntaMaxDocente; |
||
653 | docenteReport.extremePerguntaAgregadaAvgMinDocente = chartPerguntaMinDocente; |
||
654 | } |
||
655 | if(perguntaAgregadaMaxUnidade != null) |
||
656 | { |
||
657 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxUnidade = ChartBuilderUtil.createChartRingOneDimension(perguntaAgregadaMaxUnidade.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaAgregadaMaxUnidade"); |
||
658 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinUnidade = ChartBuilderUtil.createChartRingOneDimension(perguntaAgregadaMinUnidade.getMediaEntidadeEmAvaliacao(),5,true,true,false,"extremePerguntaAgregadaMinUnidade"); |
||
659 | ChartWithTitleTemp chartPerguntaMaxUnidade = new ChartWithTitleTemp(perguntaAgregadaMaxUnidade.getPergunta(),"",pathExtremePerguntaMaxUnidade); |
||
660 | ChartWithTitleTemp chartPerguntaMinUnidade = new ChartWithTitleTemp(perguntaAgregadaMinUnidade.getPergunta(),"",pathExtremePerguntaMinUnidade); |
||
661 | |||
662 | docenteReport.extremePerguntaAgregadaAvgMaxUnidade = chartPerguntaMaxUnidade; |
||
663 | docenteReport.extremePerguntaAgregadaAvgMinUnidade = chartPerguntaMinUnidade; |
||
664 | } |
||
665 | |||
666 | } |
||
667 | catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
668 | { |
||
669 | logger.error(e,e); |
||
670 | } |
||
671 | } |
||
672 | |||
673 | { |
||
674 | UnidadeStats unidadeMaxDocente = docenteReport.extremeDocenteUnidadeMax(); |
||
675 | UnidadeStats unidadeMinDocente = docenteReport.extremeDocenteUnidadeMin(); |
||
676 | UnidadeStats unidadeMaxUnidade = docenteReport.extremeUnidadeUnidadeMax(); |
||
677 | UnidadeStats unidadeMinUnidade = docenteReport.extremeUnidadeUnidadeMin(); |
||
678 | |||
679 | try { |
||
680 | if(unidadeMaxDocente != null) |
||
681 | { |
||
682 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxDocente = ChartBuilderUtil.createChartRingOneDimension(unidadeMaxDocente.getUnidadeStatsGrupoDocente().getMediasGrupo().getAvaliacaoMedia(),5,true,true,false,"extremeUnidadeMaxDocente"); |
||
683 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinDocente = ChartBuilderUtil.createChartRingOneDimension(unidadeMinDocente.getUnidadeStatsGrupoDocente().getMediasGrupo().getAvaliacaoMedia(),5,true,true,false,"extremeUnidadeMinDocente"); |
||
684 | ChartWithTitleTemp chartPerguntaMaxDocente = new ChartWithTitleTemp(unidadeMaxDocente.getNomeUnidade(),"",pathExtremePerguntaMaxDocente); |
||
685 | ChartWithTitleTemp chartPerguntaMinDocente = new ChartWithTitleTemp(unidadeMinDocente.getNomeUnidade(),"",pathExtremePerguntaMinDocente); |
||
686 | |||
687 | docenteReport.extremeUnitAvgMaxDocente = chartPerguntaMaxDocente; |
||
688 | docenteReport.extremeUnitAvgMinDocente = chartPerguntaMinDocente; |
||
689 | } |
||
690 | if(unidadeMaxUnidade != null) |
||
691 | { |
||
692 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxUnidade = ChartBuilderUtil.createChartRingOneDimension(unidadeMaxUnidade.getUnidadeStatsGrupoUnidade().getMediasGrupo().getAvaliacaoMedia(),5,true,true,false,"extremeUnidadeMaxUnidade"); |
||
693 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinUnidade = ChartBuilderUtil.createChartRingOneDimension(unidadeMinUnidade.getUnidadeStatsGrupoUnidade().getMediasGrupo().getAvaliacaoMedia(),5,true,true,false,"extremeUnidadeMinUnidade"); |
||
694 | ChartWithTitleTemp chartPerguntaMaxUnidade = new ChartWithTitleTemp(unidadeMaxUnidade.getNomeUnidade(),"",pathExtremePerguntaMaxUnidade); |
||
695 | ChartWithTitleTemp chartPerguntaMinUnidade = new ChartWithTitleTemp(unidadeMinUnidade.getNomeUnidade(),"",pathExtremePerguntaMinUnidade); |
||
696 | |||
697 | docenteReport.extremeUnitAvgMaxUnidade = chartPerguntaMaxUnidade; |
||
698 | docenteReport.extremeUnitAvgMinUnidade = chartPerguntaMinUnidade; |
||
699 | } |
||
700 | } |
||
701 | catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
702 | { |
||
703 | logger.error(e,e); |
||
704 | } |
||
705 | } |
||
706 | |||
707 | { |
||
708 | DocenteReport.PerguntaUnidadeStatAux perguntaDiffMaxDocente = docenteReport.extremeDiffMediaPerguntaMaxDocente(); |
||
709 | DocenteReport.PerguntaUnidadeStatAux perguntaDiffMinDocente = docenteReport.extremeDiffMediaPerguntaMinDocente(); |
||
710 | DocenteReport.PerguntaUnidadeStatAux perguntaDiffMaxUnidade = docenteReport.extremeDiffMediaPerguntaMaxUnidade(); |
||
711 | DocenteReport.PerguntaUnidadeStatAux perguntaDiffMinUnidade = docenteReport.extremeDiffMediaPerguntaMinUnidade(); |
||
712 | |||
713 | try { |
||
714 | if(perguntaDiffMaxDocente != null) |
||
715 | { |
||
716 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxDocente = ChartBuilderUtil.createBarChartTwoBars("Docente","Curso",ChartBuilderUtil.COLOR_SECTION_BLUE_DARK,ChartBuilderUtil.COLOR_SECTION_GREEN, perguntaDiffMaxDocente.pergunta.getMediaEntidadeEmAvaliacao(),perguntaDiffMaxDocente.pergunta.getMediaCursos(),5,"extremeDiffMaxDocente"); |
||
717 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinDocente = ChartBuilderUtil.createBarChartTwoBars("Docente", "Curso", ChartBuilderUtil.COLOR_SECTION_BLUE_DARK, ChartBuilderUtil.COLOR_SECTION_GREEN, perguntaDiffMinDocente.pergunta.getMediaEntidadeEmAvaliacao(), perguntaDiffMinDocente.pergunta.getMediaCursos(), 5, "extremeDiffMinDocente"); |
||
718 | ChartWithTitleTemp chartPerguntaMaxDocente = new ChartWithTitleTemp(perguntaDiffMaxDocente.pergunta.getPergunta() + " ( " + perguntaDiffMaxDocente.pergunta.getDiffMediaCursoPrint() + ")",perguntaDiffMaxDocente.nomeUnidade,pathExtremePerguntaMaxDocente); |
||
719 | ChartWithTitleTemp chartPerguntaMinDocente = new ChartWithTitleTemp(perguntaDiffMinDocente.pergunta.getPergunta() + " ( " + perguntaDiffMinDocente.pergunta.getDiffMediaCursoPrint() + ")",perguntaDiffMinDocente.nomeUnidade,pathExtremePerguntaMinDocente); |
||
720 | |||
721 | docenteReport.extremePerguntaAbsolutaDiffAvgMaxDocente = chartPerguntaMaxDocente; |
||
722 | docenteReport.extremePerguntaAbsolutaDiffAvgMinDocente = chartPerguntaMinDocente; |
||
723 | } |
||
724 | if(perguntaDiffMaxUnidade != null) |
||
725 | { |
||
726 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxUnidade = ChartBuilderUtil.createBarChartTwoBars("Docente", "Curso", ChartBuilderUtil.COLOR_SECTION_BLUE_DARK, ChartBuilderUtil.COLOR_SECTION_GREEN, perguntaDiffMaxUnidade.pergunta.getMediaEntidadeEmAvaliacao(), perguntaDiffMaxUnidade.pergunta.getMediaCursos(), 5, "extremeDiffMaxUnidade"); |
||
727 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinUnidade = ChartBuilderUtil.createBarChartTwoBars("Docente", "Curso", ChartBuilderUtil.COLOR_SECTION_BLUE_DARK, ChartBuilderUtil.COLOR_SECTION_GREEN, perguntaDiffMinUnidade.pergunta.getMediaEntidadeEmAvaliacao(), perguntaDiffMinUnidade.pergunta.getMediaCursos(), 5, "extremeDiffMinUnidade"); |
||
728 | ChartWithTitleTemp chartPerguntaMaxUnidade = new ChartWithTitleTemp(perguntaDiffMaxUnidade.pergunta.getPergunta() + " ( " + perguntaDiffMaxUnidade.pergunta.getDiffMediaCursoPrint() + ")",perguntaDiffMaxUnidade.nomeUnidade,pathExtremePerguntaMaxUnidade); |
||
729 | ChartWithTitleTemp chartPerguntaMinUnidade = new ChartWithTitleTemp(perguntaDiffMinUnidade.pergunta.getPergunta() + " ( " + perguntaDiffMinUnidade.pergunta.getDiffMediaCursoPrint() + ")",perguntaDiffMinUnidade.nomeUnidade,pathExtremePerguntaMinUnidade); |
||
730 | |||
731 | docenteReport.extremePerguntaAbsolutaDiffAvgMaxUnidade = chartPerguntaMaxUnidade; |
||
732 | docenteReport.extremePerguntaAbsolutaDiffAvgMinUnidade = chartPerguntaMinUnidade; |
||
733 | } |
||
734 | |||
735 | } |
||
736 | catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
737 | { |
||
738 | logger.error(e,e); |
||
739 | } |
||
740 | } |
||
741 | |||
742 | |||
743 | { |
||
744 | QuestionariosAlunosReport.ParticipacaoUnidade perguntaDiffMax = docenteReport.extremeParticipacaoUnidadeMax(); |
||
745 | QuestionariosAlunosReport.ParticipacaoUnidade perguntaDiffMin = docenteReport.extremeParticipacaoUnidadeMin(); |
||
746 | |||
747 | try { |
||
748 | if(perguntaDiffMax != null) |
||
749 | { |
||
750 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMaxDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaDiffMax.getParticiparam(),perguntaDiffMax.getInscritos(),true,true,false,"extremeParticipacaoMax"); |
||
751 | 1.5.0/docs/api/java/lang/String.html">String pathExtremePerguntaMinDocente = ChartBuilderUtil.createChartRingOneDimension(perguntaDiffMin.getParticiparam(),perguntaDiffMin.getInscritos(),true,true,false,"extremeParticipacaoMin"); |
||
752 | |||
753 | ChartWithTitleTemp chartPerguntaMaxDocente = new ChartWithTitleTemp(perguntaDiffMax.getNomeUnidade() + " (inscritos: " + perguntaDiffMax.getInscritos() + ")","",pathExtremePerguntaMaxDocente); |
||
754 | ChartWithTitleTemp chartPerguntaMinDocente = new ChartWithTitleTemp(perguntaDiffMin.getNomeUnidade() + " (inscritos: " + perguntaDiffMin.getInscritos() + ")","",pathExtremePerguntaMinDocente); |
||
755 | |||
756 | docenteReport.extremeParticipacaoMax = chartPerguntaMaxDocente; |
||
757 | docenteReport.extremeParticipacaoMin = chartPerguntaMinDocente; |
||
758 | } |
||
759 | } |
||
760 | catch (1.5.0/docs/api/java/io/IOException.html">IOException e) |
||
761 | { |
||
762 | logger.error(e,e); |
||
763 | } |
||
764 | } |
||
765 | |||
766 | |||
767 | |||
768 | |||
769 | } |
||
770 | |||
771 | |||
772 | /** |
||
773 | * |
||
774 | * GET PARAMETERS |
||
775 | * FILE_GROUP_ID |
||
776 | * LOAD FILE GROUP GET ANO, PERIODOS, DEGREES |
||
777 | * GET ALL DOCENTES |
||
778 | * GENERATE REPORT |
||
779 | * UPLOAD FILE REPOSITORY WITH PERMISSIONS |
||
780 | * QUESTIONARIOS_FILE_GROUP_DOCENTE_REPORT |
||
781 | * DELETE TMP |
||
782 | * GENERATE CSV FILE |
||
783 | * PUT STREAM IN FILE GROUP |
||
784 | * QUESTIONARIOS_FILE_GROUP_DOCENTE_ALL |
||
785 | * CREATE ZIP WITH ALL REPORTS PUT IN FILE GROUP |
||
786 | * DELETE TMP |
||
787 | * PUT STREAM IN FILE GROUP |
||
788 | * QUESTIONARIOS_FILE_GROUP_DOCENTE_ALL |
||
789 | * DELETE TMP |
||
790 | * |
||
791 | * @return |
||
792 | * @throws Throwable |
||
793 | */ |
||
794 | @1.5.0/docs/api/java/lang/Override.html">Override |
||
795 | protected ILogMessages runJobServiceTask() throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable |
||
796 | { |
||
797 | long questionarioReportId = 1.5.0/docs/api/java/lang/Long.html">Long.parseLong(getParametersMap().get(ServiceJob.JOB_questionario_report_id_KEY).getObject()); |
||
798 | DefaultLogMessages logMessages = new DefaultLogMessages(); |
||
799 | |||
800 | int docentesEncontrados = 0; |
||
801 | int docentesProcessados = 0; |
||
802 | int docentesFalhados = 0; |
||
803 | |||
804 | serviceLogInfo("######################################"); |
||
805 | serviceLogInfo("######################################"); |
||
806 | serviceLogInfo("#Docentes Encontrados:" + docentesEncontrados); |
||
807 | serviceLogInfo("#Docentes Processados:" + docentesProcessados); |
||
808 | serviceLogInfo("#Docentes Falhados:" + docentesFalhados); |
||
809 | |||
810 | logger.info("######################################"); |
||
811 | logger.info("######################################"); |
||
812 | logger.info("#Docentes Encontrados:" + docentesEncontrados); |
||
813 | logger.info("#Docentes Processados:" + docentesProcessados); |
||
814 | logger.info("#Docentes Falhados:" + docentesFalhados); |
||
815 | return logMessages; |
||
816 | } |
||
817 | } |