diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/arquivosHtml/arquivosHtml.jsp b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/arquivosHtml/arquivosHtml.jsp index 2ce993f..ef1a02e 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/arquivosHtml/arquivosHtml.jsp +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/arquivosHtml/arquivosHtml.jsp @@ -1 +1,23 @@ -${html} \ No newline at end of file +<%@taglib prefix="t" tagdir="/WEB-INF/tags"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + +
+ +
+ + ${caminhoAvaliacao.nome } +
+
+
+
+
+ +${html} + +
+
\ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/mediaAvaliacao.jsp b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/mediaAvaliacao.jsp index 8936f4c..8a612ff 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/mediaAvaliacao.jsp +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/mediaAvaliacao.jsp @@ -4,27 +4,42 @@ <%@page contentType="text/html" pageEncoding="UTF-8"%> + + +
+ + + + ${html} + + +
+ +
+
+
- - + +
${tipo}Total de ${nomeTotal}MédiaTotal de ${nomeTotal}Média
- + @@ -34,8 +49,8 @@ ${mediaAvaliacao.nome } - - ${mediaAvaliacao.nome } + + ${mediaAvaliacao.nome } @@ -52,6 +67,7 @@

+
\ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/outrosErrosMaisComuns.jsp b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/outrosErrosMaisComuns.jsp index 2ce993f..1a24ba2 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/outrosErrosMaisComuns.jsp +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/outrosErrosMaisComuns.jsp @@ -1 +1,11 @@ -${html} \ No newline at end of file +<%@taglib prefix="t" tagdir="/WEB-INF/tags"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + +${html} + + + \ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/painelAcessibilidade.jsp b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/painelAcessibilidade.jsp index 2ce993f..1a24ba2 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/painelAcessibilidade.jsp +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/jsp/painelAcessibilidade/painelAcessibilidade.jsp @@ -1 +1,11 @@ -${html} \ No newline at end of file +<%@taglib prefix="t" tagdir="/WEB-INF/tags"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + +${html} + + + \ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/web.xml b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/web.xml index c19bfbe..c4592b5 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/web.xml +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/WEB-INF/web.xml @@ -69,6 +69,13 @@ vraptor br.com.caelum.vraptor.VRaptor + + + Limite máximo em bytes + br.com.caelum.vraptor.interceptor.multipart.UPLOAD_SIZE_LIMIT + 52428800 + + vraptor /* diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/css/painelAcessibilidade.css b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/css/painelAcessibilidade.css index 589882e..9191553 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/css/painelAcessibilidade.css +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/css/painelAcessibilidade.css @@ -6,11 +6,12 @@ body { margin-bottom:0; background-color: #ffffff; color: #000000; - font-size: 61%; + font-size: 80%; font-weight: normal; font-family: "Open Sans", Arial, Helvetica, sans-serif; } + header { width: 100%; /*Banner*/ @@ -63,6 +64,7 @@ a { padding: 0; } + #accessibility { display: inline; margin-left: 12%; @@ -107,8 +109,8 @@ h1 { } Table { - width: 915px; - font-size: 12px; + width: 90%; + font-size: 0.9em; } #logo { @@ -123,7 +125,7 @@ Table { #emag { width: 180px; - height: 280px; + height: 290px; background: #92d68f; text-align: center; float: left; @@ -131,7 +133,7 @@ Table { #testesAutomaticos { width: 220px; - height: 280px; + height: 290px; border-left: 1px solid #000000; border-right: 1px solid #000000; /*background: #97aeec;*/ @@ -155,19 +157,19 @@ Table { } .myChart { - width: 510px !important; - height: 270px !important; + width: 90% !important; + height: 100% !important; } element.style { - width: 500px; - height: 210px; + width: 90% !important; + height: 100% !important; } .logoAvaliacao { margin-top: 10px; width: 940px; - height: 280px; + height: 290px; background: #ffffff; border-style: solid; border-color: #000000; @@ -180,6 +182,7 @@ element.style { } .avaliacao { + margin:auto; margin-top: 10px; width: 940px; background: #ffffff; @@ -189,7 +192,7 @@ element.style { } table { - margin-left: 10px; + margin-left: 5%; border-collapse: collapse; } @@ -225,6 +228,7 @@ a.oculto { } #voltar-topo { + margin: auto; text-align: right; font-size: 12px; } @@ -367,7 +371,7 @@ a.oculto { margin-bottom:0; background-color: #ffffff; color: #000000; - font-size: 61%; + font-size: 80%; font-weight: normal; font-family: "Open Sans", Arial, Helvetica, sans-serif; } @@ -424,6 +428,8 @@ a { padding: 0; } + + #accessibility { display: inline; margin-left: 12%; @@ -435,7 +441,8 @@ a { } h1 { - padding-top: 100px; + padding-top: 10%; + font-size: 1.6em; } #accessibility li { @@ -479,51 +486,56 @@ h1 { } #emag { - width: 15em; - height: 20em; + width: 100%; background: #92d68f; text-align: center; float: left; } #testesAutomaticos { - width: 15em; + width: 100%; height: 20em; - border-left: 1px solid #000000; - border-right: 1px solid #000000; + border-top: 1px solid #000000; + border-bottom: 1px solid #000000; /*background: #97aeec;*/ text-align: center; float: left; } #grafico { - width: 35em; + width: 100%; height: 20em; text-align: center; float: left; - margin-left: 150px; + margin-top: 20px; + border-bottom: 1px solid #000000; } #grafico2 { - width: 532px; + width: 100%; height: 200px; text-align: center; float: left; + border-bottom: 1px solid #000000; } .myChart { - width: 30em !important; - height: 15em !important; + width: 95% !important; + height: 100% !important; +} + +.myChartCanvas{ + width: 95% !important; + height: 100% !important; } element.style { - width: 35em; - height: 20em; + width: 95% !important; + height: 100% !important; } .logoAvaliacao { - margin-top: 10px; - width: 30.15em; - height: 35em; + width: 100%; + height: 100%; background: #ffffff; border-style: solid; border-color: #000000; @@ -536,7 +548,7 @@ element.style { } .avaliacao { - width: 30.15em; + width: 100%; background: #ffffff; border-style: solid; border-color: #000000; @@ -544,9 +556,9 @@ element.style { } table { - margin-left: 10px; - width: 35em; - font-size: 0.8em; + margin-left: 5%; + width: 90%; + font-size: 0.6em; border-collapse: collapse; } @@ -584,6 +596,8 @@ a.oculto { } #voltar-topo { + + margin: auto; text-align: right; font-size: 12px; } diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chart.js b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chart.js deleted file mode 100644 index ca9fa00..0000000 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chart.js +++ /dev/null @@ -1,187 +0,0 @@ -$(document).ready(function() { - var qntAvaliacoes = $("#qntAvaliacoes").text(); - - var canvas = document.getElementById('myChart'); - - //inicio 4 avaliações - if(qntAvaliacoes == 4){ - - var data = { - - labels: ["0","1", "2", "3", "4"], - datasets: [ - { - label: "Avaliações", - fill: false, - lineTension: 0.1, - backgroundColor: "rgba(75,192,192,0.4)", - borderColor: "rgba(75,192,192,1)", - borderCapStyle: 'butt', - borderDash: [], - borderDashOffset: 0.0, - borderJoinStyle: 'miter', - pointBorderColor: "rgba(75,192,192,1)", - pointBackgroundColor: "#fff", - pointBorderWidth: 1, - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(75,192,192,1)", - pointHoverBorderColor: "rgba(220,220,220,1)", - pointHoverBorderWidth: 2, - pointRadius: 5, - pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text(),$("#nota4").text()], - - - } - ] - }; - - var option = { - - showLines: true - }; - var myLineChart = Chart.Line(canvas,{ - data:data, - options:option - }); - - } - - //fim 4 avaliações - - //inicio 3 avaliações - if(qntAvaliacoes == 3){ - - var data = { - - labels: ["0","1", "2", "3"], - datasets: [ - { - label: "Avaliações", - fill: false, - lineTension: 0.1, - backgroundColor: "rgba(75,192,192,0.4)", - borderColor: "rgba(75,192,192,1)", - borderCapStyle: 'butt', - borderDash: [], - borderDashOffset: 0.0, - borderJoinStyle: 'miter', - pointBorderColor: "rgba(75,192,192,1)", - pointBackgroundColor: "#fff", - pointBorderWidth: 1, - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(75,192,192,1)", - pointHoverBorderColor: "rgba(220,220,220,1)", - pointHoverBorderWidth: 2, - pointRadius: 5, - pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text()], - - - } - ] - }; - - var option = { - showLines: true - }; - var myLineChart = Chart.Line(canvas,{ - data:data, - options:option - }); - } - - //Fim 3 avaliações - - //inicio 4 avaliações - if(qntAvaliacoes == 2){ - - var data = { - - labels: ["0","1", "2"], - datasets: [ - { - label: "Avaliações", - fill: false, - lineTension: 0.1, - backgroundColor: "rgba(75,192,192,0.4)", - borderColor: "rgba(75,192,192,1)", - borderCapStyle: 'butt', - borderDash: [], - borderDashOffset: 0.0, - borderJoinStyle: 'miter', - pointBorderColor: "rgba(75,192,192,1)", - pointBackgroundColor: "#fff", - pointBorderWidth: 1, - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(75,192,192,1)", - pointHoverBorderColor: "rgba(220,220,220,1)", - pointHoverBorderWidth: 2, - pointRadius: 5, - pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text()], - - - } - ] - }; - - var option = { - showLines: true - }; - var myLineChart = Chart.Line(canvas,{ - data:data, - options:option - }); - - } - - //fim 2 avaliações - - //inicio 4 avaliações - if(qntAvaliacoes == 1){ - - var data = { - - labels: ["0","1"], - datasets: [ - { - label: "Avaliações", - fill: false, - lineTension: 0.1, - backgroundColor: "rgba(75,192,192,0.4)", - borderColor: "rgba(75,192,192,1)", - borderCapStyle: 'butt', - borderDash: [], - borderDashOffset: 0.0, - borderJoinStyle: 'miter', - pointBorderColor: "rgba(75,192,192,1)", - pointBackgroundColor: "#fff", - pointBorderWidth: 1, - pointHoverRadius: 5, - pointHoverBackgroundColor: "rgba(75,192,192,1)", - pointHoverBorderColor: "rgba(220,220,220,1)", - pointHoverBorderWidth: 2, - pointRadius: 5, - pointHitRadius: 10, - data: [0,$("#nota1").text()], - - - } - ] - }; - - var option = { - showLines: true - }; - var myLineChart = Chart.Line(canvas,{ - data:data, - options:option - }); - - } - - //fim 1 avaliações - - -}); \ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartAvaliacao.js b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartAvaliacao.js new file mode 100644 index 0000000..07ab6bc --- /dev/null +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartAvaliacao.js @@ -0,0 +1,187 @@ +$(document).ready(function() { + var qntAvaliacoes = $("#qntAvaliacoes").text(); + + var canvas = document.getElementById('myChartAvaliacao'); + + //inicio 4 avaliações + if(qntAvaliacoes == 4){ + + var data = { + + labels: ["0","1", "2", "3", "4"], + datasets: [ + { + label: "Avaliações", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "#fff", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 5, + pointHitRadius: 10, + data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text(),$("#nota4").text()], + + + } + ] + }; + + var option = { + + showLines: true + }; + var myLineChart = Chart.Line(canvas,{ + data:data, + options:option + }); + + } + + //fim 4 avaliações + + //inicio 3 avaliações + if(qntAvaliacoes == 3){ + + var data = { + + labels: ["0","1", "2", "3"], + datasets: [ + { + label: "Avaliações", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "#fff", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 5, + pointHitRadius: 10, + data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text()], + + + } + ] + }; + + var option = { + showLines: true + }; + var myLineChart = Chart.Line(canvas,{ + data:data, + options:option + }); + } + + //Fim 3 avaliações + + //inicio 4 avaliações + if(qntAvaliacoes == 2){ + + var data = { + + labels: ["0","1", "2"], + datasets: [ + { + label: "Avaliações", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "#fff", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 5, + pointHitRadius: 10, + data: [0,$("#nota1").text(), $("#nota2").text()], + + + } + ] + }; + + var option = { + showLines: true + }; + var myLineChart = Chart.Line(canvas,{ + data:data, + options:option + }); + + } + + //fim 2 avaliações + + //inicio 4 avaliações + if(qntAvaliacoes == 1){ + + var data = { + + labels: ["0","1"], + datasets: [ + { + label: "Avaliações", + fill: false, + lineTension: 0.1, + backgroundColor: "rgba(75,192,192,0.4)", + borderColor: "rgba(75,192,192,1)", + borderCapStyle: 'butt', + borderDash: [], + borderDashOffset: 0.0, + borderJoinStyle: 'miter', + pointBorderColor: "rgba(75,192,192,1)", + pointBackgroundColor: "#fff", + pointBorderWidth: 1, + pointHoverRadius: 5, + pointHoverBackgroundColor: "rgba(75,192,192,1)", + pointHoverBorderColor: "rgba(220,220,220,1)", + pointHoverBorderWidth: 2, + pointRadius: 5, + pointHitRadius: 10, + data: [0,$("#nota1").text()], + + + } + ] + }; + + var option = { + showLines: true + }; + var myLineChart = Chart.Line(canvas,{ + data:data, + options:option + }); + + } + + //fim 1 avaliações + + +}); \ No newline at end of file diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartMediaAvaliacao.js b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartMediaAvaliacao.js index 54041f3..091729b 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartMediaAvaliacao.js +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartMediaAvaliacao.js @@ -1,7 +1,7 @@ $(document).ready(function() { var qntAvaliacoes = $("#qntAvaliacoes").text(); - var canvas = document.getElementById('myChart'); + var canvas = document.getElementById('myChartMediaAvaliacao'); //inicio 4 avaliações if(qntAvaliacoes == 4){ @@ -11,7 +11,7 @@ $(document).ready(function() { labels: ["0",$("#data1").text(), $("#data2").text(), $("#data3").text(), $("#data4").text()], datasets: [ { - label: "Avaliações", + label: 'Médias', fill: false, lineTension: 0.1, backgroundColor: "rgba(75,192,192,0.4)", @@ -29,7 +29,7 @@ $(document).ready(function() { pointHoverBorderWidth: 2, pointRadius: 5, pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text(),$("#nota4").text()], + data: [0, $("#media1").text(), $("#media2").text(),$("#media3").text(),$("#media4").text()], } @@ -57,7 +57,7 @@ $(document).ready(function() { labels: ["0",$("#data1").text(), $("#data2").text(), $("#data3").text()], datasets: [ { - label: "Avaliações", + label: 'Médias', fill: false, lineTension: 0.1, backgroundColor: "rgba(75,192,192,0.4)", @@ -75,7 +75,7 @@ $(document).ready(function() { pointHoverBorderWidth: 2, pointRadius: 5, pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text(),$("#nota3").text()], + data: [0,$("#media1").text(), $("#media2").text(),$("#media3").text()], } @@ -101,7 +101,7 @@ $(document).ready(function() { labels: ["0",$("#data1").text(), $("#data2").text()], datasets: [ { - label: "Avaliações", + label: 'Médias', fill: false, lineTension: 0.1, backgroundColor: "rgba(75,192,192,0.4)", @@ -119,7 +119,7 @@ $(document).ready(function() { pointHoverBorderWidth: 2, pointRadius: 5, pointHitRadius: 10, - data: [0,$("#nota1").text(), $("#nota2").text()], + data: [0,$("#media1").text(), $("#media2").text()], } @@ -146,7 +146,7 @@ $(document).ready(function() { labels: ["0",$("#data1").text()], datasets: [ { - label: "Avaliações", + label: 'Médias', fill: false, lineTension: 0.1, backgroundColor: "rgba(75,192,192,0.4)", @@ -164,7 +164,7 @@ $(document).ready(function() { pointHoverBorderWidth: 2, pointRadius: 5, pointHitRadius: 10, - data: [0,$("#nota1").text()], + data: [0,$("#media1").text()], } diff --git a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartPainelAgregado.js b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartPainelAgregado.js index 25107d8..9c4640f 100644 --- a/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartPainelAgregado.js +++ b/Desenvolvimento/Codificacao/e-Selo/WebContent/static/js/chartPainelAgregado.js @@ -1,7 +1,7 @@ $(document).ready(function() { var qntAvaliacoes = $("#qntAvaliacoes").text(); - var canvas = document.getElementById('myChart'); + var canvas = document.getElementById('myChartPainelAgregado'); var data = { diff --git a/Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/AvaliacaoController.java b/Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/AvaliacaoController.java index fc1a492..658674a 100644 --- a/Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/AvaliacaoController.java +++ b/Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/AvaliacaoController.java @@ -62,6 +62,7 @@ import br.com.eselo.component.WebChecker; import br.com.eselo.dao.AvaliacaoDAO; import br.com.eselo.dao.CriterioDAO; import br.com.eselo.dao.ErrosMaisComunsDAO; +import br.com.eselo.dao.OrgaoDao; import br.com.eselo.dao.ParametroCalculoDAO; import br.com.eselo.dao.RecomendacaoDAO; import br.com.eselo.dao.ResultadoCriterioDao; @@ -75,6 +76,7 @@ import br.com.eselo.integracao.ResultadoAvaliacao; import br.com.eselo.model.Avaliacao; import br.com.eselo.model.Criterio; import br.com.eselo.model.ErrosMaisComuns; +import br.com.eselo.model.Orgao; import br.com.eselo.model.ParametroCalculo; import br.com.eselo.model.Recomendacao; import br.com.eselo.model.ResultadoCriterio; @@ -96,6 +98,7 @@ public class AvaliacaoController { private final ParametroCalculoDAO paramDao; private final AvaliacaoDAO dao; private final SitioDAO daoSitio; + private final OrgaoDao daoOrgao; private final ResultadoRecomendacaoDao daoResultadoRecomendacao; private final HttpServletRequest request; private ServletContext application; @@ -120,13 +123,14 @@ public class AvaliacaoController { ResultadoRecomendacaoDao _daoResultadoRecomendacao, ResultadoCriterioDao _daoResultadoCriterio, CriterioDAO _daoCriterio, RecomendacaoDAO _daoRecomendacao, - SitioDAO _daoSitio)// gibran + SitioDAO _daoSitio, OrgaoDao _daoOrgao)// gibran // ResultadoCriterioDao // _resultadoCriterioDao throws IOException { daoUrl = _daoUrl; dao = _dao; daoSitio = _daoSitio; + daoOrgao = _daoOrgao; daoResultadoRecomendacao = _daoResultadoRecomendacao; result = _result; paramDao = _paramDao; @@ -689,9 +693,9 @@ public class AvaliacaoController { //para teste local - File diretorioJson = new File(this.application.getRealPath("") + "/WEB-INF/arquivosJson"); diretorioJson.mkdir(); + //File diretorioJson = new File(this.application.getRealPath("") + "/WEB-INF/arquivosJson"); diretorioJson.mkdir(); - //File diretorioJson = new File( properties.getProperty(SALVAR_ARQUIVOS_JSON)); + File diretorioJson = new File( properties.getProperty(SALVAR_ARQUIVOS_JSON)); @@ -740,9 +744,9 @@ public class AvaliacaoController { Recomendacao recomendacao; //para teste local - File diretorioHtml = new File(this.application.getRealPath("") + "/WEB-INF/arquivosHtml"); diretorioHtml.mkdir(); + //File diretorioHtml = new File(this.application.getRealPath("") + "/WEB-INF/arquivosHtml"); diretorioHtml.mkdir(); - //File diretorioHtml = new File(properties.getProperty(SALVAR_ARQUIVOS_HTML)); + File diretorioHtml = new File(properties.getProperty(SALVAR_ARQUIVOS_HTML)); String nomeArquivo; StringBuffer html = new StringBuffer(); @@ -772,7 +776,7 @@ public class AvaliacaoController { - bufferOut.write("\n"); + /*bufferOut.write("\n"); bufferOut.write("\n"); bufferOut.write("\n"); bufferOut @@ -835,7 +839,7 @@ public class AvaliacaoController { bufferOut.write("
\n"); bufferOut - .write("Início do conteúdo\n"); + .write("Início do conteúdo\n");*/ bufferOut.write("
\n"); @@ -871,25 +875,7 @@ public class AvaliacaoController { bufferOut.write("
"); bufferOut.write("

"); - - //bufferOut.write(" "); - /*bufferOut.write("
"); - - - bufferOut.write("
"); - bufferOut.write("
"); - bufferOut.write("
Porcentagem"); - bufferOut.write(" ASES"); - bufferOut.write(" " + notaAvaliacao +"%"); - bufferOut.write("
"); - bufferOut.write("
"); - - bufferOut.write("
"); - - - - bufferOut.write("
");*/ - + bufferOut.write("
"); @@ -925,16 +911,16 @@ public class AvaliacaoController { Long idSitio = avaliacao.getUrl().getIdSitio(); - Sitio sitio = daoSitio.getSitioById(idSitio); - - String nomeOrgao = (sitio != null) ? sitio.getDominio().getOrgao() - .getNomeOrgao() : ""; + //Sitio sitio = daoSitio.getSitioById(idSitio); + Orgao orgao = daoOrgao.buscarOrgaoPorSitio(idSitio); + + String nomeOrgao = (orgao != null) ? orgao.getNomeOrgao() : ""; bufferOut.write(""); bufferOut.write(""); bufferOut.write("
"); - bufferOut.write(" "); + bufferOut.write(" "); bufferOut.write("
"); bufferOut.write("
"); bufferOut.write(" "); @@ -945,7 +931,7 @@ public class AvaliacaoController { String dataFormatada = avaliacao.getDataAvaliacao().toString(); bufferOut - .write("