Commit 08a48e03173fb9418c4267449472ad93d7656b1a
1 parent
34194100
Exists in
master
Funcionalidades para gerar relatório (incompleto).
Showing
8 changed files
with
784 additions
and
266 deletions
Show diff stats
... | ... | @@ -0,0 +1,252 @@ |
1 | +<%@page contentType="text/html" pageEncoding="UTF-8"%> | |
2 | +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | |
3 | +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> | |
4 | +<!DOCTYPE html> | |
5 | +<html lang=pt-br> | |
6 | + | |
7 | +<head> | |
8 | +<title>Relatório Circunstanciado de Acessibilidade Digital</title> | |
9 | +</head> | |
10 | +<body> | |
11 | + <div> | |
12 | + <div id="center"> | |
13 | + <h1 style='font-size: 0.9em'> | |
14 | + RELATÓRIO CIRCUNSTANCIADO DE ACESSIBILIDADE DIGITAL (Art. 120 da Lei | |
15 | + nº 13.146/2015)<br> MINISTÉRIO DO PLANEJAMENTO, DESENVOLVIMENTO | |
16 | + E GESTÃO - MP<br> EXERCÍCIO DE 2016 | |
17 | + </h1> | |
18 | + </div> | |
19 | +</div> | |
20 | + <div> | |
21 | + <br> <label style='display: block;'><strong>Data: ${dataRespostaQuestionario } | |
22 | + </strong> </label> | |
23 | + <br> | |
24 | + | |
25 | + <fieldset> | |
26 | + <legend style='font-size: 1.2em'>Dados Institucionaais </legend> | |
27 | + <label style='display: block;'><strong>Nome do Órgão: </strong>${questionario.noOrgao }</label> <br> | |
28 | + <label style='display: block;'><strong>Nome | |
29 | + Completo: </strong> ${nomePessoa } </label><br> | |
30 | + <label style='display: block;'><strong>Cargo | |
31 | + que Ocupa: </strong> ${cargo } </label><br> | |
32 | + <label style='display: block;'><strong>Telefone | |
33 | + (com DDD):</strong> ${telefone }</label> <br> | |
34 | + <label><strong>E-mail:</strong> ${email }</label> <br> | |
35 | + </fieldset> | |
36 | + <br> | |
37 | + | |
38 | + <fieldset> | |
39 | + <legend style='font-size: 1.2em'>Dados Acessibilidade</legend> | |
40 | + <label style='display: block;'><strong>1) O Órgão | |
41 | + tem conhecimento da legislação que envolve o tema 'acessibilidade' | |
42 | + bem como suas implicações?</strong></label><p> Resposta: ${perguntaAcessibilidade } | |
43 | + </p><label style='display: block;'><strong>2) | |
44 | + O Órgão já recebeu, formal ou informalmente, reclamações sobre | |
45 | + acessibilidade em seus ambientes digitais?</strong></label> | |
46 | + <p> Resposta: ${reclamacao } | |
47 | + </p> | |
48 | + <label | |
49 | + style='display: block;'><strong>3) Com relação a | |
50 | + pergunta anterior, caso tenha respondido 'Sim', mencione abaixo | |
51 | + quando e por quem houve a reclamação e qual foi a reclamação:</strong></label> | |
52 | + <p> Resposta: ${espacoReclamacao }</p> | |
53 | + | |
54 | + <label style='display: block;'><strong>4) O Órgão | |
55 | + tem estimulado seus servidores e parceiros a realizarem | |
56 | + capacitações sobre acessibilidade em ambientes digitais?</strong></label> | |
57 | +<p> Resposta: ${perguntaEstimulo }</p> | |
58 | + <label style='display: block;'><strong>5) Com | |
59 | + relação a pergunta anterior, caso tenha respondido 'Sim', mencione | |
60 | + abaixo os tipos de cursos estimulados pelo órgão:</strong></label> | |
61 | +<p> Resposta: <br> | |
62 | + <c:if test="${not empty curso}"> | |
63 | + <ul> | |
64 | + <c:forEach items="${curso}" var="varCurso"> | |
65 | + | |
66 | + <li> | |
67 | + ${varCurso} | |
68 | + </li> | |
69 | + | |
70 | + </c:forEach> | |
71 | + </ul> | |
72 | + </c:if> | |
73 | + | |
74 | +</p> | |
75 | + <label | |
76 | + style='display: block;'><strong>6) O Órgão observa | |
77 | + em seu processo de desenvolvimento de sítios, portais e serviços | |
78 | + eletrônicos os requisitos de acessibilidade?</strong></label> | |
79 | +<p> Resposta: ${requisito }</p> | |
80 | + <label | |
81 | + style='display: block;'><strong>7) Com relação à | |
82 | + pergunta anterior, caso tenha respondido 'Sim, observamos os | |
83 | + requisitos de outros modelos que não os especificados acima', | |
84 | + então mencione abaixo estes modelos:</strong></label> | |
85 | +<p> Resposta: ${justificativaRequisito }</p> | |
86 | + <label | |
87 | + style='display: block;'><strong>8) Nas | |
88 | + contratações de fábrica de software e/ou parcerias firmadas para o | |
89 | + desenvolvimento de ambientes digitais há citação explícita sobre | |
90 | + os requisitos de acessibilidade assim como as sanções para a sua | |
91 | + não obediência? </strong></label> | |
92 | +<p> Resposta: ${opcaoContrat }</p> | |
93 | +<label style='display: block;'><strong>9) | |
94 | + O Órgão realiza validações de acessibilidade em seus ambientes | |
95 | + digitais?</strong></label> | |
96 | +<p> Resposta: ${perguntaValidacao }</p> | |
97 | + <label style='display: block;'><strong>10) | |
98 | + Com relação a pergunta anterior, no caso de 'Sim', mencione abaixo | |
99 | + as validações realizadas:</strong></label> | |
100 | +<p> Resposta: <br> | |
101 | + <c:if test="${not empty simValidacao}"> | |
102 | + <ul> | |
103 | + <c:forEach items="${simValidacao}" var="varSimValidacao"> | |
104 | + | |
105 | + <li> | |
106 | + ${varSimValidacao} | |
107 | + </li> | |
108 | + | |
109 | + </c:forEach> | |
110 | + </ul> | |
111 | + </c:if> | |
112 | + | |
113 | +</p> | |
114 | + <label style='display: block;'><strong>11) | |
115 | + Quais ferramentas são utilizadas no processo de validação de | |
116 | + acessibilidade em seus ambientes digitais?</strong></label> | |
117 | +<p> Resposta: <br> | |
118 | + <c:if test="${not empty ferramentaValidacao}"> | |
119 | + <ul> | |
120 | + <c:forEach items="${ferramentaValidacao}" var="varFerramentaValidacao"> | |
121 | + | |
122 | + <li> | |
123 | + ${varFerramentaValidacao} | |
124 | + </li> | |
125 | + | |
126 | + </c:forEach> | |
127 | + </ul> | |
128 | + </c:if> | |
129 | + | |
130 | +</p> | |
131 | +<label style='display: block;'><strong>12) Com relação à | |
132 | + pergunta anterior, caso tenha respondido 'Outros', mencione abaixo | |
133 | + quais são estas ferramentas:</strong></label> | |
134 | +<p> Resposta: ${outroAvaliador }</p> | |
135 | +<label | |
136 | + style='display: block;'><strong>13) Para cada | |
137 | + ambiente e página informada no formulário anterior, informe a nota | |
138 | + ASESWEB em porcentagem (%) e a nota ACCESSMONITOR (WCAG 2.0):</strong></label> | |
139 | + | |
140 | +<p> Resposta: <br> | |
141 | + <c:if test="${not empty lsAmostragemSiteQuestionario}"> | |
142 | + | |
143 | + <c:set var="urlAdicionada" scope="session" value="url" /> | |
144 | + | |
145 | + <c:forEach items="${lsAmostragemSiteQuestionario}" var="amostragemSiteQuestionario"> | |
146 | + | |
147 | + <c:if test="${urlAdicionada != amostragemSiteQuestionario.urlAmostraSiteQuestionario}"> | |
148 | + <p> | |
149 | + URL: ${amostragemSiteQuestionario.urlAmostraSiteQuestionario} | |
150 | + </p> | |
151 | + </c:if> | |
152 | + <c:set var="urlAdicionada" scope="session" value="${amostragemSiteQuestionario.urlAmostraSiteQuestionario}" /> | |
153 | + | |
154 | + <c:if test="${amostragemSiteQuestionario.opcaoResposta.idOpcaoResposta == '63'}"> | |
155 | + <p> | |
156 | + Nota Ases: ${amostragemSiteQuestionario.valorNota} | |
157 | + </p> | |
158 | + </c:if> | |
159 | + | |
160 | + <c:if test="${amostragemSiteQuestionario.opcaoResposta.idOpcaoResposta == '64'}"> | |
161 | + <p> | |
162 | + Nota Access Monitor: ${amostragemSiteQuestionario.valorNota} | |
163 | + </p> | |
164 | + </c:if> | |
165 | + </c:forEach> | |
166 | + | |
167 | + </c:if> | |
168 | + | |
169 | +</p> | |
170 | + <label style='display: block;'><strong>14) Em caso | |
171 | + de utilização de ferramentas automáticas para verificação de | |
172 | + acessibilidade com base no WCAG e/ou eMAG e considerando os níveis | |
173 | + de conformidade do WCAG (A - nível 1 A, AA - nível 2 A, AAA - | |
174 | + nível 3 A), bem como a relação existente dessas conformidades no | |
175 | + eMAG (Anexo A - Mapeamento do WCAG com o eMAG), em qual nível de | |
176 | + conformidade a sua instituição se enquadra?</strong></label> | |
177 | +<p> Resposta: ${nivelWcag }</p> | |
178 | + <label | |
179 | + style='display: block;'><strong>15) Quanto aos | |
180 | + itens de acessibilidade que não podem ser verificados por máquina, | |
181 | + como o atendimento, quanto às normas de acessibilidade, é | |
182 | + validado?</strong></label> | |
183 | +<p> Resposta: ${checklistQtnList }</p> | |
184 | + | |
185 | +<label style='display: block;'><strong>16) | |
186 | + Caso o órgão realize validações através de pessoas com | |
187 | + deficiência, selecione abaixo quais deficiências são utilizadas | |
188 | + para validações:</strong></label> | |
189 | + | |
190 | + | |
191 | +<p> Resposta: <br> | |
192 | + <c:if test="${not empty deficiencias}"> | |
193 | + <ul> | |
194 | + <c:forEach items="${deficiencias}" var="varDeficiencias"> | |
195 | + | |
196 | + <li> | |
197 | + ${varDeficiencias} | |
198 | + </li> | |
199 | + | |
200 | + </c:forEach> | |
201 | + </ul> | |
202 | + </c:if> | |
203 | + | |
204 | +</p> | |
205 | + | |
206 | + <label style='display: block;'><strong>17) | |
207 | + O Órgão mantém em seus ambientes funcionalidade para descrever os | |
208 | + recursos de acessibilidade existentes?</strong></label> | |
209 | + | |
210 | +<p> Resposta: ${funcionalidade }</p> | |
211 | + | |
212 | + <label | |
213 | + style='display: block;'><strong>18) Dentre as | |
214 | + tecnologias assistivas baseadas em softwares, marque qual delas o | |
215 | + órgão indica ou implementa em seus ambientes digitais: </strong></label> | |
216 | + | |
217 | +<p> Resposta: <br> | |
218 | + <c:if test="${not empty assistiva}"> | |
219 | + <ul> | |
220 | + <c:forEach items="${assistiva}" var="varAssistiva"> | |
221 | + | |
222 | + <li> | |
223 | + ${varAssistiva} | |
224 | + </li> | |
225 | + | |
226 | + </c:forEach> | |
227 | + </ul> | |
228 | + </c:if> | |
229 | + | |
230 | +</p> | |
231 | + | |
232 | + <label style='display: block;'><strong>19) Com | |
233 | + relação à pergunta anterior, caso tenha respondido 'Outro(s)' | |
234 | + mencione abaixo quais são estas tecnologias:</strong></label> | |
235 | + | |
236 | +<p> Resposta: ${justificativaAssistiva }</p> | |
237 | + | |
238 | + | |
239 | +<label | |
240 | + style='display: block;'><strong>20) Mencione | |
241 | + abaixo as dificuldades para o atendimento do prazo previsto na | |
242 | + legislação para o estabelecimento da acessibilidade digital, caso | |
243 | + o órgao esteja enfrentando estas dificuldades:</strong></label> | |
244 | + | |
245 | +<p> Resposta: ${dificuldadePrazo }</p> | |
246 | + | |
247 | + </fieldset> | |
248 | + | |
249 | + | |
250 | + </div> | |
251 | +</body> | |
252 | +</html> | |
0 | 253 | \ No newline at end of file | ... | ... |
src/br/com/controller/indexController.java
... | ... | @@ -394,132 +394,132 @@ public class indexController { |
394 | 394 | |
395 | 395 | if (lsAmostragemSiteQuestionario.size() > 0) { |
396 | 396 | result.include("lsAmostragemSiteQuestionario", lsAmostragemSiteQuestionario); |
397 | - } | |
398 | 397 | |
399 | - // Fim cria lista das amostragens | |
400 | - | |
401 | - if (questionario.getDtInicioQuestionario() != null) { | |
402 | - | |
403 | - | |
404 | - List<RespostaQuestionario> lsRespostaQuestionario = new ArrayList<RespostaQuestionario>(); | |
405 | - | |
406 | - lsRespostaQuestionario = | |
407 | - respostaQuestionarioDao.retornarRespostaQuestionarioPorQuestionario(questionario | |
408 | - .getIdQuestionario()); | |
409 | - List<Integer> curso = new ArrayList<Integer>(); | |
410 | - List<Integer> simValidacao = new ArrayList<Integer>(); | |
411 | - List<Integer> assistiva = new ArrayList<Integer>(); | |
412 | - List<Integer> deficiencias = new ArrayList<Integer>(); | |
413 | - List<Integer> ferramentaValidacao = new ArrayList<Integer>(); | |
414 | - | |
415 | - for (RespostaQuestionario respostaQuestionario : lsRespostaQuestionario) { | |
416 | - | |
417 | - switch (respostaQuestionario.getPergunta().getIdPergunta()) { | |
418 | - case 1: | |
419 | - result.include("nomeOrgao", respostaQuestionario.getTextoResposta()); | |
420 | - break; | |
421 | - case 2: | |
422 | - result.include("nomePessoa", respostaQuestionario.getTextoResposta()); | |
423 | - break; | |
424 | - case 3: | |
425 | - result.include("cargo", respostaQuestionario.getTextoResposta()); | |
426 | - break; | |
427 | - case 4: | |
428 | - result.include("telefone", respostaQuestionario.getTextoResposta()); | |
429 | - break; | |
430 | - case 5: | |
431 | - result.include("email", respostaQuestionario.getTextoResposta()); | |
432 | - break; | |
433 | - case 7: | |
434 | - result.include("perguntaAcessibilidade", respostaQuestionario.getOpcaoResposta() | |
435 | - .getIdOpcaoResposta()); | |
436 | - break; | |
437 | - case 8: | |
438 | - result.include("reclamacao", respostaQuestionario.getOpcaoResposta() | |
439 | - .getIdOpcaoResposta()); | |
440 | - break; | |
441 | - case 9: | |
442 | - result.include("espacoReclamacao", respostaQuestionario.getTextoResposta()); | |
443 | - break; | |
444 | - case 10: | |
445 | - result.include("perguntaEstimulo", respostaQuestionario.getOpcaoResposta() | |
446 | - .getIdOpcaoResposta()); | |
447 | - break; | |
448 | - case 11: | |
449 | - curso.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
450 | - break; | |
451 | - case 12: | |
452 | - result.include("requisito", respostaQuestionario.getOpcaoResposta() | |
453 | - .getIdOpcaoResposta()); | |
454 | - break; | |
455 | - case 13: | |
456 | - result.include("justificativaRequisito", respostaQuestionario.getTextoResposta()); | |
457 | - break; | |
458 | - case 14: | |
459 | - result.include("opcaoContrat", respostaQuestionario.getOpcaoResposta() | |
460 | - .getIdOpcaoResposta()); | |
461 | - break; | |
462 | - case 15: | |
463 | - result.include("perguntaValidacao", respostaQuestionario.getOpcaoResposta() | |
464 | - .getIdOpcaoResposta()); | |
465 | - break; | |
466 | - case 16: | |
467 | - simValidacao.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
468 | - break; | |
469 | - case 17: | |
470 | - ferramentaValidacao.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
471 | - break; | |
472 | - case 18: | |
473 | - result.include("outroAvaliador", respostaQuestionario.getTextoResposta()); | |
474 | - break; | |
475 | - case 19: | |
476 | - result.include(respostaQuestionario.getAmostragemSiteQuestionario().getNomeCampo(), | |
477 | - respostaQuestionario.getTextoResposta()); | |
478 | - break; | |
479 | - case 20: | |
480 | - result.include("nivelWcag", respostaQuestionario.getOpcaoResposta() | |
481 | - .getIdOpcaoResposta()); | |
482 | - break; | |
483 | - case 21: | |
484 | - result.include("checklistQtnList", respostaQuestionario.getOpcaoResposta() | |
485 | - .getIdOpcaoResposta()); | |
486 | - break; | |
487 | - case 22: | |
488 | - deficiencias.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
489 | - break; | |
490 | - case 23: | |
491 | - result.include("funcionalidade", respostaQuestionario.getOpcaoResposta() | |
492 | - .getIdOpcaoResposta()); | |
493 | - break; | |
494 | - case 24: | |
495 | - assistiva.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
496 | - break; | |
497 | - case 25: | |
498 | - result.include("justificativaAssistiva", respostaQuestionario.getTextoResposta()); | |
499 | - break; | |
500 | - case 26: | |
501 | - result.include("dificuldadePrazo", respostaQuestionario.getTextoResposta()); | |
502 | - break; | |
503 | - default: | |
504 | - break; | |
505 | - } | |
398 | + // Fim cria lista das amostragens | |
399 | + | |
400 | + if (questionario.getDtInicioQuestionario() != null) { | |
401 | + | |
402 | + | |
403 | + List<RespostaQuestionario> lsRespostaQuestionario = new ArrayList<RespostaQuestionario>(); | |
404 | + | |
405 | + lsRespostaQuestionario = | |
406 | + respostaQuestionarioDao.retornarRespostaQuestionarioPorQuestionario(questionario | |
407 | + .getIdQuestionario()); | |
408 | + List<Integer> curso = new ArrayList<Integer>(); | |
409 | + List<Integer> simValidacao = new ArrayList<Integer>(); | |
410 | + List<Integer> assistiva = new ArrayList<Integer>(); | |
411 | + List<Integer> deficiencias = new ArrayList<Integer>(); | |
412 | + List<Integer> ferramentaValidacao = new ArrayList<Integer>(); | |
413 | + | |
414 | + for (RespostaQuestionario respostaQuestionario : lsRespostaQuestionario) { | |
415 | + | |
416 | + switch (respostaQuestionario.getPergunta().getIdPergunta()) { | |
417 | + case 1: | |
418 | + result.include("nomeOrgao", respostaQuestionario.getTextoResposta()); | |
419 | + break; | |
420 | + case 2: | |
421 | + result.include("nomePessoa", respostaQuestionario.getTextoResposta()); | |
422 | + break; | |
423 | + case 3: | |
424 | + result.include("cargo", respostaQuestionario.getTextoResposta()); | |
425 | + break; | |
426 | + case 4: | |
427 | + result.include("telefone", respostaQuestionario.getTextoResposta()); | |
428 | + break; | |
429 | + case 5: | |
430 | + result.include("email", respostaQuestionario.getTextoResposta()); | |
431 | + break; | |
432 | + case 7: | |
433 | + result.include("perguntaAcessibilidade", respostaQuestionario.getOpcaoResposta() | |
434 | + .getIdOpcaoResposta()); | |
435 | + break; | |
436 | + case 8: | |
437 | + result.include("reclamacao", respostaQuestionario.getOpcaoResposta() | |
438 | + .getIdOpcaoResposta()); | |
439 | + break; | |
440 | + case 9: | |
441 | + result.include("espacoReclamacao", respostaQuestionario.getTextoResposta()); | |
442 | + break; | |
443 | + case 10: | |
444 | + result.include("perguntaEstimulo", respostaQuestionario.getOpcaoResposta() | |
445 | + .getIdOpcaoResposta()); | |
446 | + break; | |
447 | + case 11: | |
448 | + curso.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
449 | + break; | |
450 | + case 12: | |
451 | + result.include("requisito", respostaQuestionario.getOpcaoResposta() | |
452 | + .getIdOpcaoResposta()); | |
453 | + break; | |
454 | + case 13: | |
455 | + result.include("justificativaRequisito", respostaQuestionario.getTextoResposta()); | |
456 | + break; | |
457 | + case 14: | |
458 | + result.include("opcaoContrat", respostaQuestionario.getOpcaoResposta() | |
459 | + .getIdOpcaoResposta()); | |
460 | + break; | |
461 | + case 15: | |
462 | + result.include("perguntaValidacao", respostaQuestionario.getOpcaoResposta() | |
463 | + .getIdOpcaoResposta()); | |
464 | + break; | |
465 | + case 16: | |
466 | + simValidacao.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
467 | + break; | |
468 | + case 17: | |
469 | + ferramentaValidacao.add(respostaQuestionario.getOpcaoResposta() | |
470 | + .getIdOpcaoResposta()); | |
471 | + break; | |
472 | + case 18: | |
473 | + result.include("outroAvaliador", respostaQuestionario.getTextoResposta()); | |
474 | + break; | |
475 | + /*case 19: | |
476 | + result.include(respostaQuestionario.getAmostragemSiteQuestionario().getNomeCampo(), | |
477 | + respostaQuestionario.getTextoResposta()); | |
478 | + break;*/ | |
479 | + case 20: | |
480 | + result.include("nivelWcag", respostaQuestionario.getOpcaoResposta() | |
481 | + .getIdOpcaoResposta()); | |
482 | + break; | |
483 | + case 21: | |
484 | + result.include("checklistQtnList", respostaQuestionario.getOpcaoResposta() | |
485 | + .getIdOpcaoResposta()); | |
486 | + break; | |
487 | + case 22: | |
488 | + deficiencias.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
489 | + break; | |
490 | + case 23: | |
491 | + result.include("funcionalidade", respostaQuestionario.getOpcaoResposta() | |
492 | + .getIdOpcaoResposta()); | |
493 | + break; | |
494 | + case 24: | |
495 | + assistiva.add(respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta()); | |
496 | + break; | |
497 | + case 25: | |
498 | + result.include("justificativaAssistiva", respostaQuestionario.getTextoResposta()); | |
499 | + break; | |
500 | + case 26: | |
501 | + result.include("dificuldadePrazo", respostaQuestionario.getTextoResposta()); | |
502 | + break; | |
503 | + default: | |
504 | + break; | |
505 | + } | |
506 | 506 | |
507 | 507 | |
508 | - } | |
509 | - result.include("curso", curso); | |
510 | - result.include("simValidacao", simValidacao); | |
511 | - result.include("assistiva", assistiva); | |
512 | - result.include("deficiencias", deficiencias); | |
513 | - result.include("ferramentaValidacao", ferramentaValidacao); | |
514 | - result.include("questionario", questionario); | |
508 | + } | |
509 | + result.include("curso", curso); | |
510 | + result.include("simValidacao", simValidacao); | |
511 | + result.include("assistiva", assistiva); | |
512 | + result.include("deficiencias", deficiencias); | |
513 | + result.include("ferramentaValidacao", ferramentaValidacao); | |
514 | + result.include("questionario", questionario); | |
515 | 515 | |
516 | + } | |
516 | 517 | } |
518 | + | |
517 | 519 | } |
518 | 520 | |
519 | 521 | } |
520 | 522 | |
521 | - | |
522 | - | |
523 | 523 | @Post("/salvar-formulario") |
524 | 524 | public void FormularioControllerSalvar(String hNomePessoa, String nomePessoa, String hCargo, |
525 | 525 | String cargo, String hTelefone, String telefone, String hEmail, String email, |
... | ... | @@ -530,8 +530,8 @@ public class indexController { |
530 | 530 | String justificativaRequisito, String hOpcaoContrat, String opcaoContrat, |
531 | 531 | String hPerguntaValidacao, String perguntaValidacao, String hSimValidacao, |
532 | 532 | String[] simValidacao, String hFerramentaValidacao, String[] ferramentaValidacao, |
533 | - String hOutroAvaliador, String outroAvaliador, String hNivelWcag, String nivelWcag, | |
534 | - String hChecklistQtnList,String checklistQtnList,String hDeficiencias, | |
533 | + String hOutroAvaliador, String outroAvaliador, String hNivelWcag, String nivelWcag, | |
534 | + String hChecklistQtnList, String checklistQtnList, String hDeficiencias, | |
535 | 535 | String[] deficiencias, String hFuncionalidade, String funcionalidade, String hAssistiva, |
536 | 536 | String[] assistiva, String hJustificativaAssistiva, String justificativaAssistiva, |
537 | 537 | String hDificuldadePrazo, String dificuldadePrazo, int idQuestionario, String hAmbiente1, |
... | ... | @@ -581,7 +581,7 @@ public class indexController { |
581 | 581 | formulario.setPerguntaValidacao(perguntaValidacao); |
582 | 582 | formulario.setSimValidacao(simValidacao); |
583 | 583 | formulario.setFerramentaValidacao(ferramentaValidacao); |
584 | - formulario.setOutroAvaliador(outroAvaliador); | |
584 | + formulario.setOutroAvaliador(outroAvaliador); | |
585 | 585 | formulario.setNivelWcag(nivelWcag); |
586 | 586 | formulario.setDeficiencias(deficiencias); |
587 | 587 | formulario.setChecklist(checklistQtnList); | ... | ... |
src/br/com/controller/relatorioController.java
1 | 1 | package br.com.controller; |
2 | 2 | |
3 | +import java.util.ArrayList; | |
4 | +import java.util.List; | |
5 | + | |
3 | 6 | import br.com.caelum.vraptor.Path; |
4 | 7 | import br.com.caelum.vraptor.Resource; |
8 | +import br.com.caelum.vraptor.Result; | |
9 | +import br.com.caelum.vraptor.Validator; | |
10 | +import br.com.caelum.vraptor.validator.ValidationMessage; | |
11 | +import br.com.dao.HashDao; | |
12 | +import br.com.dao.RespostaQuestionarioDao; | |
13 | +import br.com.model.entity.AmostragemSiteQuestionario; | |
14 | +import br.com.model.entity.Questionario; | |
15 | +import br.com.model.entity.RespostaQuestionario; | |
16 | +import br.com.util.Validacao; | |
5 | 17 | |
6 | 18 | @Resource |
7 | 19 | public class relatorioController { |
20 | + | |
21 | + private List<Validacao> mensagemValidacaoCampos = new ArrayList<Validacao>(); | |
22 | + private Result result; | |
23 | + private Validator validator; | |
24 | + private Questionario questionario; | |
25 | + | |
26 | + public relatorioController(Result result, Validator validator) { | |
27 | + this.result = result; | |
28 | + this.validator = validator; | |
29 | + } | |
30 | + | |
31 | + @Path("/relatorio-imprimir") | |
32 | + public void relatorioImprimir() | |
33 | + { | |
34 | + String valorHash = "testeHash"; | |
35 | + Validacao validacao = new Validacao(); | |
36 | + mensagemValidacaoCampos = new ArrayList<Validacao>(); | |
37 | + mensagemValidacaoCampos = validacao.validarHash(valorHash); | |
38 | + | |
39 | + if (mensagemValidacaoCampos.size() > 0) { | |
40 | + result.include("mensagemValidacaoCampos", mensagemValidacaoCampos); | |
41 | + this.validator.add(new ValidationMessage("", "")); | |
42 | + this.validator.onErrorUsePageOf(loginController.class).login(); | |
43 | + } | |
44 | + | |
45 | + HashDao hashDao = new HashDao(); | |
46 | + questionario = new Questionario(); | |
47 | + questionario = hashDao.verificarHash(valorHash); | |
48 | + | |
49 | + if (questionario.getDtInicioQuestionario() != null && !valorHash.equalsIgnoreCase("")) { | |
50 | + gerarRelatorio(questionario.getIdQuestionario()); | |
51 | + } | |
52 | + } | |
53 | + | |
8 | 54 | @Path("/relatorio-site") |
9 | - public void relatorio(){ | |
10 | - | |
55 | + public void relatorio(){ | |
56 | + | |
57 | + } | |
58 | + | |
59 | + private void gerarRelatorio(int idQuestionario) | |
60 | + { | |
61 | + Questionario questionario = new Questionario(idQuestionario); | |
62 | + RespostaQuestionarioDao respostaQuestionarioDao = new RespostaQuestionarioDao(); | |
63 | + | |
64 | + List<RespostaQuestionario> lsRespostaQuestionario = new ArrayList<RespostaQuestionario>(); | |
65 | + List<AmostragemSiteQuestionario> lsAmostragemSiteQuestionario = | |
66 | + new ArrayList<AmostragemSiteQuestionario>(); | |
67 | + | |
68 | + lsRespostaQuestionario = | |
69 | + respostaQuestionarioDao.retornarRespostaQuestionarioPorQuestionario(questionario | |
70 | + .getIdQuestionario()); | |
71 | + | |
72 | + List<String> curso = new ArrayList<String>(); | |
73 | + List<String> simValidacao = new ArrayList<String>(); | |
74 | + List<String> assistiva = new ArrayList<String>(); | |
75 | + List<String> deficiencias = new ArrayList<String>(); | |
76 | + List<String> ferramentaValidacao = new ArrayList<String>(); | |
77 | + | |
78 | + for (RespostaQuestionario respostaQuestionario : lsRespostaQuestionario) { | |
79 | + | |
80 | + switch (respostaQuestionario.getPergunta().getIdPergunta()) { | |
81 | + case 1: | |
82 | + result.include("nomeOrgao", respostaQuestionario.getTextoResposta()); | |
83 | + break; | |
84 | + case 2: | |
85 | + result.include("nomePessoa", respostaQuestionario.getTextoResposta()); | |
86 | + break; | |
87 | + case 3: | |
88 | + result.include("cargo", respostaQuestionario.getTextoResposta()); | |
89 | + break; | |
90 | + case 4: | |
91 | + result.include("telefone", respostaQuestionario.getTextoResposta()); | |
92 | + break; | |
93 | + case 5: | |
94 | + result.include("email", respostaQuestionario.getTextoResposta()); | |
95 | + break; | |
96 | + case 7: | |
97 | + result.include("perguntaAcessibilidade", respostaQuestionario.getOpcaoResposta() | |
98 | + .getDescOpcaoResposta()); | |
99 | + break; | |
100 | + case 8: | |
101 | + result.include("reclamacao", respostaQuestionario.getOpcaoResposta() | |
102 | + .getDescOpcaoResposta()); | |
103 | + break; | |
104 | + case 9: | |
105 | + result.include("espacoReclamacao", respostaQuestionario.getTextoResposta()); | |
106 | + break; | |
107 | + case 10: | |
108 | + result.include("perguntaEstimulo", respostaQuestionario.getOpcaoResposta() | |
109 | + .getDescOpcaoResposta()); | |
110 | + break; | |
111 | + case 11: | |
112 | + curso.add(respostaQuestionario.getOpcaoResposta().getDescOpcaoResposta()); | |
113 | + break; | |
114 | + case 12: | |
115 | + result.include("requisito", respostaQuestionario.getOpcaoResposta() | |
116 | + .getDescOpcaoResposta()); | |
117 | + break; | |
118 | + case 13: | |
119 | + result.include("justificativaRequisito", respostaQuestionario.getTextoResposta()); | |
120 | + break; | |
121 | + case 14: | |
122 | + result.include("opcaoContrat", respostaQuestionario.getOpcaoResposta() | |
123 | + .getDescOpcaoResposta()); | |
124 | + break; | |
125 | + case 15: | |
126 | + result.include("perguntaValidacao", respostaQuestionario.getOpcaoResposta() | |
127 | + .getDescOpcaoResposta()); | |
128 | + break; | |
129 | + case 16: | |
130 | + simValidacao.add(respostaQuestionario.getOpcaoResposta().getDescOpcaoResposta()); | |
131 | + break; | |
132 | + case 17: | |
133 | + ferramentaValidacao.add(respostaQuestionario.getOpcaoResposta() | |
134 | + .getDescOpcaoResposta()); | |
135 | + break; | |
136 | + case 18: | |
137 | + result.include("outroAvaliador", respostaQuestionario.getTextoResposta()); | |
138 | + break; | |
139 | + case 19: | |
140 | + | |
141 | + lsAmostragemSiteQuestionario.add(respostaQuestionario.getAmostragemSiteQuestionario()); | |
142 | + break; | |
143 | + case 20: | |
144 | + result.include("nivelWcag", respostaQuestionario.getOpcaoResposta() | |
145 | + .getDescOpcaoResposta()); | |
146 | + break; | |
147 | + case 21: | |
148 | + result.include("checklistQtnList", respostaQuestionario.getOpcaoResposta() | |
149 | + .getDescOpcaoResposta()); | |
150 | + break; | |
151 | + case 22: | |
152 | + deficiencias.add(respostaQuestionario.getOpcaoResposta().getDescOpcaoResposta()); | |
153 | + break; | |
154 | + case 23: | |
155 | + result.include("funcionalidade", respostaQuestionario.getOpcaoResposta() | |
156 | + .getDescOpcaoResposta()); | |
157 | + break; | |
158 | + case 24: | |
159 | + assistiva.add(respostaQuestionario.getOpcaoResposta().getDescOpcaoResposta()); | |
160 | + break; | |
161 | + case 25: | |
162 | + result.include("justificativaAssistiva", respostaQuestionario.getTextoResposta()); | |
163 | + break; | |
164 | + case 26: | |
165 | + result.include("dificuldadePrazo", respostaQuestionario.getTextoResposta()); | |
166 | + break; | |
167 | + default: | |
168 | + break; | |
169 | + } | |
170 | + | |
171 | + | |
172 | + } | |
173 | + result.include("dataRespostaQuestionario", respostaQuestionarioDao.retornarDataRespostaQuestionarioPorQuestionario(idQuestionario)); | |
174 | + result.include("curso", curso); | |
175 | + result.include("simValidacao", simValidacao); | |
176 | + result.include("assistiva", assistiva); | |
177 | + result.include("deficiencias", deficiencias); | |
178 | + result.include("ferramentaValidacao", ferramentaValidacao); | |
179 | + result.include("questionario", questionario); | |
180 | + result.include("lsAmostragemSiteQuestionario", lsAmostragemSiteQuestionario); | |
11 | 181 | } |
12 | 182 | } | ... | ... |
src/br/com/dao/AmostragemSiteQuestionarioDao.java
... | ... | @@ -11,6 +11,8 @@ import br.com.util.DateUtil; |
11 | 11 | |
12 | 12 | public class AmostragemSiteQuestionarioDao { |
13 | 13 | |
14 | + | |
15 | + | |
14 | 16 | public ResultSet retornarAmostragemSiteQuestionarioPorQuestionario(int idAmostraSiteQuestionario) { |
15 | 17 | |
16 | 18 | StringBuffer sql = new StringBuffer(); |
... | ... | @@ -22,8 +24,11 @@ public class AmostragemSiteQuestionarioDao { |
22 | 24 | estado = con.createStatement(); |
23 | 25 | |
24 | 26 | estado.execute(sql.toString()); |
25 | - sql.append(" SELECT id_amostra_site_questionario, url_amostra_site_questionario, id_questionario, nome_campo " ); | |
26 | - sql.append(" FROM public.amostra_site_questionario where id_amostra_site_questionario = "+ idAmostraSiteQuestionario +";"); | |
27 | + sql.append(" SELECT A.id_amostra_site_questionario, A.url_amostra_site_questionario, A.id_questionario, A.nome_campo, "); | |
28 | + sql.append(" R.texto_resposta, R.id_opcao_resposta "); | |
29 | + sql.append(" FROM public.amostra_site_questionario AS A INNER JOIN public.resposta_questionario AS R "); | |
30 | + sql.append(" ON A.id_amostra_site_questionario = R.id_amostra_site_questionario "); | |
31 | + sql.append(" where A.id_amostra_site_questionario = "+ idAmostraSiteQuestionario +";"); | |
27 | 32 | |
28 | 33 | rset = estado.executeQuery(sql.toString()); |
29 | 34 | ... | ... |
src/br/com/dao/RespostaQuestionarioDao.java
... | ... | @@ -50,6 +50,38 @@ public class RespostaQuestionarioDao { |
50 | 50 | |
51 | 51 | } |
52 | 52 | |
53 | + public ResultSet retornarRespostaQuestionarioRelatorio(int id_resposta_questionario) { | |
54 | + | |
55 | + StringBuffer sql = new StringBuffer(); | |
56 | + Connection con = Conexao.conecta(); | |
57 | + Statement estado; | |
58 | + ResultSet rset = null; | |
59 | + | |
60 | + try { | |
61 | + estado = con.createStatement(); | |
62 | + | |
63 | + estado.execute(sql.toString()); | |
64 | + sql.append(" SELECT id_resposta_questionario, id_pergunta, id_opcao_resposta, texto_resposta, dt_resposta_questionario, id_questionario, id_amostra_site_questionario"); | |
65 | + sql.append(" FROM public.resposta_questionario where id_resposta_questionario = "+ id_resposta_questionario +";"); | |
66 | + | |
67 | + rset = estado.executeQuery(sql.toString()); | |
68 | + | |
69 | + return rset; | |
70 | + } catch (SQLException e) { | |
71 | + e.printStackTrace(); | |
72 | + return null; | |
73 | + | |
74 | + }finally { | |
75 | + if (con != null) { | |
76 | + try { | |
77 | + con.close(); | |
78 | + } catch (SQLException e) { | |
79 | + e.printStackTrace(); | |
80 | + } | |
81 | + } | |
82 | + } | |
83 | + | |
84 | + } | |
53 | 85 | |
54 | 86 | public List<RespostaQuestionario> retornarRespostaQuestionarioPorQuestionario(int idQuestionario) { |
55 | 87 | |
... | ... | @@ -66,7 +98,7 @@ public class RespostaQuestionarioDao { |
66 | 98 | estado = con.createStatement(); |
67 | 99 | |
68 | 100 | estado.execute(sql.toString()); |
69 | - String sqlData = "SELECT MAX(to_char((dt_resposta_questionario), 'yyyy-MM-DD')) as dt_resposta_questionario FROM public.resposta_questionario where id_questionario = " + idQuestionario; | |
101 | + String sqlData = "SELECT MAX(dt_resposta_questionario) as dt_resposta_questionario FROM public.resposta_questionario where id_questionario = " + idQuestionario; | |
70 | 102 | |
71 | 103 | rset = estado.executeQuery(sqlData); |
72 | 104 | con.close(); |
... | ... | @@ -77,7 +109,7 @@ public class RespostaQuestionarioDao { |
77 | 109 | |
78 | 110 | |
79 | 111 | sql.append(" SELECT id_resposta_questionario "); |
80 | - sql.append(" FROM public.resposta_questionario where dt_resposta_questionario > '" + dataUltimoRegistro + "' and id_questionario = "+ idQuestionario +";"); | |
112 | + sql.append(" FROM public.resposta_questionario where dt_resposta_questionario = '" + dataUltimoRegistro + "' and id_questionario = "+ idQuestionario +" order by id_resposta_questionario;"); | |
81 | 113 | |
82 | 114 | con = Conexao.conecta(); |
83 | 115 | estado = con.createStatement(); |
... | ... | @@ -107,6 +139,48 @@ public class RespostaQuestionarioDao { |
107 | 139 | return lsRespostaQuestionario; |
108 | 140 | } |
109 | 141 | |
142 | + public String retornarDataRespostaQuestionarioPorQuestionario(int idQuestionario) { | |
143 | + | |
144 | + StringBuffer sql = new StringBuffer(); | |
145 | + Connection con = Conexao.conecta(); | |
146 | + Statement estado; | |
147 | + ResultSet rset = null; | |
148 | + String dataUltimoRegistro = ""; | |
149 | + | |
150 | + RespostaQuestionario respostaQuestionario; | |
151 | + List<RespostaQuestionario> lsRespostaQuestionario = new ArrayList<RespostaQuestionario>(); | |
152 | + | |
153 | + try { | |
154 | + estado = con.createStatement(); | |
155 | + | |
156 | + estado.execute(sql.toString()); | |
157 | + String sqlData = "SELECT MAX(to_char((dt_resposta_questionario), 'DD-MM-yyyy')) as dt_resposta_questionario FROM public.resposta_questionario where id_questionario = " + idQuestionario; | |
158 | + | |
159 | + rset = estado.executeQuery(sqlData); | |
160 | + con.close(); | |
161 | + | |
162 | + while (rset.next()) { | |
163 | + dataUltimoRegistro = rset.getString("dt_resposta_questionario"); | |
164 | + } | |
165 | + | |
166 | + | |
167 | + } catch (SQLException e) { | |
168 | + | |
169 | + e.printStackTrace(); | |
170 | + | |
171 | + }finally { | |
172 | + if (con != null) { | |
173 | + try { | |
174 | + con.close(); | |
175 | + } catch (SQLException e) { | |
176 | + e.printStackTrace(); | |
177 | + } | |
178 | + } | |
179 | + } | |
180 | + | |
181 | + return dataUltimoRegistro; | |
182 | +} | |
183 | + | |
110 | 184 | //opcaoResposta '63' = Nota ASES '64' = Nota AccessMonitor |
111 | 185 | public String retornarNotaAmostragens(int idQuestionario, String amostragem, int opcaoResposta) { |
112 | 186 | |
... | ... | @@ -122,7 +196,7 @@ public class RespostaQuestionarioDao { |
122 | 196 | estado = con.createStatement(); |
123 | 197 | |
124 | 198 | estado.execute(sql.toString()); |
125 | - String sqlData = "SELECT MAX(to_char((dt_resposta_questionario), 'yyyy-MM-DD')) as dt_resposta_questionario FROM public.resposta_questionario where id_questionario = " + idQuestionario; | |
199 | + String sqlData = "SELECT MAX(dt_resposta_questionario) as dt_resposta_questionario FROM public.resposta_questionario where id_questionario = " + idQuestionario; | |
126 | 200 | |
127 | 201 | rset = estado.executeQuery(sqlData); |
128 | 202 | con.close(); |
... | ... | @@ -138,7 +212,7 @@ public class RespostaQuestionarioDao { |
138 | 212 | sql.append(" FROM public.amostra_site_questionario "); |
139 | 213 | sql.append(" where url_amostra_site_questionario = '"+ amostragem.trim() +"') "); |
140 | 214 | sql.append(" and id_opcao_resposta = "+ opcaoResposta +" and id_questionario = "+ idQuestionario ); |
141 | - sql.append(" and dt_resposta_questionario > '"+ dataUltimoRegistro +"' ; "); | |
215 | + sql.append(" and dt_resposta_questionario = '"+ dataUltimoRegistro +"' order by id_resposta_questionario; "); | |
142 | 216 | |
143 | 217 | con = Conexao.conecta(); |
144 | 218 | estado = con.createStatement(); |
... | ... | @@ -174,7 +248,7 @@ public class RespostaQuestionarioDao { |
174 | 248 | StringBuffer sql; |
175 | 249 | Statement estado; |
176 | 250 | boolean salvoComSucesso = false; |
177 | - | |
251 | + String dataHoraRespostaQuestionario = DateUtil.dataHoraAtual(); | |
178 | 252 | try { |
179 | 253 | |
180 | 254 | con = Conexao.conecta(); |
... | ... | @@ -196,7 +270,7 @@ public class RespostaQuestionarioDao { |
196 | 270 | sql.append("INSERT INTO resposta_questionario(id_pergunta, id_opcao_resposta, texto_resposta, dt_resposta_questionario, id_questionario, id_amostra_site_questionario)"); |
197 | 271 | sql.append("VALUES (" + respostaQuestionario.getPergunta().getIdPergunta() + "," |
198 | 272 | + respostaQuestionario.getOpcaoResposta().getIdOpcaoResposta() + ",'"); |
199 | - sql.append(respostaQuestionario.getTextoResposta() + "','" + DateUtil.dataHoraAtual() + "',"); | |
273 | + sql.append(respostaQuestionario.getTextoResposta() + "','" + dataHoraRespostaQuestionario + "',"); | |
200 | 274 | sql.append(respostaQuestionario.getQuestionario().getIdQuestionario() + "," + resultadoAmostragem + ");"); |
201 | 275 | |
202 | 276 | resultado = estado.executeUpdate(sql.toString()); | ... | ... |
src/br/com/model/entity/AmostragemSiteQuestionario.java
... | ... | @@ -11,6 +11,7 @@ public class AmostragemSiteQuestionario { |
11 | 11 | private String nomeCampo; |
12 | 12 | private Questionario questionario; |
13 | 13 | private String valorNota; |
14 | + private OpcaoResposta opcaoResposta; | |
14 | 15 | private String notaAses; |
15 | 16 | private String notaAccess; |
16 | 17 | |
... | ... | @@ -30,6 +31,30 @@ public class AmostragemSiteQuestionario { |
30 | 31 | this.idAmostraSiteQuestionario = rset.getInt("id_amostra_site_questionario"); |
31 | 32 | this.urlAmostraSiteQuestionario = rset.getString("url_amostra_site_questionario"); |
32 | 33 | this.questionario = new Questionario(rset.getInt("id_questionario")); |
34 | + this.valorNota = rset.getString("texto_resposta"); | |
35 | + this.opcaoResposta = new OpcaoResposta(rset.getInt("id_opcao_resposta")); | |
36 | + this.nomeCampo = rset.getString("nome_campo"); | |
37 | + } | |
38 | + } catch (Exception e) { | |
39 | + e.printStackTrace(); | |
40 | + } | |
41 | + | |
42 | + } | |
43 | + | |
44 | + public AmostragemSiteQuestionario(String url) { | |
45 | + ResultSet rset = null; | |
46 | + AmostragemSiteQuestionarioDao amostragemSiteQuestionarioDao = | |
47 | + new AmostragemSiteQuestionarioDao(); | |
48 | + | |
49 | + rset = | |
50 | + amostragemSiteQuestionarioDao | |
51 | + .retornarAmostragemSiteQuestionarioPorQuestionario(idAmostraSiteQuestionario); | |
52 | + try { | |
53 | + while (rset.next()) { | |
54 | + this.idAmostraSiteQuestionario = rset.getInt("id_amostra_site_questionario"); | |
55 | + this.urlAmostraSiteQuestionario = rset.getString("url_amostra_site_questionario"); | |
56 | + this.questionario = new Questionario(rset.getInt("id_questionario")); | |
57 | + this.valorNota = | |
33 | 58 | this.nomeCampo = rset.getString("nome_campo"); |
34 | 59 | } |
35 | 60 | } catch (Exception e) { |
... | ... | @@ -87,6 +112,12 @@ public class AmostragemSiteQuestionario { |
87 | 112 | public void setNotaAccess(String notaAccess) { |
88 | 113 | this.notaAccess = notaAccess; |
89 | 114 | } |
115 | + public OpcaoResposta getOpcaoResposta() { | |
116 | + return opcaoResposta; | |
117 | + } | |
118 | + public void setOpcaoResposta(OpcaoResposta opcaoResposta) { | |
119 | + this.opcaoResposta = opcaoResposta; | |
120 | + } | |
90 | 121 | |
91 | 122 | |
92 | 123 | ... | ... |
src/br/com/model/entity/RespostaQuestionario.java
... | ... | @@ -40,6 +40,27 @@ public class RespostaQuestionario { |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | + public RespostaQuestionario(int idRespostaQuestionario, boolean relatorio) { | |
44 | + ResultSet rset = null; | |
45 | + RespostaQuestionarioDao respostaQuestionarioDao = new RespostaQuestionarioDao(); | |
46 | + | |
47 | + rset = respostaQuestionarioDao.retornarRespostaQuestionarioRelatorio(idRespostaQuestionario); | |
48 | + try { | |
49 | + while (rset.next()) { | |
50 | + this.idRespostaQuestionario = idRespostaQuestionario; | |
51 | + this.amostragemSiteQuestionario = new AmostragemSiteQuestionario(rset.getInt("id_amostra_site_questionario")); | |
52 | + this.questionario = new Questionario(Integer.parseInt(rset.getString("id_questionario"))); | |
53 | + this.pergunta = new Pergunta(Integer.parseInt(rset.getString("id_pergunta"))); | |
54 | + this.opcaoResposta = | |
55 | + new OpcaoResposta(Integer.parseInt(rset.getString("id_opcao_resposta"))); | |
56 | + this.dtRespostaQuestionario = rset.getDate("dt_resposta_questionario").toString(); | |
57 | + this.textoResposta = rset.getString("texto_resposta"); | |
58 | + } | |
59 | + } catch (Exception e) { | |
60 | + e.printStackTrace(); | |
61 | + } | |
62 | + } | |
63 | + | |
43 | 64 | public int getIdRespostaQuestionario() { |
44 | 65 | return idRespostaQuestionario; |
45 | 66 | } | ... | ... |
src/br/com/util/Validacao.java
... | ... | @@ -108,10 +108,8 @@ public class Validacao { |
108 | 108 | validacao.mensagem = "Favor informar um ambiente!"; |
109 | 109 | mensagens.add(validacao); |
110 | 110 | |
111 | - }else | |
112 | - { | |
113 | - if(verificarAmostragensRepetidas(formulario.getAmbiente1(), formulario, "Ambiente1", 1)) | |
114 | - { | |
111 | + } else { | |
112 | + if (verificarAmostragensRepetidas(formulario.getAmbiente1(), formulario, "Ambiente1", 1)) { | |
115 | 113 | validacao = new Validacao(); |
116 | 114 | validacao.campo = formulario.getAmbiente1(); |
117 | 115 | validacao.mensagem = "O endereço (" + formulario.getAmbiente1() + ") está repetido!"; |
... | ... | @@ -125,8 +123,7 @@ public class Validacao { |
125 | 123 | mensagens.add(validacao); |
126 | 124 | |
127 | 125 | } else { |
128 | - if(verificarAmostragensRepetidas(formulario.getPagina11(), formulario, "Pagina11",2)) | |
129 | - { | |
126 | + if (verificarAmostragensRepetidas(formulario.getPagina11(), formulario, "Pagina11", 2)) { | |
130 | 127 | validacao = new Validacao(); |
131 | 128 | validacao.campo = formulario.getPagina11(); |
132 | 129 | validacao.mensagem = "O endereço (" + formulario.getPagina11() + ") está repetido!"; |
... | ... | @@ -139,16 +136,15 @@ public class Validacao { |
139 | 136 | validacao.mensagem = "Favor informar mínimo de 4(quatro) páginas!"; |
140 | 137 | mensagens.add(validacao); |
141 | 138 | |
142 | - } else { | |
143 | - if(verificarAmostragensRepetidas(formulario.getPagina12(), formulario, "Pagina12",3)) | |
144 | - { | |
139 | + } else { | |
140 | + if (verificarAmostragensRepetidas(formulario.getPagina12(), formulario, "Pagina12", 3)) { | |
145 | 141 | validacao = new Validacao(); |
146 | 142 | validacao.campo = formulario.getPagina12(); |
147 | 143 | validacao.mensagem = "O endereço (" + formulario.getPagina12() + ") está repetido!"; |
148 | 144 | mensagens.add(validacao); |
149 | 145 | } |
150 | 146 | |
151 | - | |
147 | + | |
152 | 148 | } |
153 | 149 | if (formulario.getPagina13() == null) { |
154 | 150 | validacao = new Validacao(); |
... | ... | @@ -156,34 +152,31 @@ public class Validacao { |
156 | 152 | validacao.mensagem = "Favor informar mínimo de 4(quatro) páginas!"; |
157 | 153 | mensagens.add(validacao); |
158 | 154 | |
159 | - } else { | |
160 | - if(verificarAmostragensRepetidas(formulario.getPagina13(), formulario, "Pagina13",4)) | |
161 | - { | |
155 | + } else { | |
156 | + if (verificarAmostragensRepetidas(formulario.getPagina13(), formulario, "Pagina13", 4)) { | |
162 | 157 | validacao = new Validacao(); |
163 | 158 | validacao.campo = formulario.getPagina13(); |
164 | 159 | validacao.mensagem = "O endereço (" + formulario.getPagina13() + ") está repetido!"; |
165 | 160 | mensagens.add(validacao); |
166 | 161 | } |
167 | 162 | |
168 | - } | |
163 | + } | |
169 | 164 | if (formulario.getPagina14() == null) { |
170 | 165 | validacao = new Validacao(); |
171 | 166 | validacao.campo = formulario.getPagina14(); |
172 | 167 | validacao.mensagem = "Favor informar mínimo de 4(quatro) páginas!"; |
173 | 168 | mensagens.add(validacao); |
174 | 169 | |
175 | - } else { | |
176 | - if(verificarAmostragensRepetidas(formulario.getPagina14(), formulario, "Pagina14",5)) | |
177 | - { | |
170 | + } else { | |
171 | + if (verificarAmostragensRepetidas(formulario.getPagina14(), formulario, "Pagina14", 5)) { | |
178 | 172 | validacao = new Validacao(); |
179 | 173 | validacao.campo = formulario.getPagina14(); |
180 | 174 | validacao.mensagem = "O endereço (" + formulario.getPagina14() + ") está repetido!"; |
181 | 175 | mensagens.add(validacao); |
182 | 176 | } |
183 | - } | |
177 | + } | |
184 | 178 | if (formulario.getAmbiente2() != null) { |
185 | - if(verificarAmostragensRepetidas(formulario.getAmbiente2(), formulario, "Ambiente2",6)) | |
186 | - { | |
179 | + if (verificarAmostragensRepetidas(formulario.getAmbiente2(), formulario, "Ambiente2", 6)) { | |
187 | 180 | validacao = new Validacao(); |
188 | 181 | validacao.campo = formulario.getAmbiente2(); |
189 | 182 | validacao.mensagem = "O endereço (" + formulario.getAmbiente2() + ") está repetido!"; |
... | ... | @@ -192,47 +185,42 @@ public class Validacao { |
192 | 185 | |
193 | 186 | } |
194 | 187 | if (formulario.getPagina21() != null) { |
195 | - if(verificarAmostragensRepetidas(formulario.getPagina21(), formulario, "Pagina21",7)) | |
196 | - { | |
188 | + if (verificarAmostragensRepetidas(formulario.getPagina21(), formulario, "Pagina21", 7)) { | |
197 | 189 | validacao = new Validacao(); |
198 | 190 | validacao.campo = formulario.getPagina21(); |
199 | 191 | validacao.mensagem = "O endereço (" + formulario.getPagina21() + ") está repetido!"; |
200 | 192 | mensagens.add(validacao); |
201 | 193 | } |
202 | - } | |
203 | - | |
194 | + } | |
195 | + | |
204 | 196 | if (formulario.getPagina22() != null) { |
205 | - if(verificarAmostragensRepetidas(formulario.getPagina22(), formulario, "Pagina22",8)) | |
206 | - { | |
197 | + if (verificarAmostragensRepetidas(formulario.getPagina22(), formulario, "Pagina22", 8)) { | |
207 | 198 | validacao = new Validacao(); |
208 | 199 | validacao.campo = formulario.getPagina22(); |
209 | 200 | validacao.mensagem = "O endereço (" + formulario.getPagina22() + ") está repetido!"; |
210 | 201 | mensagens.add(validacao); |
211 | 202 | } |
212 | - } | |
203 | + } | |
213 | 204 | if (formulario.getPagina23() != null) { |
214 | - if(verificarAmostragensRepetidas(formulario.getPagina23(), formulario, "Pagina23",9)) | |
215 | - { | |
205 | + if (verificarAmostragensRepetidas(formulario.getPagina23(), formulario, "Pagina23", 9)) { | |
216 | 206 | validacao = new Validacao(); |
217 | 207 | validacao.campo = formulario.getPagina23(); |
218 | 208 | validacao.mensagem = "O endereço (" + formulario.getPagina23() + ") está repetido!"; |
219 | 209 | mensagens.add(validacao); |
220 | 210 | } |
221 | - } | |
222 | - | |
211 | + } | |
212 | + | |
223 | 213 | if (formulario.getPagina24() != null) { |
224 | - if(verificarAmostragensRepetidas(formulario.getPagina24(), formulario, "Pagina24",10)) | |
225 | - { | |
214 | + if (verificarAmostragensRepetidas(formulario.getPagina24(), formulario, "Pagina24", 10)) { | |
226 | 215 | validacao = new Validacao(); |
227 | 216 | validacao.campo = formulario.getPagina24(); |
228 | 217 | validacao.mensagem = "O endereço (" + formulario.getPagina24() + ") está repetido!"; |
229 | 218 | mensagens.add(validacao); |
230 | 219 | } |
231 | - } | |
232 | - | |
220 | + } | |
221 | + | |
233 | 222 | if (formulario.getAmbiente3() != null) { |
234 | - if(verificarAmostragensRepetidas(formulario.getAmbiente3(), formulario, "Ambiente3",11)) | |
235 | - { | |
223 | + if (verificarAmostragensRepetidas(formulario.getAmbiente3(), formulario, "Ambiente3", 11)) { | |
236 | 224 | validacao = new Validacao(); |
237 | 225 | validacao.campo = formulario.getAmbiente3(); |
238 | 226 | validacao.mensagem = "O endereço (" + formulario.getAmbiente3() + ") está repetido!"; |
... | ... | @@ -241,47 +229,42 @@ public class Validacao { |
241 | 229 | |
242 | 230 | } |
243 | 231 | if (formulario.getPagina31() != null) { |
244 | - if(verificarAmostragensRepetidas(formulario.getPagina31(), formulario, "Pagina31",12)) | |
245 | - { | |
232 | + if (verificarAmostragensRepetidas(formulario.getPagina31(), formulario, "Pagina31", 12)) { | |
246 | 233 | validacao = new Validacao(); |
247 | 234 | validacao.campo = formulario.getPagina31(); |
248 | 235 | validacao.mensagem = "O endereço (" + formulario.getPagina31() + ") está repetido!"; |
249 | 236 | mensagens.add(validacao); |
250 | 237 | } |
251 | - } | |
252 | - | |
238 | + } | |
239 | + | |
253 | 240 | if (formulario.getPagina32() != null) { |
254 | - if(verificarAmostragensRepetidas(formulario.getPagina32(), formulario, "Pagina32",13)) | |
255 | - { | |
241 | + if (verificarAmostragensRepetidas(formulario.getPagina32(), formulario, "Pagina32", 13)) { | |
256 | 242 | validacao = new Validacao(); |
257 | 243 | validacao.campo = formulario.getPagina32(); |
258 | 244 | validacao.mensagem = "O endereço (" + formulario.getPagina32() + ") está repetido!"; |
259 | 245 | mensagens.add(validacao); |
260 | 246 | } |
261 | - } | |
247 | + } | |
262 | 248 | if (formulario.getPagina33() != null) { |
263 | - if(verificarAmostragensRepetidas(formulario.getPagina33(), formulario, "Pagina33",14)) | |
264 | - { | |
249 | + if (verificarAmostragensRepetidas(formulario.getPagina33(), formulario, "Pagina33", 14)) { | |
265 | 250 | validacao = new Validacao(); |
266 | 251 | validacao.campo = formulario.getPagina33(); |
267 | 252 | validacao.mensagem = "O endereço (" + formulario.getPagina33() + ") está repetido!"; |
268 | 253 | mensagens.add(validacao); |
269 | 254 | } |
270 | - } | |
271 | - | |
255 | + } | |
256 | + | |
272 | 257 | if (formulario.getPagina34() != null) { |
273 | - if(verificarAmostragensRepetidas(formulario.getPagina34(), formulario, "Pagina34",15)) | |
274 | - { | |
258 | + if (verificarAmostragensRepetidas(formulario.getPagina34(), formulario, "Pagina34", 15)) { | |
275 | 259 | validacao = new Validacao(); |
276 | 260 | validacao.campo = formulario.getPagina34(); |
277 | 261 | validacao.mensagem = "O endereço (" + formulario.getPagina34() + ") está repetido!"; |
278 | 262 | mensagens.add(validacao); |
279 | 263 | } |
280 | - } | |
281 | - | |
264 | + } | |
265 | + | |
282 | 266 | if (formulario.getAmbiente4() != null) { |
283 | - if(verificarAmostragensRepetidas(formulario.getAmbiente4(), formulario, "Ambiente4",16)) | |
284 | - { | |
267 | + if (verificarAmostragensRepetidas(formulario.getAmbiente4(), formulario, "Ambiente4", 16)) { | |
285 | 268 | validacao = new Validacao(); |
286 | 269 | validacao.campo = formulario.getAmbiente4(); |
287 | 270 | validacao.mensagem = "O endereço (" + formulario.getAmbiente4() + ") está repetido!"; |
... | ... | @@ -290,47 +273,42 @@ public class Validacao { |
290 | 273 | |
291 | 274 | } |
292 | 275 | if (formulario.getPagina41() != null) { |
293 | - if(verificarAmostragensRepetidas(formulario.getPagina41(), formulario, "Pagina41",17)) | |
294 | - { | |
276 | + if (verificarAmostragensRepetidas(formulario.getPagina41(), formulario, "Pagina41", 17)) { | |
295 | 277 | validacao = new Validacao(); |
296 | 278 | validacao.campo = formulario.getPagina41(); |
297 | 279 | validacao.mensagem = "O endereço (" + formulario.getPagina41() + ") está repetido!"; |
298 | 280 | mensagens.add(validacao); |
299 | 281 | } |
300 | - } | |
301 | - | |
282 | + } | |
283 | + | |
302 | 284 | if (formulario.getPagina42() != null) { |
303 | - if(verificarAmostragensRepetidas(formulario.getPagina42(), formulario, "Pagina42",18)) | |
304 | - { | |
285 | + if (verificarAmostragensRepetidas(formulario.getPagina42(), formulario, "Pagina42", 18)) { | |
305 | 286 | validacao = new Validacao(); |
306 | 287 | validacao.campo = formulario.getPagina42(); |
307 | 288 | validacao.mensagem = "O endereço (" + formulario.getPagina42() + ") está repetido!"; |
308 | 289 | mensagens.add(validacao); |
309 | 290 | } |
310 | - } | |
291 | + } | |
311 | 292 | if (formulario.getPagina43() != null) { |
312 | - if(verificarAmostragensRepetidas(formulario.getPagina43(), formulario, "Pagina43",19)) | |
313 | - { | |
293 | + if (verificarAmostragensRepetidas(formulario.getPagina43(), formulario, "Pagina43", 19)) { | |
314 | 294 | validacao = new Validacao(); |
315 | 295 | validacao.campo = formulario.getPagina43(); |
316 | 296 | validacao.mensagem = "O endereço (" + formulario.getPagina43() + ") está repetido!"; |
317 | 297 | mensagens.add(validacao); |
318 | 298 | } |
319 | - } | |
320 | - | |
299 | + } | |
300 | + | |
321 | 301 | if (formulario.getPagina44() != null) { |
322 | - if(verificarAmostragensRepetidas(formulario.getPagina44(), formulario, "Pagina44",20)) | |
323 | - { | |
302 | + if (verificarAmostragensRepetidas(formulario.getPagina44(), formulario, "Pagina44", 20)) { | |
324 | 303 | validacao = new Validacao(); |
325 | 304 | validacao.campo = formulario.getPagina44(); |
326 | 305 | validacao.mensagem = "O endereço (" + formulario.getPagina44() + ") está repetido!"; |
327 | 306 | mensagens.add(validacao); |
328 | 307 | } |
329 | - } | |
330 | - | |
308 | + } | |
309 | + | |
331 | 310 | if (formulario.getAmbiente5() != null) { |
332 | - if(verificarAmostragensRepetidas(formulario.getAmbiente5(), formulario, "Ambiente5",21)) | |
333 | - { | |
311 | + if (verificarAmostragensRepetidas(formulario.getAmbiente5(), formulario, "Ambiente5", 21)) { | |
334 | 312 | validacao = new Validacao(); |
335 | 313 | validacao.campo = formulario.getAmbiente5(); |
336 | 314 | validacao.mensagem = "O endereço (" + formulario.getAmbiente5() + ") está repetido!"; |
... | ... | @@ -339,43 +317,39 @@ public class Validacao { |
339 | 317 | |
340 | 318 | } |
341 | 319 | if (formulario.getPagina51() != null) { |
342 | - if(verificarAmostragensRepetidas(formulario.getPagina51(), formulario, "Pagina51",22)) | |
343 | - { | |
320 | + if (verificarAmostragensRepetidas(formulario.getPagina51(), formulario, "Pagina51", 22)) { | |
344 | 321 | validacao = new Validacao(); |
345 | 322 | validacao.campo = formulario.getPagina51(); |
346 | 323 | validacao.mensagem = "O endereço (" + formulario.getPagina51() + ") está repetido!"; |
347 | 324 | mensagens.add(validacao); |
348 | 325 | } |
349 | - } | |
350 | - | |
326 | + } | |
327 | + | |
351 | 328 | if (formulario.getPagina52() != null) { |
352 | - if(verificarAmostragensRepetidas(formulario.getPagina52(), formulario, "Pagina52",23)) | |
353 | - { | |
329 | + if (verificarAmostragensRepetidas(formulario.getPagina52(), formulario, "Pagina52", 23)) { | |
354 | 330 | validacao = new Validacao(); |
355 | 331 | validacao.campo = formulario.getPagina52(); |
356 | 332 | validacao.mensagem = "O endereço (" + formulario.getPagina52() + ") está repetido!"; |
357 | 333 | mensagens.add(validacao); |
358 | 334 | } |
359 | - } | |
335 | + } | |
360 | 336 | if (formulario.getPagina53() != null) { |
361 | - if(verificarAmostragensRepetidas(formulario.getPagina53(), formulario, "Pagina53",24)) | |
362 | - { | |
337 | + if (verificarAmostragensRepetidas(formulario.getPagina53(), formulario, "Pagina53", 24)) { | |
363 | 338 | validacao = new Validacao(); |
364 | 339 | validacao.campo = formulario.getPagina53(); |
365 | 340 | validacao.mensagem = "O endereço (" + formulario.getPagina53() + ") está repetido!"; |
366 | 341 | mensagens.add(validacao); |
367 | 342 | } |
368 | - } | |
369 | - | |
343 | + } | |
344 | + | |
370 | 345 | if (formulario.getPagina54() != null) { |
371 | - if(verificarAmostragensRepetidas(formulario.getPagina54(), formulario, "Pagina54",25)) | |
372 | - { | |
346 | + if (verificarAmostragensRepetidas(formulario.getPagina54(), formulario, "Pagina54", 25)) { | |
373 | 347 | validacao = new Validacao(); |
374 | 348 | validacao.campo = formulario.getPagina54(); |
375 | 349 | validacao.mensagem = "O endereço (" + formulario.getPagina54() + ") está repetido!"; |
376 | 350 | mensagens.add(validacao); |
377 | 351 | } |
378 | - } | |
352 | + } | |
379 | 353 | return mensagens; |
380 | 354 | } |
381 | 355 | |
... | ... | @@ -409,7 +383,7 @@ public class Validacao { |
409 | 383 | |
410 | 384 | } |
411 | 385 | } |
412 | - | |
386 | + | |
413 | 387 | |
414 | 388 | if (formulario.getPerguntaEstimulo() == null) { |
415 | 389 | validacao = new Validacao(); |
... | ... | @@ -418,19 +392,18 @@ public class Validacao { |
418 | 392 | mensagens.add(validacao); |
419 | 393 | |
420 | 394 | } |
421 | - | |
422 | - if(formulario.getPerguntaEstimulo() != null && formulario.getPerguntaEstimulo().equalsIgnoreCase("2")) | |
423 | - { | |
395 | + | |
396 | + if (formulario.getPerguntaEstimulo() != null | |
397 | + && formulario.getPerguntaEstimulo().equalsIgnoreCase("2")) { | |
424 | 398 | if (formulario.getCurso().length == 0) { |
425 | - validacao = new Validacao(); | |
426 | - validacao.campo = "curso"; | |
427 | - validacao.mensagem = "A pergunta de numero '5' precisa ser respondida!"; | |
428 | - mensagens.add(validacao); | |
399 | + validacao = new Validacao(); | |
400 | + validacao.campo = "curso"; | |
401 | + validacao.mensagem = "A pergunta de numero '5' precisa ser respondida!"; | |
402 | + mensagens.add(validacao); | |
429 | 403 | } |
430 | 404 | } |
431 | - | |
432 | - if(formulario.getRequisito().equalsIgnoreCase("11")) | |
433 | - { | |
405 | + | |
406 | + if (formulario.getRequisito().equalsIgnoreCase("11")) { | |
434 | 407 | if (formulario.getJustificativaRequisito() == null) { |
435 | 408 | validacao = new Validacao(); |
436 | 409 | validacao.campo = "justificativaRequisito"; |
... | ... | @@ -439,7 +412,7 @@ public class Validacao { |
439 | 412 | |
440 | 413 | } |
441 | 414 | } |
442 | - | |
415 | + | |
443 | 416 | if (formulario.getPerguntaValidacao() == null) { |
444 | 417 | validacao = new Validacao(); |
445 | 418 | validacao.campo = "perguntaValidacao"; |
... | ... | @@ -447,9 +420,9 @@ public class Validacao { |
447 | 420 | mensagens.add(validacao); |
448 | 421 | |
449 | 422 | } |
450 | - | |
451 | - if(formulario.getPerguntaValidacao() != null && formulario.getPerguntaValidacao().equalsIgnoreCase("2")) | |
452 | - { | |
423 | + | |
424 | + if (formulario.getPerguntaValidacao() != null | |
425 | + && formulario.getPerguntaValidacao().equalsIgnoreCase("2")) { | |
453 | 426 | if (formulario.getSimValidacao() == null || formulario.getSimValidacao().length == 0) { |
454 | 427 | validacao = new Validacao(); |
455 | 428 | validacao.campo = "simValidacao"; |
... | ... | @@ -458,21 +431,21 @@ public class Validacao { |
458 | 431 | |
459 | 432 | } |
460 | 433 | } |
461 | - | |
462 | - if (formulario.getFerramentaValidacao() == null || formulario.getFerramentaValidacao().length == 0) { | |
434 | + | |
435 | + if (formulario.getFerramentaValidacao() == null | |
436 | + || formulario.getFerramentaValidacao().length == 0) { | |
463 | 437 | validacao = new Validacao(); |
464 | 438 | validacao.campo = "ferramentaValidacao"; |
465 | 439 | validacao.mensagem = "A pergunta de numero '11' precisa ser respondida!"; |
466 | 440 | mensagens.add(validacao); |
467 | 441 | |
468 | 442 | } |
469 | - | |
470 | - | |
471 | - if(formulario.getFerramentaValidacao() != null && formulario.getFerramentaValidacao().length > 0) | |
472 | - { | |
443 | + | |
444 | + | |
445 | + if (formulario.getFerramentaValidacao() != null | |
446 | + && formulario.getFerramentaValidacao().length > 0) { | |
473 | 447 | for (String ferramentaValidacao : formulario.getFerramentaValidacao()) { |
474 | - if(ferramentaValidacao.equalsIgnoreCase("34")) | |
475 | - { | |
448 | + if (ferramentaValidacao.equalsIgnoreCase("34")) { | |
476 | 449 | if (formulario.getOutroAvaliador() == null) { |
477 | 450 | validacao = new Validacao(); |
478 | 451 | validacao.campo = "outroAvaliador"; |
... | ... | @@ -490,7 +463,7 @@ public class Validacao { |
490 | 463 | mensagens.add(validacao); |
491 | 464 | |
492 | 465 | } |
493 | - | |
466 | + | |
494 | 467 | if (formulario.getDeficiencias() == null || formulario.getDeficiencias().length == 0) { |
495 | 468 | validacao = new Validacao(); |
496 | 469 | validacao.campo = "deficiencias"; |
... | ... | @@ -498,7 +471,7 @@ public class Validacao { |
498 | 471 | mensagens.add(validacao); |
499 | 472 | |
500 | 473 | } |
501 | - | |
474 | + | |
502 | 475 | if (formulario.getFuncionalidade() == null) { |
503 | 476 | validacao = new Validacao(); |
504 | 477 | validacao.campo = "funcionalidade"; |
... | ... | @@ -506,7 +479,7 @@ public class Validacao { |
506 | 479 | mensagens.add(validacao); |
507 | 480 | |
508 | 481 | } |
509 | - | |
482 | + | |
510 | 483 | if (formulario.getAssistiva() == null || formulario.getAssistiva().length == 0) { |
511 | 484 | validacao = new Validacao(); |
512 | 485 | validacao.campo = "assistiva"; |
... | ... | @@ -515,12 +488,10 @@ public class Validacao { |
515 | 488 | |
516 | 489 | } |
517 | 490 | |
518 | - | |
519 | - if(formulario.getAssistiva() != null && formulario.getAssistiva().length > 0) | |
520 | - { | |
491 | + | |
492 | + if (formulario.getAssistiva() != null && formulario.getAssistiva().length > 0) { | |
521 | 493 | for (String assistiva : formulario.getAssistiva()) { |
522 | - if(assistiva.equalsIgnoreCase("34")) | |
523 | - { | |
494 | + if (assistiva.equalsIgnoreCase("34")) { | |
524 | 495 | if (formulario.getJustificativaAssistiva() == null) { |
525 | 496 | validacao = new Validacao(); |
526 | 497 | validacao.campo = "justificativaAssistiva"; |
... | ... | @@ -530,23 +501,17 @@ public class Validacao { |
530 | 501 | } |
531 | 502 | } |
532 | 503 | } |
533 | - | |
534 | - if(formulario.getAssistiva() != null && formulario.getAssistiva().length > 0) | |
535 | - { | |
536 | - for (String assistiva : formulario.getAssistiva()) { | |
537 | - if(assistiva.equalsIgnoreCase("34")) | |
538 | - { | |
539 | - if (formulario.getDificuldadePrazo() == null) { | |
540 | - validacao = new Validacao(); | |
541 | - validacao.campo = "dificuldadePrazo"; | |
542 | - validacao.mensagem = "A pergunta de numero '20' precisa ser respondida!"; | |
543 | - mensagens.add(validacao); | |
544 | 504 | |
545 | - } | |
546 | - } | |
547 | - } | |
505 | + | |
506 | + if (formulario.getDificuldadePrazo() == null) { | |
507 | + validacao = new Validacao(); | |
508 | + validacao.campo = "dificuldadePrazo"; | |
509 | + validacao.mensagem = "A pergunta de numero '20' precisa ser respondida!"; | |
510 | + mensagens.add(validacao); | |
511 | + | |
548 | 512 | } |
549 | - | |
513 | + | |
514 | + | |
550 | 515 | |
551 | 516 | return mensagens; |
552 | 517 | |
... | ... | @@ -554,10 +519,10 @@ public class Validacao { |
554 | 519 | |
555 | 520 | public boolean verificarAmostragensRepetidas(String amostragem, Formulario formulario, |
556 | 521 | String campoIgnorar, int campoVerificado) { |
557 | - | |
522 | + | |
558 | 523 | boolean existeCampoRepetido = false; |
559 | - | |
560 | - | |
524 | + | |
525 | + | |
561 | 526 | if (formulario.getAmbiente1() != null && formulario.getAmbiente1().equalsIgnoreCase(amostragem) |
562 | 527 | && !campoIgnorar.equalsIgnoreCase("Ambiente1") && campoVerificado < 1) { |
563 | 528 | existeCampoRepetido = true; |
... | ... | @@ -639,7 +604,7 @@ public class Validacao { |
639 | 604 | && !campoIgnorar.equalsIgnoreCase("Pagina44") && campoVerificado < 20) { |
640 | 605 | existeCampoRepetido = true; |
641 | 606 | } |
642 | - | |
607 | + | |
643 | 608 | if (formulario.getAmbiente5() != null && formulario.getAmbiente5().equalsIgnoreCase(amostragem) |
644 | 609 | && !campoIgnorar.equalsIgnoreCase("Ambiente5") && campoVerificado < 21) { |
645 | 610 | existeCampoRepetido = true; |
... | ... | @@ -660,7 +625,7 @@ public class Validacao { |
660 | 625 | && !campoIgnorar.equalsIgnoreCase("Pagina54") && campoVerificado < 25) { |
661 | 626 | existeCampoRepetido = true; |
662 | 627 | } |
663 | - | |
628 | + | |
664 | 629 | return existeCampoRepetido; |
665 | 630 | } |
666 | 631 | ... | ... |