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 | 40 | import br.com.eselo.dao.UsuarioDAO; |
| 41 | 41 | import br.com.eselo.integracao.CriterioAvaliado; |
| 42 | 42 | import br.com.eselo.model.Criterio; |
| 43 | +import br.com.eselo.model.Faixa; | |
| 43 | 44 | import br.com.eselo.model.ParametroCalculo; |
| 44 | 45 | import br.com.eselo.model.Recomendacao; |
| 45 | 46 | import br.com.eselo.model.Usuario; |
| ... | ... | @@ -348,6 +349,12 @@ public class ParametroCalculoController { |
| 348 | 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 | 358 | @Get("/parametrosCalculo/exportar/{id}/*") |
| 352 | 359 | @Restrito(descricao = "PARAMETRO_CALCULO_LISTA") |
| 353 | 360 | public File exportar(Long id) { |
| ... | ... | @@ -417,6 +424,37 @@ public class ParametroCalculoController { |
| 417 | 424 | row.createCell(1).setCellValue(criterio.getNumeroCriterio()); |
| 418 | 425 | row.createCell(2).setCellValue(criterio.getPeso()); |
| 419 | 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 | 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