Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 229 | espaco | 1 | package br.com.ec.controller; |
| 2 | |||
| 3 | import java.io.Serializable; |
||
| 4 | |||
| 5 | import javax.annotation.PostConstruct; |
||
| 6 | import javax.inject.Inject; |
||
| 7 | |||
| 8 | import org.springframework.context.annotation.Scope; |
||
| 9 | import org.springframework.stereotype.Controller; |
||
| 10 | |||
| 11 | import br.com.ec.core.generic.GenericService; |
||
| 12 | import br.com.ec.domain.dto.TempoRealDTO; |
||
| 13 | import br.com.ec.domain.service.TempoRealService; |
||
| 14 | import br.com.ec.web.generic.AbstractBean; |
||
| 15 | |||
| 16 | @Controller |
||
| 17 | @Scope("view") |
||
| 18 | public class TempoRealBean extends AbstractBean<TempoRealDTO> implements Serializable { |
||
| 19 | |||
| 20 | private static final long serialVersionUID = 1L; |
||
| 21 | |||
| 22 | private TempoRealService tempoRealService; |
||
| 23 | |||
| 24 | @Inject |
||
| 25 | public TempoRealBean(TempoRealService tempoRealService) { |
||
| 26 | this.tempoRealService = tempoRealService; |
||
| 27 | } |
||
| 28 | |||
| 29 | @Override |
||
| 30 | public GenericService<TempoRealDTO> getService() { |
||
| 31 | return tempoRealService; |
||
| 32 | } |
||
| 33 | |||
| 34 | @Override |
||
| 35 | public TempoRealDTO getId() { |
||
| 36 | return null; |
||
| 37 | } |
||
| 38 | |||
| 39 | @Override |
||
| 40 | public void limparEntidade() { |
||
| 41 | setEntidade(new TempoRealDTO()); |
||
| 42 | } |
||
| 43 | |||
| 44 | @PostConstruct |
||
| 45 | private void iniciarConsolidacoes() { |
||
| 46 | setEntidade(tempoRealService.consultarTempoReal()); |
||
| 47 | // setAcompanhamentoDia(acompanhamentoService.consultarConsolidacaoDoDia()); |
||
| 48 | // getAcompanhamentoDia().setQuantidadePedidosEntrarEmContato(pedidoService.obterQuantidadePedidosPorSituacao(null, TipoSituacaoPedido.ENTRAR_EM_CONTATO.getValor())); |
||
| 49 | // getAcompanhamentoDia().setQuantidadePedidosNovos(pedidoService.obterQuantidadePedidosPorSituacao(null, TipoSituacaoPedido.NOVO.getValor())); |
||
| 50 | // preencherInformacoesPedidos(); |
||
| 51 | } |
||
| 52 | |||
| 53 | } |