Rev 627 | Rev 630 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 627 | Rev 629 | ||
|---|---|---|---|
| Line 15... | Line 15... | ||
| 15 | import br.com.ec.domain.dto.ClienteDTO; |
15 | import br.com.ec.domain.dto.ClienteDTO; |
| 16 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
16 | import br.com.ec.domain.dto.ComercialPosVendaDTO; |
| 17 | import br.com.ec.domain.dto.PosVendaDTO; |
17 | import br.com.ec.domain.dto.PosVendaDTO; |
| 18 | import br.com.ec.domain.dto.VendaDTO; |
18 | import br.com.ec.domain.dto.VendaDTO; |
| 19 | import br.com.ec.domain.model.PosVenda; |
19 | import br.com.ec.domain.model.PosVenda; |
| - | 20 | import br.com.ec.domain.model.tipos.TipoNpsPosVenda; |
|
| 20 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
21 | import br.com.ec.domain.model.tipos.TipoPeriodoConsulta; |
| 21 | import br.com.ec.domain.service.LancamentoService; |
22 | import br.com.ec.domain.service.LancamentoService; |
| - | 23 | import br.com.ec.domain.service.NpsPosVendaService; |
|
| 22 | import br.com.ec.domain.service.PosVendaService; |
24 | import br.com.ec.domain.service.PosVendaService; |
| 23 | import br.com.ec.domain.service.TransferenciaService; |
25 | import br.com.ec.domain.service.TransferenciaService; |
| 24 | import br.com.ec.web.exception.VerificadorLancamentoException; |
26 | import br.com.ec.web.exception.VerificadorLancamentoException; |
| 25 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
27 | import br.com.ec.web.exception.VerificadorLancamentoException.CommandBean; |
| 26 | import br.com.ec.web.generic.AbstractBean; |
28 | import br.com.ec.web.generic.AbstractBean; |
| Line 31... | Line 33... | ||
| 31 | public class PosVendaBean extends AbstractBean<ComercialPosVendaDTO> implements Serializable { |
33 | public class PosVendaBean extends AbstractBean<ComercialPosVendaDTO> implements Serializable { |
| 32 | 34 | ||
| 33 | private static final long serialVersionUID = 1L; |
35 | private static final long serialVersionUID = 1L; |
| 34 | 36 | ||
| 35 | private PosVendaService posVendaService; |
37 | private PosVendaService posVendaService; |
| - | 38 | private NpsPosVendaService npsPosVendaService; |
|
| 36 | private LancamentoService lancamentoService; |
39 | private LancamentoService lancamentoService; |
| 37 | 40 | ||
| 38 | private PosVendaDTO posVendaSelecionado; |
41 | private PosVendaDTO posVendaSelecionado; |
| 39 | 42 | ||
| 40 | public static class NpsItem { |
43 | public static class NpsItem { |
| Line 52... | Line 55... | ||
| 52 | public String getIcone() { return icone; } |
55 | public String getIcone() { return icone; } |
| 53 | public String getEstrelas() { return estrelas; } |
56 | public String getEstrelas() { return estrelas; } |
| 54 | }
|
57 | }
|
| 55 | 58 | ||
| 56 | @Inject |
59 | @Inject |
| 57 | public PosVendaBean(PosVendaService posVendaService, LancamentoService lancamentoService) { |
- | |
| - | 60 | public PosVendaBean(PosVendaService posVendaService, NpsPosVendaService npsPosVendaService, LancamentoService lancamentoService) { |
|
| 58 | this.posVendaService = posVendaService; |
61 | this.posVendaService = posVendaService; |
| 59 | this.lancamentoService = lancamentoService; |
62 | this.lancamentoService = lancamentoService; |
| - | 63 | this.npsPosVendaService = npsPosVendaService; |
|
| 60 | }
|
64 | }
|
| 61 | 65 | ||
| 62 | @Override |
66 | @Override |
| 63 | public GenericService<ComercialPosVendaDTO> getService() { |
67 | public GenericService<ComercialPosVendaDTO> getService() { |
| 64 | return null; |
68 | return null; |
| Line 111... | Line 115... | ||
| 111 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
115 | new VerificadorLancamentoException().tratarIhRelancarExcecaoSemLimparEntidade(new CommandBean() { |
| 112 | public void execute() { |
116 | public void execute() { |
| 113 | // CONSULTAR DETALHES BASEANDO-SE NO TIPO DE ATIVACAO
|
117 | // CONSULTAR DETALHES BASEANDO-SE NO TIPO DE ATIVACAO
|
| 114 | posVenda.getVendaDTO().setListaLancamentos(lancamentoService.consultarLancamentosDaVenda(posVenda.getVendaDTO().getSequencial())); |
118 | posVenda.getVendaDTO().setListaLancamentos(lancamentoService.consultarLancamentosDaVenda(posVenda.getVendaDTO().getSequencial())); |
| 115 | // CONSULTAR NPS PÓS-VENDA
|
119 | // CONSULTAR NPS PÓS-VENDA
|
| - | 120 | posVenda.setNpsPosVendaAtendimento(npsPosVendaService.consultarPorPosVendaEeTipo(posVenda.getSequencial(), TipoNpsPosVenda.ATENDIMENTO_A.getValor())); |
|
| 116 | setPosVendaSelecionado(posVenda); |
121 | setPosVendaSelecionado(posVenda); |
| 117 | }
|
122 | }
|
| 118 | }); |
123 | }); |
| 119 | }
|
124 | }
|
| 120 | 125 | ||