Skip to content
Permalink
Browse files

Novidades do Relatório de Tickets

  • Loading branch information...
andrefaria committed May 10, 2012
1 parent 0172e64 commit 291b300fb5129542f34fe597f24a4a3a73f987d7
Showing with 146 additions and 83 deletions.
  1. +1 −1 .classpath
  2. +1 −0 .settings/org.eclipse.wst.common.component
  3. +25 −2 pom.xml
  4. +10 −0 src/main/groovy/br/com/bluesoft/pronto/SpringConfig.groovy
  5. +4 −3 src/main/groovy/br/com/bluesoft/pronto/controller/BancoDeDadosController.groovy
  6. +4 −3 src/main/groovy/br/com/bluesoft/pronto/controller/BurndownController.groovy
  7. +8 −5 src/main/groovy/br/com/bluesoft/pronto/controller/CategoriaController.groovy
  8. +7 −5 src/main/groovy/br/com/bluesoft/pronto/controller/CausaDeDefeitoController.groovy
  9. +8 −7 src/main/groovy/br/com/bluesoft/pronto/controller/ChecklistController.groovy
  10. +5 −4 src/main/groovy/br/com/bluesoft/pronto/controller/ClienteController.groovy
  11. +3 −2 src/main/groovy/br/com/bluesoft/pronto/controller/ConfiguracoesController.groovy
  12. +2 −20 src/main/groovy/br/com/bluesoft/pronto/controller/DashboardController.groovy
  13. +9 −8 src/main/groovy/br/com/bluesoft/pronto/controller/ExecucaoController.groovy
  14. +13 −12 src/main/groovy/br/com/bluesoft/pronto/controller/ProjetoController.groovy
  15. +4 −0 src/main/groovy/br/com/bluesoft/pronto/controller/RelatorioDeTicketsController.groovy
  16. +6 −4 src/main/groovy/br/com/bluesoft/pronto/controller/TicketController.groovy
  17. +26 −3 src/main/groovy/br/com/bluesoft/pronto/dao/RelatorioDeTicketsDao.groovy
  18. +4 −2 src/main/groovy/br/com/bluesoft/pronto/service/MovimentadorDeTicket.groovy
  19. +1 −0 src/main/webapp/WEB-INF/spring-servlet.xml
  20. +5 −2 src/main/webapp/relatorios/quantidades/index.jsp
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/test-classes" path="src/test/groovy"/>
<classpathentry kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/groovy"/>
<classpathentry kind="src" path="src/main/groovy"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
@@ -4,6 +4,7 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/groovy"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/groovy"/>
<property name="context-root" value="pronto-agile"/>
<property name="java-output-path"/>
</wb-module>
27 pom.xml
@@ -4,10 +4,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pronto-agile</groupId>
<artifactId>pronto-agile</artifactId>
<packaging>war</packaging>
<name>Pronto!</name>
<version>0.0.2</version>
<url>http://pronto.bluesoft.com.br</url>
<packaging>war</packaging>

<build>
<directory>${directory}</directory>
@@ -96,6 +96,20 @@
<version>${spring.version}</version>
</dependency>

<!--
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<version>${springsocial-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<version>${springsocial-version}</version>
</dependency>
-->

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
@@ -326,6 +340,13 @@
<version>4.0.2.GA</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

</dependencies>


@@ -341,7 +362,7 @@
<javamail.version>1.4.3</javamail.version>
<mockito.version>1.8.5</mockito.version>
<jsp.version>2.0</jsp.version>
<junit.version>4.7</junit.version>
<junit.version>4.10</junit.version>
<jsonlib.version>2.3</jsonlib.version>
<groovy-xmlrpc.version>0.7</groovy-xmlrpc.version>
<sitemesh.version>2.2.1</sitemesh.version>
@@ -350,6 +371,7 @@
<smackx.version>3.1.0</smackx.version>
<spock.version>0.5-groovy-1.7</spock.version>
<spring.version>3.0.5.RELEASE</spring.version>
<springsocial-version>1.0.0.RELEASE</springsocial-version>
<servlet.version>2.5</servlet.version>
<http-builder.version>0.5.0-RC2</http-builder.version>
<jetty.plugin.version>6.1.26</jetty.plugin.version>
@@ -359,6 +381,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<repositories>
<repository>
<id>info-bliki-repository</id>
@@ -0,0 +1,10 @@
package br.com.bluesoft.pronto

import org.springframework.beans.factory.annotation.Configurable;


@Configurable
public class SpringConfig {


}
@@ -26,6 +26,7 @@ import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod;

import br.com.bluesoft.pronto.SegurancaException
import br.com.bluesoft.pronto.core.Papel
@@ -42,7 +43,7 @@ class BancoDeDadosController {

@Autowired private BancoDeDadosDao bancoDeDadosDao

@RequestMapping(method = GET)
@RequestMapping(method = RequestMethod.GET, value="/listar")
String listar(Model model) {
Seguranca.validarPermissao Papel.EQUIPE
model.addAttribute("bancos", bancoDeDadosDao.listar())
@@ -63,14 +64,14 @@ class BancoDeDadosController {
VIEW_EDITAR
}

@RequestMapping(method=[PUT, POST])
@RequestMapping(method=[RequestMethod.PUT, RequestMethod.POST], value="/salvar")
String salvar(Model model, BancoDeDados bancoDeDados) {
Seguranca.validarPermissao Papel.EQUIPE
bancoDeDadosDao.salvar bancoDeDados
"redirect:/bancosDeDados"
}

@RequestMapping(value="/{bancoDeDadosKey}", method = DELETE)
@RequestMapping(value="/{bancoDeDadosKey}", method = RequestMethod.DELETE)
String excluir(Model model, @PathVariable int bancoDeDadosKey) {
Seguranca.validarPermissao Papel.EQUIPE
bancoDeDadosDao.excluir bancoDeDadosDao.obter(bancoDeDadosKey)
@@ -34,6 +34,7 @@ import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.ResponseBody;

import br.com.bluesoft.pronto.SegurancaException
@@ -51,12 +52,12 @@ class BurndownController {
@Autowired
SprintDao sprintDao

@RequestMapping(value='/{sprintKey}', method=GET)
@RequestMapping(value='/{sprintKey}', method=RequestMethod.GET)
String burndownDoSprint(final Model model, @PathVariable int sprintKey, Boolean considerarFimDeSemana) throws SegurancaException {
return burndown(model, sprintKey, considerarFimDeSemana)
}

@RequestMapping(method=GET)
@RequestMapping(method=RequestMethod.GET)
String burndown(final Model model, final Integer sprintKey, Boolean considerarFimDeSemana) throws SegurancaException {

Seguranca.validarPermissao(Papel.EQUIPE, Papel.PRODUCT_OWNER, Papel.SCRUM_MASTER)
@@ -86,7 +87,7 @@ class BurndownController {

}

@RequestMapping(value='/data/{sprintKey}',method=GET)
@RequestMapping(value='/data/{sprintKey}',method=RequestMethod.GET)
@ResponseBody String data(final HttpServletResponse response, @PathVariable Integer sprintKey, Boolean considerarFimDeSemana) throws Exception {

considerarFimDeSemana = considerarFimDeSemana == null ? false : considerarFimDeSemana
@@ -10,6 +10,9 @@ import org.springframework.ui.Model;
import br.com.bluesoft.pronto.service.Seguranca;
import br.com.bluesoft.pronto.model.Categoria;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import br.com.bluesoft.pronto.dao.CategoriaDao;
import org.springframework.web.bind.annotation.RequestMapping;
import static org.springframework.web.bind.annotation.RequestMethod.*;
@@ -20,7 +23,7 @@ class CategoriaController {

@Autowired private CategoriaDao categoriaDao

@RequestMapping(value='/{categoriaKey}', method=DELETE)
@RequestMapping(value='/{categoriaKey}', method=RequestMethod.DELETE)
String excluir(Model model, @PathVariable int categoriaKey) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
try {
@@ -31,29 +34,29 @@ class CategoriaController {
}
}

@RequestMapping(method=GET)
@RequestMapping(method=RequestMethod.GET)
String index(Model model) {
model.addAttribute 'categorias', categoriaDao.listar()
"/categorias/categorias.listar.jsp"
}

@RequestMapping(value='/novo', method=GET)
@RequestMapping(value='/novo', method=RequestMethod.GET)
String novo(Model model) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
model.addAttribute 'categoria', new Categoria()
model.addAttribute 'cores', Cor.values()
"/categorias/categorias.editar.jsp"
}

@RequestMapping(value='/{categoriaKey}', method=GET)
@RequestMapping(value='/{categoriaKey}', method=RequestMethod.GET)
String editar(Model model, @PathVariable int categoriaKey) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
model.addAttribute 'categoria', categoriaDao.obter(categoriaKey)
model.addAttribute 'cores', Cor.values()
"/categorias/categorias.editar.jsp"
}

@RequestMapping(method=POST)
@RequestMapping(method=RequestMethod.POST)
String salvar(Model model, Categoria categoria) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
def tx = categoriaDao.getSession().beginTransaction()
@@ -10,6 +10,8 @@ import org.springframework.ui.Model;
import br.com.bluesoft.pronto.service.Seguranca;
import br.com.bluesoft.pronto.model.CausaDeDefeito;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.ResponseBody;
import br.com.bluesoft.pronto.dao.CausaDeDefeitoDao;
import br.com.bluesoft.pronto.dao.CausaDeDefeitoDao;

@@ -22,7 +24,7 @@ class CausaDeDefeitoController {

@Autowired private CausaDeDefeitoDao causaDeDefeitoDao

@RequestMapping(value='/{causaDeDefeitoKey}', method=DELETE)
@RequestMapping(value='/{causaDeDefeitoKey}', method=RequestMethod.DELETE)
String excluir(Model model, @PathVariable int causaDeDefeitoKey) {
Seguranca.validarPermissao Papel.EQUIPE
try {
@@ -33,29 +35,29 @@ class CausaDeDefeitoController {
}
}

@RequestMapping(method=GET)
@RequestMapping(method=RequestMethod.GET)
String index(Model model) {
model.addAttribute 'causasDeDefeito', causaDeDefeitoDao.listar()
"/causasDeDefeito/causasDeDefeito.listar.jsp"
}

@RequestMapping(value='/novo', method=GET)
@RequestMapping(value='/novo', method=RequestMethod.GET)
String novo(Model model) {
Seguranca.validarPermissao Papel.EQUIPE
model.addAttribute 'causaDeDefeito', new CausaDeDefeito()
model.addAttribute 'cores', Cor.values()
"/causasDeDefeito/causasDeDefeito.editar.jsp"
}

@RequestMapping(value='/{causaDeDefeitoKey}', method=GET)
@RequestMapping(value='/{causaDeDefeitoKey}', method=RequestMethod.GET)
String editar(Model model, @PathVariable int causaDeDefeitoKey) {
Seguranca.validarPermissao Papel.EQUIPE
model.addAttribute 'causaDeDefeito', causaDeDefeitoDao.obter(causaDeDefeitoKey)
model.addAttribute 'cores', Cor.values()
"/causasDeDefeito/causasDeDefeito.editar.jsp"
}

@RequestMapping(method=POST)
@RequestMapping(method=RequestMethod.POST)
String salvar(Model model, CausaDeDefeito causaDeDefeito) {
Seguranca.validarPermissao Papel.EQUIPE
def tx = causaDeDefeitoDao.getSession().beginTransaction()
@@ -5,6 +5,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import br.com.bluesoft.pronto.core.Papel;
@@ -21,34 +22,34 @@ class ChecklistController {

@Autowired private ChecklistService checklistService

@RequestMapping(value='/{checklistKey}', method=DELETE)
@RequestMapping(value='/{checklistKey}', method=RequestMethod.DELETE)
String excluir(Model model, @PathVariable int checklistKey) {
Seguranca.validarPermissao Papel.EQUIPE
checklistService.excluir(checklistKey)
"redirect:/checklists?message=Excluído com Sucesso"
}

@RequestMapping(method=GET)
@RequestMapping(method=RequestMethod.GET)
String index(Model model) {
model.addAttribute 'checklists', checklistService.listarModelos()
"/checklists/checklists.listar.jsp"
}

@RequestMapping(value='/novo', method=GET)
@RequestMapping(value='/novo', method=RequestMethod.GET)
String novo(Model model) {
Seguranca.validarPermissao Papel.EQUIPE
model.addAttribute 'checklist', new Checklist()
"/checklists/checklists.editar.jsp"
}

@RequestMapping(value='/{checklistKey}', method=GET)
@RequestMapping(value='/{checklistKey}', method=RequestMethod.GET)
String editar(Model model, @PathVariable int checklistKey) {
Seguranca.validarPermissao Papel.EQUIPE
model.addAttribute 'checklist', checklistService.obter(checklistKey)
"/checklists/checklists.editar.jsp"
}

@RequestMapping(method=POST)
@RequestMapping(method=RequestMethod.POST)
String salvar(Model model, Checklist checklist) {
Seguranca.validarPermissao Papel.EQUIPE
boolean novo = (checklist.checklistKey == null || checklist.checklistKey == 0)
@@ -63,7 +64,7 @@ class ChecklistController {
}

@ResponseBody
@RequestMapping(value="/modelos", method=GET)
@RequestMapping(value="/modelos", method=RequestMethod.GET)
def modelos() {
def modelos = checklistService.listarModelos().collect {
[nome:it.nome, checklistKey:it.checklistKey]
@@ -72,7 +73,7 @@ class ChecklistController {
}

@ResponseBody
@RequestMapping(value="/{checklistKey}/incluirItem", method=POST)
@RequestMapping(value="/{checklistKey}/incluirItem", method=RequestMethod.POST)
def incluirItemNoChecklist(@PathVariable int checklistKey, String descricao) {
checklistService.incluirItem(checklistKey, descricao).checklistItemKey
}
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod

import br.com.bluesoft.pronto.core.Papel
import br.com.bluesoft.pronto.dao.ClienteDao
@@ -46,28 +47,28 @@ public class ClienteController {

@Autowired private TicketDao ticketDao

@RequestMapping(method = GET)
@RequestMapping(method = RequestMethod.GET)
String listar(Model model) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
model.addAttribute "clientes", clienteDao.listar()
VIEW_LISTAR
}

@RequestMapping(value = "/novo", method = GET)
@RequestMapping(value = "/novo", method = RequestMethod.GET)
String novo(final Model model) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
model.addAttribute "cliente", new Cliente()
VIEW_EDITAR
}

@RequestMapping(value = "/{clienteKey}", method = GET)
@RequestMapping(value = "/{clienteKey}", method = RequestMethod.GET)
String editar(final Model model, @PathVariable final Integer clienteKey) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER
model.addAttribute "cliente", clienteDao.obter(clienteKey)
VIEW_EDITAR
}

@RequestMapping(value = "/{clienteKey}", method = DELETE)
@RequestMapping(value = "/{clienteKey}", method = RequestMethod.DELETE)
String excluir(final Model model, @PathVariable int clienteKey) {
Seguranca.validarPermissao Papel.PRODUCT_OWNER

0 comments on commit 291b300

Please sign in to comment.
You can’t perform that action at this time.