Commit 05b7ea3f80da654a2cd840f33f299e0141b3868f
1 parent
d64fe9b3
Exists in
master
Relatorio de exportação
git-svn-id: https://svn.bento.ifrs.edu.br/default/ASES/e-selo@9956 c2178572-b5ca-4887-91d2-9e3a90c7d55b
Showing
3 changed files
with
39 additions
and
1 deletions
Show diff stats
Desenvolvimento/Codificacao/e-Selo/src/main/java/br/com/eselo/controller/ParametroCalculoController.java
| @@ -40,6 +40,7 @@ import br.com.eselo.dao.RecomendacaoDAO; | @@ -40,6 +40,7 @@ import br.com.eselo.dao.RecomendacaoDAO; | ||
| 40 | import br.com.eselo.dao.UsuarioDAO; | 40 | import br.com.eselo.dao.UsuarioDAO; |
| 41 | import br.com.eselo.integracao.CriterioAvaliado; | 41 | import br.com.eselo.integracao.CriterioAvaliado; |
| 42 | import br.com.eselo.model.Criterio; | 42 | import br.com.eselo.model.Criterio; |
| 43 | +import br.com.eselo.model.Faixa; | ||
| 43 | import br.com.eselo.model.ParametroCalculo; | 44 | import br.com.eselo.model.ParametroCalculo; |
| 44 | import br.com.eselo.model.Recomendacao; | 45 | import br.com.eselo.model.Recomendacao; |
| 45 | import br.com.eselo.model.Usuario; | 46 | import br.com.eselo.model.Usuario; |
| @@ -348,6 +349,12 @@ public class ParametroCalculoController { | @@ -348,6 +349,12 @@ public class ParametroCalculoController { | ||
| 348 | return parametroCalculo; | 349 | return parametroCalculo; |
| 349 | } | 350 | } |
| 350 | 351 | ||
| 352 | + @Get("/parametroAtivo") | ||
| 353 | + public File exportarAtivo(){ | ||
| 354 | + Long id = dao.getLastParametrosCalculoAtivo().getId(); | ||
| 355 | + return exportar(id); | ||
| 356 | + } | ||
| 357 | + | ||
| 351 | @Get("/parametrosCalculo/exportar/{id}/*") | 358 | @Get("/parametrosCalculo/exportar/{id}/*") |
| 352 | @Restrito(descricao = "PARAMETRO_CALCULO_LISTA") | 359 | @Restrito(descricao = "PARAMETRO_CALCULO_LISTA") |
| 353 | public File exportar(Long id) { | 360 | public File exportar(Long id) { |
| @@ -417,6 +424,37 @@ public class ParametroCalculoController { | @@ -417,6 +424,37 @@ public class ParametroCalculoController { | ||
| 417 | row.createCell(1).setCellValue(criterio.getNumeroCriterio()); | 424 | row.createCell(1).setCellValue(criterio.getNumeroCriterio()); |
| 418 | row.createCell(2).setCellValue(criterio.getPeso()); | 425 | row.createCell(2).setCellValue(criterio.getPeso()); |
| 419 | row.createCell(3).setCellValue(criterio.getDescricao()); | 426 | row.createCell(3).setCellValue(criterio.getDescricao()); |
| 427 | + | ||
| 428 | + if(criterio.getTipoTeste().getId().intValue()==3){ | ||
| 429 | + rows++; | ||
| 430 | + row = sheet.createRow(rows); | ||
| 431 | + cell = row.createCell(1); | ||
| 432 | + cell.setCellValue("Faixa"); | ||
| 433 | + cell.setCellStyle(styles.get("label")); | ||
| 434 | + cell = row.createCell(2); | ||
| 435 | + cell.setCellValue("Descrição"); | ||
| 436 | + cell.setCellStyle(styles.get("label")); | ||
| 437 | + cell = row.createCell(3); | ||
| 438 | + cell.setCellValue("Início"); | ||
| 439 | + cell.setCellStyle(styles.get("label")); | ||
| 440 | + cell = row.createCell(4); | ||
| 441 | + cell.setCellValue("Fim"); | ||
| 442 | + cell.setCellStyle(styles.get("label")); | ||
| 443 | + cell = row.createCell(5); | ||
| 444 | + cell.setCellValue("%"); | ||
| 445 | + cell.setCellStyle(styles.get("label")); | ||
| 446 | + | ||
| 447 | + for(Faixa faixa:criterio.getFaixas()){ | ||
| 448 | + row = sheet.createRow(rows); | ||
| 449 | + row.createCell(1).setCellValue(faixa.getFaixa()); | ||
| 450 | + row.createCell(2).setCellValue(faixa.getDescricao()); | ||
| 451 | + row.createCell(3).setCellValue(faixa.getFaixaInicio()); | ||
| 452 | + row.createCell(4).setCellValue(faixa.getFaixaFim()); | ||
| 453 | + row.createCell(5).setCellValue(faixa.getPercentualConformidade()); | ||
| 454 | + | ||
| 455 | + } | ||
| 456 | + } | ||
| 457 | + | ||
| 420 | rows++; | 458 | rows++; |
| 421 | } | 459 | } |
| 422 | 460 |
Desenvolvimento/Codificacao/e-Selo/target/classes/br/com/eselo/controller/ParametroCalculoController.class
No preview for this file type
Desenvolvimento/Codificacao/e-Selo/target/m2e-wtp/web-resources/META-INF/maven/eselo/eselo/pom.properties
| 1 | #Generated by Maven Integration for Eclipse | 1 | #Generated by Maven Integration for Eclipse |
| 2 | -#Sat Nov 01 14:28:27 GMT-03:00 2014 | 2 | +#Thu Nov 13 06:20:53 GMT-03:00 2014 |
| 3 | version=0.0.1-SNAPSHOT | 3 | version=0.0.1-SNAPSHOT |
| 4 | groupId=eselo | 4 | groupId=eselo |
| 5 | m2e.projectName=e-Selo | 5 | m2e.projectName=e-Selo |